@scalar/api-client 2.1.18 → 2.1.19
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 +29 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +5 -1
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +78 -75
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +8 -8
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +6 -6
- package/dist/components/CodeInput/CodeInput.vue.d.ts +6 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +57 -49
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +7 -7
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +22 -22
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +19 -3
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +27 -14
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +8 -8
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +39 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +7 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +88 -0
- package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue2.js +37 -26
- package/dist/components/SideNav/SideNavLink.vue.d.ts +2 -2
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +10 -11
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +24 -3
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +26 -22
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +4 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +35 -32
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue2.js +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +7 -7
- package/dist/components/ViewLayout/ViewLayoutContent.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +11 -11
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/hooks/useDarkModeState.d.ts +4 -3
- package/dist/hooks/useDarkModeState.d.ts.map +1 -1
- package/dist/hooks/useDarkModeState.js +36 -21
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +34 -38
- package/dist/layouts/App/create-api-client-app.d.ts +35 -32
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +6 -6
- package/dist/layouts/Modal/create-api-client-modal.d.ts +70 -64
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +35 -39
- package/dist/layouts/Web/create-api-client-web.d.ts +35 -32
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +35 -32
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.d.ts +1 -1
- package/dist/libs/importers/curl.d.ts +3 -0
- package/dist/libs/importers/curl.d.ts.map +1 -0
- package/dist/libs/importers/curl.js +61 -0
- package/dist/libs/importers/index.d.ts +2 -0
- package/dist/libs/importers/index.d.ts.map +1 -0
- package/dist/libs/importers/index.js +4 -0
- package/dist/libs/index.d.ts +1 -0
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +23 -21
- package/dist/libs/parse-curl.d.ts +12 -0
- package/dist/libs/parse-curl.d.ts.map +1 -0
- package/dist/libs/parse-curl.js +70 -0
- package/dist/router.d.ts +2 -1
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +33 -24
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/router-params.d.ts +1 -0
- package/dist/store/router-params.d.ts.map +1 -1
- package/dist/store/router-params.js +2 -1
- package/dist/store/servers.d.ts +4 -4
- package/dist/store/store.d.ts +70 -64
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +126 -119
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +18 -18
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +9 -9
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +146 -96
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +4 -4
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +49 -49
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +2 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +4 -4
- package/dist/views/Request/RequestSubpageHeader.vue2.js +17 -15
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +1 -1
- package/dist/views/Settings/Settings.vue.d.ts +4 -0
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -0
- package/dist/views/Settings/Settings.vue.js +4 -0
- package/dist/views/Settings/Settings.vue2.js +59 -0
- package/dist/{components/DarkModeToggle/DarkModeIconToggle.vue.d.ts → views/Settings/SettingsGeneral.vue.d.ts} +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -0
- package/dist/views/Settings/SettingsGeneral.vue.js +124 -0
- package/dist/views/Settings/SettingsGeneral.vue2.js +4 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts +3 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +1 -0
- package/dist/views/Settings/SettingsGeneralMode.vue.js +78 -0
- package/dist/views/Settings/SettingsGeneralMode.vue2.js +4 -0
- package/package.json +60 -36
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +0 -1
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +0 -31
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue2.js +0 -4
- package/dist/components/DarkModeToggle/index.d.ts +0 -2
- package/dist/components/DarkModeToggle/index.d.ts.map +0 -1
- package/dist/components/DarkModeToggle/index.js +0 -4
- package/dist/components/ScreenReader.vue.js +0 -7
- package/dist/components/ScreenReader.vue2.js +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayout.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"ViewLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayout.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;qBA2BM,GAAG;EAa/B;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { openBlock as o, createElementBlock as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
return o(),
|
|
6
|
-
|
|
1
|
+
import { openBlock as o, createElementBlock as d, renderSlot as r } from "vue";
|
|
2
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const i = {}, l = { class: "divide-y md:divide-y-0 divide-1 flex flex-col min-h-0 flex-1 xl:overflow-hidden md:flex-row leading-3" };
|
|
4
|
+
function n(e, c) {
|
|
5
|
+
return o(), d("div", l, [
|
|
6
|
+
r(e.$slots, "default")
|
|
7
7
|
]);
|
|
8
8
|
}
|
|
9
|
-
const a = /* @__PURE__ */
|
|
9
|
+
const a = /* @__PURE__ */ t(i, [["render", n]]);
|
|
10
10
|
export {
|
|
11
11
|
a as default
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewLayoutContent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutContent.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"ViewLayoutContent.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutContent.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;qBA4BM,GAAG;EAa/B;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { openBlock as o, createElementBlock as r, renderSlot as t } from "vue";
|
|
2
2
|
import d from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
const l = {}, c = { class: "border-t-1/2 md:border-t-0 divide divide-y xl:divide-y-0 xl:divide-x-1/2 flex xl:flex-row flex-col custom-scroll pr-0
|
|
3
|
+
const l = {}, c = { class: "border-t-1/2 md:border-t-0 divide divide-y xl:divide-y-0 xl:divide-x-1/2 flex xl:flex-row flex-col custom-scroll pr-0" };
|
|
4
4
|
function i(e, n) {
|
|
5
5
|
return o(), r("div", c, [
|
|
6
6
|
t(e.$slots, "default")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewLayoutSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutSection.vue"],"names":[],"mappings":"AA8BA,iBAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"ViewLayoutSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ViewLayout/ViewLayoutSection.vue"],"names":[],"mappings":"AA8BA,iBAAS,cAAc;mBA8CI,GAAG;qBACD,GAAG;EAc/B;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as n, openBlock as r, createElementBlock as s, unref as
|
|
2
|
-
import { nanoid as
|
|
1
|
+
import { defineComponent as n, openBlock as r, createElementBlock as s, unref as t, createElementVNode as i, renderSlot as o } from "vue";
|
|
2
|
+
import { nanoid as d } from "nanoid";
|
|
3
3
|
const a = ["aria-labelledby"], c = ["id"], u = /* @__PURE__ */ n({
|
|
4
4
|
__name: "ViewLayoutSection",
|
|
5
5
|
setup(m) {
|
|
6
|
-
const e =
|
|
7
|
-
return (
|
|
8
|
-
"aria-labelledby":
|
|
9
|
-
class: "flex xl:min-w-0 xl:flex-1 flex-col xl:custom-scroll bg-b-1"
|
|
6
|
+
const e = d();
|
|
7
|
+
return (l, p) => (r(), s("section", {
|
|
8
|
+
"aria-labelledby": t(e),
|
|
9
|
+
class: "flex h-full xl:min-w-0 xl:flex-1 flex-col xl:custom-scroll bg-b-1"
|
|
10
10
|
}, [
|
|
11
|
-
|
|
12
|
-
id:
|
|
13
|
-
class: "xl:min-h-header flex items-center border-b-1/2
|
|
11
|
+
i("div", {
|
|
12
|
+
id: t(e),
|
|
13
|
+
class: "min-h-11 xl:min-h-header flex items-center border-b-1/2 px-3.5 py-2 md:px-4 md:py-2.5 xl:px-6 xl:pr-5 text-sm font-medium sticky top-0 bg-b-1 xl:rounded-none"
|
|
14
14
|
}, [
|
|
15
|
-
l
|
|
15
|
+
o(l.$slots, "title")
|
|
16
16
|
], 8, c),
|
|
17
|
-
l
|
|
17
|
+
o(l.$slots, "default")
|
|
18
18
|
], 8, a));
|
|
19
19
|
}
|
|
20
20
|
});
|
package/dist/constants.d.ts
CHANGED
|
@@ -10,5 +10,9 @@ export declare const ROUTES: readonly [{
|
|
|
10
10
|
readonly prettyName: "Env Vars";
|
|
11
11
|
readonly name: "environment";
|
|
12
12
|
readonly icon: "Brackets";
|
|
13
|
+
}, {
|
|
14
|
+
readonly prettyName: "Settings";
|
|
15
|
+
readonly name: "settings";
|
|
16
|
+
readonly icon: "Settings";
|
|
13
17
|
}];
|
|
14
18
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;EAOT,CAAA"}
|
package/dist/constants.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
const e = [
|
|
2
2
|
{ prettyName: "Request", name: "request", icon: "ExternalLink" },
|
|
3
3
|
{ prettyName: "Cookies", name: "cookies", icon: "Cookie" },
|
|
4
|
-
{ prettyName: "Env Vars", name: "environment", icon: "Brackets" }
|
|
4
|
+
{ prettyName: "Env Vars", name: "environment", icon: "Brackets" },
|
|
5
|
+
{ prettyName: "Settings", name: "settings", icon: "Settings" }
|
|
5
6
|
// { prettyName: 'Servers', name: 'servers', icon: 'Server' },
|
|
6
7
|
// { label: 'Git Sync', icon: 'Branch', path: '/git-sync' },
|
|
7
8
|
];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/** This hook helps with retrieving the dark mode setting from local storage or from system settings. */
|
|
2
|
-
export declare function useDarkModeState(
|
|
3
|
-
|
|
2
|
+
export declare function useDarkModeState(): {
|
|
3
|
+
colorMode: import("vue").Ref<"light" | "dark" | "system">;
|
|
4
4
|
toggleDarkMode: () => void;
|
|
5
|
-
setDarkMode: (value: boolean) => void;
|
|
5
|
+
setDarkMode: (value: boolean | null) => void;
|
|
6
|
+
getSystemModePreference: () => boolean;
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=useDarkModeState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDarkModeState.d.ts","sourceRoot":"","sources":["../../src/hooks/useDarkModeState.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDarkModeState.d.ts","sourceRoot":"","sources":["../../src/hooks/useDarkModeState.ts"],"names":[],"mappings":"AAIA,wGAAwG;AACxG,wBAAgB,gBAAgB;;;yBAYF,OAAO,GAAG,IAAI;;EA+E3C"}
|
|
@@ -1,31 +1,46 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
const r = () => {
|
|
6
|
-
var o, i;
|
|
7
|
-
const e = typeof window < "u" ? (o = window.localStorage) == null ? void 0 : o.getItem("isDark") : null;
|
|
8
|
-
return typeof e == "string" ? !!JSON.parse(e) : !!(typeof window < "u" && typeof (window == null ? void 0 : window.matchMedia) == "function" && ((i = window == null ? void 0 : window.matchMedia("(prefers-color-scheme: dark)")) != null && i.matches));
|
|
9
|
-
}, d = () => {
|
|
1
|
+
import { ref as r, watch as l, onMounted as s, onUnmounted as c } from "vue";
|
|
2
|
+
const o = r("dark");
|
|
3
|
+
function f() {
|
|
4
|
+
const a = () => {
|
|
10
5
|
var e;
|
|
11
|
-
|
|
6
|
+
o.value = o.value === "dark" ? "light" : "dark", typeof window < "u" && ((e = window == null ? void 0 : window.localStorage) == null || e.setItem("colorMode", o.value));
|
|
12
7
|
};
|
|
13
|
-
function
|
|
14
|
-
var
|
|
15
|
-
|
|
8
|
+
function i(e) {
|
|
9
|
+
var d;
|
|
10
|
+
o.value = e === null ? "system" : e ? "dark" : "light", typeof window < "u" && ((d = window == null ? void 0 : window.localStorage) == null || d.setItem("colorMode", o.value));
|
|
16
11
|
}
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
const t = () => {
|
|
13
|
+
var e;
|
|
14
|
+
return typeof window < "u" && typeof (window == null ? void 0 : window.matchMedia) == "function" ? (e = window == null ? void 0 : window.matchMedia("(prefers-color-scheme: dark)")) == null ? void 0 : e.matches : !1;
|
|
15
|
+
}, n = (e) => {
|
|
16
|
+
typeof document < "u" && (e === null ? (document.body.classList.toggle("dark-mode", t()), document.body.classList.toggle("light-mode", !t())) : (document.body.classList.toggle("dark-mode", e === !0), document.body.classList.toggle("light-mode", e === !1)));
|
|
17
|
+
};
|
|
18
|
+
return o.value = typeof window > "u" ? "dark" : localStorage.getItem("colorMode") || "dark", n(
|
|
19
|
+
o.value === "dark" || o.value === "system" && t()
|
|
20
|
+
), l(
|
|
21
|
+
o,
|
|
19
22
|
(e) => {
|
|
20
|
-
|
|
23
|
+
n(
|
|
24
|
+
e === "dark" || e === "system" && t()
|
|
25
|
+
);
|
|
21
26
|
},
|
|
22
27
|
{ immediate: !0 }
|
|
23
|
-
), {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
), s(() => {
|
|
29
|
+
if (typeof window < "u" && typeof window.matchMedia == "function") {
|
|
30
|
+
const e = window.matchMedia("(prefers-color-scheme: dark)"), d = () => {
|
|
31
|
+
o.value === "system" && n(t());
|
|
32
|
+
};
|
|
33
|
+
e.addEventListener("change", d), c(() => {
|
|
34
|
+
e.removeEventListener("change", d);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}), {
|
|
38
|
+
colorMode: o,
|
|
39
|
+
toggleDarkMode: a,
|
|
40
|
+
setDarkMode: i,
|
|
41
|
+
getSystemModePreference: t
|
|
27
42
|
};
|
|
28
43
|
}
|
|
29
44
|
export {
|
|
30
|
-
|
|
45
|
+
f as useDarkModeState
|
|
31
46
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ApiClientApp.vue.d.ts","sourceRoot":"","sources":["../../../src/layouts/App/ApiClientApp.vue"],"names":[],"mappings":";;cAsH8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA6LjD,wBAMG"}
|
|
@@ -1,61 +1,57 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as v, ref as w, onBeforeMount as T, onMounted as _, onBeforeUnmount as h, computed as k, openBlock as t, createElementBlock as s, Fragment as y, createElementVNode as i, createVNode as e, unref as n, withCtx as N, createBlock as c, KeepAlive as S, resolveDynamicComponent as b, createCommentVNode as x } from "vue";
|
|
2
2
|
import C from "../../components/SideNav/SideNav.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import { addScalarClassesToHeadless as
|
|
5
|
-
import { getThemeStyles as
|
|
6
|
-
import { ScalarToasts as
|
|
7
|
-
import { RouterView as
|
|
8
|
-
import { APP_HOTKEYS as
|
|
3
|
+
import E from "../../components/TopNav/TopNav.vue.js";
|
|
4
|
+
import { addScalarClassesToHeadless as H } from "@scalar/components";
|
|
5
|
+
import { getThemeStyles as K } from "@scalar/themes";
|
|
6
|
+
import { ScalarToasts as A } from "@scalar/use-toasts";
|
|
7
|
+
import { RouterView as B } from "vue-router";
|
|
8
|
+
import { APP_HOTKEYS as D } from "./hotkeys.js";
|
|
9
|
+
import { useDarkModeState as L } from "../../hooks/useDarkModeState.js";
|
|
9
10
|
import M from "../../components/CommandPalette/TheCommandPalette.vue.js";
|
|
10
11
|
import { DEFAULT_HOTKEYS as V, handleHotKeyDown as W } from "../../libs/event-busses/hot-keys-bus.js";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
const O = ["innerHTML"], U = {
|
|
12
|
+
import { useWorkspace as g } from "../../store/store.js";
|
|
13
|
+
const P = ["innerHTML"], F = {
|
|
14
14
|
key: 0,
|
|
15
|
-
class: "flex min-h-0 flex-1
|
|
16
|
-
},
|
|
15
|
+
class: "flex min-h-0 flex-1"
|
|
16
|
+
}, O = { class: "flex flex-1 flex-col min-w-0 border-l-1/2 border-t-1/2" }, oe = /* @__PURE__ */ v({
|
|
17
17
|
__name: "ApiClientApp",
|
|
18
18
|
emits: ["newTab"],
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
19
|
+
setup(U) {
|
|
20
|
+
const d = { ...V, ...D }, a = w(null), p = (o) => {
|
|
21
21
|
a.value = o;
|
|
22
22
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const s = (o) => W(o, { hotKeys: u });
|
|
31
|
-
c(() => window.addEventListener("keydown", s)), y(() => window.removeEventListener("keydown", s));
|
|
32
|
-
const v = b(
|
|
33
|
-
() => r.activeWorkspace.value && `<style>${H(r.activeWorkspace.value.themeId)}</style>`
|
|
23
|
+
L();
|
|
24
|
+
const r = g();
|
|
25
|
+
T(() => H());
|
|
26
|
+
const l = (o) => W(o, { hotKeys: d });
|
|
27
|
+
_(() => window.addEventListener("keydown", l)), h(() => window.removeEventListener("keydown", l));
|
|
28
|
+
const u = k(
|
|
29
|
+
() => r.activeWorkspace.value && `<style>${K(r.activeWorkspace.value.themeId)}</style>`
|
|
34
30
|
);
|
|
35
|
-
return (o,
|
|
31
|
+
return (o, Y) => {
|
|
36
32
|
var m;
|
|
37
|
-
return t(),
|
|
38
|
-
|
|
39
|
-
e(
|
|
40
|
-
(m = n(r).activeWorkspace.value) != null && m.uid ? (t(),
|
|
33
|
+
return t(), s(y, null, [
|
|
34
|
+
i("div", { innerHTML: u.value }, null, 8, P),
|
|
35
|
+
e(E, { openNewTab: a.value }, null, 8, ["openNewTab"]),
|
|
36
|
+
(m = n(r).activeWorkspace.value) != null && m.uid ? (t(), s("main", F, [
|
|
41
37
|
e(C),
|
|
42
38
|
e(n(M)),
|
|
43
|
-
|
|
44
|
-
e(n(
|
|
45
|
-
default:
|
|
46
|
-
(t(),
|
|
47
|
-
(t(),
|
|
39
|
+
i("div", O, [
|
|
40
|
+
e(n(B), { onNewTab: p }, {
|
|
41
|
+
default: N(({ Component: f }) => [
|
|
42
|
+
(t(), c(S, null, [
|
|
43
|
+
(t(), c(b(f)))
|
|
48
44
|
], 1024))
|
|
49
45
|
]),
|
|
50
46
|
_: 1
|
|
51
47
|
})
|
|
52
48
|
])
|
|
53
|
-
])) :
|
|
54
|
-
e(n(
|
|
49
|
+
])) : x("", !0),
|
|
50
|
+
e(n(A))
|
|
55
51
|
], 64);
|
|
56
52
|
};
|
|
57
53
|
}
|
|
58
54
|
});
|
|
59
55
|
export {
|
|
60
|
-
|
|
56
|
+
oe as default
|
|
61
57
|
};
|