@lvce-editor/main-area-worker 9.68.2 → 9.68.3

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.
@@ -5561,13 +5561,18 @@ const shouldRetryExistingTab = (existingTab, editorInput, forceOpen) => {
5561
5561
  return existingTab.tab.loadingState === 'error' || forceOpen && existingTab.tab.loadingState === 'large' || editorInput.type === 'editor' && editorInput.forceText === true && existingTab.tab.editorInput?.type === 'binary';
5562
5562
  };
5563
5563
  const getViewletArgs = options => {
5564
- if (options.forceOpen !== true || options.editorInput.type !== 'editor') {
5564
+ if (options.editorInput.type !== 'editor') {
5565
5565
  return options.args;
5566
5566
  }
5567
+ const [viewletContext, ...rest] = options.args || [];
5568
+ const context = viewletContext && typeof viewletContext === 'object' ? viewletContext : {};
5567
5569
  return [{
5568
- ...options.args?.[0],
5569
- largeFile: true
5570
- }, ...(options.args?.slice(1) || [])];
5570
+ ...context,
5571
+ focus: options.focus,
5572
+ ...(options.forceOpen === true && {
5573
+ largeFile: true
5574
+ })
5575
+ }, ...rest];
5571
5576
  };
5572
5577
  const openInputWithContext = async (context, options) => {
5573
5578
  const state = context.getState();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/main-area-worker",
3
- "version": "9.68.2",
3
+ "version": "9.68.3",
4
4
  "description": "Main Area Worker",
5
5
  "repository": {
6
6
  "type": "git",