/** * 提示词小助手 (PromptAssistant) 样式表 * 包含所有组件样式和动画定义 */ /* ======== 提示词小助手样式 ======== */ /* 提示词小助手容器 */ .prompt-assistant-container { position: absolute; pointer-events: all; display: none; align-items: center; justify-content: center; padding: 4px; background-color: color-mix(in srgb, var(--bg-color), transparent 20%); border: 1px solid color-mix(in srgb, var(--p-panel-border-color), transparent 60%); border-radius: 6px; z-index: 9999; opacity: 0.95; backdrop-filter: blur(8px); transform-origin: bottom right; user-select: none; will-change: transform, opacity; width: auto; height: 28px !important; max-width: fit-content; box-sizing: border-box !important; overflow: visible; } /* ======== 图像小助手样式 ======== */ /* 图像小助手容器 */ .image-assistant-container { position: fixed; /* 使用fixed定位 */ pointer-events: all; display: none; align-items: center; justify-content: center; padding: 4px; background-color: color-mix(in srgb, var(--bg-color), transparent 20%); border: 1px solid color-mix(in srgb, var(--p-panel-border-color), transparent 40%); border-radius: 6px; z-index: 9999; opacity: 0.95; backdrop-filter: blur(8px); transform-origin: bottom right; user-select: none; will-change: transform, opacity; width: auto; height: 28px !important; max-width: fit-content; box-sizing: border-box !important; overflow: visible; transform: scale(var(--assistant-scale, 1)); /* 添加transform属性 */ } .image-assistant-container:hover { opacity: 1; } /* 图像小助手显示和隐藏动画类 */ .image-assistant-show { display: flex !important; animation: image-assistant-fade-in 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); } .image-assistant-hide { display: flex !important; animation: image-assistant-fade-out 0.2s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards !important; pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); } /* ======== 共用组件样式 ======== */ /* 内部内容容器 */ .prompt-assistant-inner, .image-assistant-inner { display: flex; gap: 2px; } /* 按钮分割线样式 */ .prompt-assistant-divider, .image-assistant-divider { width: 1px; height: 10px; background-color: var(--p-content-border-color); margin: 0 2px; align-self: center; flex-shrink: 0; transform: translateZ(0); border-radius: 0.5px; } /* 显示和隐藏动画类 */ .assistant-show { display: flex !important; animation: clipFadeInDown 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); } .assistant-hide { display: flex !important; animation: clipFadeOutUp 0.2s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards !important; pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); } /* 状态提示的入场和退场动画类 */ .statustip-show { animation: tipScaleIn 0.1s ease-out forwards !important; } .statustip-hide { animation: tipFloatUp 0.4s ease-out forwards !important; } /* 按钮样式 */ .prompt-assistant-button, .image-assistant-button { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; cursor: pointer; opacity: 0.8; border: none; padding: 0; margin: 0 1px; background-color: transparent; transition: transform 0.15s, opacity 0.2s, background-color 0.2s; flex-shrink: 0; border-radius: 3px; color: var(--p-dialog-color); } /* SVG图标样式 */ .svg-icon { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; position: relative; z-index: 1; } .svg-icon svg { width: 100%; height: 100%; fill: currentColor; color: inherit; transition: all 0.2s; vertical-align: middle; } /* 按钮内部图标样式 */ .prompt-assistant-button .svg-icon, .image-assistant-button .svg-icon { width: 18px; height: 18px; color: inherit; transition: all 0.2s; position: relative; z-index: 1; vertical-align: middle; margin: 0; } /* 按钮交互效果 */ .prompt-assistant-button:hover, .image-assistant-button:hover { opacity: 1; transform: scale(1.15); background-color: rgba(255, 255, 255, 0.1); box-shadow: 0 0 5px rgba(255, 255, 255, 0.2); } .prompt-assistant-button:active, .image-assistant-button:active { transform: scale(0.95); } /* 按钮状态类 */ .button-processing { animation: buttonBreathing 1.5s infinite ease-in-out; background-color: rgba(100, 100, 255, 0.15) !important; position: relative; z-index: 1; opacity: 1 !important; } .button-active { background-color: rgba(255, 255, 255, 0.1); box-shadow: 0 0 4px rgba(255, 255, 255, 0.2); position: relative; z-index: 1; opacity: 1 !important; } .button-active .svg-icon svg { fill: var(--active-color); } .button-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; } /* 状态提示样式 */ .statustip { transform-origin: center bottom; font-weight: bold; letter-spacing: 0.5px; position: absolute; padding: 4px 8px; border-radius: 8px; font-size: 14px; z-index: 10000; text-align: center; display: flex; align-items: center; justify-content: center; pointer-events: none; backdrop-filter: blur(8px); white-space: nowrap; will-change: transform, opacity; } /* 状态提示颜色 */ .statustip.success { color: color-mix(in srgb, var(--p-inputtext-color), rgb(18, 255, 18) 40%) !important; background-color: color-mix(in srgb, var(--p-content-background), rgb(4, 58, 4)30%); } .statustip.error { color: color-mix(in srgb, var(--p-inputtext-color), rgb(255, 0, 0) 60%) !important; background-color: color-mix(in srgb, var(--p-content-background), rgb(74, 12, 12)30%); } .statustip.loading { color: color-mix(in srgb, var(--p-inputtext-color), rgb(249, 255, 69) 30%) !important; background-color: color-mix(in srgb, var(--p-content-background), rgb(114, 117, 22)30%); } .statustip.info { color: color-mix(in srgb, var(--p-inputtext-color), rgb(82, 70, 255) 60%) !important; background-color: color-mix(in srgb, var(--p-content-background), rgb(55, 8, 113)30%); }