forked from 77media/video-flow
Merge branch 'dev' of https://git.qikongjian.com/77media/video-flow into dev
This commit is contained in:
commit
ed0d92a01f
@ -25,8 +25,16 @@ interface HighlightNode {
|
|||||||
attrs: HighlightAttributes;
|
attrs: HighlightAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 定义只读文本节点接口
|
||||||
|
interface ReadonlyTextNode {
|
||||||
|
type: 'readonlyText';
|
||||||
|
attrs: {
|
||||||
|
text: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// 定义内容节点类型(文本或角色标记)
|
// 定义内容节点类型(文本或角色标记)
|
||||||
type ContentNode = TextNode | CharacterTokenNode | HighlightNode;
|
type ContentNode = TextNode | CharacterTokenNode | HighlightNode | ReadonlyTextNode;
|
||||||
|
|
||||||
// 定义段落接口
|
// 定义段落接口
|
||||||
interface Paragraph {
|
interface Paragraph {
|
||||||
@ -217,6 +225,12 @@ export class TextToShotAdapter {
|
|||||||
attrs: {
|
attrs: {
|
||||||
...roleMatch
|
...roleMatch
|
||||||
}},
|
}},
|
||||||
|
{
|
||||||
|
type: 'readonlyText',
|
||||||
|
attrs: {
|
||||||
|
text: ':'
|
||||||
|
}
|
||||||
|
},
|
||||||
...dialogNodes
|
...dialogNodes
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
@ -101,7 +101,7 @@ export function AISuggestionBar({
|
|||||||
height: { type: "spring", stiffness: 300, damping: 30 },
|
height: { type: "spring", stiffness: 300, damping: 30 },
|
||||||
opacity: { duration: 0.2 }
|
opacity: { duration: 0.2 }
|
||||||
}}
|
}}
|
||||||
className="mb-4 pt-4 px-4 overflow-hidden bg-black/40 rounded-xl backdrop-blur-sm"
|
className="mb-2 pt-4 px-4 overflow-hidden bg-black/40 rounded-xl backdrop-blur-sm"
|
||||||
>
|
>
|
||||||
<motion.div
|
<motion.div
|
||||||
className="flex items-center gap-3 mb-3"
|
className="flex items-center gap-3 mb-3"
|
||||||
@ -180,7 +180,10 @@ export function AISuggestionBar({
|
|||||||
toggleCollapse();
|
toggleCollapse();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onBlur={() => setIsFocused(false)}
|
onBlur={() => {
|
||||||
|
setIsFocused(false);
|
||||||
|
setShowSuggestions(!showSuggestions)
|
||||||
|
}}
|
||||||
placeholder={isCollapsed ? "点击展开..." : placeholder}
|
placeholder={isCollapsed ? "点击展开..." : placeholder}
|
||||||
className="w-full resize-none bg-transparent border-none px-4 py-3 text-white placeholder:text-white/40
|
className="w-full resize-none bg-transparent border-none px-4 py-3 text-white placeholder:text-white/40
|
||||||
focus:outline-none min-h-[52px] max-h-[150px] pr-[100px]"
|
focus:outline-none min-h-[52px] max-h-[150px] pr-[100px]"
|
||||||
@ -189,7 +192,7 @@ export function AISuggestionBar({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* 操作按钮 */}
|
{/* 操作按钮 */}
|
||||||
<div className="absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2">
|
<div className="absolute right-2 bottom-2 flex items-center gap-2">
|
||||||
<motion.button
|
<motion.button
|
||||||
className={`
|
className={`
|
||||||
p-2 rounded-lg transition-colors
|
p-2 rounded-lg transition-colors
|
||||||
|
|||||||
@ -171,7 +171,7 @@ export const ShotsEditor = forwardRef<any, ShotsEditorProps>(function ShotsEdito
|
|||||||
avatar: ''
|
avatar: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ type: 'text', text: ' says:' }
|
{ type: 'readonlyText', attrs: { text: ':' } }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user