@teambit/workspace 1.0.139 → 1.0.141
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/artifacts/preview/teambit_workspace_workspace-preview.js +1 -1
- package/dist/{preview-1705577037962.js → preview-1705720522529.js} +2 -2
- package/dist/ui/workspace/workspace.js +15 -3
- package/dist/ui/workspace/workspace.js.map +1 -1
- package/dist/ui/workspace/workspace.module.scss +38 -62
- package/dist/workspace.d.ts +1 -0
- package/dist/workspace.js +43 -0
- package/dist/workspace.js.map +1 -1
- package/package.json +24 -21
- package/ui/workspace/workspace.module.scss +38 -62
- package/ui/workspace/workspace.tsx +12 -5
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/workspace",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.141",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/workspace/workspace",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.workspace",
|
|
8
8
|
"name": "workspace",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.141"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"find-root": "1.1.0",
|
|
18
18
|
"graphql-tag": "2.12.1",
|
|
19
19
|
"memoizee": "0.4.15",
|
|
20
|
+
"node-fetch": "2.6.7",
|
|
20
21
|
"detect-indent": "5.0.0",
|
|
21
22
|
"detect-newline": "3.1.0",
|
|
22
23
|
"stringify-package": "1.0.1",
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.506",
|
|
42
43
|
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.505",
|
|
43
44
|
"@teambit/ui-foundation.ui.constants.z-indexes": "0.0.504",
|
|
45
|
+
"@teambit/base-react.themes.theme-switcher": "1.0.2",
|
|
44
46
|
"@teambit/base-ui.surfaces.split-pane.hover-splitter": "1.0.0",
|
|
45
47
|
"@teambit/base-ui.surfaces.split-pane.split-pane": "1.0.0",
|
|
46
48
|
"@teambit/ui-foundation.ui.corner": "0.0.520",
|
|
@@ -51,44 +53,44 @@
|
|
|
51
53
|
"@teambit/explorer.ui.gallery.component-grid": "0.0.496",
|
|
52
54
|
"@teambit/scopes.scope-id": "0.0.7",
|
|
53
55
|
"@teambit/workspace.ui.empty-workspace": "0.0.508",
|
|
54
|
-
"@teambit/component": "1.0.
|
|
55
|
-
"@teambit/dependency-resolver": "1.0.
|
|
56
|
-
"@teambit/envs": "1.0.
|
|
56
|
+
"@teambit/component": "1.0.141",
|
|
57
|
+
"@teambit/dependency-resolver": "1.0.141",
|
|
58
|
+
"@teambit/envs": "1.0.141",
|
|
57
59
|
"@teambit/logger": "0.0.941",
|
|
58
|
-
"@teambit/scope": "1.0.
|
|
59
|
-
"@teambit/graph": "1.0.
|
|
60
|
+
"@teambit/scope": "1.0.141",
|
|
61
|
+
"@teambit/graph": "1.0.141",
|
|
60
62
|
"@teambit/cli": "0.0.848",
|
|
61
|
-
"@teambit/isolator": "1.0.
|
|
62
|
-
"@teambit/component-tree": "1.0.
|
|
63
|
+
"@teambit/isolator": "1.0.141",
|
|
64
|
+
"@teambit/component-tree": "1.0.141",
|
|
63
65
|
"@teambit/harmony.modules.resolved-component": "0.0.497",
|
|
64
|
-
"@teambit/watcher": "1.0.
|
|
65
|
-
"@teambit/aspect-loader": "1.0.
|
|
66
|
-
"@teambit/config": "0.0.
|
|
66
|
+
"@teambit/watcher": "1.0.141",
|
|
67
|
+
"@teambit/aspect-loader": "1.0.141",
|
|
68
|
+
"@teambit/config": "0.0.892",
|
|
67
69
|
"@teambit/global-config": "0.0.851",
|
|
68
70
|
"@teambit/harmony.modules.requireable-component": "0.0.497",
|
|
69
71
|
"@teambit/toolbox.modules.module-resolver": "0.0.7",
|
|
70
72
|
"@teambit/workspace.modules.node-modules-linker": "0.0.162",
|
|
71
|
-
"@teambit/graphql": "1.0.
|
|
72
|
-
"@teambit/bundler": "1.0.
|
|
73
|
-
"@teambit/pubsub": "1.0.
|
|
74
|
-
"@teambit/ui": "1.0.
|
|
75
|
-
"@teambit/variants": "0.0.
|
|
73
|
+
"@teambit/graphql": "1.0.141",
|
|
74
|
+
"@teambit/bundler": "1.0.141",
|
|
75
|
+
"@teambit/pubsub": "1.0.141",
|
|
76
|
+
"@teambit/ui": "1.0.141",
|
|
77
|
+
"@teambit/variants": "0.0.985",
|
|
76
78
|
"@teambit/component-issues": "0.0.140",
|
|
77
|
-
"@teambit/workspace.modules.match-pattern": "0.0.
|
|
79
|
+
"@teambit/workspace.modules.match-pattern": "0.0.505",
|
|
78
80
|
"@teambit/component.ui.component-drawer": "0.0.389",
|
|
79
81
|
"@teambit/lanes.hooks.use-lane-components": "0.0.256",
|
|
80
82
|
"@teambit/lanes.hooks.use-lanes": "0.0.258",
|
|
81
83
|
"@teambit/lanes.ui.models.lanes-model": "0.0.212",
|
|
82
84
|
"@teambit/ui-foundation.ui.side-bar": "0.0.874",
|
|
83
|
-
"@teambit/command-bar": "1.0.
|
|
85
|
+
"@teambit/command-bar": "1.0.141",
|
|
84
86
|
"@teambit/component.ui.component-filters.component-filter-context": "0.0.218",
|
|
85
87
|
"@teambit/component.ui.component-filters.deprecate-filter": "0.0.216",
|
|
86
88
|
"@teambit/component.ui.component-filters.env-filter": "0.0.222",
|
|
87
89
|
"@teambit/component.ui.component-filters.show-main-filter": "0.0.209",
|
|
88
|
-
"@teambit/sidebar": "1.0.
|
|
90
|
+
"@teambit/sidebar": "1.0.141",
|
|
89
91
|
"@teambit/ui-foundation.ui.tree.drawer": "0.0.518",
|
|
90
92
|
"@teambit/component-descriptor": "0.0.413",
|
|
91
|
-
"@teambit/deprecation": "1.0.
|
|
93
|
+
"@teambit/deprecation": "1.0.141",
|
|
92
94
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.216",
|
|
93
95
|
"@teambit/cloud.hooks.use-cloud-scopes": "0.0.3",
|
|
94
96
|
"@teambit/preview.ui.preview-placeholder": "0.0.509",
|
|
@@ -100,6 +102,7 @@
|
|
|
100
102
|
"@types/fs-extra": "9.0.7",
|
|
101
103
|
"@types/find-root": "1.1.2",
|
|
102
104
|
"@types/memoizee": "0.4.5",
|
|
105
|
+
"@types/node-fetch": "2.5.12",
|
|
103
106
|
"@types/classnames": "2.2.11",
|
|
104
107
|
"@types/pluralize": "0.0.29",
|
|
105
108
|
"@types/mocha": "9.1.0",
|
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
.corner {
|
|
8
8
|
width: 300px;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
&.dark {
|
|
10
|
+
--bit-border-color-lightest: #333333;
|
|
11
|
+
--bit-text-color-heavy: white;
|
|
12
|
+
}
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
.workspaceWrapper {
|
|
@@ -19,49 +21,34 @@
|
|
|
19
21
|
|
|
20
22
|
.topbar {
|
|
21
23
|
flex: none;
|
|
24
|
+
&.dark {
|
|
25
|
+
--bit-bg-heaviest: #333333;
|
|
26
|
+
--bit-accent-color: #6a57fd;
|
|
27
|
+
--bit-bg-heavy: #2c2b36;
|
|
28
|
+
div[class*='versionMenuContainer'] {
|
|
29
|
+
--bit-bg-heavy: #f4f5f6;
|
|
30
|
+
}
|
|
31
|
+
div[class*='useBox'] {
|
|
32
|
+
div[class*='placeholder'] {
|
|
33
|
+
--bit-bg-color: transparent;
|
|
34
|
+
&:hover {
|
|
35
|
+
color: #2b2b2b;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
&[data-open='true'] {
|
|
39
|
+
div[class*='placeholder'] {
|
|
40
|
+
color: #2b2b2b;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
div[class*='iconAnchor'] {
|
|
45
|
+
> span {
|
|
46
|
+
color: white;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
22
50
|
}
|
|
23
51
|
|
|
24
|
-
// .topbarDarkColors {
|
|
25
|
-
// --bit-bg-heaviest: #333333;
|
|
26
|
-
// --bit-accent-color: #6a57fd;
|
|
27
|
-
// --bit-bg-heavy: #2c2b36;
|
|
28
|
-
// --on-surface-color: white;
|
|
29
|
-
// div[class*='tab'] {
|
|
30
|
-
// --on-background-color: white;
|
|
31
|
-
// }
|
|
32
|
-
// div[class*='versionDropdown'] {
|
|
33
|
-
// div[class*='placeholder'] {
|
|
34
|
-
// color: white;
|
|
35
|
-
// }
|
|
36
|
-
// }
|
|
37
|
-
// div[class*='versionMenuContainer'] {
|
|
38
|
-
// --bit-bg-heavy: #f4f5f6;
|
|
39
|
-
// }
|
|
40
|
-
// div[class*='useBox'] {
|
|
41
|
-
// div[class*='placeholder'] {
|
|
42
|
-
// --bit-bg-color: transparent;
|
|
43
|
-
// color: #37b26c;
|
|
44
|
-
// &:hover {
|
|
45
|
-
// color: #2b2b2b;
|
|
46
|
-
// }
|
|
47
|
-
// }
|
|
48
|
-
// &[data-open='true'] {
|
|
49
|
-
// div[class*='placeholder'] {
|
|
50
|
-
// --bit-bg-color: #37b26c;
|
|
51
|
-
// color: #2b2b2b;
|
|
52
|
-
// }
|
|
53
|
-
// }
|
|
54
|
-
// }
|
|
55
|
-
// div[class*='iconAnchor'] {
|
|
56
|
-
// // [data-open='true'] {
|
|
57
|
-
// background: transparent !important;
|
|
58
|
-
// // }
|
|
59
|
-
// > span {
|
|
60
|
-
// color: white;
|
|
61
|
-
// }
|
|
62
|
-
// }
|
|
63
|
-
// }
|
|
64
|
-
|
|
65
52
|
.main {
|
|
66
53
|
flex: 1 1;
|
|
67
54
|
|
|
@@ -89,23 +76,12 @@
|
|
|
89
76
|
&.closed {
|
|
90
77
|
overflow: hidden;
|
|
91
78
|
}
|
|
79
|
+
&.dark {
|
|
80
|
+
background-color: #333333;
|
|
81
|
+
a[class*='laneGalleryIcon'] {
|
|
82
|
+
> img {
|
|
83
|
+
filter: invert(1);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
92
87
|
}
|
|
93
|
-
|
|
94
|
-
// .sidebarDarkColors {
|
|
95
|
-
// background-color: #333333;
|
|
96
|
-
// --bit-text-color-heavy: #ededed;
|
|
97
|
-
// --bit-text-color-light: #ededed;
|
|
98
|
-
// --bit-bg-heavy: #2c2b36;
|
|
99
|
-
// --bit-bg-color: #2c2b36;
|
|
100
|
-
// --bit-accent-bg: #2c2b36;
|
|
101
|
-
// --border-medium-color: #3d3d3c;
|
|
102
|
-
|
|
103
|
-
// --surface-neutral-hover-color: #2b2b2b;
|
|
104
|
-
// --bit-border-color-lightest: #2b2b2b;
|
|
105
|
-
// color: #ededed;
|
|
106
|
-
// a[class*='laneGalleryIcon'] {
|
|
107
|
-
// > img {
|
|
108
|
-
// filter: invert(1);
|
|
109
|
-
// }
|
|
110
|
-
// }
|
|
111
|
-
// }
|
|
@@ -9,6 +9,7 @@ import { RouteSlot, SlotRouter } from '@teambit/ui-foundation.ui.react-router.sl
|
|
|
9
9
|
import { Corner } from '@teambit/ui-foundation.ui.corner';
|
|
10
10
|
import { Collapser } from '@teambit/ui-foundation.ui.buttons.collapser';
|
|
11
11
|
import { SplitPane, Pane, Layout } from '@teambit/base-ui.surfaces.split-pane.split-pane';
|
|
12
|
+
import { useThemePicker } from '@teambit/base-react.themes.theme-switcher';
|
|
12
13
|
import { HoverSplitter } from '@teambit/base-ui.surfaces.split-pane.hover-splitter';
|
|
13
14
|
import { TopBar } from '@teambit/ui-foundation.ui.top-bar';
|
|
14
15
|
import classNames from 'classnames';
|
|
@@ -33,10 +34,10 @@ export type WorkspaceProps = {
|
|
|
33
34
|
export function Workspace({ routeSlot, menuSlot, sidebar, workspaceUI, onSidebarTogglerChange }: WorkspaceProps) {
|
|
34
35
|
const reactions = useComponentNotifications();
|
|
35
36
|
const { workspace } = useWorkspace(reactions);
|
|
36
|
-
|
|
37
|
+
const { current } = useThemePicker();
|
|
37
38
|
const [isSidebarOpen, handleSidebarToggle] = useReducer((x) => !x, true);
|
|
38
39
|
const sidebarOpenness = isSidebarOpen ? Layout.row : Layout.right;
|
|
39
|
-
|
|
40
|
+
const themeName = current?.themeName || 'light';
|
|
40
41
|
onSidebarTogglerChange(handleSidebarToggle);
|
|
41
42
|
|
|
42
43
|
if (!workspace) {
|
|
@@ -49,13 +50,19 @@ export function Workspace({ routeSlot, menuSlot, sidebar, workspaceUI, onSidebar
|
|
|
49
50
|
<WorkspaceProvider workspace={workspace}>
|
|
50
51
|
<div className={styles.workspaceWrapper}>
|
|
51
52
|
<TopBar
|
|
52
|
-
className={classNames(styles.topbar
|
|
53
|
-
Corner={() =>
|
|
53
|
+
className={classNames(styles.topbar, styles[themeName])}
|
|
54
|
+
Corner={() => (
|
|
55
|
+
<Corner
|
|
56
|
+
className={classNames(styles.corner, styles[themeName])}
|
|
57
|
+
name={workspace.name}
|
|
58
|
+
icon={workspace.icon}
|
|
59
|
+
/>
|
|
60
|
+
)}
|
|
54
61
|
menu={menuSlot}
|
|
55
62
|
/>
|
|
56
63
|
|
|
57
64
|
<SplitPane className={styles.main} size={246} layout={sidebarOpenness}>
|
|
58
|
-
<Pane className={classNames(styles.sidebar,
|
|
65
|
+
<Pane className={classNames(styles.sidebar, styles[themeName], !isSidebarOpen && styles.closed)}>
|
|
59
66
|
{sidebar}
|
|
60
67
|
</Pane>
|
|
61
68
|
<HoverSplitter className={styles.splitter}>
|