@teambit/workspace 1.0.1006 → 1.0.1008
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/{preview-1780598604039.js → preview-1780929047751.js} +2 -2
- package/dist/ui/workspace/workspace-overview/hope-ai-icon.d.ts +10 -0
- package/dist/ui/workspace/workspace-overview/hope-ai-icon.js +135 -0
- package/dist/ui/workspace/workspace-overview/hope-ai-icon.js.map +1 -0
- package/dist/ui/workspace/workspace-overview/workspace-blank-state.d.ts +10 -0
- package/dist/ui/workspace/workspace-overview/workspace-blank-state.js +179 -0
- package/dist/ui/workspace/workspace-overview/workspace-blank-state.js.map +1 -0
- package/dist/ui/workspace/workspace-overview/workspace-blank-state.module.scss +252 -0
- package/dist/ui/workspace/workspace-overview/workspace-overview.js +15 -16
- package/dist/ui/workspace/workspace-overview/workspace-overview.js.map +1 -1
- package/package.json +37 -36
- package/ui/workspace/workspace-overview/hope-ai-icon.tsx +125 -0
- package/ui/workspace/workspace-overview/workspace-blank-state.module.scss +252 -0
- package/ui/workspace/workspace-overview/workspace-blank-state.tsx +124 -0
- package/ui/workspace/workspace-overview/workspace-overview.tsx +6 -3
|
@@ -18,13 +18,6 @@ function _explorerUiGallery() {
|
|
|
18
18
|
};
|
|
19
19
|
return data;
|
|
20
20
|
}
|
|
21
|
-
function _workspaceUi() {
|
|
22
|
-
const data = require("@teambit/workspace.ui.empty-workspace");
|
|
23
|
-
_workspaceUi = function () {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
return data;
|
|
27
|
-
}
|
|
28
21
|
function _lodash() {
|
|
29
22
|
const data = _interopRequireDefault(require("lodash.compact"));
|
|
30
23
|
_lodash = function () {
|
|
@@ -46,9 +39,9 @@ function _cloudHooks() {
|
|
|
46
39
|
};
|
|
47
40
|
return data;
|
|
48
41
|
}
|
|
49
|
-
function
|
|
42
|
+
function _workspaceUi() {
|
|
50
43
|
const data = require("@teambit/workspace.ui.use-workspace-mode");
|
|
51
|
-
|
|
44
|
+
_workspaceUi = function () {
|
|
52
45
|
return data;
|
|
53
46
|
};
|
|
54
47
|
return data;
|
|
@@ -95,6 +88,13 @@ function _workspaceFilterPanel() {
|
|
|
95
88
|
};
|
|
96
89
|
return data;
|
|
97
90
|
}
|
|
91
|
+
function _workspaceBlankState() {
|
|
92
|
+
const data = require("./workspace-blank-state");
|
|
93
|
+
_workspaceBlankState = function () {
|
|
94
|
+
return data;
|
|
95
|
+
};
|
|
96
|
+
return data;
|
|
97
|
+
}
|
|
98
98
|
function _workspaceOverviewModule() {
|
|
99
99
|
const data = _interopRequireDefault(require("./workspace-overview.module.scss"));
|
|
100
100
|
_workspaceOverviewModule = function () {
|
|
@@ -104,18 +104,18 @@ function _workspaceOverviewModule() {
|
|
|
104
104
|
}
|
|
105
105
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
106
106
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
107
|
+
// Legacy empty state — kept around as a fallback while the new blank state rolls out.
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
109
|
+
|
|
107
110
|
function WorkspaceOverview() {
|
|
108
111
|
const workspace = (0, _react().useContext)(_workspaceContext().WorkspaceContext);
|
|
109
112
|
const {
|
|
110
113
|
components,
|
|
111
114
|
componentDescriptors
|
|
112
115
|
} = workspace;
|
|
113
|
-
if (!components.length) return /*#__PURE__*/_react().default.createElement(_workspaceUi().EmptyWorkspace, {
|
|
114
|
-
name: workspace.name
|
|
115
|
-
});
|
|
116
116
|
const {
|
|
117
117
|
isMinimal
|
|
118
|
-
} = (0,
|
|
118
|
+
} = (0, _workspaceUi().useWorkspaceMode)();
|
|
119
119
|
const uniqueScopes = [...new Set(components.map(c => c.id.scope))];
|
|
120
120
|
const {
|
|
121
121
|
cloudScopes
|
|
@@ -154,6 +154,7 @@ function WorkspaceOverview() {
|
|
|
154
154
|
availableAggregations,
|
|
155
155
|
filteredCount
|
|
156
156
|
} = (0, _useWorkspaceAggregation().useWorkspaceAggregation)(items, aggregation, filters);
|
|
157
|
+
if (!components.length) return /*#__PURE__*/_react().default.createElement(_workspaceBlankState().WorkspaceBlankState, null);
|
|
157
158
|
return /*#__PURE__*/_react().default.createElement("div", {
|
|
158
159
|
className: _workspaceOverviewModule().default.container
|
|
159
160
|
}, /*#__PURE__*/_react().default.createElement(_workspaceFilterPanel().WorkspaceFilterPanel, {
|
|
@@ -167,9 +168,7 @@ function WorkspaceOverview() {
|
|
|
167
168
|
onScopesChange: setActiveScopes
|
|
168
169
|
}), /*#__PURE__*/_react().default.createElement("div", {
|
|
169
170
|
className: _workspaceOverviewModule().default.content
|
|
170
|
-
}, filteredCount === 0 && /*#__PURE__*/_react().default.createElement(
|
|
171
|
-
name: workspace.name
|
|
172
|
-
}), groups.map(group => /*#__PURE__*/_react().default.createElement("section", {
|
|
171
|
+
}, filteredCount === 0 && /*#__PURE__*/_react().default.createElement(_workspaceBlankState().WorkspaceBlankState, null), groups.map(group => /*#__PURE__*/_react().default.createElement("section", {
|
|
173
172
|
key: group.name,
|
|
174
173
|
className: _workspaceOverviewModule().default.section
|
|
175
174
|
}, groupType !== 'none' && /*#__PURE__*/_react().default.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","data","_interopRequireWildcard","require","_explorerUiGallery","_workspaceUi","_lodash","_interopRequireDefault","_scopes","_cloudHooks","_workspaceUi2","_workspaceContext","_useWorkspaceAggregation","_useQueryParamWithDefault","_namespaceHeader","_hopeComponentCard","_workspaceFilterPanel","_workspaceOverviewModule","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","WorkspaceOverview","workspace","useContext","WorkspaceContext","components","componentDescriptors","length","createElement","EmptyWorkspace","name","isMinimal","useWorkspaceMode","uniqueScopes","Set","map","c","id","scope","cloudScopes","useCloudScopes","cloudMap","Map","s","toString","compDescriptorMap","d","items","compact","component","deprecation","isDeprecate","descriptor","cloudScope","ScopeID","isValid","fromString","undefined","componentDescriptor","icon","backgroundIconColor","aggregation","setAggregation","useQueryParamWithDefault","activeNamespaces","setActiveNamespaces","useListParamWithDefault","activeScopes","setActiveScopes","filters","useMemo","namespaces","scopes","statuses","groups","groupType","availableAggregations","filteredCount","useWorkspaceAggregation","className","styles","container","WorkspaceFilterPanel","onAggregationChange","onNamespacesChange","onScopesChange","content","group","key","section","sectionHeader","NamespaceHeader","namespace","scopeIcon","scopeIconColor","ComponentGrid","cardGrid","item","HopeComponentCard","showPreview"],"sources":["workspace-overview.tsx"],"sourcesContent":["import React, { useContext, useMemo } from 'react';\nimport { ComponentGrid } from '@teambit/explorer.ui.gallery.component-grid';\nimport { EmptyWorkspace } from '@teambit/workspace.ui.empty-workspace';\nimport compact from 'lodash.compact';\nimport { ScopeID } from '@teambit/scopes.scope-id';\nimport { useCloudScopes } from '@teambit/cloud.hooks.use-cloud-scopes';\nimport { useWorkspaceMode } from '@teambit/workspace.ui.use-workspace-mode';\nimport { WorkspaceContext } from '../workspace-context';\nimport { useWorkspaceAggregation } from './use-workspace-aggregation';\nimport { useQueryParamWithDefault, useListParamWithDefault } from './use-query-param-with-default';\nimport { NamespaceHeader } from './namespace-header';\nimport { HopeComponentCard } from './hope-component-card';\nimport type { AggregationType } from './workspace-overview.types';\nimport { WorkspaceFilterPanel } from './workspace-filter-panel';\nimport styles from './workspace-overview.module.scss';\n\nexport function WorkspaceOverview() {\n const workspace = useContext(WorkspaceContext);\n const { components, componentDescriptors } = workspace;\n\n if (!components.length) return <EmptyWorkspace name={workspace.name} />;\n\n const { isMinimal } = useWorkspaceMode();\n const uniqueScopes = [...new Set(components.map((c) => c.id.scope))];\n const { cloudScopes } = useCloudScopes(uniqueScopes);\n const cloudMap = new Map((cloudScopes || []).map((s) => [s.id.toString(), s]));\n\n const compDescriptorMap = new Map(componentDescriptors.map((d) => [d.id.toString(), d]));\n\n const items = compact(\n components.map((component) => {\n if (component.deprecation?.isDeprecate) return null;\n\n const descriptor = compDescriptorMap.get(component.id.toString());\n if (!descriptor) return null;\n\n const cloudScope = cloudMap.get(component.id.scope);\n const scope =\n cloudScope ||\n (ScopeID.isValid(component.id.scope) && { id: ScopeID.fromString(component.id.scope) }) ||\n undefined;\n\n return {\n component,\n componentDescriptor: descriptor,\n scope: scope\n ? { id: scope.id, icon: (scope as any).icon, backgroundIconColor: (scope as any).backgroundIconColor }\n : undefined,\n };\n })\n );\n\n const [aggregation, setAggregation] = useQueryParamWithDefault<AggregationType>('aggregation', 'namespaces');\n const [activeNamespaces, setActiveNamespaces] = useListParamWithDefault('ns');\n const [activeScopes, setActiveScopes] = useListParamWithDefault('scopes');\n\n const filters = useMemo(\n () => ({ namespaces: activeNamespaces, scopes: activeScopes, statuses: new Set() as any }),\n [activeNamespaces, activeScopes]\n );\n\n const { groups, groupType, availableAggregations, filteredCount } = useWorkspaceAggregation(\n items,\n aggregation,\n filters\n );\n\n return (\n <div className={styles.container}>\n <WorkspaceFilterPanel\n aggregation={aggregation}\n onAggregationChange={setAggregation}\n availableAggregations={availableAggregations}\n items={items}\n activeNamespaces={activeNamespaces}\n onNamespacesChange={setActiveNamespaces}\n activeScopes={activeScopes}\n onScopesChange={setActiveScopes}\n />\n\n <div className={styles.content}>\n {filteredCount === 0 && <EmptyWorkspace name={workspace.name} />}\n\n {groups.map((group) => (\n <section key={group.name} className={styles.section}>\n {groupType !== 'none' && (\n <div className={styles.sectionHeader}>\n <NamespaceHeader\n namespace={group.name}\n items={group.items}\n scopeIcon={group.scopeIcon}\n scopeIconColor={group.scopeIconColor}\n />\n </div>\n )}\n\n <ComponentGrid className={styles.cardGrid}>\n {group.items.map((item) => (\n <HopeComponentCard\n key={item.component.id.toString()}\n component={item.component}\n componentDescriptor={item.componentDescriptor}\n scope={item.scope as any}\n showPreview={isMinimal}\n />\n ))}\n </ComponentGrid>\n </section>\n ))}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,mBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,kBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,YAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAM,sBAAA,CAAAJ,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,QAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,YAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,WAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,cAAA;EAAA,MAAAT,IAAA,GAAAE,OAAA;EAAAO,aAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,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oreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireWildcard","require","_explorerUiGallery","_lodash","_interopRequireDefault","_scopes","_cloudHooks","_workspaceUi","_workspaceContext","_useWorkspaceAggregation","_useQueryParamWithDefault","_namespaceHeader","_hopeComponentCard","_workspaceFilterPanel","_workspaceBlankState","_workspaceOverviewModule","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","WorkspaceOverview","workspace","useContext","WorkspaceContext","components","componentDescriptors","isMinimal","useWorkspaceMode","uniqueScopes","Set","map","c","id","scope","cloudScopes","useCloudScopes","cloudMap","Map","s","toString","compDescriptorMap","d","items","compact","component","deprecation","isDeprecate","descriptor","cloudScope","ScopeID","isValid","fromString","undefined","componentDescriptor","icon","backgroundIconColor","aggregation","setAggregation","useQueryParamWithDefault","activeNamespaces","setActiveNamespaces","useListParamWithDefault","activeScopes","setActiveScopes","filters","useMemo","namespaces","scopes","statuses","groups","groupType","availableAggregations","filteredCount","useWorkspaceAggregation","length","createElement","WorkspaceBlankState","className","styles","container","WorkspaceFilterPanel","onAggregationChange","onNamespacesChange","onScopesChange","content","group","key","name","section","sectionHeader","NamespaceHeader","namespace","scopeIcon","scopeIconColor","ComponentGrid","cardGrid","item","HopeComponentCard","showPreview"],"sources":["workspace-overview.tsx"],"sourcesContent":["import React, { useContext, useMemo } from 'react';\nimport { ComponentGrid } from '@teambit/explorer.ui.gallery.component-grid';\n// Legacy empty state — kept around as a fallback while the new blank state rolls out.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { EmptyWorkspace } from '@teambit/workspace.ui.empty-workspace';\nimport compact from 'lodash.compact';\nimport { ScopeID } from '@teambit/scopes.scope-id';\nimport { useCloudScopes } from '@teambit/cloud.hooks.use-cloud-scopes';\nimport { useWorkspaceMode } from '@teambit/workspace.ui.use-workspace-mode';\nimport { WorkspaceContext } from '../workspace-context';\nimport { useWorkspaceAggregation } from './use-workspace-aggregation';\nimport { useQueryParamWithDefault, useListParamWithDefault } from './use-query-param-with-default';\nimport { NamespaceHeader } from './namespace-header';\nimport { HopeComponentCard } from './hope-component-card';\nimport type { AggregationType } from './workspace-overview.types';\nimport { WorkspaceFilterPanel } from './workspace-filter-panel';\nimport { WorkspaceBlankState } from './workspace-blank-state';\nimport styles from './workspace-overview.module.scss';\n\nexport function WorkspaceOverview() {\n const workspace = useContext(WorkspaceContext);\n const { components, componentDescriptors } = workspace;\n\n const { isMinimal } = useWorkspaceMode();\n const uniqueScopes = [...new Set(components.map((c) => c.id.scope))];\n const { cloudScopes } = useCloudScopes(uniqueScopes);\n const cloudMap = new Map((cloudScopes || []).map((s) => [s.id.toString(), s]));\n\n const compDescriptorMap = new Map(componentDescriptors.map((d) => [d.id.toString(), d]));\n\n const items = compact(\n components.map((component) => {\n if (component.deprecation?.isDeprecate) return null;\n\n const descriptor = compDescriptorMap.get(component.id.toString());\n if (!descriptor) return null;\n\n const cloudScope = cloudMap.get(component.id.scope);\n const scope =\n cloudScope ||\n (ScopeID.isValid(component.id.scope) && { id: ScopeID.fromString(component.id.scope) }) ||\n undefined;\n\n return {\n component,\n componentDescriptor: descriptor,\n scope: scope\n ? { id: scope.id, icon: (scope as any).icon, backgroundIconColor: (scope as any).backgroundIconColor }\n : undefined,\n };\n })\n );\n\n const [aggregation, setAggregation] = useQueryParamWithDefault<AggregationType>('aggregation', 'namespaces');\n const [activeNamespaces, setActiveNamespaces] = useListParamWithDefault('ns');\n const [activeScopes, setActiveScopes] = useListParamWithDefault('scopes');\n\n const filters = useMemo(\n () => ({ namespaces: activeNamespaces, scopes: activeScopes, statuses: new Set() as any }),\n [activeNamespaces, activeScopes]\n );\n\n const { groups, groupType, availableAggregations, filteredCount } = useWorkspaceAggregation(\n items,\n aggregation,\n filters\n );\n\n if (!components.length) return <WorkspaceBlankState />;\n\n return (\n <div className={styles.container}>\n <WorkspaceFilterPanel\n aggregation={aggregation}\n onAggregationChange={setAggregation}\n availableAggregations={availableAggregations}\n items={items}\n activeNamespaces={activeNamespaces}\n onNamespacesChange={setActiveNamespaces}\n activeScopes={activeScopes}\n onScopesChange={setActiveScopes}\n />\n\n <div className={styles.content}>\n {filteredCount === 0 && <WorkspaceBlankState />}\n\n {groups.map((group) => (\n <section key={group.name} className={styles.section}>\n {groupType !== 'none' && (\n <div className={styles.sectionHeader}>\n <NamespaceHeader\n namespace={group.name}\n items={group.items}\n scopeIcon={group.scopeIcon}\n scopeIconColor={group.scopeIconColor}\n />\n </div>\n )}\n\n <ComponentGrid className={styles.cardGrid}>\n {group.items.map((item) => (\n <HopeComponentCard\n key={item.component.id.toString()}\n component={item.component}\n componentDescriptor={item.componentDescriptor}\n scope={item.scope as any}\n showPreview={isMinimal}\n />\n ))}\n </ComponentGrid>\n </section>\n ))}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,mBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,kBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAK,sBAAA,CAAAH,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,QAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,aA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SAAU;IAC1BS,mBAAmB,EAAE2C,IAAI,CAAC3C,mBAAoB;IAC9CpB,KAAK,EAAE+D,IAAI,CAAC/D,KAAa;IACzBiE,WAAW,EAAExE;EAAU,CACxB,CACF,CACY,CACR,CACV,CACE,CACF,CAAC;AAEV","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/workspace",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1008",
|
|
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.1008"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -30,40 +30,40 @@
|
|
|
30
30
|
"reset-css": "5.0.1",
|
|
31
31
|
"@teambit/component-id": "1.2.4",
|
|
32
32
|
"@teambit/harmony": "0.4.7",
|
|
33
|
-
"@teambit/legacy.extension-data": "0.0.
|
|
34
|
-
"@teambit/legacy.scope": "0.0.
|
|
33
|
+
"@teambit/legacy.extension-data": "0.0.125",
|
|
34
|
+
"@teambit/legacy.scope": "0.0.123",
|
|
35
35
|
"@teambit/component-version": "1.0.4",
|
|
36
|
-
"@teambit/legacy.consumer-component": "0.0.
|
|
37
|
-
"@teambit/legacy.consumer": "0.0.
|
|
36
|
+
"@teambit/legacy.consumer-component": "0.0.124",
|
|
37
|
+
"@teambit/legacy.consumer": "0.0.123",
|
|
38
38
|
"@teambit/bit-error": "0.0.404",
|
|
39
39
|
"@teambit/lane-id": "0.0.312",
|
|
40
|
-
"@teambit/legacy.bit-map": "0.0.
|
|
40
|
+
"@teambit/legacy.bit-map": "0.0.180",
|
|
41
41
|
"@teambit/toolbox.fs.last-modified": "0.0.15",
|
|
42
42
|
"@teambit/toolbox.path.path": "0.0.17",
|
|
43
43
|
"@teambit/graph.cleargraph": "0.0.11",
|
|
44
|
-
"@teambit/logger": "0.0.
|
|
45
|
-
"@teambit/cli": "0.0.
|
|
46
|
-
"@teambit/config-store": "0.0.
|
|
44
|
+
"@teambit/logger": "0.0.1426",
|
|
45
|
+
"@teambit/cli": "0.0.1333",
|
|
46
|
+
"@teambit/config-store": "0.0.214",
|
|
47
47
|
"@teambit/legacy.constants": "0.0.29",
|
|
48
48
|
"@teambit/component.ui.component-status-resolver": "0.0.510",
|
|
49
49
|
"@teambit/harmony.modules.resolved-component": "0.0.514",
|
|
50
50
|
"@teambit/legacy.utils": "0.0.38",
|
|
51
|
-
"@teambit/scope.remotes": "0.0.
|
|
52
|
-
"@teambit/config": "0.0.
|
|
51
|
+
"@teambit/scope.remotes": "0.0.123",
|
|
52
|
+
"@teambit/config": "0.0.1508",
|
|
53
53
|
"@teambit/harmony.modules.requireable-component": "0.0.514",
|
|
54
54
|
"@teambit/toolbox.modules.module-resolver": "0.0.20",
|
|
55
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.
|
|
56
|
-
"@teambit/global-config": "0.0.
|
|
57
|
-
"@teambit/legacy.consumer-config": "0.0.
|
|
58
|
-
"@teambit/variants": "0.0.
|
|
55
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.354",
|
|
56
|
+
"@teambit/global-config": "0.0.1337",
|
|
57
|
+
"@teambit/legacy.consumer-config": "0.0.123",
|
|
58
|
+
"@teambit/variants": "0.0.1601",
|
|
59
59
|
"@teambit/component-issues": "0.0.172",
|
|
60
|
-
"@teambit/component.sources": "0.0.
|
|
60
|
+
"@teambit/component.sources": "0.0.175",
|
|
61
61
|
"@teambit/dependencies.modules.packages-excluder": "1.0.8",
|
|
62
62
|
"@teambit/git.modules.git-executable": "0.0.30",
|
|
63
63
|
"@teambit/harmony.modules.in-memory-cache": "0.0.33",
|
|
64
64
|
"@teambit/legacy-bit-id": "1.1.3",
|
|
65
|
-
"@teambit/legacy.component-list": "0.0.
|
|
66
|
-
"@teambit/legacy.scope-api": "0.0.
|
|
65
|
+
"@teambit/legacy.component-list": "0.0.177",
|
|
66
|
+
"@teambit/legacy.scope-api": "0.0.178",
|
|
67
67
|
"@teambit/toolbox.path.is-path-inside": "0.0.509",
|
|
68
68
|
"@teambit/workspace.modules.match-pattern": "0.0.521",
|
|
69
69
|
"@teambit/component.ui.component-drawer": "0.0.482",
|
|
@@ -101,28 +101,29 @@
|
|
|
101
101
|
"@teambit/preview.ui.preview-placeholder": "0.0.567",
|
|
102
102
|
"@teambit/scopes.scope-id": "0.0.9",
|
|
103
103
|
"@teambit/workspace.ui.load-preview": "0.0.504",
|
|
104
|
+
"@teambit/evangelist.elements.icon": "1.0.5",
|
|
104
105
|
"@teambit/component.filters.base-filter": "0.0.6",
|
|
105
106
|
"@teambit/design.inputs.toggle-button": "0.0.16",
|
|
106
107
|
"@teambit/cloud.hooks.use-cloud-scopes": "0.0.21",
|
|
107
108
|
"@teambit/explorer.ui.gallery.component-grid": "0.0.496",
|
|
108
109
|
"@teambit/workspace.ui.empty-workspace": "0.0.509",
|
|
109
|
-
"@teambit/component": "1.0.
|
|
110
|
-
"@teambit/dependency-resolver": "1.0.
|
|
111
|
-
"@teambit/envs": "1.0.
|
|
112
|
-
"@teambit/objects": "0.0.
|
|
113
|
-
"@teambit/scope": "1.0.
|
|
114
|
-
"@teambit/graph": "1.0.
|
|
115
|
-
"@teambit/isolator": "1.0.
|
|
116
|
-
"@teambit/component-tree": "1.0.
|
|
117
|
-
"@teambit/watcher": "1.0.
|
|
118
|
-
"@teambit/aspect-loader": "1.0.
|
|
119
|
-
"@teambit/graphql": "1.0.
|
|
120
|
-
"@teambit/bundler": "1.0.
|
|
121
|
-
"@teambit/ui": "1.0.
|
|
122
|
-
"@teambit/command-bar": "1.0.
|
|
123
|
-
"@teambit/sidebar": "1.0.
|
|
124
|
-
"@teambit/pubsub": "1.0.
|
|
125
|
-
"@teambit/deprecation": "1.0.
|
|
110
|
+
"@teambit/component": "1.0.1008",
|
|
111
|
+
"@teambit/dependency-resolver": "1.0.1008",
|
|
112
|
+
"@teambit/envs": "1.0.1008",
|
|
113
|
+
"@teambit/objects": "0.0.515",
|
|
114
|
+
"@teambit/scope": "1.0.1008",
|
|
115
|
+
"@teambit/graph": "1.0.1008",
|
|
116
|
+
"@teambit/isolator": "1.0.1008",
|
|
117
|
+
"@teambit/component-tree": "1.0.1008",
|
|
118
|
+
"@teambit/watcher": "1.0.1008",
|
|
119
|
+
"@teambit/aspect-loader": "1.0.1008",
|
|
120
|
+
"@teambit/graphql": "1.0.1008",
|
|
121
|
+
"@teambit/bundler": "1.0.1008",
|
|
122
|
+
"@teambit/ui": "1.0.1008",
|
|
123
|
+
"@teambit/command-bar": "1.0.1008",
|
|
124
|
+
"@teambit/sidebar": "1.0.1008",
|
|
125
|
+
"@teambit/pubsub": "1.0.1008",
|
|
126
|
+
"@teambit/deprecation": "1.0.1008"
|
|
126
127
|
},
|
|
127
128
|
"devDependencies": {
|
|
128
129
|
"@types/lodash": "4.14.165",
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Inlined copy of `@teambit/hope.design.hope-icon`'s `HopeAiIcon`.
|
|
5
|
+
* Inlined here because the original lives in a private scope; replace with the
|
|
6
|
+
* package import once it is publicly available.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
let counter = 0;
|
|
10
|
+
|
|
11
|
+
function useGradientIds() {
|
|
12
|
+
const ref = useRef<{ idle: string; active: string } | null>(null);
|
|
13
|
+
if (!ref.current) {
|
|
14
|
+
counter += 1;
|
|
15
|
+
ref.current = {
|
|
16
|
+
idle: `hopeAiIdle${counter}`,
|
|
17
|
+
active: `hopeAiActive${counter}`,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return ref.current;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type HopeAiIconProps = {
|
|
24
|
+
/** Whether the icon is in active/loading state. */
|
|
25
|
+
active?: boolean;
|
|
26
|
+
/** Icon size in pixels. */
|
|
27
|
+
size?: number;
|
|
28
|
+
/** Additional class name. */
|
|
29
|
+
className?: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export function HopeAiIcon({ active = false, size = 24, className }: HopeAiIconProps) {
|
|
33
|
+
const { idle, active: activeId } = useGradientIds();
|
|
34
|
+
const s = active ? `url(#${activeId})` : `url(#${idle})`;
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<svg
|
|
38
|
+
viewBox="-2 -2 28 28"
|
|
39
|
+
fill="none"
|
|
40
|
+
width={size}
|
|
41
|
+
height={size}
|
|
42
|
+
className={className}
|
|
43
|
+
style={{ display: 'inline-flex', flexShrink: 0 }}
|
|
44
|
+
>
|
|
45
|
+
<defs>
|
|
46
|
+
<linearGradient id={idle} x1="0%" y1="0%" x2="100%" y2="100%">
|
|
47
|
+
<stop offset="0%" stopColor="#6B8FA8">
|
|
48
|
+
<animate
|
|
49
|
+
attributeName="stop-color"
|
|
50
|
+
values="#6B8FA8;#7B6DB8;#A06B8F;#6B8FA8"
|
|
51
|
+
dur="8s"
|
|
52
|
+
repeatCount="indefinite"
|
|
53
|
+
/>
|
|
54
|
+
</stop>
|
|
55
|
+
<stop offset="100%" stopColor="#A06B8F">
|
|
56
|
+
<animate
|
|
57
|
+
attributeName="stop-color"
|
|
58
|
+
values="#A06B8F;#6B8FA8;#7B6DB8;#A06B8F"
|
|
59
|
+
dur="8s"
|
|
60
|
+
repeatCount="indefinite"
|
|
61
|
+
/>
|
|
62
|
+
</stop>
|
|
63
|
+
</linearGradient>
|
|
64
|
+
<linearGradient id={activeId} x1="0%" y1="0%" x2="100%" y2="100%">
|
|
65
|
+
<stop offset="0%" stopColor="#7EC8E3">
|
|
66
|
+
<animate
|
|
67
|
+
attributeName="stop-color"
|
|
68
|
+
values="#7EC8E3;#9B72F2;#F06B8A;#7EC8E3"
|
|
69
|
+
dur="3s"
|
|
70
|
+
repeatCount="indefinite"
|
|
71
|
+
/>
|
|
72
|
+
</stop>
|
|
73
|
+
<stop offset="100%" stopColor="#F06B8A">
|
|
74
|
+
<animate
|
|
75
|
+
attributeName="stop-color"
|
|
76
|
+
values="#F06B8A;#7EC8E3;#9B72F2;#F06B8A"
|
|
77
|
+
dur="3s"
|
|
78
|
+
repeatCount="indefinite"
|
|
79
|
+
/>
|
|
80
|
+
</stop>
|
|
81
|
+
</linearGradient>
|
|
82
|
+
</defs>
|
|
83
|
+
{/* main star */}
|
|
84
|
+
<path
|
|
85
|
+
d="M12 2.5L13.8 10.2L21.5 12L13.8 13.8L12 21.5L10.2 13.8L2.5 12L10.2 10.2L12 2.5Z"
|
|
86
|
+
stroke={s}
|
|
87
|
+
strokeWidth="1.5"
|
|
88
|
+
strokeLinejoin="round"
|
|
89
|
+
fill="none"
|
|
90
|
+
>
|
|
91
|
+
{active && (
|
|
92
|
+
<animateTransform
|
|
93
|
+
attributeName="transform"
|
|
94
|
+
type="rotate"
|
|
95
|
+
values="0 12 12;12 12 12;-12 12 12;0 12 12"
|
|
96
|
+
dur="1s"
|
|
97
|
+
repeatCount="indefinite"
|
|
98
|
+
/>
|
|
99
|
+
)}
|
|
100
|
+
</path>
|
|
101
|
+
{/* top-right mini sparkle */}
|
|
102
|
+
<path
|
|
103
|
+
d="M21 3L21.6 4.8L23.4 5.4L21.6 6L21 7.8L20.4 6L18.6 5.4L20.4 4.8L21 3Z"
|
|
104
|
+
stroke={s}
|
|
105
|
+
strokeWidth="0.8"
|
|
106
|
+
strokeLinejoin="round"
|
|
107
|
+
fill="none"
|
|
108
|
+
>
|
|
109
|
+
{active && <animate attributeName="opacity" values="1;0.2;1" dur="0.9s" repeatCount="indefinite" />}
|
|
110
|
+
</path>
|
|
111
|
+
{/* bottom-left mini sparkle */}
|
|
112
|
+
<path
|
|
113
|
+
d="M3.5 17.5L4 19L5.5 19.5L4 20L3.5 21.5L3 20L1.5 19.5L3 19L3.5 17.5Z"
|
|
114
|
+
stroke={s}
|
|
115
|
+
strokeWidth="0.8"
|
|
116
|
+
strokeLinejoin="round"
|
|
117
|
+
fill="none"
|
|
118
|
+
>
|
|
119
|
+
{active && (
|
|
120
|
+
<animate attributeName="opacity" values="1;0.15;1" dur="0.9s" begin="0.3s" repeatCount="indefinite" />
|
|
121
|
+
)}
|
|
122
|
+
</path>
|
|
123
|
+
</svg>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
background: var(--background-color);
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.vignette {
|
|
12
|
+
position: absolute;
|
|
13
|
+
inset: 0;
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
background: radial-gradient(ellipse at 50% 22%, var(--surface01-color, #f7f7f7) 0%, var(--background-color) 60%);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Centered in the space above the footer via auto margins. */
|
|
19
|
+
.body {
|
|
20
|
+
position: relative;
|
|
21
|
+
z-index: 1;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
width: 100%;
|
|
24
|
+
max-width: 720px;
|
|
25
|
+
margin: auto;
|
|
26
|
+
padding: 48px 32px;
|
|
27
|
+
text-align: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.headline {
|
|
31
|
+
font-family: 'Instrument Serif', Georgia, serif;
|
|
32
|
+
margin: 0;
|
|
33
|
+
font-size: 44px;
|
|
34
|
+
line-height: 1.1;
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
color: var(--on-background-high-color);
|
|
37
|
+
letter-spacing: -0.02em;
|
|
38
|
+
text-wrap: balance;
|
|
39
|
+
|
|
40
|
+
em {
|
|
41
|
+
color: var(--bit-accent-color, #6c5ce7);
|
|
42
|
+
font-style: italic;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.sub {
|
|
47
|
+
margin: 16px auto 40px;
|
|
48
|
+
max-width: 460px;
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
line-height: 1.55;
|
|
51
|
+
color: var(--on-background-medium-color);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* ---- Primary CTA — Hope callout ---- */
|
|
55
|
+
|
|
56
|
+
.hopeCallout {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
gap: 16px;
|
|
60
|
+
padding: 20px 24px;
|
|
61
|
+
background: var(--primary-surface-color, #f6f5fe);
|
|
62
|
+
border: 1.5px solid var(--border-primary-color, #6c5ce7);
|
|
63
|
+
border-radius: 14px;
|
|
64
|
+
box-shadow:
|
|
65
|
+
0 1px 2px rgba(93, 72, 255, 0.06),
|
|
66
|
+
0 18px 40px -18px rgba(93, 72, 255, 0.4);
|
|
67
|
+
text-align: left;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.hopeIcon {
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.hopeText {
|
|
75
|
+
flex: 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.hopeTitle {
|
|
79
|
+
font-size: 16px;
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
color: var(--on-background-high-color);
|
|
82
|
+
letter-spacing: -0.01em;
|
|
83
|
+
margin-bottom: 3px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.hopeHelp {
|
|
87
|
+
font-size: 13px;
|
|
88
|
+
color: var(--on-background-medium-color);
|
|
89
|
+
line-height: 1.5;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* ---- Separator ---- */
|
|
93
|
+
|
|
94
|
+
.sep {
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
gap: 14px;
|
|
98
|
+
margin: 32px auto 20px;
|
|
99
|
+
max-width: 340px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.sepLine {
|
|
103
|
+
flex: 1;
|
|
104
|
+
height: 1px;
|
|
105
|
+
background: var(--border-medium-color);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.sepLabel {
|
|
109
|
+
font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
|
|
110
|
+
font-size: 11px;
|
|
111
|
+
color: var(--on-background-low-color);
|
|
112
|
+
letter-spacing: 0.14em;
|
|
113
|
+
text-transform: uppercase;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* ---- DIY rows ---- */
|
|
117
|
+
|
|
118
|
+
.diyGrid {
|
|
119
|
+
display: grid;
|
|
120
|
+
grid-template-columns: 1fr 1fr;
|
|
121
|
+
gap: 16px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.diyRow {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
gap: 14px;
|
|
128
|
+
padding: 16px 18px;
|
|
129
|
+
background: var(--surface-color);
|
|
130
|
+
border: 1px solid var(--border-medium-color);
|
|
131
|
+
border-radius: 12px;
|
|
132
|
+
text-align: left;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.diyTitle {
|
|
136
|
+
font-size: 14px;
|
|
137
|
+
font-weight: 600;
|
|
138
|
+
color: var(--on-background-high-color);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.diyBody {
|
|
142
|
+
font-size: 13px;
|
|
143
|
+
color: var(--on-background-medium-color);
|
|
144
|
+
line-height: 1.45;
|
|
145
|
+
margin-top: 2px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.diyCmdRow {
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
gap: 8px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.diyCmd {
|
|
155
|
+
flex: 1;
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
gap: 8px;
|
|
159
|
+
padding: 8px 10px;
|
|
160
|
+
background: var(--surface01-color, #f7f7f7);
|
|
161
|
+
border: 1px solid var(--border-medium-color);
|
|
162
|
+
border-radius: 8px;
|
|
163
|
+
font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
|
|
164
|
+
font-size: 13px;
|
|
165
|
+
color: var(--on-background-color);
|
|
166
|
+
min-width: 0;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.diyPrompt {
|
|
170
|
+
color: var(--on-background-low-color);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.diyCmdText {
|
|
174
|
+
flex: 1;
|
|
175
|
+
overflow: hidden;
|
|
176
|
+
text-overflow: ellipsis;
|
|
177
|
+
white-space: nowrap;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.diyCopy {
|
|
181
|
+
height: 30px;
|
|
182
|
+
padding: 0 12px;
|
|
183
|
+
background: transparent;
|
|
184
|
+
border: 1px solid var(--border-medium-color);
|
|
185
|
+
border-radius: 8px;
|
|
186
|
+
font-size: 12px;
|
|
187
|
+
font-weight: 500;
|
|
188
|
+
color: var(--on-background-medium-color);
|
|
189
|
+
cursor: pointer;
|
|
190
|
+
flex-shrink: 0;
|
|
191
|
+
transition: background 0.12s ease;
|
|
192
|
+
|
|
193
|
+
&:hover {
|
|
194
|
+
background: var(--surface01-color, #f7f7f7);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* ---- Docs links ---- */
|
|
199
|
+
|
|
200
|
+
.docsLinks {
|
|
201
|
+
margin-top: 32px;
|
|
202
|
+
display: flex;
|
|
203
|
+
justify-content: center;
|
|
204
|
+
gap: 28px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.link {
|
|
208
|
+
color: var(--bit-accent-color, #6c5ce7);
|
|
209
|
+
text-decoration: none;
|
|
210
|
+
font-weight: 500;
|
|
211
|
+
font-size: 13px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* ---- Footer ---- */
|
|
215
|
+
|
|
216
|
+
.bottom {
|
|
217
|
+
flex-shrink: 0;
|
|
218
|
+
position: relative;
|
|
219
|
+
z-index: 1;
|
|
220
|
+
padding: 20px 24px;
|
|
221
|
+
display: flex;
|
|
222
|
+
align-items: center;
|
|
223
|
+
justify-content: center;
|
|
224
|
+
gap: 8px;
|
|
225
|
+
border-top: 1px solid var(--border-medium-color);
|
|
226
|
+
background: var(--surface-color);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.iconLink {
|
|
230
|
+
display: inline-flex;
|
|
231
|
+
padding: 8px;
|
|
232
|
+
border-radius: 10px;
|
|
233
|
+
text-decoration: none;
|
|
234
|
+
transition: background 0.14s ease;
|
|
235
|
+
|
|
236
|
+
&:hover {
|
|
237
|
+
background: var(--surface-hover-color, rgba(120, 120, 140, 0.12));
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.logo {
|
|
242
|
+
width: 28px;
|
|
243
|
+
height: 28px;
|
|
244
|
+
display: block;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.discordIcon {
|
|
248
|
+
display: block;
|
|
249
|
+
font-size: 28px;
|
|
250
|
+
line-height: 1;
|
|
251
|
+
color: var(--on-background-medium-color);
|
|
252
|
+
}
|