Skip to content

Commit 59bdd6a

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 7e0352d + 95b05b8 commit 59bdd6a

9 files changed

Lines changed: 17 additions & 7 deletions

File tree

packages/script-engine/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"@codemirror/language": "^6.12.2",
4141
"@codemirror/state": "^6.5.4",
4242
"@codemirror/theme-one-dark": "^6.1.3",
43-
"@codemirror/view": "^6.39.16"
43+
"@codemirror/view": "^6.39.16",
44+
"@lezer/highlight": "^1.2.3"
4445
},
4546
"peerDependencies": {
4647
"react": ">=18",

packages/script-engine/src/components/data-types-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface DataTypesSectionProps {
1212
}
1313

1414
export const DataTypesSection: React.FC<DataTypesSectionProps> = ({ allTypes, expanded, onToggle, colors }) => (
15-
<div style={{ marginTop: 4 }}>
15+
<div className="data-types-section" style={{ marginTop: 4 }}>
1616
<SectionHeader colors={colors} label="数据类型" />
1717
{allTypes.length === 0 ? (
1818
<div

packages/script-engine/src/components/drag-handle.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const DragHandle: React.FC<DragHandleProps> = ({
2020

2121
return (
2222
<div
23+
className="se-drag-handle"
2324
onMouseDown={onMouseDown}
2425
onMouseEnter={() => onHoverChange(true)}
2526
onMouseLeave={() => onHoverChange(false)}

packages/script-engine/src/components/main-function-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface MainFunctionSectionProps {
1010

1111
export const MainFunctionSection: React.FC<MainFunctionSectionProps> = ({ metadata, colors }) => {
1212
return (
13-
<div>
13+
<div className="main-function-section">
1414
<SectionHeader colors={colors} label="主函数" />
1515
<div style={{ padding: '4px 12px 4px 20px' }}>
1616
<div style={{ display: 'flex', alignItems: 'center', gap: 6, fontSize: 12 }}>

packages/script-engine/src/components/panel-header.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const PanelHeader: React.FC<PanelHeaderProps> = ({ colors, onCollapse })
1111

1212
return (
1313
<div
14+
className="panel-header"
1415
style={{
1516
padding: '8px 12px',
1617
display: 'flex',

packages/script-engine/src/components/toolbar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ export const Toolbar: React.FC<ToolbarProps> = ({
166166

167167
return (
168168
<div
169+
className="script-editor-toolbar"
169170
style={{
170171
display: 'flex',
171172
alignItems: 'center',
@@ -180,6 +181,7 @@ export const Toolbar: React.FC<ToolbarProps> = ({
180181
>
181182
{title && (
182183
<span
184+
className="script-editor-toolbar-title"
183185
style={{
184186
color: toolbarText,
185187
fontWeight: 600,
@@ -192,7 +194,7 @@ export const Toolbar: React.FC<ToolbarProps> = ({
192194
{title}
193195
</span>
194196
)}
195-
{!title && <span style={{ marginRight: 'auto' }} />}
197+
{!title && <span className="script-editor-toolbar-title" style={{ marginRight: 'auto' }} />}
196198

197199

198200
{/* 脚本说明按钮 */}

packages/script-engine/src/components/variables-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const VariablesSection: React.FC<VariablesSectionProps> = ({ sortedBinds,
1616
}
1717

1818
return (
19-
<div>
19+
<div className="variables-section">
2020
{/* 函数入参 */}
2121
{sortedRequests.length > 0 && (
2222
<>

packages/script-engine/src/script-code.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ export const ScriptCodeEditor: React.FC<ScriptCodeEditorProps> = (props) => {
381381

382382
return (
383383
<div
384+
className="script-editor"
384385
style={
385386
isFullscreen
386387
? {
@@ -420,6 +421,7 @@ export const ScriptCodeEditor: React.FC<ScriptCodeEditorProps> = (props) => {
420421

421422
{/* ── 编辑器 + 侧边栏 ───────────────────────────── */}
422423
<div
424+
className="script-editor-body"
423425
style={{
424426
display: 'flex',
425427
border: `1px solid ${borderColor}`,
@@ -430,7 +432,7 @@ export const ScriptCodeEditor: React.FC<ScriptCodeEditorProps> = (props) => {
430432
minHeight: isFullscreen ? 0 : undefined,
431433
}}
432434
>
433-
<div style={{ flex: 1, minWidth: 0, position: 'relative' }}>
435+
<div className="script-editor-code" style={{ flex: 1, minWidth: 0, position: 'relative' }}>
434436
{metadata && !sidebarOpen && (
435437
<ExpandSidebarButton
436438
borderColor={borderColor}
@@ -441,6 +443,7 @@ export const ScriptCodeEditor: React.FC<ScriptCodeEditorProps> = (props) => {
441443
)}
442444
<div
443445
ref={editorContainerRef}
446+
className="script-editor-codemirror"
444447
style={isFullscreen ? { height: '100%' } : undefined}
445448
/>
446449
</div>

packages/script-engine/src/type-panel/type-panel.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ export const TypePanel: React.FC<TypePanelProps> = ({
113113
return (
114114
<div
115115
ref={panelRef}
116+
className="type-panel"
116117
style={{
117118
width,
118119
flexShrink: 0,
@@ -135,6 +136,7 @@ export const TypePanel: React.FC<TypePanelProps> = ({
135136

136137
{/* 面板主体 */}
137138
<div
139+
className="type-panel-body"
138140
style={{
139141
flex: 1,
140142
minWidth: 0,
@@ -154,7 +156,7 @@ export const TypePanel: React.FC<TypePanelProps> = ({
154156

155157
{/* 可滚动内容 */}
156158
<div
157-
className={SCROLL_CLASS}
159+
className={`type-panel-content ${SCROLL_CLASS}`}
158160
style={{
159161
flex: 1,
160162
overflowY: 'auto',

0 commit comments

Comments
 (0)