@lvce-editor/renderer-process 30.49.1 → 30.51.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.
- package/dist/rendererProcessMain.js +29 -1
- package/package.json +1 -1
|
@@ -3,6 +3,15 @@ const play = async src => {
|
|
|
3
3
|
await audio.play();
|
|
4
4
|
};
|
|
5
5
|
|
|
6
|
+
const fileSaved = (applicationId, uri) => {
|
|
7
|
+
window.dispatchEvent(new CustomEvent('lvce-file-saved', {
|
|
8
|
+
detail: {
|
|
9
|
+
applicationId,
|
|
10
|
+
uri
|
|
11
|
+
}
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
|
|
6
15
|
class AssertionError extends Error {
|
|
7
16
|
constructor(message) {
|
|
8
17
|
super(message);
|
|
@@ -7915,6 +7924,9 @@ const handleSashDoubleClick = event => {
|
|
|
7915
7924
|
handleSashDoubleClick$1(id);
|
|
7916
7925
|
};
|
|
7917
7926
|
const handleResize = () => {
|
|
7927
|
+
if (new URL(location.href).searchParams.has('applicationHost')) {
|
|
7928
|
+
return;
|
|
7929
|
+
}
|
|
7918
7930
|
const {
|
|
7919
7931
|
innerHeight,
|
|
7920
7932
|
innerWidth
|
|
@@ -9934,6 +9946,18 @@ const appendToBody = childId => {
|
|
|
9934
9946
|
$Parent.append($Child);
|
|
9935
9947
|
applyLateFocusMaybe();
|
|
9936
9948
|
};
|
|
9949
|
+
const appendToRoot = (childId, rootId) => {
|
|
9950
|
+
const parent = document.getElementById(rootId);
|
|
9951
|
+
if (!parent) {
|
|
9952
|
+
throw new Error(`Application root not found: ${rootId}`);
|
|
9953
|
+
}
|
|
9954
|
+
const childInstance = get$a(childId);
|
|
9955
|
+
if (!childInstance) {
|
|
9956
|
+
throw new Error(`Viewlet not found: ${childId}`);
|
|
9957
|
+
}
|
|
9958
|
+
parent.append(childInstance.state.$Viewlet);
|
|
9959
|
+
applyLateFocusMaybe();
|
|
9960
|
+
};
|
|
9937
9961
|
const executeCommands = commands => {
|
|
9938
9962
|
for (const [command, ...args] of commands) {
|
|
9939
9963
|
const fn = getFn(command);
|
|
@@ -10016,6 +10040,7 @@ const commandHandlers = {
|
|
|
10016
10040
|
'Viewlet.addKeyBindings': addKeyBindings,
|
|
10017
10041
|
'Viewlet.append': append,
|
|
10018
10042
|
'Viewlet.appendToBody': appendToBody,
|
|
10043
|
+
'Viewlet.appendToRoot': appendToRoot,
|
|
10019
10044
|
'Viewlet.appendViewlet': appendViewlet,
|
|
10020
10045
|
'Viewlet.ariaAnnounce': ariaAnnounce,
|
|
10021
10046
|
'Viewlet.attachWindowEvents': attachWindowEvents,
|
|
@@ -10487,6 +10512,7 @@ const readMicLevels = options => {
|
|
|
10487
10512
|
};
|
|
10488
10513
|
|
|
10489
10514
|
const commandMap = {
|
|
10515
|
+
'ApplicationHost.fileSaved': fileSaved,
|
|
10490
10516
|
'Audio.play': play,
|
|
10491
10517
|
'ClipBoard.execCopy': execCopy,
|
|
10492
10518
|
'ClipBoard.read': read,
|
|
@@ -11076,7 +11102,7 @@ const main = async () => {
|
|
|
11076
11102
|
setIpc(ViewletEventRouter);
|
|
11077
11103
|
};
|
|
11078
11104
|
|
|
11079
|
-
main();
|
|
11105
|
+
const ready = main();
|
|
11080
11106
|
|
|
11081
11107
|
const defaultColumns = 80;
|
|
11082
11108
|
const defaultRows = 24;
|
|
@@ -11326,3 +11352,5 @@ const AriaAlert = {
|
|
|
11326
11352
|
__proto__: null,
|
|
11327
11353
|
alert: alert$1
|
|
11328
11354
|
};
|
|
11355
|
+
|
|
11356
|
+
export { invoke$1 as executeCommand, ready };
|