@lvce-editor/extension-host-worker 3.20.0 → 3.21.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.
|
@@ -4710,6 +4710,26 @@ const getFiles = () => {
|
|
|
4710
4710
|
return state$2.files;
|
|
4711
4711
|
};
|
|
4712
4712
|
|
|
4713
|
+
const getExtensionColorThemeNames = extension => {
|
|
4714
|
+
return extension.colorThemes || [];
|
|
4715
|
+
};
|
|
4716
|
+
const getColorThemeId = colorTheme => {
|
|
4717
|
+
return colorTheme.id;
|
|
4718
|
+
};
|
|
4719
|
+
|
|
4720
|
+
// TODO should send names to renderer worker or names with ids?
|
|
4721
|
+
const getColorThemeNamesFromExtensions = async extensions => {
|
|
4722
|
+
const colorThemes = extensions.flatMap(getExtensionColorThemeNames);
|
|
4723
|
+
const colorThemeNames = colorThemes.map(getColorThemeId);
|
|
4724
|
+
return colorThemeNames;
|
|
4725
|
+
};
|
|
4726
|
+
|
|
4727
|
+
const getColorThemeNames = async () => {
|
|
4728
|
+
const extensions = await getExtensions();
|
|
4729
|
+
const colorThemeNames = getColorThemeNamesFromExtensions(extensions);
|
|
4730
|
+
return colorThemeNames;
|
|
4731
|
+
};
|
|
4732
|
+
|
|
4713
4733
|
const findMatchingIconThemeExtension = (extensions, iconThemeId) => {
|
|
4714
4734
|
for (const extension of extensions) {
|
|
4715
4735
|
if (extension && extension.iconThemes) {
|
|
@@ -4730,7 +4750,7 @@ const getIconThemeUrl = iconThemeId => {
|
|
|
4730
4750
|
return `${assetDir}/extensions/builtin.${iconThemeId}/icon-theme.json`;
|
|
4731
4751
|
};
|
|
4732
4752
|
|
|
4733
|
-
const getIconThemeJson = async iconThemeId => {
|
|
4753
|
+
const getIconThemeJson$1 = async iconThemeId => {
|
|
4734
4754
|
if (platform === Web) {
|
|
4735
4755
|
const url = getIconThemeUrl(iconThemeId);
|
|
4736
4756
|
const json = await getJson(url);
|
|
@@ -4765,6 +4785,10 @@ const getIconThemeJson = async iconThemeId => {
|
|
|
4765
4785
|
};
|
|
4766
4786
|
};
|
|
4767
4787
|
|
|
4788
|
+
const getIconThemeJson = async iconThemeId => {
|
|
4789
|
+
return getIconThemeJson$1(iconThemeId);
|
|
4790
|
+
};
|
|
4791
|
+
|
|
4768
4792
|
const getRpcInfo = rpcId => {
|
|
4769
4793
|
const info = get$7(rpcId);
|
|
4770
4794
|
if (!info) {
|
|
@@ -5357,6 +5381,7 @@ const commandMap = {
|
|
|
5357
5381
|
'BulkReplacement.applyBulkReplacement': applyBulkReplacement,
|
|
5358
5382
|
'ColorTheme.getColorThemeCssFromJson': getColorThemeCssFromJson,
|
|
5359
5383
|
'ColorTheme.getColorThemeJson': getColorThemeJson,
|
|
5384
|
+
'ColorTheme.getColorThemeNames': getColorThemeNames,
|
|
5360
5385
|
'ColorTheme.hydrate': hydrate$1,
|
|
5361
5386
|
'ExtensionHost.launchIframeWorker': launchIframeWorker,
|
|
5362
5387
|
'ExtensionHostRename.executeprepareRenameProvider': executeprepareRenameProvider,
|
package/package.json
CHANGED