@lvce-editor/activity-bar-worker 3.2.0 → 3.3.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/activityBarWorkerMain.js +24 -13
- package/package.json +1 -1
|
@@ -613,7 +613,7 @@ const getErrorProperty = (error, prettyError) => {
|
|
|
613
613
|
}
|
|
614
614
|
};
|
|
615
615
|
};
|
|
616
|
-
const create$1$
|
|
616
|
+
const create$1$1 = (id, error) => {
|
|
617
617
|
return {
|
|
618
618
|
jsonrpc: Two$1,
|
|
619
619
|
id,
|
|
@@ -624,7 +624,7 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
|
624
624
|
const prettyError = preparePrettyError(error);
|
|
625
625
|
logError(error, prettyError);
|
|
626
626
|
const errorProperty = getErrorProperty(error, prettyError);
|
|
627
|
-
return create$1$
|
|
627
|
+
return create$1$1(id, errorProperty);
|
|
628
628
|
};
|
|
629
629
|
const create$3 = (message, result) => {
|
|
630
630
|
return {
|
|
@@ -749,14 +749,14 @@ const execute = (command, ...args) => {
|
|
|
749
749
|
};
|
|
750
750
|
|
|
751
751
|
const Two = '2.0';
|
|
752
|
-
const create$
|
|
752
|
+
const create$t = (method, params) => {
|
|
753
753
|
return {
|
|
754
754
|
jsonrpc: Two,
|
|
755
755
|
method,
|
|
756
756
|
params
|
|
757
757
|
};
|
|
758
758
|
};
|
|
759
|
-
const create$
|
|
759
|
+
const create$s = (id, method, params) => {
|
|
760
760
|
const message = {
|
|
761
761
|
id,
|
|
762
762
|
jsonrpc: Two,
|
|
@@ -766,14 +766,14 @@ const create$r = (id, method, params) => {
|
|
|
766
766
|
return message;
|
|
767
767
|
};
|
|
768
768
|
let id = 0;
|
|
769
|
-
const create$
|
|
769
|
+
const create$r = () => {
|
|
770
770
|
return ++id;
|
|
771
771
|
};
|
|
772
772
|
|
|
773
773
|
/* eslint-disable n/no-unsupported-features/es-syntax */
|
|
774
774
|
|
|
775
775
|
const registerPromise = map => {
|
|
776
|
-
const id = create$
|
|
776
|
+
const id = create$r();
|
|
777
777
|
const {
|
|
778
778
|
promise,
|
|
779
779
|
resolve
|
|
@@ -791,7 +791,7 @@ const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer)
|
|
|
791
791
|
id,
|
|
792
792
|
promise
|
|
793
793
|
} = registerPromise(callbacks);
|
|
794
|
-
const message = create$
|
|
794
|
+
const message = create$s(id, method, params);
|
|
795
795
|
if (useSendAndTransfer && ipc.sendAndTransfer) {
|
|
796
796
|
ipc.sendAndTransfer(message);
|
|
797
797
|
} else {
|
|
@@ -827,7 +827,7 @@ const createRpc = ipc => {
|
|
|
827
827
|
* @deprecated
|
|
828
828
|
*/
|
|
829
829
|
send(method, ...params) {
|
|
830
|
-
const message = create$
|
|
830
|
+
const message = create$t(method, params);
|
|
831
831
|
ipc.send(message);
|
|
832
832
|
}
|
|
833
833
|
};
|
|
@@ -863,7 +863,7 @@ const listen$1 = async (module, options) => {
|
|
|
863
863
|
const ipc = module.wrap(rawIpc);
|
|
864
864
|
return ipc;
|
|
865
865
|
};
|
|
866
|
-
const create$
|
|
866
|
+
const create$2$1 = async ({
|
|
867
867
|
commandMap
|
|
868
868
|
}) => {
|
|
869
869
|
// TODO create a commandMap per rpc instance
|
|
@@ -875,7 +875,7 @@ const create$1$1 = async ({
|
|
|
875
875
|
};
|
|
876
876
|
const WebWorkerRpcClient = {
|
|
877
877
|
__proto__: null,
|
|
878
|
-
create: create$
|
|
878
|
+
create: create$2$1
|
|
879
879
|
};
|
|
880
880
|
const createMockRpc = ({
|
|
881
881
|
commandMap
|
|
@@ -904,6 +904,7 @@ const ToolBar = 'toolbar';
|
|
|
904
904
|
|
|
905
905
|
const Div = 4;
|
|
906
906
|
const Text = 12;
|
|
907
|
+
const Reference = 100;
|
|
907
908
|
|
|
908
909
|
const Button$1 = 'event.button';
|
|
909
910
|
const ClientX = 'event.clientX';
|
|
@@ -1001,7 +1002,6 @@ const showContextMenu2 = async (uid, menuId, x, y, args) => {
|
|
|
1001
1002
|
number(menuId);
|
|
1002
1003
|
number(x);
|
|
1003
1004
|
number(y);
|
|
1004
|
-
// @ts-ignore
|
|
1005
1005
|
await invoke('ContextMenu.show2', uid, menuId, x, y, args);
|
|
1006
1006
|
};
|
|
1007
1007
|
|
|
@@ -1972,6 +1972,7 @@ const NavigateChild = 7;
|
|
|
1972
1972
|
const NavigateParent = 8;
|
|
1973
1973
|
const RemoveChild = 9;
|
|
1974
1974
|
const NavigateSibling = 10;
|
|
1975
|
+
const SetReferenceNodeUid = 11;
|
|
1975
1976
|
|
|
1976
1977
|
const isKey = key => {
|
|
1977
1978
|
return key !== 'type' && key !== 'childCount';
|
|
@@ -2039,6 +2040,16 @@ const compareNodes = (oldNode, newNode) => {
|
|
|
2039
2040
|
if (oldNode.type !== newNode.type) {
|
|
2040
2041
|
return null;
|
|
2041
2042
|
}
|
|
2043
|
+
// Handle reference nodes - special handling for uid changes
|
|
2044
|
+
if (oldNode.type === Reference) {
|
|
2045
|
+
if (oldNode.uid !== newNode.uid) {
|
|
2046
|
+
patches.push({
|
|
2047
|
+
type: SetReferenceNodeUid,
|
|
2048
|
+
uid: newNode.uid
|
|
2049
|
+
});
|
|
2050
|
+
}
|
|
2051
|
+
return patches;
|
|
2052
|
+
}
|
|
2042
2053
|
// Handle text nodes
|
|
2043
2054
|
if (oldNode.type === Text && newNode.type === Text) {
|
|
2044
2055
|
if (oldNode.text !== newNode.text) {
|
|
@@ -2518,8 +2529,8 @@ const renderEventListeners = () => {
|
|
|
2518
2529
|
}, {
|
|
2519
2530
|
name: HandleMouseDown,
|
|
2520
2531
|
params: ['handleClick', Button$1, ClientX, ClientY],
|
|
2521
|
-
preventDefault:
|
|
2522
|
-
stopPropagation:
|
|
2532
|
+
preventDefault: false,
|
|
2533
|
+
stopPropagation: false
|
|
2523
2534
|
}];
|
|
2524
2535
|
};
|
|
2525
2536
|
|