vzcode 0.26.0 → 0.27.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/assets/index-5f9f376e.css +1 -0
- package/dist/assets/index-70b6d947.js +111 -0
- package/dist/index.html +2 -2
- package/package.json +4 -4
- package/src/client/App.tsx +86 -43
- package/src/client/CodeEditor/getOrCreateEditor.ts +6 -1
- package/src/client/CodeEditor/index.tsx +60 -12
- package/src/client/CodeEditor/json1PresenceBroadcast.ts +6 -2
- package/src/client/CodeEditor/json1PresenceDisplay.ts +0 -45
- package/src/client/CodeEditor/style.scss +5 -1
- package/src/client/CodeErrorOverlay/index.tsx +27 -0
- package/src/client/CodeErrorOverlay/style.scss +30 -0
- package/src/client/PresenceNotifications/PresenceNotifications.test.ts +134 -0
- package/src/client/PresenceNotifications/index.tsx +118 -103
- package/src/client/SplitPaneResizeContext.tsx +12 -7
- package/src/client/TabList/Tab.tsx +20 -6
- package/src/client/TabList/index.tsx +18 -8
- package/src/client/TabList/style.scss +5 -0
- package/src/client/VZSettings.tsx +33 -20
- package/src/client/VZSidebar/{ConfirmationBox.tsx → DeleteConfirmationModal.tsx} +17 -14
- package/src/client/VZSidebar/DirectoryListing.tsx +27 -26
- package/src/client/VZSidebar/FileListing.tsx +16 -19
- package/src/client/VZSidebar/Item.tsx +83 -37
- package/src/client/VZSidebar/Listing.tsx +17 -14
- package/src/client/VZSidebar/index.tsx +43 -24
- package/src/client/style.scss +3 -0
- package/src/client/useActions.ts +25 -6
- package/src/client/useEditorCache.ts +2 -1
- package/src/client/useFileCRUD.ts +29 -27
- package/src/client/usernameLocalStorage.ts +43 -0
- package/src/client/vzReducer/closeTabReducer.test.ts +177 -0
- package/src/client/vzReducer/closeTabsReducer.ts +68 -0
- package/src/client/vzReducer/createInitialState.ts +19 -0
- package/src/client/vzReducer/editorNoLongerWantsFocusReducer.ts +9 -0
- package/src/client/vzReducer/index.ts +107 -0
- package/src/client/vzReducer/openTabReducer.test.ts +110 -0
- package/src/client/vzReducer/openTabReducer.ts +57 -0
- package/src/client/vzReducer/setActiveFileIdReducer.ts +9 -0
- package/src/client/vzReducer/setIsSettingsOpenReducer.ts +9 -0
- package/src/client/vzReducer/setThemeReducer.ts +9 -0
- package/src/client/vzReducer/setUsernameReducer.ts +9 -0
- package/src/index.ts +9 -3
- package/src/types.ts +12 -5
- package/dist/assets/index-284b7339.js +0 -111
- package/dist/assets/index-e160f758.css +0 -1
- package/src/client/PrettierErrorOverlay/index.tsx +0 -9
- package/src/client/PrettierErrorOverlay/style.scss +0 -9
- package/src/client/vzReducer.ts +0 -118
package/src/index.ts
CHANGED
|
@@ -15,16 +15,22 @@ export type {
|
|
|
15
15
|
|
|
16
16
|
export { VZSidebar } from './client/VZSidebar';
|
|
17
17
|
export { VZSettings } from './client/VZSettings';
|
|
18
|
-
export {
|
|
18
|
+
export {
|
|
19
|
+
SplitPaneResizeProvider,
|
|
20
|
+
SplitPaneResizeContext,
|
|
21
|
+
} from './client/SplitPaneResizeContext';
|
|
19
22
|
export { Resizer } from './client/Resizer';
|
|
20
23
|
export { TabList } from './client/TabList';
|
|
21
24
|
export { CodeEditor } from './client/CodeEditor';
|
|
22
25
|
export { usePrettier } from './client/usePrettier';
|
|
23
|
-
export {
|
|
26
|
+
export { CodeErrorOverlay } from './client/CodeErrorOverlay';
|
|
24
27
|
export { PresenceNotifications } from './client/PresenceNotifications';
|
|
25
28
|
export { useFileCRUD } from './client/useFileCRUD';
|
|
26
29
|
export { useSubmitOperation } from './client/useSubmitOperation';
|
|
27
|
-
export {
|
|
30
|
+
export {
|
|
31
|
+
vzReducer,
|
|
32
|
+
createInitialState,
|
|
33
|
+
} from './client/vzReducer';
|
|
28
34
|
export { useActions } from './client/useActions';
|
|
29
35
|
export { useOpenDirectories } from './client/useOpenDirectories';
|
|
30
36
|
export {
|
package/src/types.ts
CHANGED
|
@@ -30,6 +30,11 @@ export interface File {
|
|
|
30
30
|
text: string;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
// FileTreePath
|
|
34
|
+
// * The path to the directory, e.g. "src/components", OR
|
|
35
|
+
// * The path to the file e.g. "src/components/HelloWorld.js".
|
|
36
|
+
export type FileTreePath = string;
|
|
37
|
+
|
|
33
38
|
// FileTree
|
|
34
39
|
// * A tree of files.
|
|
35
40
|
// * Each node in the tree is either a directory or a file.
|
|
@@ -38,13 +43,9 @@ export interface File {
|
|
|
38
43
|
// * Each file has a `fileId` string.
|
|
39
44
|
// * Each directory has a `name` string.
|
|
40
45
|
// * Each directory has a `path` string.
|
|
41
|
-
// * The `path` string is the path to the directory.
|
|
42
|
-
// e.g. "src/components".
|
|
43
|
-
// * The `path` string is the path to the file.
|
|
44
|
-
// e.g. "src/components/HelloWorld.js".
|
|
45
46
|
export interface FileTree {
|
|
46
47
|
name: string;
|
|
47
|
-
path?:
|
|
48
|
+
path?: FileTreePath;
|
|
48
49
|
children?: Array<FileTree | FileTreeFile>;
|
|
49
50
|
}
|
|
50
51
|
|
|
@@ -93,3 +94,9 @@ export type VZCodeContent = {
|
|
|
93
94
|
// * Hot reloading is debounced when this is `false`.
|
|
94
95
|
isInteracting?: boolean;
|
|
95
96
|
};
|
|
97
|
+
|
|
98
|
+
// An id used for presence.
|
|
99
|
+
export type PresenceId = string;
|
|
100
|
+
|
|
101
|
+
// A user name for display in presence.
|
|
102
|
+
export type Username = string;
|