insync-stage-handler 4.0.0-beta.3 → 4.0.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/library.js +17 -3
- package/dist/library.js.map +1 -1
- package/dist/module.js +17 -3
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -3740,6 +3740,19 @@ const createDockviewGridNode = (section, sections) => {
|
|
|
3740
3740
|
data: children
|
|
3741
3741
|
};
|
|
3742
3742
|
};
|
|
3743
|
+
const ensureBranchRoot = node => {
|
|
3744
|
+
if (!node || node.type !== "leaf") {
|
|
3745
|
+
return node;
|
|
3746
|
+
}
|
|
3747
|
+
return {
|
|
3748
|
+
type: "branch",
|
|
3749
|
+
size: 100,
|
|
3750
|
+
data: [{
|
|
3751
|
+
...node,
|
|
3752
|
+
size: 100
|
|
3753
|
+
}]
|
|
3754
|
+
};
|
|
3755
|
+
};
|
|
3743
3756
|
const filterLayoutSectionsByAssets = (sectionsById, assetsById) => {
|
|
3744
3757
|
return R__namespace.pipe(R__namespace.map(section => {
|
|
3745
3758
|
const assetId = R__namespace.path(["props", "assetId"], section);
|
|
@@ -3764,12 +3777,13 @@ const convertLegacyLayoutToDockview = stage => {
|
|
|
3764
3777
|
const sections = filterLayoutSectionsByAssets(rawSections, assetsById);
|
|
3765
3778
|
const rootSection = getRootSection(content, sections);
|
|
3766
3779
|
const rootNode = createDockviewGridNode(rootSection, sections);
|
|
3767
|
-
|
|
3780
|
+
const dockviewRoot = ensureBranchRoot(rootNode);
|
|
3781
|
+
if (!rootSection || !dockviewRoot) {
|
|
3768
3782
|
return null;
|
|
3769
3783
|
}
|
|
3770
3784
|
return {
|
|
3771
3785
|
grid: {
|
|
3772
|
-
root:
|
|
3786
|
+
root: dockviewRoot,
|
|
3773
3787
|
height: 100,
|
|
3774
3788
|
width: 100,
|
|
3775
3789
|
orientation: getOrientationForSection(rootSection)
|
|
@@ -4008,7 +4022,7 @@ const settingsCleaner = R__namespace.pipe(R__namespace.dissocPath(["timer", "wan
|
|
|
4008
4022
|
var settingsHandler = (stage, settings) => R__namespace.pipe(settingsUpgrader(stage), settingsCleaner)(settings);
|
|
4009
4023
|
|
|
4010
4024
|
var name = "insync-stage-handler";
|
|
4011
|
-
var version = "4.0.0
|
|
4025
|
+
var version = "4.0.0";
|
|
4012
4026
|
var description = "Handles stages files. This consists of validating, upgrading and consolodating them.";
|
|
4013
4027
|
var author = "David Ammeraal (Noterik B.V.)";
|
|
4014
4028
|
var license = "MIT";
|