@astryxdesign/cli 0.1.0 → 0.1.1
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/CHANGELOG.md +68 -0
- package/README.md +117 -75
- package/bin/astryx.mjs +22 -7
- package/docs/getting-started.doc.mjs +11 -11
- package/docs/icons.doc.mjs +1 -1
- package/docs/migration.doc.mjs +2 -2
- package/docs/shape.doc.mjs +1 -1
- package/docs/styling.doc.mjs +3 -4
- package/docs/theme.doc.dense.mjs +2 -2
- package/docs/theme.doc.mjs +14 -0
- package/docs/theme.doc.zh.mjs +2 -2
- package/docs/working-with-ai.doc.mjs +4 -4
- package/package.json +2 -2
- package/src/api/doctor.mjs +3 -3
- package/src/api/search.mjs +207 -13
- package/src/api/template.mjs +2 -1
- package/src/codemods/__tests__/registry.test.mjs +1 -0
- package/src/codemods/registry.mjs +1 -0
- package/src/codemods/runner.mjs +105 -51
- package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-config-surfaces.test.mjs +116 -0
- package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-module-specifiers.test.mjs +51 -0
- package/src/codemods/transforms/v0.1.0/index.mjs +28 -0
- package/src/codemods/transforms/v0.1.0/migrate-xds-config-surfaces.mjs +230 -0
- package/src/codemods/transforms/v0.1.0/migrate-xds-module-specifiers.mjs +84 -0
- package/src/commands/agent-docs.mjs +119 -66
- package/src/commands/agent-docs.path-safety.test.mjs +1 -1
- package/src/commands/agent-docs.test.mjs +87 -31
- package/src/commands/build-theme.import-path.test.mjs +1 -1
- package/src/commands/build-theme.path-safety.test.mjs +1 -1
- package/src/commands/build-theme.prose.test.mjs +1 -1
- package/src/commands/build.mjs +196 -0
- package/src/commands/component-package.test.mjs +1 -1
- package/src/commands/component.test.mjs +1 -1
- package/src/commands/docs.test.mjs +1 -1
- package/src/commands/doctor.test.mjs +1 -1
- package/src/commands/external-showcase.test.mjs +1 -1
- package/src/commands/init.mjs +10 -2
- package/src/commands/interactive-guard.test.mjs +1 -1
- package/src/commands/json-contract.test.mjs +10 -3
- package/src/commands/swizzle-gap-safety.test.mjs +1 -1
- package/src/commands/swizzle.path-safety.test.mjs +1 -1
- package/src/commands/template.path-safety.test.mjs +1 -1
- package/src/commands/template.test.mjs +1 -1
- package/src/commands/upgrade.mjs +353 -169
- package/src/commands/upgrade.test.mjs +41 -27
- package/src/index.mjs +1 -0
- package/src/lib/config.mjs +12 -0
- package/src/lib/config.test.mjs +42 -0
- package/src/lib/error-codes.mjs +3 -0
- package/src/types/error-codes.d.ts +1 -0
- package/src/utils/interactive.mjs +1 -1
- package/src/utils/interactive.test.mjs +2 -0
- package/src/utils/package-manager.mjs +1 -1
- package/src/utils/package-manager.test.mjs +1 -1
- package/src/utils/path-safety.test.mjs +1 -1
- package/src/utils/paths.test.mjs +8 -8
- package/src/utils/update-check.mjs +4 -26
- package/src/utils/update-check.test.mjs +2 -64
- package/templates/blocks/components/AppShell/AppShellContentOnly.tsx +1 -9
- package/templates/blocks/components/AppShell/AppShellShowcase.tsx +1 -10
- package/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx +1 -9
- package/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx +1 -9
- package/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsx +1 -9
- package/templates/blocks/components/AppShell/AppShellWithBanner.tsx +1 -9
- package/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsx +12 -19
- package/templates/blocks/components/Banner/BannerShowcase.tsx +1 -8
- package/templates/blocks/components/Blockquote/BlockquoteShowcase.tsx +1 -8
- package/templates/blocks/components/Carousel/CarouselShowcase.tsx +2 -12
- package/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerShowcase.tsx +6 -9
- package/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx +10 -12
- package/templates/blocks/components/ChatMessageList/ChatMessageListDensity.tsx +1 -9
- package/templates/blocks/components/ChatMessageList/ChatMessageListFullFeatured.tsx +1 -9
- package/templates/blocks/components/ChatMessageList/ChatMessageListShowcase.tsx +1 -9
- package/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx +1 -8
- package/templates/blocks/components/ChatSendButton/ChatSendButtonInComposer.tsx +1 -8
- package/templates/blocks/components/Citation/CitationInlineText.tsx +4 -4
- package/templates/blocks/components/Code/CodeInlineInParagraph.tsx +1 -8
- package/templates/blocks/components/CodeBlock/CodeBlockBashCommand.tsx +1 -1
- package/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.tsx +1 -1
- package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemShowcase.tsx +9 -12
- package/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx +13 -15
- package/templates/blocks/components/Divider/DividerShowcase.tsx +1 -8
- package/templates/blocks/components/Divider/DividerVertical.tsx +7 -9
- package/templates/blocks/components/Field/FieldShowcase.tsx +1 -8
- package/templates/blocks/components/FormLayout/FormLayoutHorizontal.tsx +1 -6
- package/templates/blocks/components/Grid/GridResponsiveAutoFit.tsx +1 -9
- package/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.tsx +4 -6
- package/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx +1 -6
- package/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx +2 -8
- package/templates/blocks/components/HoverCard/HoverCardShowcase.tsx +1 -8
- package/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx +2 -12
- package/templates/blocks/components/OverflowList/OverflowListOverflowBadges.tsx +8 -11
- package/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx +9 -12
- package/templates/blocks/components/Overlay/OverlayBottomStrip.tsx +4 -17
- package/templates/blocks/components/Overlay/OverlayHoverReveal.tsx +15 -16
- package/templates/blocks/components/Overlay/OverlayShowcase.tsx +5 -21
- package/templates/blocks/components/Pagination/PaginationDotsCarousel.tsx +2 -14
- package/templates/blocks/components/Pagination/PaginationPageSize.tsx +12 -14
- package/templates/blocks/components/Pagination/PaginationVariants.tsx +1 -8
- package/templates/blocks/components/Pagination/PaginationWithTable.tsx +2 -14
- package/templates/blocks/components/Tokenizer/TokenizerClear.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx +2 -7
- package/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerIcon.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerMaxEntries.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx +2 -7
- package/templates/blocks/components/Tokenizer/TokenizerShowcase.tsx +1 -6
- package/templates/blocks/components/Tokenizer/TokenizerStates.tsx +4 -9
- package/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx +1 -10
- package/templates/blocks/components/Toolbar/ToolbarSizes.tsx +1 -8
- package/templates/blocks/components/Toolbar/ToolbarTableFilter.tsx +1 -8
- package/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx +1 -10
- package/templates/blocks/components/Toolbar/ToolbarWithTabs.tsx +8 -11
- package/templates/pages/ai-chat/page.tsx +71 -64
- package/templates/pages/ai-chat-landing/page.tsx +8 -12
- package/templates/pages/centered-hero/page.tsx +13 -15
- package/templates/pages/classic-gallery/page.tsx +27 -34
- package/templates/pages/detail-page/page.tsx +18 -18
- package/templates/pages/documentation/page.tsx +42 -58
- package/templates/pages/documentation-design/page.tsx +82 -60
- package/templates/pages/documentation-technical/page.tsx +101 -60
- package/templates/pages/editor/page.tsx +42 -54
- package/templates/pages/file-explorer/page.tsx +13 -16
- package/templates/pages/form-two-column/page.tsx +13 -17
- package/templates/pages/gallery-hero/page.tsx +13 -15
- package/templates/pages/ide/page.tsx +188 -264
- package/templates/pages/library/page.tsx +16 -23
- package/templates/pages/login/page.tsx +14 -18
- package/templates/pages/login-card/page.tsx +14 -18
- package/templates/pages/login-split/page.tsx +50 -48
- package/templates/pages/login-sso/page.tsx +9 -13
- package/templates/pages/mixed-gallery/page.tsx +51 -45
- package/templates/pages/payment-form/page.tsx +56 -70
- package/templates/pages/product-detail/page.tsx +27 -33
- package/templates/pages/product-gallery/page.tsx +7 -13
- package/templates/pages/settings-dialog/page.tsx +35 -43
- package/templates/pages/settings-sidebar/page.tsx +39 -47
- package/templates/pages/side-gallery/page.tsx +6 -9
- package/templates/pages/table-grouped/page.tsx +11 -15
- package/templates/pages/theme-showcase/page.tsx +33 -37
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
-
import {useState, useMemo} from 'react';
|
|
6
|
-
import * as stylex from '@stylexjs/stylex';
|
|
7
|
-
import {SideNav, SideNavItem, SideNavSection} from '@astryxdesign/core/SideNav';
|
|
5
|
+
import {useState, useMemo, type CSSProperties} from 'react';
|
|
8
6
|
|
|
9
7
|
import {Layout, LayoutContent, LayoutPanel} from '@astryxdesign/core/Layout';
|
|
10
8
|
import {ResizeHandle, useResizable} from '@astryxdesign/core/Resizable';
|
|
11
9
|
import {Text, Heading} from '@astryxdesign/core/Text';
|
|
12
10
|
import {CodeBlock} from '@astryxdesign/core/CodeBlock';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
11
|
+
import {Stack, StackItem} from '@astryxdesign/core/Layout';
|
|
12
|
+
import {useMediaQuery} from '@astryxdesign/core/hooks';
|
|
15
13
|
import {TabList, Tab} from '@astryxdesign/core/TabList';
|
|
16
14
|
import {
|
|
17
15
|
SegmentedControl,
|
|
@@ -27,90 +25,71 @@ import type {TreeListItemData} from '@astryxdesign/core/TreeList';
|
|
|
27
25
|
import {
|
|
28
26
|
FolderIcon,
|
|
29
27
|
DocumentTextIcon,
|
|
30
|
-
CodeBracketIcon,
|
|
31
28
|
MagnifyingGlassIcon,
|
|
32
|
-
CommandLineIcon,
|
|
33
|
-
ExclamationTriangleIcon,
|
|
34
|
-
InformationCircleIcon,
|
|
35
|
-
BugAntIcon,
|
|
36
|
-
HomeIcon,
|
|
37
|
-
FolderOpenIcon,
|
|
38
|
-
PuzzlePieceIcon,
|
|
39
29
|
} from '@heroicons/react/24/outline';
|
|
40
|
-
import {
|
|
41
|
-
HomeIcon as HomeIconSolid,
|
|
42
|
-
FolderOpenIcon as FolderOpenSolid,
|
|
43
|
-
MagnifyingGlassIcon as MagnifyingGlassSolid,
|
|
44
|
-
PuzzlePieceIcon as PuzzlePieceSolid,
|
|
45
|
-
} from '@heroicons/react/24/solid';
|
|
46
30
|
|
|
47
|
-
const styles =
|
|
31
|
+
const styles: Record<string, CSSProperties> = {
|
|
48
32
|
contentFill: {
|
|
49
33
|
height: '100%',
|
|
50
34
|
},
|
|
51
35
|
terminalWrapper: {
|
|
52
|
-
flex: 1,
|
|
53
36
|
minHeight: 0,
|
|
54
37
|
overflow: 'hidden',
|
|
55
38
|
display: 'grid',
|
|
56
39
|
},
|
|
57
40
|
tabListPadding: {
|
|
58
|
-
paddingTop:
|
|
41
|
+
paddingTop: 'var(--spacing-2)',
|
|
59
42
|
},
|
|
60
43
|
metadataCompact: {
|
|
61
|
-
gap:
|
|
44
|
+
gap: 'var(--spacing-1) var(--spacing-3)',
|
|
62
45
|
},
|
|
63
46
|
historyTimelineDot: {
|
|
64
47
|
width: 8,
|
|
65
48
|
height: 8,
|
|
66
49
|
borderRadius: '50%',
|
|
67
|
-
backgroundColor:
|
|
50
|
+
backgroundColor: 'var(--color-border-emphasized)',
|
|
68
51
|
marginTop: 6,
|
|
69
52
|
flexShrink: 0,
|
|
70
53
|
},
|
|
71
54
|
editorArea: {
|
|
72
|
-
flex: 1,
|
|
73
55
|
overflow: 'auto',
|
|
56
|
+
minHeight: 0,
|
|
74
57
|
},
|
|
75
58
|
fileExplorer: {
|
|
76
59
|
padding: 16,
|
|
60
|
+
minWidth: 0,
|
|
77
61
|
},
|
|
78
|
-
|
|
62
|
+
propertiesPanel: {
|
|
79
63
|
height: '100%',
|
|
80
|
-
overflow: 'hidden',
|
|
81
64
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
'@media (max-width: 768px)': 'none',
|
|
86
|
-
},
|
|
65
|
+
propertiesContent: {
|
|
66
|
+
flex: 1,
|
|
67
|
+
minHeight: 0,
|
|
87
68
|
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
69
|
+
propertyActions: {
|
|
70
|
+
marginTop: 'auto',
|
|
71
|
+
},
|
|
72
|
+
terminalArea: {
|
|
73
|
+
height: '100%',
|
|
74
|
+
overflow: 'hidden',
|
|
93
75
|
},
|
|
94
|
-
}
|
|
76
|
+
};
|
|
95
77
|
|
|
96
78
|
const EDITOR_CODE = `import {useState, useCallback} from 'react';
|
|
97
|
-
import * as stylex from '@stylexjs/stylex';
|
|
98
79
|
import {Button} from '@astryxdesign/core/Button';
|
|
99
80
|
import {Text} from '@astryxdesign/core/Text';
|
|
100
81
|
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
});
|
|
82
|
+
const containerStyle = {
|
|
83
|
+
display: 'flex',
|
|
84
|
+
flexDirection: 'column',
|
|
85
|
+
gap: 8,
|
|
86
|
+
padding: 16,
|
|
87
|
+
};
|
|
88
|
+
const counterStyle = {
|
|
89
|
+
fontSize: 48,
|
|
90
|
+
fontWeight: 700,
|
|
91
|
+
fontVariantNumeric: 'tabular-nums',
|
|
92
|
+
};
|
|
114
93
|
|
|
115
94
|
export default function Counter() {
|
|
116
95
|
const [count, setCount] = useState(0);
|
|
@@ -124,9 +103,9 @@ export default function Counter() {
|
|
|
124
103
|
}, []);
|
|
125
104
|
|
|
126
105
|
return (
|
|
127
|
-
<div {
|
|
106
|
+
<div style={containerStyle}>
|
|
128
107
|
<Text type="label">Counter</Text>
|
|
129
|
-
<span {
|
|
108
|
+
<span style={counterStyle}>
|
|
130
109
|
{count}
|
|
131
110
|
</span>
|
|
132
111
|
<Button label="Increment" onClick={increment} />
|
|
@@ -151,22 +130,23 @@ $ `;
|
|
|
151
130
|
function buildFileTree(
|
|
152
131
|
onFileClick: (name: string) => void,
|
|
153
132
|
): TreeListItemData[] {
|
|
133
|
+
const label = (text: string) => <Text maxLines={1}>{text}</Text>;
|
|
154
134
|
const file = (id: string): TreeListItemData => ({
|
|
155
135
|
id,
|
|
156
|
-
label: id,
|
|
136
|
+
label: label(id),
|
|
157
137
|
startContent: <Icon icon={DocumentTextIcon} size="xsm" />,
|
|
158
138
|
onClick: () => onFileClick(id),
|
|
159
139
|
});
|
|
160
140
|
return [
|
|
161
141
|
{
|
|
162
142
|
id: 'src',
|
|
163
|
-
label: 'src',
|
|
143
|
+
label: label('src'),
|
|
164
144
|
startContent: <Icon icon={FolderIcon} size="xsm" />,
|
|
165
145
|
isExpanded: true,
|
|
166
146
|
children: [
|
|
167
147
|
{
|
|
168
148
|
id: 'components',
|
|
169
|
-
label: 'components',
|
|
149
|
+
label: label('components'),
|
|
170
150
|
startContent: <Icon icon={FolderIcon} size="xsm" />,
|
|
171
151
|
isExpanded: true,
|
|
172
152
|
children: [
|
|
@@ -177,17 +157,17 @@ function buildFileTree(
|
|
|
177
157
|
},
|
|
178
158
|
{
|
|
179
159
|
id: 'pages',
|
|
180
|
-
label: 'pages',
|
|
160
|
+
label: label('pages'),
|
|
181
161
|
startContent: <Icon icon={FolderIcon} size="xsm" />,
|
|
182
162
|
isExpanded: true,
|
|
183
163
|
children: [file('index.tsx'), file('about.tsx')],
|
|
184
164
|
},
|
|
185
165
|
{
|
|
186
166
|
id: 'styles',
|
|
187
|
-
label: 'styles',
|
|
167
|
+
label: label('styles'),
|
|
188
168
|
startContent: <Icon icon={FolderIcon} size="xsm" />,
|
|
189
169
|
isExpanded: true,
|
|
190
|
-
children: [file('tokens.
|
|
170
|
+
children: [file('tokens.ts'), file('theme.ts')],
|
|
191
171
|
},
|
|
192
172
|
],
|
|
193
173
|
},
|
|
@@ -211,12 +191,11 @@ const PROPERTIES = [
|
|
|
211
191
|
const HISTORY_ITEMS = [
|
|
212
192
|
{label: 'Opened Counter.tsx', time: '2 min ago'},
|
|
213
193
|
{label: 'Opened Layout.tsx', time: '6 min ago'},
|
|
214
|
-
{label: 'Viewed tokens.
|
|
194
|
+
{label: 'Viewed tokens.ts', time: '11 min ago'},
|
|
215
195
|
];
|
|
216
196
|
|
|
217
197
|
export default function ResizableWorkspacePage() {
|
|
218
198
|
const [activeFile, setActiveFile] = useState('Counter.tsx');
|
|
219
|
-
const [activeNavItem, setActiveNavItem] = useState('Explorer');
|
|
220
199
|
const [activeTermTab, setActiveTermTab] = useState('terminal');
|
|
221
200
|
const [activePropertiesTab, setActivePropertiesTab] = useState('properties');
|
|
222
201
|
const fileTree = useMemo(() => buildFileTree(setActiveFile), []);
|
|
@@ -245,89 +224,48 @@ export default function ResizableWorkspacePage() {
|
|
|
245
224
|
collapsedSize: 40,
|
|
246
225
|
});
|
|
247
226
|
|
|
227
|
+
const isMobile = useMediaQuery('(max-width: 768px)');
|
|
228
|
+
|
|
248
229
|
return (
|
|
249
230
|
<Layout
|
|
250
231
|
height="fill"
|
|
251
|
-
start={
|
|
252
|
-
<LayoutPanel hasDivider={false} padding={0}>
|
|
253
|
-
<SideNav
|
|
254
|
-
collapsible={{defaultIsCollapsed: true}}
|
|
255
|
-
resizable
|
|
256
|
-
xstyle={styles.hideSideNav}>
|
|
257
|
-
<SideNavSection title="Navigation" isHeaderHidden>
|
|
258
|
-
<SideNavItem
|
|
259
|
-
label="Home"
|
|
260
|
-
icon={HomeIcon}
|
|
261
|
-
selectedIcon={HomeIconSolid}
|
|
262
|
-
isSelected={activeNavItem === 'Home'}
|
|
263
|
-
onClick={() => setActiveNavItem('Home')}
|
|
264
|
-
/>
|
|
265
|
-
<SideNavItem
|
|
266
|
-
label="Explorer"
|
|
267
|
-
icon={FolderOpenIcon}
|
|
268
|
-
selectedIcon={FolderOpenSolid}
|
|
269
|
-
isSelected={activeNavItem === 'Explorer'}
|
|
270
|
-
onClick={() => setActiveNavItem('Explorer')}
|
|
271
|
-
/>
|
|
272
|
-
<SideNavItem
|
|
273
|
-
label="Search"
|
|
274
|
-
icon={MagnifyingGlassIcon}
|
|
275
|
-
selectedIcon={MagnifyingGlassSolid}
|
|
276
|
-
isSelected={activeNavItem === 'Search'}
|
|
277
|
-
onClick={() => setActiveNavItem('Search')}
|
|
278
|
-
/>
|
|
279
|
-
<SideNavItem
|
|
280
|
-
label="Source Control"
|
|
281
|
-
icon={CodeBracketIcon}
|
|
282
|
-
isSelected={activeNavItem === 'Source Control'}
|
|
283
|
-
onClick={() => setActiveNavItem('Source Control')}
|
|
284
|
-
/>
|
|
285
|
-
<SideNavItem
|
|
286
|
-
label="Extensions"
|
|
287
|
-
icon={PuzzlePieceIcon}
|
|
288
|
-
selectedIcon={PuzzlePieceSolid}
|
|
289
|
-
isSelected={activeNavItem === 'Extensions'}
|
|
290
|
-
onClick={() => setActiveNavItem('Extensions')}
|
|
291
|
-
/>
|
|
292
|
-
</SideNavSection>
|
|
293
|
-
</SideNav>
|
|
294
|
-
</LayoutPanel>
|
|
295
|
-
}
|
|
296
232
|
content={
|
|
297
233
|
<LayoutContent padding={0}>
|
|
298
234
|
<Layout
|
|
299
235
|
height="fill"
|
|
300
236
|
start={
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
237
|
+
isMobile ? undefined : (
|
|
238
|
+
<>
|
|
239
|
+
{!startPanel.isCollapsed && (
|
|
240
|
+
<LayoutPanel
|
|
241
|
+
width={startPanel.size}
|
|
242
|
+
hasDivider={false}
|
|
243
|
+
padding={0}>
|
|
244
|
+
<Stack
|
|
245
|
+
direction="vertical"
|
|
246
|
+
style={styles.fileExplorer}
|
|
247
|
+
gap={2}>
|
|
248
|
+
<TextInput
|
|
249
|
+
label="Search files"
|
|
250
|
+
isLabelHidden
|
|
251
|
+
value=""
|
|
252
|
+
placeholder="Search"
|
|
253
|
+
size="md"
|
|
254
|
+
startIcon={MagnifyingGlassIcon}
|
|
255
|
+
/>
|
|
256
|
+
<TreeList items={fileTree} density="compact" />
|
|
257
|
+
</Stack>
|
|
258
|
+
</LayoutPanel>
|
|
259
|
+
)}
|
|
260
|
+
<ResizeHandle
|
|
261
|
+
direction="horizontal"
|
|
262
|
+
hasDivider
|
|
263
|
+
isAlwaysVisible={false}
|
|
264
|
+
resizable={startPanel.props}
|
|
265
|
+
label="Resize file explorer"
|
|
266
|
+
/>
|
|
267
|
+
</>
|
|
268
|
+
)
|
|
331
269
|
}
|
|
332
270
|
content={
|
|
333
271
|
<LayoutContent padding={0}>
|
|
@@ -335,13 +273,13 @@ export default function ResizableWorkspacePage() {
|
|
|
335
273
|
height="fill"
|
|
336
274
|
content={
|
|
337
275
|
<LayoutContent padding={0}>
|
|
338
|
-
<Stack
|
|
339
|
-
|
|
340
|
-
xstyle={styles.contentFill}>
|
|
341
|
-
<div {...stylex.props(styles.editorArea)}>
|
|
276
|
+
<Stack direction="vertical" style={styles.contentFill}>
|
|
277
|
+
<StackItem size="fill" style={styles.editorArea}>
|
|
342
278
|
<CodeBlock
|
|
343
279
|
code={EDITOR_CODE}
|
|
344
280
|
language="typescript"
|
|
281
|
+
container="section"
|
|
282
|
+
hasLanguageLabel={false}
|
|
345
283
|
hasLineNumbers
|
|
346
284
|
highlightLines={[21]}
|
|
347
285
|
hasCopyButton={false}
|
|
@@ -353,7 +291,7 @@ export default function ResizableWorkspacePage() {
|
|
|
353
291
|
borderRadius: 0,
|
|
354
292
|
}}
|
|
355
293
|
/>
|
|
356
|
-
</
|
|
294
|
+
</StackItem>
|
|
357
295
|
<ResizeHandle
|
|
358
296
|
direction="vertical"
|
|
359
297
|
hasDivider
|
|
@@ -371,50 +309,26 @@ export default function ResizableWorkspacePage() {
|
|
|
371
309
|
}}>
|
|
372
310
|
<Stack
|
|
373
311
|
direction="vertical"
|
|
374
|
-
|
|
312
|
+
style={styles.contentFill}>
|
|
375
313
|
<TabList
|
|
376
314
|
value={activeTermTab}
|
|
377
315
|
onChange={val => setActiveTermTab(val)}
|
|
378
316
|
size="sm"
|
|
379
317
|
hasDivider={false}
|
|
380
|
-
|
|
381
|
-
<Tab
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
<Icon icon={CommandLineIcon} size="sm" />
|
|
386
|
-
}
|
|
387
|
-
/>
|
|
388
|
-
<Tab
|
|
389
|
-
label="Problems"
|
|
390
|
-
value="problems"
|
|
391
|
-
icon={
|
|
392
|
-
<Icon
|
|
393
|
-
icon={ExclamationTriangleIcon}
|
|
394
|
-
size="sm"
|
|
395
|
-
/>
|
|
396
|
-
}
|
|
397
|
-
/>
|
|
398
|
-
<Tab
|
|
399
|
-
label="Output"
|
|
400
|
-
value="output"
|
|
401
|
-
icon={
|
|
402
|
-
<Icon
|
|
403
|
-
icon={InformationCircleIcon}
|
|
404
|
-
size="sm"
|
|
405
|
-
/>
|
|
406
|
-
}
|
|
407
|
-
/>
|
|
408
|
-
<Tab
|
|
409
|
-
label="Debug"
|
|
410
|
-
value="debug"
|
|
411
|
-
icon={<Icon icon={BugAntIcon} size="sm" />}
|
|
412
|
-
/>
|
|
318
|
+
style={styles.tabListPadding}>
|
|
319
|
+
<Tab label="Terminal" value="terminal" />
|
|
320
|
+
<Tab label="Problems" value="problems" />
|
|
321
|
+
<Tab label="Output" value="output" />
|
|
322
|
+
<Tab label="Debug" value="debug" />
|
|
413
323
|
</TabList>
|
|
414
|
-
<
|
|
324
|
+
<StackItem
|
|
325
|
+
size="fill"
|
|
326
|
+
style={styles.terminalWrapper}>
|
|
415
327
|
<CodeBlock
|
|
416
328
|
code={TERMINAL_OUTPUT}
|
|
417
329
|
language="bash"
|
|
330
|
+
container="section"
|
|
331
|
+
hasLanguageLabel={false}
|
|
418
332
|
hasCopyButton={false}
|
|
419
333
|
size="sm"
|
|
420
334
|
style={{
|
|
@@ -424,7 +338,7 @@ export default function ResizableWorkspacePage() {
|
|
|
424
338
|
borderRadius: 0,
|
|
425
339
|
}}
|
|
426
340
|
/>
|
|
427
|
-
</
|
|
341
|
+
</StackItem>
|
|
428
342
|
</Stack>
|
|
429
343
|
</div>
|
|
430
344
|
)}
|
|
@@ -432,106 +346,116 @@ export default function ResizableWorkspacePage() {
|
|
|
432
346
|
</LayoutContent>
|
|
433
347
|
}
|
|
434
348
|
end={
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
<
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
<
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
{
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
349
|
+
isMobile ? undefined : (
|
|
350
|
+
<>
|
|
351
|
+
<ResizeHandle
|
|
352
|
+
direction="horizontal"
|
|
353
|
+
hasDivider
|
|
354
|
+
isReversed
|
|
355
|
+
isAlwaysVisible={false}
|
|
356
|
+
resizable={endPanel.props}
|
|
357
|
+
label="Resize properties panel"
|
|
358
|
+
/>
|
|
359
|
+
{!endPanel.isCollapsed && (
|
|
360
|
+
<LayoutPanel
|
|
361
|
+
width={endPanel.size}
|
|
362
|
+
hasDivider={false}
|
|
363
|
+
padding={4}>
|
|
364
|
+
<Stack
|
|
365
|
+
direction="vertical"
|
|
366
|
+
gap={3}
|
|
367
|
+
style={styles.propertiesPanel}>
|
|
368
|
+
<SegmentedControl
|
|
369
|
+
label="Properties panel sections"
|
|
370
|
+
value={activePropertiesTab}
|
|
371
|
+
onChange={setActivePropertiesTab}
|
|
372
|
+
size="sm"
|
|
373
|
+
layout="fill">
|
|
374
|
+
<SegmentedControlItem
|
|
375
|
+
label="Properties"
|
|
376
|
+
value="properties"
|
|
377
|
+
/>
|
|
378
|
+
<SegmentedControlItem
|
|
379
|
+
label="History"
|
|
380
|
+
value="history"
|
|
381
|
+
/>
|
|
382
|
+
</SegmentedControl>
|
|
383
|
+
{activePropertiesTab === 'properties' ? (
|
|
384
|
+
<Stack
|
|
385
|
+
direction="vertical"
|
|
386
|
+
gap={3}
|
|
387
|
+
style={styles.propertiesContent}>
|
|
388
|
+
<Stack direction="vertical" gap={1}>
|
|
389
|
+
<Heading level={3} maxLines={1}>
|
|
390
|
+
{activeFile}
|
|
391
|
+
</Heading>
|
|
392
|
+
<Text
|
|
393
|
+
color="secondary"
|
|
394
|
+
type="supporting"
|
|
395
|
+
maxLines={1}>
|
|
396
|
+
src/components/{activeFile}
|
|
397
|
+
</Text>
|
|
398
|
+
</Stack>
|
|
399
|
+
<MetadataList style={styles.metadataCompact}>
|
|
400
|
+
{PROPERTIES.map(prop => (
|
|
401
|
+
<MetadataListItem
|
|
402
|
+
key={prop.label}
|
|
403
|
+
label={prop.label}>
|
|
404
|
+
{prop.value}
|
|
405
|
+
</MetadataListItem>
|
|
406
|
+
))}
|
|
407
|
+
</MetadataList>
|
|
408
|
+
<Stack
|
|
409
|
+
direction="vertical"
|
|
410
|
+
gap={2}
|
|
411
|
+
style={styles.propertyActions}>
|
|
487
412
|
<Button
|
|
488
413
|
label="Format Document"
|
|
489
|
-
size="
|
|
414
|
+
size="sm"
|
|
490
415
|
variant="secondary"
|
|
491
416
|
/>
|
|
492
417
|
<Button
|
|
493
418
|
label="Go to Definition"
|
|
494
|
-
size="
|
|
419
|
+
size="sm"
|
|
495
420
|
variant="secondary"
|
|
496
421
|
/>
|
|
497
422
|
<Button
|
|
498
423
|
label="Find References"
|
|
499
|
-
size="
|
|
424
|
+
size="sm"
|
|
500
425
|
variant="secondary"
|
|
501
426
|
/>
|
|
502
427
|
</Stack>
|
|
503
428
|
</Stack>
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
</div>
|
|
429
|
+
) : (
|
|
430
|
+
<Stack direction="vertical" gap={1}>
|
|
431
|
+
<List>
|
|
432
|
+
{HISTORY_ITEMS.map(item => (
|
|
433
|
+
<ListItem
|
|
434
|
+
key={item.label}
|
|
435
|
+
label={item.label}
|
|
436
|
+
endContent={
|
|
437
|
+
<Text
|
|
438
|
+
type="supporting"
|
|
439
|
+
color="secondary"
|
|
440
|
+
maxLines={1}>
|
|
441
|
+
{item.time}
|
|
442
|
+
</Text>
|
|
443
|
+
}
|
|
444
|
+
startContent={
|
|
445
|
+
<span
|
|
446
|
+
style={styles.historyTimelineDot}
|
|
447
|
+
/>
|
|
448
|
+
}
|
|
449
|
+
/>
|
|
450
|
+
))}
|
|
451
|
+
</List>
|
|
452
|
+
</Stack>
|
|
453
|
+
)}
|
|
454
|
+
</Stack>
|
|
455
|
+
</LayoutPanel>
|
|
456
|
+
)}
|
|
457
|
+
</>
|
|
458
|
+
)
|
|
535
459
|
}
|
|
536
460
|
/>
|
|
537
461
|
</LayoutContent>
|