vzcode 0.5.0 → 0.6.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,33 +0,0 @@
1
- import { File } from './File';
2
- import { Directory } from './Directory';
3
-
4
- export const FileOrDirectory = ({
5
- entity,
6
- handleRenameFileClick,
7
- handleDeleteFileClick,
8
- handleFileClick,
9
- openDirectories,
10
- toggleDirectory,
11
- }) => {
12
- const { name, path, fileId, file, children } = entity;
13
- return file ? (
14
- <File
15
- fileId={fileId}
16
- name={name}
17
- handleRenameFileClick={handleRenameFileClick}
18
- handleDeleteFileClick={handleDeleteFileClick}
19
- handleFileClick={handleFileClick}
20
- />
21
- ) : (
22
- <Directory
23
- name={name}
24
- path={path}
25
- children={children}
26
- handleRenameFileClick={handleRenameFileClick}
27
- handleDeleteFileClick={handleDeleteFileClick}
28
- handleFileClick={handleFileClick}
29
- openDirectories={openDirectories}
30
- toggleDirectory={toggleDirectory}
31
- />
32
- );
33
- };
@@ -1,64 +0,0 @@
1
- import { useMemo } from 'react';
2
- import { getFileTree } from '../getFileTree';
3
- import { sortFileTree } from '../sortFileTree';
4
- import { disableSettings } from '../featureFlags';
5
- import { FileOrDirectory } from './FileOrDirectory';
6
- import { useOpenDirectories } from './useOpenDirectories';
7
-
8
- import './styles.css';
9
-
10
- export const Sidebar = ({
11
- createFile,
12
- data,
13
- handleRenameFileClick,
14
- handleDeleteFileClick,
15
- handleFileClick,
16
- setSettings,
17
- settings,
18
- }) => {
19
- const fileTree = useMemo(
20
- () => (data ? sortFileTree(getFileTree(data)) : null),
21
- [data]
22
- );
23
-
24
- const { openDirectories, toggleDirectory } = useOpenDirectories();
25
-
26
- return (
27
- <div className="vz-sidebar">
28
- <div className="files">
29
- <div className="full-box">
30
- <div>
31
- <a className="link-name" href="#">
32
- Files
33
- </a>
34
- </div>
35
- <div>
36
- <i
37
- className="bx bxs-file-plus new-btn"
38
- style={{ color: '#dbdde1' }}
39
- onClick={createFile}
40
- ></i>
41
- </div>
42
- </div>
43
- </div>
44
- {fileTree
45
- ? fileTree.children.map((entity) => (
46
- <FileOrDirectory
47
- entity={entity}
48
- key={entity.fileId || entity.path}
49
- handleRenameFileClick={handleRenameFileClick}
50
- handleDeleteFileClick={handleDeleteFileClick}
51
- handleFileClick={handleFileClick}
52
- openDirectories={openDirectories}
53
- toggleDirectory={toggleDirectory}
54
- />
55
- ))
56
- : null}
57
- {disableSettings ? null : (
58
- <div className="settings" onClick={() => setSettings(!settings)}>
59
- Settings
60
- </div>
61
- )}
62
- </div>
63
- );
64
- };
@@ -1,88 +0,0 @@
1
- .vz-sidebar {
2
- /* TODO remove position: fixed, overhaul CSS to use Flexbox for entire app */
3
-
4
- position: fixed;
5
- top: 0;
6
- left: 0;
7
- height: 100%;
8
- width: 200px;
9
- background: rgb(54, 65, 89);
10
- }
11
-
12
- .vz-sidebar .full-box {
13
- padding: 7px;
14
- display: flex;
15
- flex-direction: row;
16
- align-items: center;
17
- justify-content: space-between;
18
- }
19
-
20
- .vz-sidebar .file-or-directory {
21
- display: flex;
22
- flex-direction: row;
23
- align-items: center;
24
- justify-content: space-between;
25
- cursor: pointer;
26
- margin: 0 10px;
27
- color: rgb(219, 221, 225);
28
- border-radius: 5px;
29
- }
30
-
31
- .vz-sidebar .link-name {
32
- margin-top: 30px;
33
- margin-left: 10px;
34
- color: rgb(154, 160, 172);
35
- font-size: 12px;
36
- text-decoration: none;
37
- }
38
-
39
- .vz-sidebar .new-btn {
40
- justify-content: right;
41
- margin-right: 10px;
42
- cursor: pointer;
43
- }
44
-
45
- .vz-sidebar .utils {
46
- display: flex;
47
- }
48
-
49
- .vz-sidebar .utilities {
50
- margin-right: 3px;
51
- }
52
-
53
- .vz-sidebar .settings {
54
- position: absolute;
55
- bottom: 0;
56
- height: 30px;
57
- width: 180px;
58
- z-index: 100;
59
- color: rgb(219, 221, 225);
60
- cursor: pointer;
61
- display: flex;
62
- align-items: center;
63
- justify-content: center;
64
- padding: 14px 0;
65
- margin: 10px;
66
- border-radius: 5px;
67
- }
68
-
69
- .vz-sidebar .file-or-directory:hover,
70
- .vz-sidebar .settings:hover {
71
- background-color: rgb(74, 84, 105);
72
- }
73
-
74
- .vz-sidebar .name {
75
- display: flex;
76
- text-overflow: ellipsis;
77
- white-space: nowrap;
78
- overflow: hidden;
79
- }
80
-
81
- /* Responsible for indenting directories */
82
- .vz-sidebar .indentation {
83
- margin-left: 20px;
84
- }
85
-
86
- .vz-sidebar .arrow-wrapper {
87
- margin-right: 4px;
88
- }
@@ -1,120 +0,0 @@
1
- /* Inspired by: https://www.codinglabweb.com/2021/06/dropdown-sidebar-menu-html-css.html */
2
- /* Google Fonts Import Link */
3
- @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
4
- @import url('https://unpkg.com/boxicons@2.0.7/css/boxicons.min.css');
5
- @import url('https://unpkg.com/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css');
6
-
7
- * {
8
- margin: 0;
9
- padding: 0;
10
- box-sizing: border-box;
11
- }
12
-
13
- /* width */
14
- ::-webkit-scrollbar {
15
- width: 10px;
16
- height: 20px;
17
- }
18
-
19
- /* Track */
20
- ::-webkit-scrollbar-track {
21
- background: rgb(41, 44, 52);
22
- }
23
-
24
- /* Handle */
25
- ::-webkit-scrollbar-thumb {
26
- background: rgb(37, 37, 38);
27
- }
28
-
29
- /* Handle on hover */
30
- ::-webkit-scrollbar-thumb:hover {
31
- background: #555;
32
- }
33
-
34
- :root {
35
- --main-font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas,
36
- Liberation Mono, monospace;
37
- }
38
-
39
- body {
40
- background: rgb(41, 44, 52);
41
- font-family: 'Poppins', sans-serif;
42
- overflow-x: hidden;
43
- }
44
-
45
- .tab {
46
- width: max-content;
47
- height: 30px;
48
- background: rgb(45, 45, 45);
49
- text-align: center;
50
- color: #fff;
51
- font-family: var(--main-font-family);
52
- justify-content: center;
53
- align-items: center;
54
- display: flex;
55
- padding-left: 10px;
56
- padding-right: 10px;
57
- border-top-left-radius: 10px;
58
- border-top-right-radius: 10px;
59
- margin-top: 5px;
60
- margin-left: 2px;
61
- margin-right: 2px;
62
- cursor: pointer;
63
- }
64
-
65
- .tab.active {
66
- background-color: rgb(41, 44, 52);
67
- }
68
-
69
- .tab-close {
70
- display: flex;
71
- cursor: pointer;
72
- margin-left: 5px;
73
- justify-content: center;
74
- align-items: center;
75
- }
76
-
77
- .tab-close:hover {
78
- border-radius: 30%;
79
- background-color: rgb(37, 37, 38);
80
- }
81
-
82
- .editor {
83
- position: relative;
84
- margin-left: 200px;
85
- width: 100%;
86
- height: 100%;
87
- top: 30px;
88
- bottom: 0;
89
- background-color: rgb(41, 44, 52);
90
- color: #fff;
91
- font-family: var(--main-font-family);
92
- }
93
-
94
- .tab-list {
95
- position: fixed;
96
- display: flex;
97
- flex-direction: row;
98
- top: 0;
99
- left: 200px;
100
- height: 35px;
101
- width: 100%;
102
- background: rgb(37, 37, 38);
103
- z-index: 100;
104
- transition: all 0.5s ease;
105
- }
106
-
107
- .bottom-bar {
108
- position: absolute;
109
- bottom: 0;
110
- left: 0;
111
- height: 20px;
112
- width: 100%;
113
- background: rgb(45, 45, 45);
114
- z-index: 100;
115
- transition: all 0.5s ease;
116
- }
117
-
118
- .themes {
119
- color: rgb(37, 37, 38);
120
- }