@lvce-editor/main-area-worker 9.17.0 → 9.19.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.
@@ -3253,6 +3253,7 @@ const getStateWithTab = (currentState, editorInput, existingTab, shouldRetryExis
3253
3253
 
3254
3254
  const Directory = 3;
3255
3255
  const DirectoryExpanded = 4;
3256
+ const File = 7;
3256
3257
 
3257
3258
  const isLocalEditorInput = editorInput => {
3258
3259
  if (editorInput.type !== 'editor') {
@@ -3313,6 +3314,8 @@ const getIconsCached = (dirents, fileIconCache) => {
3313
3314
  return dirents.map(dirent => fileIconCache[dirent]);
3314
3315
  };
3315
3316
 
3317
+ const ExtensionDetailScheme = 'extension-detail://';
3318
+ const ExtensionIconName = 'extensions';
3316
3319
  const getBasename = uri => {
3317
3320
  const lastSlashIndex = uri.lastIndexOf('/');
3318
3321
  if (lastSlashIndex === -1) {
@@ -3331,10 +3334,17 @@ const getMissingTabs = (tabs, fileIconCache) => {
3331
3334
  };
3332
3335
  const tabToIconRequest = tab => {
3333
3336
  const uri = tab.uri || '';
3337
+ if (uri.startsWith(ExtensionDetailScheme)) {
3338
+ return {
3339
+ name: ExtensionIconName,
3340
+ path: uri,
3341
+ type: Directory
3342
+ };
3343
+ }
3334
3344
  return {
3335
3345
  name: getBasename(uri),
3336
3346
  path: uri,
3337
- type: 0 // file type
3347
+ type: File
3338
3348
  };
3339
3349
  };
3340
3350
  const getMissingIconRequestsForTabs = (tabs, fileIconCache) => {
@@ -4334,6 +4344,11 @@ const handleWorkspaceChange = state => {
4334
4344
  };
4335
4345
  };
4336
4346
 
4347
+ const hasActiveTextEditor = state => {
4348
+ const activeTab = getActiveTab(state);
4349
+ return activeTab?.tab.editorInput?.type === 'editor';
4350
+ };
4351
+
4337
4352
  const id = 7201;
4338
4353
  const sendMessagePortToExtensionHostWorker = async port => {
4339
4354
  await sendMessagePortToExtensionHostWorker$1(port, id);
@@ -4402,6 +4417,9 @@ const tryRestoreLayout = savedState => {
4402
4417
  if (typeof savedState !== 'object') {
4403
4418
  return undefined;
4404
4419
  }
4420
+ if (savedState.restore === false) {
4421
+ return undefined;
4422
+ }
4405
4423
  const {
4406
4424
  layout
4407
4425
  } = savedState;
@@ -6130,6 +6148,7 @@ const commandMap = {
6130
6148
  'Main.focusPreviousTab': wrapCommand(focusPreviousTab),
6131
6149
  'Main.handleModifiedStatusChange': wrapCommand(handleModifiedStatusChange),
6132
6150
  'Main.handleTabContextMenu': wrapCommand(handleTabContextMenu),
6151
+ 'Main.hasActiveTextEditor': wrapGetter(hasActiveTextEditor),
6133
6152
  'Main.openInput': wrapCommand(openInput),
6134
6153
  'Main.openUri': wrapCommand(openUri),
6135
6154
  'Main.openUris': wrapCommand(openUris),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/main-area-worker",
3
- "version": "9.17.0",
3
+ "version": "9.19.0",
4
4
  "description": "Main Area Worker",
5
5
  "repository": {
6
6
  "type": "git",