open-ask-ai 0.3.1 → 0.3.2
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/index.cjs.js +2 -2
- package/dist/index.esm.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -487,7 +487,7 @@ const Button = React__namespace.forwardRef(({ className, variant = 'default', si
|
|
|
487
487
|
});
|
|
488
488
|
Button.displayName = 'Button';
|
|
489
489
|
|
|
490
|
-
var css_248z$4 = "/* Drawer 组件样式 */\n\n.overlay_M4Ctc {\n position: fixed;\n inset: 0;\n z-index:
|
|
490
|
+
var css_248z$4 = "/* Drawer 组件样式 */\n\n.overlay_M4Ctc {\n position: fixed;\n inset: 0;\n z-index: var(--ask-ai-overlay-z-index);\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.overlay_M4Ctc[data-state=\"open\"] {\n animation: fadeIn_ofwCi 300ms ease-in-out;\n}\n\n.overlay_M4Ctc[data-state=\"closed\"] {\n animation: fadeOut_gGY8D 300ms ease-in-out;\n}\n\n.content_CFbqn {\n position: fixed;\n z-index: var(--ask-ai-overlay-z-index);\n display: flex;\n flex-direction: column;\n background-color: var(--ask-ai-background);\n box-shadow: var(--ask-ai-shadow);\n top: 16px;\n bottom: 16px;\n height: calc(100% - 32px);\n max-height: calc(100dvh - 32px);\n border-radius: var(--ask-ai-radius-lg);\n transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);\n width: calc(100% - 32px);\n overflow: hidden;\n}\n\n.content_CFbqn[data-state=\"open\"].position-right_jfDyQ {\n animation: slideInFromRight_1XcEG 300ms ease-in-out;\n}\n\n.content_CFbqn[data-state=\"closed\"].position-right_jfDyQ {\n animation: slideOutToRight_R3Q0I 300ms ease-in-out;\n}\n\n.content_CFbqn[data-state=\"open\"].position-left_GhNmP {\n animation: slideInFromLeft_g-jJq 300ms ease-in-out;\n}\n\n.content_CFbqn[data-state=\"closed\"].position-left_GhNmP {\n animation: slideOutToLeft_K488H 300ms ease-in-out;\n}\n\n.position-right_jfDyQ {\n right: 16px;\n}\n\n.position-left_GhNmP {\n left: 16px;\n}\n\n.header_m6xZ6 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid var(--ask-ai-border);\n padding: 8px 16px;\n}\n\n.headerActions_p1WQU {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.title_jiPst {\n font-size: 18px;\n font-weight: 600;\n color: var(--ask-ai-foreground);\n margin: 0;\n display: inline-flex;\n gap: 8px;\n align-items: center;\n}\n\n.icon_VOWAV {\n width: 20px;\n height: 20px;\n color: var(--ask-ai-primary);\n}\n\n.closeButton_HTzsf {\n border-radius: 4px;\n opacity: 0.7;\n}\n\n.closeButton_HTzsf:hover {\n opacity: 1;\n}\n\n.newSessionButton_-WoCc {\n border-radius: 4px;\n opacity: 0.7;\n}\n\n.newSessionButton_-WoCc:hover {\n opacity: 1;\n}\n\n.closeIcon_QvQtm {\n height: 20px;\n width: 20px;\n}\n\n.newSessionIcon_edUZ8 {\n height: 18px;\n width: 18px;\n}\n\n.body_EPX-M {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n/* Animations */\n@keyframes fadeIn_ofwCi {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut_gGY8D {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n@keyframes slideInFromRight_1XcEG {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n\n@keyframes slideOutToRight_R3Q0I {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n\n@keyframes slideInFromLeft_g-jJq {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(0);\n }\n}\n\n@keyframes slideOutToLeft_K488H {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(-100%);\n }\n}\n";
|
|
491
491
|
var styles$2 = {"overlay":"overlay_M4Ctc","fadeIn":"fadeIn_ofwCi","fadeOut":"fadeOut_gGY8D","content":"content_CFbqn","position-right":"position-right_jfDyQ","slideInFromRight":"slideInFromRight_1XcEG","slideOutToRight":"slideOutToRight_R3Q0I","position-left":"position-left_GhNmP","slideInFromLeft":"slideInFromLeft_g-jJq","slideOutToLeft":"slideOutToLeft_K488H","header":"header_m6xZ6","headerActions":"headerActions_p1WQU","title":"title_jiPst","icon":"icon_VOWAV","closeButton":"closeButton_HTzsf","newSessionButton":"newSessionButton_-WoCc","closeIcon":"closeIcon_QvQtm","newSessionIcon":"newSessionIcon_edUZ8","body":"body_EPX-M"};
|
|
492
492
|
styleInject(css_248z$4);
|
|
493
493
|
|
|
@@ -698,7 +698,7 @@ function Widget(props) {
|
|
|
698
698
|
})) : (jsxRuntime.jsx(Trigger, { onClick: handleOpen, text: texts?.triggerButtonText, ariaLabel: texts?.triggerButtonAriaLabel })), jsxRuntime.jsx(Drawer, { isOpen: isOpen, onClose: handleClose, onNewSession: handleNewSession, hasMessages: messages.length > 0, position: drawerPosition, width: drawerWidth, title: texts?.drawerTitle, closeAriaLabel: texts?.drawerCloseAriaLabel, newSessionAriaLabel: texts?.drawerNewSessionAriaLabel, theme: theme, children: jsxRuntime.jsx(ChatContainer, { texts: texts, exampleQuestions: exampleQuestions, onMessage: onMessage, onError: onError, messages: messages, isStreaming: isStreaming, error: error, sendMessage: sendMessage, input: input, setInput: setInput }) })] }));
|
|
699
699
|
}
|
|
700
700
|
|
|
701
|
-
var css_248z$1 = "/* CSS 变量定义 - 亮色主题(默认) */\n.ask-ai {\n /* 颜色 */\n --ask-ai-primary: #2563eb;\n --ask-ai-primary-hover: #1d4ed8;\n --ask-ai-background: #ffffff;\n --ask-ai-foreground: #0f172a;\n --ask-ai-muted: #64748b;\n --ask-ai-border: #e2e8f0;\n --ask-ai-error: #dc2626;\n --ask-ai-button-bg: #f1f5f9;\n\n /* 用户消息 */\n --ask-ai-user-message-bg: var(--ask-ai-button-bg);\n --ask-ai-user-message-text: var(--ask-ai-foreground);\n\n /* AI 消息 */\n --ask-ai-ai-message-bg: none;\n --ask-ai-ai-message-text: var(--ask-ai-foreground);\n\n /* 字体 */\n --ask-ai-font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n --ask-ai-font-size-base: 14px;\n --ask-ai-line-height: 1.5;\n\n /* 间距 */\n --ask-ai-spacing-xs: 4px;\n --ask-ai-spacing-sm: 8px;\n --ask-ai-spacing-md: 16px;\n --ask-ai-spacing-lg: 24px;\n\n /* 圆角 */\n --ask-ai-radius-sm: 4px;\n --ask-ai-radius-md: 8px;\n --ask-ai-radius-lg: 12px;\n\n /* 阴影 */\n --ask-ai-shadow: none;\n\n /* 动画 */\n --ask-ai-transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);\n\n /* 语法高亮 - 亮色主题 (VS Code Light+) */\n --ask-ai-code-bg: #f8f8f8;\n --ask-ai-code-text: #000000;\n --ask-ai-code-keyword: #0000ff; /* 关键字:蓝色 */\n --ask-ai-code-string: #a31515; /* 字符串:红色 */\n --ask-ai-code-number: #098658; /* 数字:绿色 */\n --ask-ai-code-comment: #008000; /* 注释:绿色 */\n --ask-ai-code-function: #795e26; /* 函数:棕色 */\n --ask-ai-code-operator: #000000; /* 操作符:黑色 */\n --ask-ai-code-variable: #001080; /* 变量:深蓝 */\n --ask-ai-code-type: #267f99; /* 类型:青蓝 */\n --ask-ai-code-builtin: #0000ff; /* 内置:蓝色 */\n --ask-ai-code-tag: #800000; /* 标签:深红 */\n --ask-ai-code-attr: #ff0000; /* 属性:红色 */\n}\n\n/* 明确指定暗色主题 */\n.ask-ai.dark {\n --ask-ai-primary: #3b82f6;\n --ask-ai-primary-hover: #2563eb;\n --ask-ai-background: #0f172a;\n --ask-ai-foreground: #f1f5f9;\n --ask-ai-muted: #94a3b8;\n --ask-ai-border: #334155;\n --ask-ai-error: #ef4444;\n --ask-ai-button-bg: #1e293b;\n\n /* 语法高亮 - 暗色主题 (VS Code Dark+) */\n --ask-ai-code-bg: #1e1e1e;\n --ask-ai-code-text: #d4d4d4;\n --ask-ai-code-keyword: #569cd6; /* 关键字:蓝色 */\n --ask-ai-code-string: #ce9178; /* 字符串:米色 */\n --ask-ai-code-number: #b5cea8; /* 数字:浅绿 */\n --ask-ai-code-comment: #6a9955; /* 注释:绿色 */\n --ask-ai-code-function: #dcdcaa; /* 函数:黄色 */\n --ask-ai-code-operator: #d4d4d4; /* 操作符:浅灰 */\n --ask-ai-code-variable: #9cdcfe; /* 变量:青色 */\n --ask-ai-code-type: #4ec9b0; /* 类型:青绿 */\n --ask-ai-code-builtin: #4fc1ff; /* 内置:亮蓝 */\n --ask-ai-code-tag: #569cd6; /* 标签:蓝色 */\n --ask-ai-code-attr: #9cdcfe; /* 属性:青色 */\n}\n";
|
|
701
|
+
var css_248z$1 = "/* CSS 变量定义 - 亮色主题(默认) */\n.ask-ai {\n /* 颜色 */\n --ask-ai-primary: #2563eb;\n --ask-ai-primary-hover: #1d4ed8;\n --ask-ai-background: #ffffff;\n --ask-ai-foreground: #0f172a;\n --ask-ai-muted: #64748b;\n --ask-ai-border: #e2e8f0;\n --ask-ai-error: #dc2626;\n --ask-ai-button-bg: #f1f5f9;\n\n /* 用户消息 */\n --ask-ai-user-message-bg: var(--ask-ai-button-bg);\n --ask-ai-user-message-text: var(--ask-ai-foreground);\n\n /* AI 消息 */\n --ask-ai-ai-message-bg: none;\n --ask-ai-ai-message-text: var(--ask-ai-foreground);\n\n /* 字体 */\n --ask-ai-font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n --ask-ai-font-size-base: 14px;\n --ask-ai-line-height: 1.5;\n\n /* 间距 */\n --ask-ai-spacing-xs: 4px;\n --ask-ai-spacing-sm: 8px;\n --ask-ai-spacing-md: 16px;\n --ask-ai-spacing-lg: 24px;\n\n /* 圆角 */\n --ask-ai-radius-sm: 4px;\n --ask-ai-radius-md: 8px;\n --ask-ai-radius-lg: 12px;\n\n /* 阴影 */\n --ask-ai-shadow: none;\n\n /* 动画 */\n --ask-ai-transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);\n\n /* 抽屉层级 */\n --ask-ai-overlay-z-index: 400;\n\n /* 语法高亮 - 亮色主题 (VS Code Light+) */\n --ask-ai-code-bg: #f8f8f8;\n --ask-ai-code-text: #000000;\n --ask-ai-code-keyword: #0000ff; /* 关键字:蓝色 */\n --ask-ai-code-string: #a31515; /* 字符串:红色 */\n --ask-ai-code-number: #098658; /* 数字:绿色 */\n --ask-ai-code-comment: #008000; /* 注释:绿色 */\n --ask-ai-code-function: #795e26; /* 函数:棕色 */\n --ask-ai-code-operator: #000000; /* 操作符:黑色 */\n --ask-ai-code-variable: #001080; /* 变量:深蓝 */\n --ask-ai-code-type: #267f99; /* 类型:青蓝 */\n --ask-ai-code-builtin: #0000ff; /* 内置:蓝色 */\n --ask-ai-code-tag: #800000; /* 标签:深红 */\n --ask-ai-code-attr: #ff0000; /* 属性:红色 */\n}\n\n/* 明确指定暗色主题 */\n.ask-ai.dark {\n --ask-ai-primary: #3b82f6;\n --ask-ai-primary-hover: #2563eb;\n --ask-ai-background: #0f172a;\n --ask-ai-foreground: #f1f5f9;\n --ask-ai-muted: #94a3b8;\n --ask-ai-border: #334155;\n --ask-ai-error: #ef4444;\n --ask-ai-button-bg: #1e293b;\n\n /* 语法高亮 - 暗色主题 (VS Code Dark+) */\n --ask-ai-code-bg: #1e1e1e;\n --ask-ai-code-text: #d4d4d4;\n --ask-ai-code-keyword: #569cd6; /* 关键字:蓝色 */\n --ask-ai-code-string: #ce9178; /* 字符串:米色 */\n --ask-ai-code-number: #b5cea8; /* 数字:浅绿 */\n --ask-ai-code-comment: #6a9955; /* 注释:绿色 */\n --ask-ai-code-function: #dcdcaa; /* 函数:黄色 */\n --ask-ai-code-operator: #d4d4d4; /* 操作符:浅灰 */\n --ask-ai-code-variable: #9cdcfe; /* 变量:青色 */\n --ask-ai-code-type: #4ec9b0; /* 类型:青绿 */\n --ask-ai-code-builtin: #4fc1ff; /* 内置:亮蓝 */\n --ask-ai-code-tag: #569cd6; /* 标签:蓝色 */\n --ask-ai-code-attr: #9cdcfe; /* 属性:青色 */\n}\n";
|
|
702
702
|
styleInject(css_248z$1);
|
|
703
703
|
|
|
704
704
|
var css_248z = "/* 全局样式 - 所有样式都在 .ask-ai 命名空间下 */\n\n/* 基础样式重置 */\n.ask-ai *,\n.ask-ai *::before,\n.ask-ai *::after {\n box-sizing: border-box;\n}\n\n.ask-ai {\n font-family: var(--ask-ai-font-family);\n font-size: var(--ask-ai-font-size-base);\n line-height: var(--ask-ai-line-height);\n color: var(--ask-ai-foreground);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n/* 确保组件不受外部样式影响 */\n.ask-ai button {\n font-family: inherit;\n}\n\n.ask-ai input,\n.ask-ai textarea {\n font-family: inherit;\n font-size: inherit;\n}\n\n/* 滚动条样式 */\n.ask-ai ::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.ask-ai ::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.ask-ai ::-webkit-scrollbar-thumb {\n background: var(--ask-ai-border);\n border-radius: var(--ask-ai-radius-sm);\n}\n\n.ask-ai ::-webkit-scrollbar-thumb:hover {\n background: var(--ask-ai-muted);\n}\n";
|
package/dist/index.esm.js
CHANGED
|
@@ -466,7 +466,7 @@ const Button = React.forwardRef(({ className, variant = 'default', size = 'defau
|
|
|
466
466
|
});
|
|
467
467
|
Button.displayName = 'Button';
|
|
468
468
|
|
|
469
|
-
var css_248z$4 = "/* Drawer 组件样式 */\n\n.overlay_M4Ctc {\n position: fixed;\n inset: 0;\n z-index:
|
|
469
|
+
var css_248z$4 = "/* Drawer 组件样式 */\n\n.overlay_M4Ctc {\n position: fixed;\n inset: 0;\n z-index: var(--ask-ai-overlay-z-index);\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.overlay_M4Ctc[data-state=\"open\"] {\n animation: fadeIn_ofwCi 300ms ease-in-out;\n}\n\n.overlay_M4Ctc[data-state=\"closed\"] {\n animation: fadeOut_gGY8D 300ms ease-in-out;\n}\n\n.content_CFbqn {\n position: fixed;\n z-index: var(--ask-ai-overlay-z-index);\n display: flex;\n flex-direction: column;\n background-color: var(--ask-ai-background);\n box-shadow: var(--ask-ai-shadow);\n top: 16px;\n bottom: 16px;\n height: calc(100% - 32px);\n max-height: calc(100dvh - 32px);\n border-radius: var(--ask-ai-radius-lg);\n transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);\n width: calc(100% - 32px);\n overflow: hidden;\n}\n\n.content_CFbqn[data-state=\"open\"].position-right_jfDyQ {\n animation: slideInFromRight_1XcEG 300ms ease-in-out;\n}\n\n.content_CFbqn[data-state=\"closed\"].position-right_jfDyQ {\n animation: slideOutToRight_R3Q0I 300ms ease-in-out;\n}\n\n.content_CFbqn[data-state=\"open\"].position-left_GhNmP {\n animation: slideInFromLeft_g-jJq 300ms ease-in-out;\n}\n\n.content_CFbqn[data-state=\"closed\"].position-left_GhNmP {\n animation: slideOutToLeft_K488H 300ms ease-in-out;\n}\n\n.position-right_jfDyQ {\n right: 16px;\n}\n\n.position-left_GhNmP {\n left: 16px;\n}\n\n.header_m6xZ6 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid var(--ask-ai-border);\n padding: 8px 16px;\n}\n\n.headerActions_p1WQU {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.title_jiPst {\n font-size: 18px;\n font-weight: 600;\n color: var(--ask-ai-foreground);\n margin: 0;\n display: inline-flex;\n gap: 8px;\n align-items: center;\n}\n\n.icon_VOWAV {\n width: 20px;\n height: 20px;\n color: var(--ask-ai-primary);\n}\n\n.closeButton_HTzsf {\n border-radius: 4px;\n opacity: 0.7;\n}\n\n.closeButton_HTzsf:hover {\n opacity: 1;\n}\n\n.newSessionButton_-WoCc {\n border-radius: 4px;\n opacity: 0.7;\n}\n\n.newSessionButton_-WoCc:hover {\n opacity: 1;\n}\n\n.closeIcon_QvQtm {\n height: 20px;\n width: 20px;\n}\n\n.newSessionIcon_edUZ8 {\n height: 18px;\n width: 18px;\n}\n\n.body_EPX-M {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n/* Animations */\n@keyframes fadeIn_ofwCi {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut_gGY8D {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n@keyframes slideInFromRight_1XcEG {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n\n@keyframes slideOutToRight_R3Q0I {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n\n@keyframes slideInFromLeft_g-jJq {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(0);\n }\n}\n\n@keyframes slideOutToLeft_K488H {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(-100%);\n }\n}\n";
|
|
470
470
|
var styles$2 = {"overlay":"overlay_M4Ctc","fadeIn":"fadeIn_ofwCi","fadeOut":"fadeOut_gGY8D","content":"content_CFbqn","position-right":"position-right_jfDyQ","slideInFromRight":"slideInFromRight_1XcEG","slideOutToRight":"slideOutToRight_R3Q0I","position-left":"position-left_GhNmP","slideInFromLeft":"slideInFromLeft_g-jJq","slideOutToLeft":"slideOutToLeft_K488H","header":"header_m6xZ6","headerActions":"headerActions_p1WQU","title":"title_jiPst","icon":"icon_VOWAV","closeButton":"closeButton_HTzsf","newSessionButton":"newSessionButton_-WoCc","closeIcon":"closeIcon_QvQtm","newSessionIcon":"newSessionIcon_edUZ8","body":"body_EPX-M"};
|
|
471
471
|
styleInject(css_248z$4);
|
|
472
472
|
|
|
@@ -677,7 +677,7 @@ function Widget(props) {
|
|
|
677
677
|
})) : (jsx(Trigger, { onClick: handleOpen, text: texts?.triggerButtonText, ariaLabel: texts?.triggerButtonAriaLabel })), jsx(Drawer, { isOpen: isOpen, onClose: handleClose, onNewSession: handleNewSession, hasMessages: messages.length > 0, position: drawerPosition, width: drawerWidth, title: texts?.drawerTitle, closeAriaLabel: texts?.drawerCloseAriaLabel, newSessionAriaLabel: texts?.drawerNewSessionAriaLabel, theme: theme, children: jsx(ChatContainer, { texts: texts, exampleQuestions: exampleQuestions, onMessage: onMessage, onError: onError, messages: messages, isStreaming: isStreaming, error: error, sendMessage: sendMessage, input: input, setInput: setInput }) })] }));
|
|
678
678
|
}
|
|
679
679
|
|
|
680
|
-
var css_248z$1 = "/* CSS 变量定义 - 亮色主题(默认) */\n.ask-ai {\n /* 颜色 */\n --ask-ai-primary: #2563eb;\n --ask-ai-primary-hover: #1d4ed8;\n --ask-ai-background: #ffffff;\n --ask-ai-foreground: #0f172a;\n --ask-ai-muted: #64748b;\n --ask-ai-border: #e2e8f0;\n --ask-ai-error: #dc2626;\n --ask-ai-button-bg: #f1f5f9;\n\n /* 用户消息 */\n --ask-ai-user-message-bg: var(--ask-ai-button-bg);\n --ask-ai-user-message-text: var(--ask-ai-foreground);\n\n /* AI 消息 */\n --ask-ai-ai-message-bg: none;\n --ask-ai-ai-message-text: var(--ask-ai-foreground);\n\n /* 字体 */\n --ask-ai-font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n --ask-ai-font-size-base: 14px;\n --ask-ai-line-height: 1.5;\n\n /* 间距 */\n --ask-ai-spacing-xs: 4px;\n --ask-ai-spacing-sm: 8px;\n --ask-ai-spacing-md: 16px;\n --ask-ai-spacing-lg: 24px;\n\n /* 圆角 */\n --ask-ai-radius-sm: 4px;\n --ask-ai-radius-md: 8px;\n --ask-ai-radius-lg: 12px;\n\n /* 阴影 */\n --ask-ai-shadow: none;\n\n /* 动画 */\n --ask-ai-transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);\n\n /* 语法高亮 - 亮色主题 (VS Code Light+) */\n --ask-ai-code-bg: #f8f8f8;\n --ask-ai-code-text: #000000;\n --ask-ai-code-keyword: #0000ff; /* 关键字:蓝色 */\n --ask-ai-code-string: #a31515; /* 字符串:红色 */\n --ask-ai-code-number: #098658; /* 数字:绿色 */\n --ask-ai-code-comment: #008000; /* 注释:绿色 */\n --ask-ai-code-function: #795e26; /* 函数:棕色 */\n --ask-ai-code-operator: #000000; /* 操作符:黑色 */\n --ask-ai-code-variable: #001080; /* 变量:深蓝 */\n --ask-ai-code-type: #267f99; /* 类型:青蓝 */\n --ask-ai-code-builtin: #0000ff; /* 内置:蓝色 */\n --ask-ai-code-tag: #800000; /* 标签:深红 */\n --ask-ai-code-attr: #ff0000; /* 属性:红色 */\n}\n\n/* 明确指定暗色主题 */\n.ask-ai.dark {\n --ask-ai-primary: #3b82f6;\n --ask-ai-primary-hover: #2563eb;\n --ask-ai-background: #0f172a;\n --ask-ai-foreground: #f1f5f9;\n --ask-ai-muted: #94a3b8;\n --ask-ai-border: #334155;\n --ask-ai-error: #ef4444;\n --ask-ai-button-bg: #1e293b;\n\n /* 语法高亮 - 暗色主题 (VS Code Dark+) */\n --ask-ai-code-bg: #1e1e1e;\n --ask-ai-code-text: #d4d4d4;\n --ask-ai-code-keyword: #569cd6; /* 关键字:蓝色 */\n --ask-ai-code-string: #ce9178; /* 字符串:米色 */\n --ask-ai-code-number: #b5cea8; /* 数字:浅绿 */\n --ask-ai-code-comment: #6a9955; /* 注释:绿色 */\n --ask-ai-code-function: #dcdcaa; /* 函数:黄色 */\n --ask-ai-code-operator: #d4d4d4; /* 操作符:浅灰 */\n --ask-ai-code-variable: #9cdcfe; /* 变量:青色 */\n --ask-ai-code-type: #4ec9b0; /* 类型:青绿 */\n --ask-ai-code-builtin: #4fc1ff; /* 内置:亮蓝 */\n --ask-ai-code-tag: #569cd6; /* 标签:蓝色 */\n --ask-ai-code-attr: #9cdcfe; /* 属性:青色 */\n}\n";
|
|
680
|
+
var css_248z$1 = "/* CSS 变量定义 - 亮色主题(默认) */\n.ask-ai {\n /* 颜色 */\n --ask-ai-primary: #2563eb;\n --ask-ai-primary-hover: #1d4ed8;\n --ask-ai-background: #ffffff;\n --ask-ai-foreground: #0f172a;\n --ask-ai-muted: #64748b;\n --ask-ai-border: #e2e8f0;\n --ask-ai-error: #dc2626;\n --ask-ai-button-bg: #f1f5f9;\n\n /* 用户消息 */\n --ask-ai-user-message-bg: var(--ask-ai-button-bg);\n --ask-ai-user-message-text: var(--ask-ai-foreground);\n\n /* AI 消息 */\n --ask-ai-ai-message-bg: none;\n --ask-ai-ai-message-text: var(--ask-ai-foreground);\n\n /* 字体 */\n --ask-ai-font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n --ask-ai-font-size-base: 14px;\n --ask-ai-line-height: 1.5;\n\n /* 间距 */\n --ask-ai-spacing-xs: 4px;\n --ask-ai-spacing-sm: 8px;\n --ask-ai-spacing-md: 16px;\n --ask-ai-spacing-lg: 24px;\n\n /* 圆角 */\n --ask-ai-radius-sm: 4px;\n --ask-ai-radius-md: 8px;\n --ask-ai-radius-lg: 12px;\n\n /* 阴影 */\n --ask-ai-shadow: none;\n\n /* 动画 */\n --ask-ai-transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);\n\n /* 抽屉层级 */\n --ask-ai-overlay-z-index: 400;\n\n /* 语法高亮 - 亮色主题 (VS Code Light+) */\n --ask-ai-code-bg: #f8f8f8;\n --ask-ai-code-text: #000000;\n --ask-ai-code-keyword: #0000ff; /* 关键字:蓝色 */\n --ask-ai-code-string: #a31515; /* 字符串:红色 */\n --ask-ai-code-number: #098658; /* 数字:绿色 */\n --ask-ai-code-comment: #008000; /* 注释:绿色 */\n --ask-ai-code-function: #795e26; /* 函数:棕色 */\n --ask-ai-code-operator: #000000; /* 操作符:黑色 */\n --ask-ai-code-variable: #001080; /* 变量:深蓝 */\n --ask-ai-code-type: #267f99; /* 类型:青蓝 */\n --ask-ai-code-builtin: #0000ff; /* 内置:蓝色 */\n --ask-ai-code-tag: #800000; /* 标签:深红 */\n --ask-ai-code-attr: #ff0000; /* 属性:红色 */\n}\n\n/* 明确指定暗色主题 */\n.ask-ai.dark {\n --ask-ai-primary: #3b82f6;\n --ask-ai-primary-hover: #2563eb;\n --ask-ai-background: #0f172a;\n --ask-ai-foreground: #f1f5f9;\n --ask-ai-muted: #94a3b8;\n --ask-ai-border: #334155;\n --ask-ai-error: #ef4444;\n --ask-ai-button-bg: #1e293b;\n\n /* 语法高亮 - 暗色主题 (VS Code Dark+) */\n --ask-ai-code-bg: #1e1e1e;\n --ask-ai-code-text: #d4d4d4;\n --ask-ai-code-keyword: #569cd6; /* 关键字:蓝色 */\n --ask-ai-code-string: #ce9178; /* 字符串:米色 */\n --ask-ai-code-number: #b5cea8; /* 数字:浅绿 */\n --ask-ai-code-comment: #6a9955; /* 注释:绿色 */\n --ask-ai-code-function: #dcdcaa; /* 函数:黄色 */\n --ask-ai-code-operator: #d4d4d4; /* 操作符:浅灰 */\n --ask-ai-code-variable: #9cdcfe; /* 变量:青色 */\n --ask-ai-code-type: #4ec9b0; /* 类型:青绿 */\n --ask-ai-code-builtin: #4fc1ff; /* 内置:亮蓝 */\n --ask-ai-code-tag: #569cd6; /* 标签:蓝色 */\n --ask-ai-code-attr: #9cdcfe; /* 属性:青色 */\n}\n";
|
|
681
681
|
styleInject(css_248z$1);
|
|
682
682
|
|
|
683
683
|
var css_248z = "/* 全局样式 - 所有样式都在 .ask-ai 命名空间下 */\n\n/* 基础样式重置 */\n.ask-ai *,\n.ask-ai *::before,\n.ask-ai *::after {\n box-sizing: border-box;\n}\n\n.ask-ai {\n font-family: var(--ask-ai-font-family);\n font-size: var(--ask-ai-font-size-base);\n line-height: var(--ask-ai-line-height);\n color: var(--ask-ai-foreground);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n/* 确保组件不受外部样式影响 */\n.ask-ai button {\n font-family: inherit;\n}\n\n.ask-ai input,\n.ask-ai textarea {\n font-family: inherit;\n font-size: inherit;\n}\n\n/* 滚动条样式 */\n.ask-ai ::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.ask-ai ::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.ask-ai ::-webkit-scrollbar-thumb {\n background: var(--ask-ai-border);\n border-radius: var(--ask-ai-radius-sm);\n}\n\n.ask-ai ::-webkit-scrollbar-thumb:hover {\n background: var(--ask-ai-muted);\n}\n";
|