@lvce-editor/api 9.35.0 → 9.35.2
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/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { activate } from './parts/Activation/Activation.ts';
|
|
2
|
+
export { getColorThemeNames } from './parts/ColorTheme/ColorTheme.ts';
|
|
2
3
|
export { getAccessToken, type GetAccessTokenOptions } from './parts/Authentication/Authentication.ts';
|
|
3
4
|
export { createElectronWebContentsView } from './parts/ElectronWebContentsView/ElectronWebContentsView.ts';
|
|
4
5
|
export { executeCommand } from './parts/ExecuteCommand/ExecuteCommand.ts';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { activate } from "./parts/Activation/Activation.js";
|
|
2
|
+
export { getColorThemeNames } from "./parts/ColorTheme/ColorTheme.js";
|
|
2
3
|
export { getAccessToken } from "./parts/Authentication/Authentication.js";
|
|
3
4
|
export { createElectronWebContentsView } from "./parts/ElectronWebContentsView/ElectronWebContentsView.js";
|
|
4
5
|
export { executeCommand } from "./parts/ExecuteCommand/ExecuteCommand.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getColorThemeNames: () => Promise<readonly string[]>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ExtensionManagementWorker } from '@lvce-editor/rpc-registry';
|
|
2
|
+
import { executeCommand } from "../ExecuteCommand/ExecuteCommand.js";
|
|
3
|
+
const getColorThemeIds = (extension) => {
|
|
4
|
+
if (extension.disabled || !Array.isArray(extension.colorThemes)) {
|
|
5
|
+
return [];
|
|
6
|
+
}
|
|
7
|
+
return extension.colorThemes.map((colorTheme) => colorTheme.id);
|
|
8
|
+
};
|
|
9
|
+
export const getColorThemeNames = async () => {
|
|
10
|
+
const platform = (await executeCommand('Layout.getPlatform'));
|
|
11
|
+
const extensions = (await ExtensionManagementWorker.invoke('Extensions.getAllExtensions', '', platform));
|
|
12
|
+
return extensions.flatMap(getColorThemeIds);
|
|
13
|
+
};
|
|
@@ -4,7 +4,9 @@ export declare const confirm: (message: string) => Promise<boolean>;
|
|
|
4
4
|
export declare const getWorkspaceFolder: () => Promise<string>;
|
|
5
5
|
export declare const getRecentlyOpenedWorkspaceUris: () => Promise<readonly string[]>;
|
|
6
6
|
export declare const getWorkspaceUri: () => Promise<string>;
|
|
7
|
-
export declare const handleWorkspaceRefresh: (
|
|
7
|
+
export declare const handleWorkspaceRefresh: (changes?: {
|
|
8
|
+
readonly reloadAll?: boolean;
|
|
9
|
+
}) => Promise<void>;
|
|
8
10
|
export declare const openUri: (uri: string) => Promise<void>;
|
|
9
11
|
export declare const showNotification: (type: NotificationType, message: string) => Promise<void>;
|
|
10
12
|
export declare const setWorkspaceUri: (uri: string) => Promise<void>;
|
package/dist/parts/Host/Host.js
CHANGED
|
@@ -15,8 +15,8 @@ export const getRecentlyOpenedWorkspaceUris = async () => {
|
|
|
15
15
|
export const getWorkspaceUri = async () => {
|
|
16
16
|
return (await executeCommand('Workspace.getUri'));
|
|
17
17
|
};
|
|
18
|
-
export const handleWorkspaceRefresh = async () => {
|
|
19
|
-
await executeCommand('Layout.handleWorkspaceRefresh');
|
|
18
|
+
export const handleWorkspaceRefresh = async (changes) => {
|
|
19
|
+
await executeCommand('Layout.handleWorkspaceRefresh', ...(changes ? [changes] : []));
|
|
20
20
|
};
|
|
21
21
|
export const openUri = async (uri) => {
|
|
22
22
|
await executeCommand('Main.openUri', uri);
|