@vite-plugin-opencode-assistant/components 1.0.54 → 1.0.55
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/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/open-code-widget/composables/use-inspector.mjs +5 -13
- package/lib/@vite-plugin-opencode-assistant/components.cjs.js +6 -12
- package/lib/@vite-plugin-opencode-assistant/components.es.js +6 -12
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/open-code-widget/composables/use-inspector.cjs +5 -13
- package/lib/web-types.json +1 -1
- package/package.json +2 -2
package/es/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import OpenCodeWidget from './open-code-widget';
|
|
2
2
|
import type { App } from 'vue';
|
|
3
|
-
declare const version = "1.0.
|
|
3
|
+
declare const version = "1.0.55";
|
|
4
4
|
declare function install(app: App<any>, options?: any): void;
|
|
5
5
|
export { install, version, OpenCodeWidget };
|
|
6
6
|
export default install;
|
package/es/index.mjs
CHANGED
|
@@ -139,6 +139,10 @@ function getDataFromElement(el) {
|
|
|
139
139
|
function findInspectorFileInfo(element) {
|
|
140
140
|
let current = element;
|
|
141
141
|
while (current) {
|
|
142
|
+
if (shouldIgnoreElement(current)) {
|
|
143
|
+
current = current.parentElement;
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
142
146
|
const data = getDataFromElement(current);
|
|
143
147
|
if (data) {
|
|
144
148
|
const splitRE = /(.+):([\d]+):([\d]+)$/;
|
|
@@ -181,20 +185,8 @@ function getTargetElement(e) {
|
|
|
181
185
|
return el;
|
|
182
186
|
}
|
|
183
187
|
function getFileInfo(e, element) {
|
|
184
|
-
var _a, _b;
|
|
185
|
-
const inspector = window.__VUE_INSPECTOR__;
|
|
186
188
|
let inspectorFileInfo = null;
|
|
187
|
-
if (
|
|
188
|
-
const { targetNode, params } = inspector.getTargetNode(e);
|
|
189
|
-
if (targetNode && params && params.file) {
|
|
190
|
-
inspectorFileInfo = {
|
|
191
|
-
file: params.file,
|
|
192
|
-
line: (_a = params.line) != null ? _a : null,
|
|
193
|
-
column: (_b = params.column) != null ? _b : null
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
if (element && !inspectorFileInfo) {
|
|
189
|
+
if (element) {
|
|
198
190
|
inspectorFileInfo = findInspectorFileInfo(element);
|
|
199
191
|
}
|
|
200
192
|
const vueFileInfo = element ? getFileInfoFromVueInstance(element) : null;
|
|
@@ -1987,6 +1987,10 @@ function getDataFromElement(el) {
|
|
|
1987
1987
|
function findInspectorFileInfo(element) {
|
|
1988
1988
|
let current = element;
|
|
1989
1989
|
while (current) {
|
|
1990
|
+
if (shouldIgnoreElement(current)) {
|
|
1991
|
+
current = current.parentElement;
|
|
1992
|
+
continue;
|
|
1993
|
+
}
|
|
1990
1994
|
const data = getDataFromElement(current);
|
|
1991
1995
|
if (data) {
|
|
1992
1996
|
const match = data.match(/(.+):([\d]+):([\d]+)$/);
|
|
@@ -2020,18 +2024,8 @@ function getTargetElement(e) {
|
|
|
2020
2024
|
return el;
|
|
2021
2025
|
}
|
|
2022
2026
|
function getFileInfo(e, element) {
|
|
2023
|
-
var _a, _b;
|
|
2024
|
-
const inspector = window.__VUE_INSPECTOR__;
|
|
2025
2027
|
let inspectorFileInfo = null;
|
|
2026
|
-
if (
|
|
2027
|
-
const { targetNode, params } = inspector.getTargetNode(e);
|
|
2028
|
-
if (targetNode && params && params.file) inspectorFileInfo = {
|
|
2029
|
-
file: params.file,
|
|
2030
|
-
line: (_a = params.line) != null ? _a : null,
|
|
2031
|
-
column: (_b = params.column) != null ? _b : null
|
|
2032
|
-
};
|
|
2033
|
-
}
|
|
2034
|
-
if (element && !inspectorFileInfo) inspectorFileInfo = findInspectorFileInfo(element);
|
|
2028
|
+
if (element) inspectorFileInfo = findInspectorFileInfo(element);
|
|
2035
2029
|
const vueFileInfo = element ? getFileInfoFromVueInstance(element) : null;
|
|
2036
2030
|
return mergeFileInfo(inspectorFileInfo, vueFileInfo);
|
|
2037
2031
|
}
|
|
@@ -3206,7 +3200,7 @@ __vue_sfc__.render = __vue_render__;
|
|
|
3206
3200
|
var open_code_widget_default = __vue_sfc__;
|
|
3207
3201
|
//#endregion
|
|
3208
3202
|
//#region es/index.mjs
|
|
3209
|
-
var version = "1.0.
|
|
3203
|
+
var version = "1.0.55";
|
|
3210
3204
|
function install(app, options) {
|
|
3211
3205
|
[open_code_widget_default].forEach((item) => {
|
|
3212
3206
|
if (item.install) app.use(item, options);
|
|
@@ -1960,6 +1960,10 @@ function getDataFromElement(el) {
|
|
|
1960
1960
|
function findInspectorFileInfo(element) {
|
|
1961
1961
|
let current = element;
|
|
1962
1962
|
while (current) {
|
|
1963
|
+
if (shouldIgnoreElement(current)) {
|
|
1964
|
+
current = current.parentElement;
|
|
1965
|
+
continue;
|
|
1966
|
+
}
|
|
1963
1967
|
const data = getDataFromElement(current);
|
|
1964
1968
|
if (data) {
|
|
1965
1969
|
const match = data.match(/(.+):([\d]+):([\d]+)$/);
|
|
@@ -1993,18 +1997,8 @@ function getTargetElement(e) {
|
|
|
1993
1997
|
return el;
|
|
1994
1998
|
}
|
|
1995
1999
|
function getFileInfo(e, element) {
|
|
1996
|
-
var _a, _b;
|
|
1997
|
-
const inspector = window.__VUE_INSPECTOR__;
|
|
1998
2000
|
let inspectorFileInfo = null;
|
|
1999
|
-
if (
|
|
2000
|
-
const { targetNode, params } = inspector.getTargetNode(e);
|
|
2001
|
-
if (targetNode && params && params.file) inspectorFileInfo = {
|
|
2002
|
-
file: params.file,
|
|
2003
|
-
line: (_a = params.line) != null ? _a : null,
|
|
2004
|
-
column: (_b = params.column) != null ? _b : null
|
|
2005
|
-
};
|
|
2006
|
-
}
|
|
2007
|
-
if (element && !inspectorFileInfo) inspectorFileInfo = findInspectorFileInfo(element);
|
|
2001
|
+
if (element) inspectorFileInfo = findInspectorFileInfo(element);
|
|
2008
2002
|
const vueFileInfo = element ? getFileInfoFromVueInstance(element) : null;
|
|
2009
2003
|
return mergeFileInfo(inspectorFileInfo, vueFileInfo);
|
|
2010
2004
|
}
|
|
@@ -3179,7 +3173,7 @@ __vue_sfc__.render = __vue_render__;
|
|
|
3179
3173
|
var open_code_widget_default = __vue_sfc__;
|
|
3180
3174
|
//#endregion
|
|
3181
3175
|
//#region es/index.mjs
|
|
3182
|
-
var version = "1.0.
|
|
3176
|
+
var version = "1.0.55";
|
|
3183
3177
|
function install(app, options) {
|
|
3184
3178
|
[open_code_widget_default].forEach((item) => {
|
|
3185
3179
|
if (item.install) app.use(item, options);
|
package/lib/index.cjs
CHANGED
|
@@ -34,7 +34,7 @@ __export(lib_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(lib_exports);
|
|
36
36
|
var import_open_code_widget = __toESM(require("./open-code-widget/index.cjs"));
|
|
37
|
-
const version = "1.0.
|
|
37
|
+
const version = "1.0.55";
|
|
38
38
|
function install(app, options) {
|
|
39
39
|
const components = [
|
|
40
40
|
import_open_code_widget.default
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import OpenCodeWidget from './open-code-widget';
|
|
2
2
|
import type { App } from 'vue';
|
|
3
|
-
declare const version = "1.0.
|
|
3
|
+
declare const version = "1.0.55";
|
|
4
4
|
declare function install(app: App<any>, options?: any): void;
|
|
5
5
|
export { install, version, OpenCodeWidget };
|
|
6
6
|
export default install;
|
|
@@ -171,6 +171,10 @@ function getDataFromElement(el) {
|
|
|
171
171
|
function findInspectorFileInfo(element) {
|
|
172
172
|
let current = element;
|
|
173
173
|
while (current) {
|
|
174
|
+
if (shouldIgnoreElement(current)) {
|
|
175
|
+
current = current.parentElement;
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
174
178
|
const data = getDataFromElement(current);
|
|
175
179
|
if (data) {
|
|
176
180
|
const splitRE = /(.+):([\d]+):([\d]+)$/;
|
|
@@ -213,20 +217,8 @@ function getTargetElement(e) {
|
|
|
213
217
|
return el;
|
|
214
218
|
}
|
|
215
219
|
function getFileInfo(e, element) {
|
|
216
|
-
var _a, _b;
|
|
217
|
-
const inspector = window.__VUE_INSPECTOR__;
|
|
218
220
|
let inspectorFileInfo = null;
|
|
219
|
-
if (
|
|
220
|
-
const { targetNode, params } = inspector.getTargetNode(e);
|
|
221
|
-
if (targetNode && params && params.file) {
|
|
222
|
-
inspectorFileInfo = {
|
|
223
|
-
file: params.file,
|
|
224
|
-
line: (_a = params.line) != null ? _a : null,
|
|
225
|
-
column: (_b = params.column) != null ? _b : null
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
if (element && !inspectorFileInfo) {
|
|
221
|
+
if (element) {
|
|
230
222
|
inspectorFileInfo = findInspectorFileInfo(element);
|
|
231
223
|
}
|
|
232
224
|
const vueFileInfo = element ? getFileInfoFromVueInstance(element) : null;
|
package/lib/web-types.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json","framework":"vue","name":"@vite-plugin-opencode-assistant/components","version":"1.0.
|
|
1
|
+
{"$schema":"https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json","framework":"vue","name":"@vite-plugin-opencode-assistant/components","version":"1.0.55","contributions":{"html":{"tags":[{"name":"open-code","attributes":[{"name":"","default":"`'bottom-right'`","description":"挂件显示的位置","value":{"type":"`'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'`","kind":"expression"}},{"name":"","default":"`false`","description":"挂件是否打开","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`'auto'`","description":"主题模式","value":{"type":"`'light' | 'dark' | 'auto'`","kind":"expression"}},{"name":"","default":"`'AI 助手'`","description":"助手头部显示的标题","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`'Ctrl+K'`","description":"快捷键提示文本","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`'按 ESC 或 Ctrl+P 退出'`","description":"选择模式快捷键提示文本","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`false`","description":"是否进入选择页面元素模式","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`true`","description":"会话列表是否折叠","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`'id'`","description":"会话列表项的唯一键字段","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`false`","description":"iframe 是否显示加载状态","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`undefined`","description":"会话列表是否加载中","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`false`","description":"是否显示会话列表骨架屏","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`false`","description":"是否显示空状态","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`false`","description":"是否显示错误状态","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`'当前项目暂无会话'`","description":"空状态显示的文本","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`'立即创建'`","description":"空状态操作按钮文本","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`''`","description":"Web UI 的 URL 来源","value":{"type":"`string`","kind":"expression"}},{"name":"","default":"`[]`","description":"会话列表数据","value":{"type":"`OpenCodeWidgetSession[]`","kind":"expression"}},{"name":"","default":"`null`","description":"当前选中的会话 ID","value":{"type":"`string | null`","kind":"expression"}},{"name":"","default":"`[]`","description":"已选中的元素列表","value":{"type":"`OpenCodeSelectedElement[]`","kind":"expression"}},{"name":"","default":"`true`","description":"是否显示\"一键清空\"按钮","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`true`","description":"是否启用选择模式","value":{"type":"`boolean`","kind":"expression"}},{"name":"","default":"`false`","description":"是否显示思考状态(加载中)","value":{"type":"`boolean`","kind":"expression"}}],"events":[{"name":"`update:open`","description":"当挂件打开或关闭时触发","arguments":[{"name":"open","type":"en"},{"name":"boolean"}]},{"name":"`update:selectMode`","description":"当选择模式切换时触发","arguments":[{"name":"mode","type":"de"},{"name":"boolean"}]},{"name":"`update:sessionListCollapsed`","description":"当会话列表折叠状态改变时触发","arguments":[{"name":"collapsed","type":"ed"},{"name":"boolean"}]},{"name":"`update:currentSessionId`","description":"当选中的会话 ID 改变时触发","arguments":[{"name":"sessionId","type":"Id"},{"name":"string | null"}]},{"name":"`update:selectedElements`","description":"当已选中的元素列表改变时触发","arguments":[{"name":"elements","type":"ts"},{"name":"OpenCodeSelectedElement[]"}]},{"name":"`update:theme`","description":"当主题模式改变时触发","arguments":[{"name":"theme","type":"me"},{"name":"'light' | 'dark' | 'auto'"}]},{"name":"`update:thinking`","description":"当思考状态改变时触发","arguments":[{"name":"thinking","type":"ng"},{"name":"boolean"}]},{"name":"","description":"点击触发挂件开关","arguments":[{"name":"open","type":"en"},{"name":"boolean"}]},{"name":"","description":"点击关闭按钮时触发","arguments":[]},{"name":"`toggle-session-list`","description":"点击会话列表切换按钮时触发","arguments":[{"name":"collapsed","type":"ed"},{"name":"boolean"}]},{"name":"`toggle-select-mode`","description":"点击选择模式切换按钮时触发","arguments":[{"name":"mode","type":"de"},{"name":"boolean"}]},{"name":"`toggle-theme`","description":"点击主题切换按钮时触发","arguments":[{"name":"theme","type":"me"},{"name":"'light' | 'dark' | 'auto'"}]},{"name":"`create-session`","description":"点击创建新会话时触发","arguments":[]},{"name":"`select-session`","description":"选中某个历史会话时触发","arguments":[{"name":"session","type":"on"},{"name":"OpenCodeWidgetSession"}]},{"name":"`delete-session`","description":"删除某个历史会话时触发","arguments":[{"name":"session","type":"on"},{"name":"OpenCodeWidgetSession"}]},{"name":"`click-selected-node`","description":"点击已选中的气泡或节点卡片时触发","arguments":[{"name":"element","type":"nt"},{"name":"OpenCodeSelectedElement"}]},{"name":"`remove-selected-node`","description":"删除已选中的元素时触发","arguments":[{"name":"payload","type":"ad"},{"name":"OpenCodeRemoveSelectedPayload"}]},{"name":"`clear-selected-nodes`","description":"清空所有选中元素时触发","arguments":[]},{"name":"`empty-action`","description":"点击空状态操作按钮时触发","arguments":[]},{"name":"`frame-loaded`","description":"iframe 加载完成时触发","arguments":[]},{"name":"`thinking-change`","description":"思考状态改变时触发(用于显示加载动画)","arguments":[{"name":"thinking","type":"ng"},{"name":"boolean"}]}],"slots":[{"name":"`button-icon`","description":"自定义触发按钮图标"},{"name":"`session-toggle-icon`","description":"自定义会话列表切换图标"},{"name":"`select-icon`","description":"自定义选择模式切换图标"},{"name":"`close-icon`","description":"自定义关闭按钮图标"},{"name":"`theme-icon`","description":"自定义主题切换图标"},{"name":"`sessions-empty`","description":"自定义会话列表空状态"},{"name":"`empty-state`","description":"自定义 iframe 空状态"},{"name":"","description":"自定义 iframe 加载状态"},{"name":"","description":"自定义错误状态"},{"name":"","description":"自定义 iframe 内容"}]}],"attributes":[]}},"js-types-syntax":"typescript"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vite-plugin-opencode-assistant/components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"description": "Reusable OpenCode widget components built with Pagoda CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.cjs",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"css-selector-generator": "^3.9.1",
|
|
34
|
-
"@vite-plugin-opencode-assistant/shared": "1.0.
|
|
34
|
+
"@vite-plugin-opencode-assistant/shared": "1.0.55"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@vitejs/plugin-vue": "^6.0.5",
|