astro-tractstack 2.2.9 → 2.2.10
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/package.json
CHANGED
|
@@ -132,21 +132,32 @@ const AddPaneNewPanel = ({
|
|
|
132
132
|
insertTemplate.title = '';
|
|
133
133
|
insertTemplate.slug = '';
|
|
134
134
|
|
|
135
|
+
let newPaneId: string | undefined | null;
|
|
136
|
+
|
|
135
137
|
if (isContextPane) {
|
|
136
138
|
insertTemplate.isContextPane = true;
|
|
137
|
-
ctx.addContextTemplatePane(ownerId, insertTemplate);
|
|
139
|
+
newPaneId = ctx.addContextTemplatePane(ownerId, insertTemplate);
|
|
138
140
|
} else {
|
|
139
|
-
ctx.addTemplatePane(
|
|
141
|
+
newPaneId = ctx.addTemplatePane(
|
|
140
142
|
ownerId,
|
|
141
143
|
insertTemplate,
|
|
142
144
|
nodeId,
|
|
143
145
|
first ? 'before' : 'after'
|
|
144
146
|
);
|
|
147
|
+
|
|
145
148
|
const storyFragment = cloneDeep(
|
|
146
149
|
ctx.allNodes.get().get(ownerId)
|
|
147
150
|
) as StoryFragmentNode;
|
|
148
151
|
ctx.modifyNodes([{ ...storyFragment }]);
|
|
149
152
|
}
|
|
153
|
+
|
|
154
|
+
if (newPaneId) {
|
|
155
|
+
const newPane = ctx.allNodes.get().get(newPaneId);
|
|
156
|
+
if (newPane) {
|
|
157
|
+
ctx.modifyNodes([{ ...newPane }]);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
150
161
|
ctx.notifyNode(`root`);
|
|
151
162
|
setParentMode(PaneAddMode.DEFAULT, false);
|
|
152
163
|
} catch (err) {
|