wi-chat 0.3.0 → 0.5.0
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/core/index.cjs +1 -1
- package/dist/core/index.js +129 -123
- package/dist/core/useChat.d.ts +11 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +101 -68
- package/dist/mobile-ui/chat/ChatContainer.vue.d.ts +8 -3
- package/dist/mobile-ui/chat/ChatMessagesView.vue.d.ts +5 -0
- package/dist/mobile-ui/index.cjs +1 -1
- package/dist/mobile-ui/index.d.ts +2 -2
- package/dist/mobile-ui/index.js +79 -71
- package/dist/mobile-ui/inputbox/Inputbox.vue.d.ts +1 -1
- package/dist/mobile-ui/style.css +1 -1
- package/dist/page-context/extArgs.d.ts +46 -0
- package/dist/page-context/index.cjs +2 -0
- package/dist/page-context/index.d.ts +18 -0
- package/dist/page-context/index.js +48 -0
- package/dist/page-context/state.d.ts +10 -0
- package/dist/page-context/types.d.ts +218 -0
- package/dist/parser/answerCom/actionExecute/actionProtocol.d.ts +38 -0
- package/dist/parser/answerCom/actionExecute/clarification.d.ts +67 -0
- package/dist/parser/answerCom/actionExecute/parseActionExecute.d.ts +28 -0
- package/dist/parser/answerCom/actionExecute/types.d.ts +153 -0
- package/dist/parser/answerCom/outputFile/parseOutputFile.d.ts +43 -0
- package/dist/parser/answerCom/outputFile/types.d.ts +17 -0
- package/dist/parser/index.cjs +2 -2
- package/dist/parser/index.d.ts +12 -0
- package/dist/parser/index.js +537 -211
- package/dist/parser/registry.d.ts +8 -1
- package/dist/parser/title.d.ts +27 -0
- package/dist/renderers/clarification/ClarificationCard.vue.d.ts +19 -0
- package/dist/renderers/index.cjs +1 -1
- package/dist/renderers/index.d.ts +4 -0
- package/dist/renderers/index.js +796 -143
- package/dist/renderers/outputFile/OutputFile.vue.d.ts +19 -0
- package/dist/renderers/outputFile/useOutputFile.d.ts +85 -0
- package/dist/renderers/style.css +1 -1
- package/dist/right-panel/RightPanel.vue.d.ts +43 -0
- package/dist/right-panel/RightPanelIcon.vue.d.ts +38 -0
- package/dist/right-panel/RightPanelTabs.vue.d.ts +39 -0
- package/dist/right-panel/icons.d.ts +48 -0
- package/dist/right-panel/index.cjs +2 -0
- package/dist/right-panel/index.d.ts +43 -0
- package/dist/right-panel/index.js +1004 -0
- package/dist/right-panel/panels/index.d.ts +7 -0
- package/dist/right-panel/panels/newtab/NewTabPanel.vue.d.ts +27 -0
- package/dist/right-panel/panels/newtab/defaults.d.ts +6 -0
- package/dist/right-panel/panels/newtab/index.d.ts +4 -0
- package/dist/right-panel/panels/web/WebPanel.vue.d.ts +28 -0
- package/dist/right-panel/panels/web/index.d.ts +4 -0
- package/dist/right-panel/panels/web/useWebview.d.ts +59 -0
- package/dist/right-panel/registry.d.ts +24 -0
- package/dist/right-panel/runtime.d.ts +45 -0
- package/dist/right-panel/scope.d.ts +34 -0
- package/dist/right-panel/shared/BrowserToolbar.vue.d.ts +23 -0
- package/dist/right-panel/shared/RightPanelToolList.vue.d.ts +48 -0
- package/dist/right-panel/style.css +1 -0
- package/dist/right-panel/types.d.ts +363 -0
- package/dist/right-panel/useRightPanel.d.ts +39 -0
- package/dist/right-panel/useRightPanelTabs.d.ts +14 -0
- package/dist/tools/index.cjs +4 -4
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.js +182 -162
- package/dist/tools/markdown/index.d.ts +1 -1
- package/dist/tools/markdown/renderMarkdown.d.ts +25 -0
- package/dist/web-ui/attach/AttachmentList.vue.d.ts +1 -1
- package/dist/web-ui/chat/ChatContainer.vue.d.ts +8 -3
- package/dist/web-ui/chat/ChatMessagesView.vue.d.ts +5 -0
- package/dist/web-ui/envswitch/EnvSwitch.vue.d.ts +2 -2
- package/dist/web-ui/index.cjs +1 -1
- package/dist/web-ui/index.d.ts +2 -2
- package/dist/web-ui/index.js +428 -408
- package/dist/web-ui/inputbox/Inputbox.vue.d.ts +4 -7
- package/dist/web-ui/style.css +1 -1
- package/package.json +13 -6
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RightPanelDefinition } from '../types';
|
|
2
|
+
|
|
3
|
+
export { newTabPanelDefinition } from './newtab';
|
|
4
|
+
export { webPanelDefinition } from './web';
|
|
5
|
+
export { DEFAULT_NEW_TAB_RECOMMENDATIONS, DEFAULT_NEW_TAB_TOOLS } from './newtab/defaults';
|
|
6
|
+
/** 内置面板定义列表:注册表初始化时按顺序注册 */
|
|
7
|
+
export declare const BUILTIN_RIGHT_PANELS: RightPanelDefinition[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { RightPanelTab, RightPanelToolItem, UseRightPanelReturn } from '../../types';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
/** 当前标签页 */
|
|
5
|
+
tab: RightPanelTab;
|
|
6
|
+
/** 面板状态机句柄(地址栏跳转 / 插入标签页) */
|
|
7
|
+
panel: UseRightPanelReturn;
|
|
8
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
"tool-click": (item: RightPanelToolItem) => void;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
11
|
+
/** 当前标签页 */
|
|
12
|
+
tab: RightPanelTab;
|
|
13
|
+
/** 面板状态机句柄(地址栏跳转 / 插入标签页) */
|
|
14
|
+
panel: UseRightPanelReturn;
|
|
15
|
+
}>>> & {
|
|
16
|
+
"onTool-click"?: (item: RightPanelToolItem) => any;
|
|
17
|
+
}, {}, {}>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
21
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
22
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
23
|
+
} : {
|
|
24
|
+
type: import('vue').PropType<T[K]>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RightPanelRecommendation, RightPanelToolItem } from '../../types';
|
|
2
|
+
|
|
3
|
+
/** 默认工具入口:为空,由宿主注入(桌面端可加终端等本地能力) */
|
|
4
|
+
export declare const DEFAULT_NEW_TAB_TOOLS: RightPanelToolItem[];
|
|
5
|
+
/** 默认推荐站点:外部演示站 + 本机地址(宿主通常会覆盖为本系统页面) */
|
|
6
|
+
export declare const DEFAULT_NEW_TAB_RECOMMENDATIONS: RightPanelRecommendation[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RightPanelWebRuntime } from './useWebview';
|
|
2
|
+
import { RightPanelTab, UseRightPanelReturn } from '../../types';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
/** 当前标签页(url / 标题 / 刷新计数) */
|
|
6
|
+
tab: RightPanelTab;
|
|
7
|
+
/** 面板状态机句柄(导航 / 历史 / 刷新 / 状态回写) */
|
|
8
|
+
panel: UseRightPanelReturn;
|
|
9
|
+
/** 强制指定运行时;缺省在 Electron 且 webview 可用时用 webview,否则 iframe */
|
|
10
|
+
runtime?: RightPanelWebRuntime;
|
|
11
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
12
|
+
/** 当前标签页(url / 标题 / 刷新计数) */
|
|
13
|
+
tab: RightPanelTab;
|
|
14
|
+
/** 面板状态机句柄(导航 / 历史 / 刷新 / 状态回写) */
|
|
15
|
+
panel: UseRightPanelReturn;
|
|
16
|
+
/** 强制指定运行时;缺省在 Electron 且 webview 可用时用 webview,否则 iframe */
|
|
17
|
+
runtime?: RightPanelWebRuntime;
|
|
18
|
+
}>>>, {}, {}>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
22
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
+
} : {
|
|
25
|
+
type: import('vue').PropType<T[K]>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Electron `<webview>` 运行时适配
|
|
3
|
+
*
|
|
4
|
+
* iframe 会被目标站点的 X-Frame-Options / CSP 拒绝(浏览器里无解),
|
|
5
|
+
* Electron 下改用 `<webview>`:它是独立顶层页面,不受嵌框策略限制。
|
|
6
|
+
* 本模块只负责能力探测、运行时决策与元素创建;事件绑定与状态回写在 WebPanel.vue 内完成。
|
|
7
|
+
*
|
|
8
|
+
* 应用端当前走纯 Web(未开启 Electron 的 webviewTag),因此这里会自动降级为 iframe;
|
|
9
|
+
* 启用桌面端内置浏览器时,宿主需要:① Electron 主进程打开 webviewTag 并做
|
|
10
|
+
* `will-attach-webview` 安全校验;② preload 暴露 `rightPanelWebviewEnabled: true`
|
|
11
|
+
*(WI.App 已内置该标记),组件侧无需改动。
|
|
12
|
+
*/
|
|
13
|
+
/** 网页面板使用的渲染运行时:iframe(浏览器)/ webview(Electron) */
|
|
14
|
+
export type RightPanelWebRuntime = 'iframe' | 'webview';
|
|
15
|
+
/** webview 元素的最小能力接口(仅覆盖面板实际用到的 API) */
|
|
16
|
+
export interface ElectronWebviewElement extends HTMLElement {
|
|
17
|
+
/** 让 guest 加载指定地址 */
|
|
18
|
+
loadURL(url: string): Promise<void> | void;
|
|
19
|
+
/** 重新加载当前页面 */
|
|
20
|
+
reload(): void;
|
|
21
|
+
/** 停止加载 */
|
|
22
|
+
stop(): void;
|
|
23
|
+
/** 当前 guest 地址 */
|
|
24
|
+
getURL(): string;
|
|
25
|
+
/** 当前页面标题 */
|
|
26
|
+
getTitle(): string;
|
|
27
|
+
/** 是否可后退 */
|
|
28
|
+
canGoBack(): boolean;
|
|
29
|
+
/** 是否可前进 */
|
|
30
|
+
canGoForward(): boolean;
|
|
31
|
+
/** 后退 */
|
|
32
|
+
goBack(): void;
|
|
33
|
+
/** 前进 */
|
|
34
|
+
goForward(): void;
|
|
35
|
+
}
|
|
36
|
+
/** webview 独立会话分区:与主应用 Cookie 隔离,避免外部站点读取应用登录态 */
|
|
37
|
+
export declare const WEBVIEW_PARTITION = "persist:wi-right-panel";
|
|
38
|
+
/**
|
|
39
|
+
* 当前环境是否真的能用 `<webview>`。
|
|
40
|
+
* 由宿主 preload 显式声明 `rightPanelWebviewEnabled`(只有开启了 webviewTag 的窗口才置 true)——
|
|
41
|
+
* 不能在 detached webview 元素上探测 loadURL:Electron 31 里元素挂载后该方法才存在,
|
|
42
|
+
* 探测会误判为不可用,导致面板永远走 iframe。
|
|
43
|
+
* @returns 可用时为 true
|
|
44
|
+
*/
|
|
45
|
+
export declare const canUseWebview: () => boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 解析实际生效的运行时。
|
|
48
|
+
* @param forced 调用方强制指定的运行时(测试或宿主覆盖)
|
|
49
|
+
* @returns 强制值优先;否则 Electron 且 webview 可用时用 webview,其余用 iframe
|
|
50
|
+
*/
|
|
51
|
+
export declare const resolveWebRuntime: (forced?: RightPanelWebRuntime) => RightPanelWebRuntime;
|
|
52
|
+
/**
|
|
53
|
+
* 创建一个用于承载网页的 webview 元素。
|
|
54
|
+
* 使用内联样式而不是 scoped CSS:元素是命令式创建的,拿不到 SFC 的 scopeId。
|
|
55
|
+
* @param url 初始地址
|
|
56
|
+
* @param partition 会话分区,默认 WEBVIEW_PARTITION(与主应用隔离)
|
|
57
|
+
* @returns 配置好的 webview 元素
|
|
58
|
+
*/
|
|
59
|
+
export declare const createWebviewElement: (url: string, partition?: string) => ElectronWebviewElement;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RightPanelDefinition, RightPanelRegistry, RightPanelTabType } from './types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 创建一个独立的面板注册表。
|
|
5
|
+
* @param initial 初始面板定义列表(通常传内置面板);同名 type 以后者覆盖前者
|
|
6
|
+
* @returns 注册表实例(可注册 / 查询 / 列出,供外壳渲染分发)
|
|
7
|
+
*/
|
|
8
|
+
export declare const createRightPanelRegistry: (initial?: RightPanelDefinition[]) => RightPanelRegistry;
|
|
9
|
+
/** 全局默认注册表:内置面板已注册,外部注册的面板也进这里(与 useRightPanel 单例对应) */
|
|
10
|
+
export declare const defaultRightPanelRegistry: RightPanelRegistry;
|
|
11
|
+
/**
|
|
12
|
+
* 注册一个面板类型到指定注册表(默认全局注册表)。
|
|
13
|
+
* @param definition 面板类型定义(type 必填,component 为内容组件)
|
|
14
|
+
* @param registry 目标注册表,缺省为全局单例使用的注册表
|
|
15
|
+
* @returns 注销函数
|
|
16
|
+
*/
|
|
17
|
+
export declare const registerRightPanel: (definition: RightPanelDefinition, registry?: RightPanelRegistry) => (() => void);
|
|
18
|
+
/**
|
|
19
|
+
* 从指定注册表按类型取面板定义(默认全局注册表)。
|
|
20
|
+
* @param type 面板类型标识
|
|
21
|
+
* @param registry 目标注册表,缺省为全局单例使用的注册表
|
|
22
|
+
* @returns 面板定义;未注册返回 undefined
|
|
23
|
+
*/
|
|
24
|
+
export declare const getRightPanelDefinition: (type: RightPanelTabType, registry?: RightPanelRegistry) => RightPanelDefinition | undefined;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* wi-chat-right-panel 运行环境探测
|
|
3
|
+
*
|
|
4
|
+
* 面板里有些能力只在桌面壳(Electron)中成立:网页可走 `<webview>`、宿主可注册终端等
|
|
5
|
+
* 本地工具;纯浏览器部署只有 iframe 与网页。本模块统一读取各桌面壳暴露的桥对象,
|
|
6
|
+
* 供外壳文案(是否提「终端」)与 webview 运行时决策复用,避免每个组件各写一份探测。
|
|
7
|
+
* 只做只读探测,不发起任何调用。
|
|
8
|
+
*/
|
|
9
|
+
/** 独立桌面端桥(WI.Web 自带 Electron 壳的 window.electronApp) */
|
|
10
|
+
export interface RightPanelElectronAppBridge {
|
|
11
|
+
/** 是否处于 Electron 环境 */
|
|
12
|
+
isElectron?: boolean;
|
|
13
|
+
/** 宿主是否声明右侧面板可用 `<webview>` */
|
|
14
|
+
rightPanelWebviewEnabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** WI.App 桌面端桥(preload 暴露的 window.wiElectron) */
|
|
17
|
+
export interface RightPanelWiElectronBridge {
|
|
18
|
+
/** 宿主是否声明右侧面板可用 `<webview>` */
|
|
19
|
+
rightPanelWebviewEnabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** 通用桌面桥(示例/其它宿主可用 window.wiChatDesktop 承载桌面能力) */
|
|
22
|
+
export interface RightPanelDesktopBridge {
|
|
23
|
+
/** 桌面能力字段(有该对象即视为桌面端) */
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
}
|
|
26
|
+
/** 一次探测拿到的桌面桥集合:三种壳各自可能缺省 */
|
|
27
|
+
export interface RightPanelElectronBridgeSet {
|
|
28
|
+
/** 独立桌面端桥 */
|
|
29
|
+
electronApp?: RightPanelElectronAppBridge;
|
|
30
|
+
/** WI.App 桌面端桥 */
|
|
31
|
+
wiElectron?: RightPanelWiElectronBridge;
|
|
32
|
+
/** 通用桌面桥 */
|
|
33
|
+
wiChatDesktop?: RightPanelDesktopBridge;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 读取当前窗口上的桌面桥对象。
|
|
37
|
+
* @returns 桌面桥集合(浏览器里全部缺省;不做能力判断,由调用方读具体字段)
|
|
38
|
+
*/
|
|
39
|
+
export declare const readElectronBridge: () => RightPanelElectronBridgeSet;
|
|
40
|
+
/**
|
|
41
|
+
* 当前是否运行在桌面端(Electron 壳)。
|
|
42
|
+
* 只判断"存在桌面壳",不判断具体能力:如 `<webview>` 还需宿主显式声明 rightPanelWebviewEnabled。
|
|
43
|
+
* @returns 桌面端为 true;纯浏览器为 false
|
|
44
|
+
*/
|
|
45
|
+
export declare const isDesktopRuntime: () => boolean;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { RightPanelScopeStorage, UseRightPanelReturn, UseRightPanelScopeOptions } from './types';
|
|
2
|
+
|
|
3
|
+
/** localStorage 中每个作用域记录的 key 前缀 */
|
|
4
|
+
export declare const RIGHT_PANEL_SCOPE_STORAGE_PREFIX = "wi-chat:right-panel-scope:";
|
|
5
|
+
/**
|
|
6
|
+
* 默认持久化适配器:localStorage 按作用域 id 分 key。
|
|
7
|
+
* 读取失败(脏数据 / 隐私模式)时返回 null,写入失败(配额满)时静默忽略,不影响面板使用。
|
|
8
|
+
* @returns 基于 localStorage 的存储适配器
|
|
9
|
+
*/
|
|
10
|
+
export declare const createLocalStorageRightPanelScopeStorage: () => RightPanelScopeStorage;
|
|
11
|
+
/**
|
|
12
|
+
* 配置作用域的持久化方式(宿主启动时调用一次即可)。
|
|
13
|
+
* @param options 存储适配器与是否持久化
|
|
14
|
+
*/
|
|
15
|
+
export declare const configureRightPanelScope: (options?: UseRightPanelScopeOptions) => void;
|
|
16
|
+
/**
|
|
17
|
+
* 取当前作用域 id。
|
|
18
|
+
* @returns 作用域 id,未绑定时为空串
|
|
19
|
+
*/
|
|
20
|
+
export declare const getRightPanelScope: () => string;
|
|
21
|
+
/**
|
|
22
|
+
* 切换面板作用域:保存旧作用域的标签页,恢复新作用域的标签页。
|
|
23
|
+
*
|
|
24
|
+
* 传空串表示离开所有会话,会清空标签页(不落盘)。
|
|
25
|
+
* 展开状态与面板宽度不随作用域切换变化。
|
|
26
|
+
* @param nextScopeId 目标作用域 id(应用侧通常是 history_group_id)
|
|
27
|
+
* @param panel 面板状态机句柄;缺省使用全局单例
|
|
28
|
+
*/
|
|
29
|
+
export declare const setRightPanelScope: (nextScopeId: string, panel?: UseRightPanelReturn) => void;
|
|
30
|
+
/**
|
|
31
|
+
* 清空某个作用域保存的标签页(如会话被删除时)。
|
|
32
|
+
* @param scopeId 作用域 id;缺省为当前作用域
|
|
33
|
+
*/
|
|
34
|
+
export declare const clearRightPanelScope: (scopeId?: string) => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { RightPanelTab, UseRightPanelReturn } from '../types';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
/** 当前标签页(地址与加载态来源) */
|
|
5
|
+
tab: RightPanelTab;
|
|
6
|
+
/** 面板状态机句柄(导航 / 历史 / 刷新) */
|
|
7
|
+
panel: UseRightPanelReturn;
|
|
8
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
9
|
+
/** 当前标签页(地址与加载态来源) */
|
|
10
|
+
tab: RightPanelTab;
|
|
11
|
+
/** 面板状态机句柄(导航 / 历史 / 刷新) */
|
|
12
|
+
panel: UseRightPanelReturn;
|
|
13
|
+
}>>>, {}, {}>;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
17
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
+
} : {
|
|
20
|
+
type: import('vue').PropType<T[K]>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { RightPanelToolItem } from '../types';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
/** 工具入口列表;空数组时整块不渲染 */
|
|
5
|
+
tools: RightPanelToolItem[];
|
|
6
|
+
/** 区块标题,传空串则只渲染卡片网格 */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** 每行卡片数(默认 2) */
|
|
9
|
+
columns?: number;
|
|
10
|
+
}>, {
|
|
11
|
+
title: string;
|
|
12
|
+
columns: number;
|
|
13
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
"tool-click": (item: RightPanelToolItem) => void;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
16
|
+
/** 工具入口列表;空数组时整块不渲染 */
|
|
17
|
+
tools: RightPanelToolItem[];
|
|
18
|
+
/** 区块标题,传空串则只渲染卡片网格 */
|
|
19
|
+
title?: string;
|
|
20
|
+
/** 每行卡片数(默认 2) */
|
|
21
|
+
columns?: number;
|
|
22
|
+
}>, {
|
|
23
|
+
title: string;
|
|
24
|
+
columns: number;
|
|
25
|
+
}>>> & {
|
|
26
|
+
"onTool-click"?: (item: RightPanelToolItem) => any;
|
|
27
|
+
}, {
|
|
28
|
+
title: string;
|
|
29
|
+
columns: number;
|
|
30
|
+
}, {}>;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
33
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
34
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
35
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
36
|
+
} : {
|
|
37
|
+
type: import('vue').PropType<T[K]>;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
type __VLS_WithDefaults<P, D> = {
|
|
42
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
43
|
+
default: D[K];
|
|
44
|
+
}> : P[K];
|
|
45
|
+
};
|
|
46
|
+
type __VLS_Prettify<T> = {
|
|
47
|
+
[K in keyof T]: T[K];
|
|
48
|
+
} & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.wi-right-panel__icon[data-v-5a35fd97]{display:block;flex:0 0 auto}.wi-right-panel__tabs[data-v-0f712f34]{display:flex;align-items:center;gap:2px;padding:6px 8px;border-bottom:1px solid var(--wi-chat-border, #e1e4e8);background:var(--wi-chat-header-bg, #f6f8fa);flex:0 0 auto}.wi-right-panel__tabs-list[data-v-0f712f34]{display:flex;align-items:center;gap:2px;flex:0 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none}.wi-right-panel__tab-action--maximize[data-v-0f712f34]{margin-left:auto}.wi-right-panel__tabs-list[data-v-0f712f34]::-webkit-scrollbar{height:0;width:0}.wi-right-panel__tab[data-v-0f712f34]{display:flex;align-items:center;gap:6px;flex:0 1 auto;min-width:84px;max-width:168px;height:28px;padding:0 6px 0 9px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--wi-chat-text-secondary, #8a93a6);font-size:12px;cursor:pointer;transition:background-color .15s,color .15s,border-color .15s}.wi-right-panel__tab[data-v-0f712f34]:hover{background:#ffffffb3;color:var(--wi-chat-text, #27344d)}.wi-right-panel__tab.is-active[data-v-0f712f34]{background:#fff;border-color:var(--wi-chat-border, #e1e4e8);color:var(--wi-chat-text, #27344d);box-shadow:0 1px 3px #0f172a0f}.wi-right-panel__tab-title[data-v-0f712f34]{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.wi-right-panel__tab-loading[data-v-0f712f34]{width:9px;height:9px;flex:0 0 auto;border-radius:50%;border:1.5px solid var(--wi-chat-primary, #5b7fff);border-top-color:transparent;animation:wi-right-panel-tab-spin-0f712f34 .7s linear infinite}.wi-right-panel__tab-close[data-v-0f712f34]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;flex:0 0 auto;border-radius:4px;color:var(--wi-chat-text-secondary, #8a93a6);opacity:0;transition:opacity .15s,background-color .15s}.wi-right-panel__tab:hover .wi-right-panel__tab-close[data-v-0f712f34],.wi-right-panel__tab.is-active .wi-right-panel__tab-close[data-v-0f712f34]{opacity:1}.wi-right-panel__tab-close[data-v-0f712f34]:hover{background:#0f172a14;color:var(--wi-chat-text, #27344d)}.wi-right-panel__tab-action[data-v-0f712f34]{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;flex:0 0 auto;padding:0;border:none;border-radius:6px;background:transparent;color:var(--wi-chat-text-secondary, #8a93a6);cursor:pointer;transition:background-color .15s,color .15s}.wi-right-panel__tab-action[data-v-0f712f34]:hover{background:#0f172a0f;color:var(--wi-chat-text, #27344d)}.wi-right-panel__tab-action--collapse[data-v-0f712f34]{background:#0f172a0a}.wi-right-panel__tab-action--collapse[data-v-0f712f34]:hover{background:#0f172a14}@keyframes wi-right-panel-tab-spin-0f712f34{to{transform:rotate(360deg)}}.wi-right-panel__toolbar[data-v-89af1cad]{display:flex;align-items:center;gap:4px;padding:8px 10px;border-bottom:1px solid var(--wi-chat-border, #e1e4e8);flex:0 0 auto}.wi-right-panel__tool[data-v-89af1cad]{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;padding:0;border:none;border-radius:6px;background:transparent;color:var(--wi-chat-text-secondary, #8a93a6);cursor:pointer;transition:background-color .15s,color .15s}.wi-right-panel__tool[data-v-89af1cad]:hover:not(:disabled){background:var(--wi-chat-code-bg, #f6f8fa);color:var(--wi-chat-text, #27344d)}.wi-right-panel__tool[data-v-89af1cad]:disabled{opacity:.35;cursor:not-allowed}.wi-right-panel__address[data-v-89af1cad]{position:relative;flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:6px;height:28px;padding:0 10px 0 9px;border-radius:999px;border:1px solid var(--wi-chat-border, #e1e4e8);background:var(--wi-chat-header-bg, #f6f8fa);transition:border-color .15s,background-color .15s}.wi-right-panel__address[data-v-89af1cad]:focus-within{border-color:var(--wi-chat-primary, #5b7fff);background:#fff}.wi-right-panel__address-icon[data-v-89af1cad]{flex:0 0 auto;color:var(--wi-chat-text-secondary, #8a93a6)}.wi-right-panel__address-input[data-v-89af1cad]{flex:1 1 auto;min-width:0;height:100%;padding:0;border:none;outline:none;background:transparent;color:var(--wi-chat-text, #27344d);font-size:12px;line-height:1}.wi-right-panel__address-input[data-v-89af1cad]::placeholder{color:var(--wi-chat-text-secondary, #8a93a6)}.wi-right-panel__address-loading[data-v-89af1cad]{width:10px;height:10px;flex:0 0 auto;border-radius:50%;border:2px solid var(--wi-chat-primary, #5b7fff);border-top-color:transparent;animation:wi-right-panel-spin-89af1cad .7s linear infinite}@keyframes wi-right-panel-spin-89af1cad{to{transform:rotate(360deg)}}.wi-right-panel__section[data-v-edb8e61a]{margin-bottom:22px}.wi-right-panel__section[data-v-edb8e61a]:last-child{margin-bottom:0}.wi-right-panel__section-title[data-v-edb8e61a]{margin:0 0 10px;font-size:12px;font-weight:600;color:var(--wi-chat-text, #27344d)}.wi-right-panel__tools[data-v-edb8e61a]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.wi-right-panel__tool-card[data-v-edb8e61a]{display:flex;align-items:center;gap:8px;min-width:0;padding:10px 12px;border:1px solid transparent;border-radius:8px;background:var(--wi-chat-code-bg, #f6f8fa);color:var(--wi-chat-text, #27344d);font-size:12px;text-align:left;cursor:pointer;transition:background-color .15s,border-color .15s}.wi-right-panel__tool-card[data-v-edb8e61a]:hover{background:#eef2ff;border-color:color-mix(in srgb,var(--wi-chat-primary, #5b7fff) 22%,transparent)}.wi-right-panel__tool-card.is-disabled[data-v-edb8e61a]{color:var(--wi-chat-text-secondary, #8a93a6)}.wi-right-panel__tool-card-label[data-v-edb8e61a]{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-right-panel__tool-card-shortcut[data-v-edb8e61a],.wi-right-panel__tool-card-tag[data-v-edb8e61a]{flex:0 0 auto;padding:1px 6px;border-radius:999px;border:1px solid var(--wi-chat-border, #e1e4e8);background:#fff;color:var(--wi-chat-text-secondary, #8a93a6);font-size:10px;line-height:16px}.wi-right-panel__tool-card-tag[data-v-edb8e61a]{border-color:transparent;background:color-mix(in srgb,var(--wi-chat-primary, #5b7fff) 10%,transparent);color:var(--wi-chat-primary, #5b7fff)}.wi-right-panel__newtab[data-v-1d433f71]{display:flex;flex-direction:column;height:100%;min-height:0;background:var(--wi-chat-bg, #fff)}.wi-right-panel__newtab-body[data-v-1d433f71]{flex:1 1 auto;min-height:0;overflow:auto;padding:20px 22px 28px}.wi-right-panel__hero[data-v-1d433f71]{margin-bottom:22px}.wi-right-panel__hero-title[data-v-1d433f71]{margin:0 0 6px;font-size:15px;font-weight:600;color:var(--wi-chat-text, #27344d)}.wi-right-panel__hero-desc[data-v-1d433f71]{margin:0;font-size:12px;line-height:1.7;color:var(--wi-chat-text-secondary, #8a93a6)}.wi-right-panel__section[data-v-1d433f71]{margin-bottom:22px}.wi-right-panel__section[data-v-1d433f71]:last-child{margin-bottom:0}.wi-right-panel__section-title[data-v-1d433f71]{margin:0 0 10px;font-size:12px;font-weight:600;color:var(--wi-chat-text, #27344d)}.wi-right-panel__recommendations[data-v-1d433f71]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.wi-right-panel__recommendation[data-v-1d433f71]{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;padding:12px 6px 10px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--wi-chat-text, #27344d);font-size:12px;cursor:pointer;transition:background-color .15s,border-color .15s}.wi-right-panel__recommendation[data-v-1d433f71]:hover{background:var(--wi-chat-code-bg, #f6f8fa);border-color:var(--wi-chat-border, #e1e4e8)}.wi-right-panel__recommendation-icon[data-v-1d433f71]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9px;background:linear-gradient(135deg,#dbe6ff,#eef2ff);color:#4b6bd6;font-size:14px;font-weight:600}.wi-right-panel__recommendation-title[data-v-1d433f71]{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}@media (max-width: 480px){.wi-right-panel__recommendations[data-v-1d433f71]{grid-template-columns:repeat(2,minmax(0,1fr))}}.wi-right-panel__web[data-v-4ee42504]{display:flex;flex-direction:column;height:100%;min-height:0;background:var(--wi-chat-bg, #fff)}.wi-right-panel__frame-hint[data-v-4ee42504]{display:flex;align-items:center;gap:6px;flex:0 0 auto;padding:6px 12px;border-bottom:1px solid var(--wi-chat-border, #e1e4e8);background:var(--wi-chat-header-bg, #f6f8fa);color:var(--wi-chat-text-secondary, #8a93a6);font-size:11px;line-height:1.4}.wi-right-panel__frame-hint span[data-v-4ee42504]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wi-right-panel__web-body[data-v-4ee42504]{position:relative;flex:1 1 auto;min-height:0;background:#fff}.wi-right-panel__webview-host[data-v-4ee42504]{display:flex;width:100%;height:100%}.wi-right-panel__iframe[data-v-4ee42504]{display:block;width:100%;height:100%;border:0;background:#fff}.wi-right-panel__blocked[data-v-4ee42504]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:24px;text-align:center;background:var(--wi-chat-bg, #fff);color:var(--wi-chat-text-secondary, #8a93a6)}.wi-right-panel__blocked-title[data-v-4ee42504]{margin:4px 0 0;font-size:13px;font-weight:600;color:var(--wi-chat-text, #27344d)}.wi-right-panel__blocked-desc[data-v-4ee42504]{margin:0;max-width:320px;font-size:12px;line-height:1.7}.wi-right-panel__blocked-actions[data-v-4ee42504]{display:flex;gap:8px;margin-top:8px}.wi-right-panel__ghost-button[data-v-4ee42504],.wi-right-panel__primary-button[data-v-4ee42504]{height:28px;padding:0 14px;border-radius:6px;font-size:12px;cursor:pointer;transition:background-color .15s,border-color .15s}.wi-right-panel__ghost-button[data-v-4ee42504]{border:1px solid var(--wi-chat-border, #e1e4e8);background:#fff;color:var(--wi-chat-text, #27344d)}.wi-right-panel__ghost-button[data-v-4ee42504]:hover{border-color:var(--wi-chat-primary, #5b7fff);color:var(--wi-chat-primary, #5b7fff)}.wi-right-panel__primary-button[data-v-4ee42504]{border:1px solid var(--wi-chat-primary, #5b7fff);background:var(--wi-chat-primary, #5b7fff);color:#fff}.wi-right-panel__primary-button[data-v-4ee42504]:hover{filter:brightness(1.05)}.wi-right-panel[data-v-752ff3da]{position:relative;display:flex;flex-direction:column;flex:0 0 auto;height:100%;min-height:0;box-sizing:border-box;overflow:hidden;background:var(--wi-chat-bg, #fff);border-left:1px solid var(--wi-chat-border, #e1e4e8);box-shadow:-8px 0 24px #0f172a0d;animation:wi-right-panel-enter-752ff3da .18s ease-out}.wi-right-panel.is-maximized[data-v-752ff3da]{flex:1 1 100%;width:100%;box-shadow:none}@keyframes wi-right-panel-enter-752ff3da{0%{opacity:.4;transform:translate(12px)}to{opacity:1;transform:translate(0)}}.wi-right-panel__resizer[data-v-752ff3da]{position:absolute;top:0;bottom:0;left:0;z-index:3;width:5px;cursor:col-resize;background:transparent;transition:background-color .15s}.wi-right-panel__resizer[data-v-752ff3da]:hover,.wi-right-panel.is-resizing .wi-right-panel__resizer[data-v-752ff3da]{background:color-mix(in srgb,var(--wi-chat-primary, #5b7fff) 45%,transparent)}.wi-right-panel__body[data-v-752ff3da]{position:relative;flex:1 1 auto;min-height:0;display:flex;overflow:hidden}.wi-right-panel__view[data-v-752ff3da]{flex:1 1 auto;min-width:0;min-height:0;height:100%;overflow:hidden}.wi-right-panel.is-resizing .wi-right-panel__view[data-v-752ff3da]{pointer-events:none}.wi-right-panel__unknown[data-v-752ff3da],.wi-right-panel__empty[data-v-752ff3da],.wi-right-panel__lazy[data-v-752ff3da]{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:28px 24px;text-align:center;color:var(--wi-chat-text-secondary, #8a93a6)}.wi-right-panel__lazy-title[data-v-752ff3da]{margin:0;font-size:13px;font-weight:600;color:var(--wi-chat-text, #27344d)}.wi-right-panel__lazy-desc[data-v-752ff3da]{margin:0;font-size:12px}.wi-right-panel__empty-icon[data-v-752ff3da]{display:flex;align-items:center;justify-content:center;width:54px;height:54px;margin-bottom:4px;border-radius:14px;background:var(--wi-chat-header-bg, #f6f8fa);color:var(--wi-chat-primary, #5b7fff)}.wi-right-panel__empty-title[data-v-752ff3da],.wi-right-panel__unknown-title[data-v-752ff3da]{margin:0;font-size:13px;font-weight:600;color:var(--wi-chat-text, #27344d)}.wi-right-panel__empty-desc[data-v-752ff3da],.wi-right-panel__unknown-desc[data-v-752ff3da]{margin:0;max-width:300px;font-size:12px;line-height:1.7}.wi-right-panel__empty-button[data-v-752ff3da]{margin-top:10px;height:30px;padding:0 16px;border:1px solid var(--wi-chat-primary, #5b7fff);border-radius:7px;background:var(--wi-chat-primary, #5b7fff);color:#fff;font-size:12px;cursor:pointer;transition:filter .15s}.wi-right-panel__empty-button[data-v-752ff3da]:hover{filter:brightness(1.05)}
|