vzcode 0.51.0 → 0.53.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.
@@ -1,23 +1,16 @@
1
- import { TabState, VZState } from '.';
2
- import { FileId, Username } from '../../types';
1
+ import { VZState } from '.';
2
+ import { Username } from '../../types';
3
3
  import { ThemeLabel } from '../themes';
4
4
 
5
5
  export const createInitialState = ({
6
6
  defaultTheme,
7
7
  initialUsername = 'Anonymous',
8
- initialTabList = [],
9
- initialActiveFileId = null,
10
8
  }: {
11
9
  defaultTheme: ThemeLabel;
12
10
  initialUsername?: Username;
13
- initialTabList?: TabState[];
14
- initialActiveFileId?: FileId;
15
11
  }): VZState => ({
16
- tabList: initialTabList,
17
- activeFileId:
18
- initialActiveFileId ??
19
- initialTabList[0]?.fileId ??
20
- null,
12
+ tabList: [],
13
+ activeFileId: null,
21
14
  theme: defaultTheme,
22
15
  isSettingsOpen: false,
23
16
  editorWantsFocus: false,
@@ -44,7 +44,7 @@ export type VZAction =
44
44
  | {
45
45
  type: 'open_tab';
46
46
  fileId: FileId;
47
- isTransient: boolean;
47
+ isTransient?: boolean;
48
48
  }
49
49
 
50
50
  // `close_tabs`
@@ -79,11 +79,11 @@ export type TabState = {
79
79
  // appears as italic, and it will be automatically
80
80
  // closed when the user switches to another file.
81
81
  // If `true` and the tab is opened, the editor will not focus.
82
- // * `false` if the tab is persistent, meaning its text
82
+ // * `false` or `undefined` if the tab is persistent, meaning its text
83
83
  // appears as normal, and it will not be automatically
84
84
  // closed when the user switches to another file.
85
85
  // If `false` and the tab is opened, the editor will focus.
86
- isTransient: boolean;
86
+ isTransient?: boolean;
87
87
  };
88
88
 
89
89
  const reducers = [