@lvce-editor/panel-worker 2.12.1 → 2.13.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/panelWorkerMain.js +6 -19
- package/package.json +1 -1
package/dist/panelWorkerMain.js
CHANGED
|
@@ -1581,12 +1581,8 @@ const create = (uid, uri, x, y, width, height, platform, assetDir) => {
|
|
|
1581
1581
|
set$1(uid, state, state);
|
|
1582
1582
|
};
|
|
1583
1583
|
|
|
1584
|
-
const isEqual$2 = (oldState, newState) => {
|
|
1585
|
-
return oldState.actionsUid === newState.actionsUid;
|
|
1586
|
-
};
|
|
1587
|
-
|
|
1588
1584
|
const isEqual$1 = (oldState, newState) => {
|
|
1589
|
-
return oldState.
|
|
1585
|
+
return oldState.actionsUid === newState.actionsUid;
|
|
1590
1586
|
};
|
|
1591
1587
|
|
|
1592
1588
|
const areBadgeCountsEqual = (oldBadgeCounts, newBadgeCounts) => {
|
|
@@ -1600,11 +1596,10 @@ const isEqual = (oldState, newState) => {
|
|
|
1600
1596
|
|
|
1601
1597
|
const RenderItems = 4;
|
|
1602
1598
|
const RenderIncremental = 11;
|
|
1603
|
-
const RenderChildUid = 12;
|
|
1604
1599
|
const RenderActionsUid = 13;
|
|
1605
1600
|
|
|
1606
|
-
const modules = [isEqual, isEqual$1
|
|
1607
|
-
const numbers = [RenderIncremental,
|
|
1601
|
+
const modules = [isEqual, isEqual$1];
|
|
1602
|
+
const numbers = [RenderIncremental, RenderActionsUid];
|
|
1608
1603
|
|
|
1609
1604
|
const diff = (oldState, newState) => {
|
|
1610
1605
|
const diffResult = [];
|
|
@@ -1829,6 +1824,9 @@ const openViewlet = async (state, id, focus = false, uri = '') => {
|
|
|
1829
1824
|
const actionsUid = getUid();
|
|
1830
1825
|
const index = views.indexOf(id);
|
|
1831
1826
|
await createViewlet(id, childUid, tabId, actionsUid, childDimensions, uri, focus);
|
|
1827
|
+
if (currentChildUid > 0) {
|
|
1828
|
+
await invoke$1('Viewlet.dispose', currentChildUid);
|
|
1829
|
+
}
|
|
1832
1830
|
return {
|
|
1833
1831
|
...state,
|
|
1834
1832
|
actionsUid,
|
|
@@ -1894,15 +1892,6 @@ const renderActionsUid = (oldState, newState) => {
|
|
|
1894
1892
|
return ['Viewlet.dispose', oldActionsUid];
|
|
1895
1893
|
};
|
|
1896
1894
|
|
|
1897
|
-
// TODO also need to dispose child when panel becomes hidden
|
|
1898
|
-
const renderChildUid = (oldState, newState) => {
|
|
1899
|
-
const oldChildUid = oldState.childUid;
|
|
1900
|
-
if (oldChildUid <= 0 || oldChildUid === newState.childUid) {
|
|
1901
|
-
return [];
|
|
1902
|
-
}
|
|
1903
|
-
return ['Viewlet.dispose', oldChildUid];
|
|
1904
|
-
};
|
|
1905
|
-
|
|
1906
1895
|
const mergeClassNames = (...classNames) => {
|
|
1907
1896
|
return classNames.filter(Boolean).join(' ');
|
|
1908
1897
|
};
|
|
@@ -2371,8 +2360,6 @@ const getRenderer = diffType => {
|
|
|
2371
2360
|
switch (diffType) {
|
|
2372
2361
|
case RenderActionsUid:
|
|
2373
2362
|
return renderActionsUid;
|
|
2374
|
-
case RenderChildUid:
|
|
2375
|
-
return renderChildUid;
|
|
2376
2363
|
case RenderIncremental:
|
|
2377
2364
|
return renderIncremental;
|
|
2378
2365
|
case RenderItems:
|