@lvce-editor/extension-management-worker 4.81.2 → 4.81.3
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.
|
@@ -4934,6 +4934,9 @@ const createViewInstance = async (viewId, uid, context, assetDir, platform, appl
|
|
|
4934
4934
|
} = await getViewMetadata(rpc, viewId);
|
|
4935
4935
|
const result = await rpc.invoke('ExtensionApi.createViewInstance', viewId, uid, context);
|
|
4936
4936
|
set$1(uid, {
|
|
4937
|
+
...(applicationId && {
|
|
4938
|
+
applicationId
|
|
4939
|
+
}),
|
|
4937
4940
|
context,
|
|
4938
4941
|
disposeWorkerWhenLastViewCloses,
|
|
4939
4942
|
extensionId,
|
|
@@ -5013,7 +5016,11 @@ const setViewInstanceActive = async (viewId, uid, active, assetDir, platform) =>
|
|
|
5013
5016
|
throw error;
|
|
5014
5017
|
}
|
|
5015
5018
|
};
|
|
5016
|
-
const requestViewRerender = async uid => {
|
|
5019
|
+
const requestViewRerender = async (uid, applicationId) => {
|
|
5020
|
+
const instance = get$1(uid);
|
|
5021
|
+
if (applicationId !== undefined && (instance?.status !== 'ready' || instance.applicationId !== applicationId)) {
|
|
5022
|
+
throw new Error(`view instance ${uid} does not belong to application ${applicationId}`);
|
|
5023
|
+
}
|
|
5017
5024
|
await invoke$4('Viewlet.executeViewletCommand', uid, 'rerender');
|
|
5018
5025
|
};
|
|
5019
5026
|
const showViewContextMenu = async (uid, viewId, menuId, x, y) => {
|
|
@@ -6242,6 +6249,8 @@ const invokeForApplication = async (applicationId, method, ...args) => {
|
|
|
6242
6249
|
}
|
|
6243
6250
|
case 'Extensions.handleFileChanges':
|
|
6244
6251
|
return handleFileChanges(args[0], applicationId);
|
|
6252
|
+
case 'Extensions.requestViewRerender':
|
|
6253
|
+
return requestViewRerender(args[0], applicationId);
|
|
6245
6254
|
case 'Extensions.sendMessagePortToFileSystemWorker':
|
|
6246
6255
|
return createFileSystemPort(application, args[0]);
|
|
6247
6256
|
case 'Extensions.showNotification':
|