@vite-plugin-opencode-assistant/components 1.0.29 → 1.0.31
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.js +1 -1
- package/es/open-code-widget/composables/use-inspector.js +1 -1
- package/es/open-code-widget/src/components/FloatingBubble/FloatingBubble.vue.js +28 -7
- package/lib/@vite-plugin-opencode-assistant/components.cjs.js +12 -4
- package/lib/@vite-plugin-opencode-assistant/components.es.js +12 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/open-code-widget/composables/use-inspector.js +1 -1
- package/lib/open-code-widget/src/components/FloatingBubble/FloatingBubble.vue.js +28 -7
- 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.31";
|
|
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.js
CHANGED
|
@@ -245,7 +245,7 @@ function useInspector(options) {
|
|
|
245
245
|
if (highlight) highlight.style.pointerEvents = "none";
|
|
246
246
|
if (tooltip) tooltip.style.pointerEvents = "none";
|
|
247
247
|
let elementToHighlight = null;
|
|
248
|
-
let targetNode
|
|
248
|
+
let targetNode;
|
|
249
249
|
let fileInfo = { file: null, line: null, column: null };
|
|
250
250
|
try {
|
|
251
251
|
if (inspector) {
|
|
@@ -64,11 +64,18 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent(__spreadProps(__spreadValue
|
|
|
64
64
|
};
|
|
65
65
|
const applyMagnetic = () => {
|
|
66
66
|
if (props.magnetic === "x") {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
if (magneticSide.value === "left") {
|
|
68
|
+
state.value.x = boundary.value.left;
|
|
69
|
+
} else if (magneticSide.value === "right") {
|
|
70
|
+
state.value.x = boundary.value.right;
|
|
71
|
+
} else {
|
|
72
|
+
const nextX = closest(
|
|
73
|
+
[boundary.value.left, boundary.value.right],
|
|
74
|
+
state.value.x
|
|
75
|
+
);
|
|
76
|
+
state.value.x = nextX;
|
|
77
|
+
magneticSide.value = nextX === boundary.value.left ? "left" : "right";
|
|
78
|
+
}
|
|
72
79
|
}
|
|
73
80
|
if (props.magnetic === "y") {
|
|
74
81
|
const nextY = closest(
|
|
@@ -80,6 +87,7 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent(__spreadProps(__spreadValue
|
|
|
80
87
|
};
|
|
81
88
|
const dragging = ref(false);
|
|
82
89
|
const initialized = ref(false);
|
|
90
|
+
const magneticSide = ref(null);
|
|
83
91
|
const rootStyle = computed(() => {
|
|
84
92
|
const style = {};
|
|
85
93
|
const x = `${state.value.x}px`;
|
|
@@ -113,7 +121,15 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent(__spreadProps(__spreadValue
|
|
|
113
121
|
height: rect.height
|
|
114
122
|
};
|
|
115
123
|
if (!dragging.value) {
|
|
116
|
-
|
|
124
|
+
if (props.magnetic === "x" && magneticSide.value) {
|
|
125
|
+
if (magneticSide.value === "left") {
|
|
126
|
+
state.value.x = boundary.value.left;
|
|
127
|
+
} else {
|
|
128
|
+
state.value.x = boundary.value.right;
|
|
129
|
+
}
|
|
130
|
+
} else {
|
|
131
|
+
applyMagnetic();
|
|
132
|
+
}
|
|
117
133
|
if (state.value.x !== oldX || state.value.y !== oldY) {
|
|
118
134
|
const offset2 = { x: state.value.x, y: state.value.y };
|
|
119
135
|
emit("update:offset", offset2);
|
|
@@ -199,6 +215,11 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent(__spreadProps(__spreadValue
|
|
|
199
215
|
window.removeEventListener("mouseup", onTouchEnd);
|
|
200
216
|
}
|
|
201
217
|
requestAnimationFrame(() => {
|
|
218
|
+
if (props.magnetic === "x" && !touch.isTap.value) {
|
|
219
|
+
const centerX = state.value.x + state.value.width / 2;
|
|
220
|
+
const windowCenterX = windowWidth.value / 2;
|
|
221
|
+
magneticSide.value = centerX < windowCenterX ? "left" : "right";
|
|
222
|
+
}
|
|
202
223
|
applyMagnetic();
|
|
203
224
|
if (!touch.isTap.value) {
|
|
204
225
|
emit("drag-end");
|
|
@@ -256,7 +277,7 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent(__spreadProps(__spreadValue
|
|
|
256
277
|
__expose({
|
|
257
278
|
offset: computed(() => ({ x: state.value.x, y: state.value.y }))
|
|
258
279
|
});
|
|
259
|
-
const __returned__ = { props, emit, rootRef, state, isObject, gapX, gapY, windowWidth, windowHeight, boundary, closest, applyMagnetic, dragging, initialized, rootStyle, updateState, touch, get prevX() {
|
|
280
|
+
const __returned__ = { props, emit, rootRef, state, isObject, gapX, gapY, windowWidth, windowHeight, boundary, closest, applyMagnetic, dragging, initialized, magneticSide, rootStyle, updateState, touch, get prevX() {
|
|
260
281
|
return prevX;
|
|
261
282
|
}, set prevX(v) {
|
|
262
283
|
prevX = v;
|
|
@@ -628,9 +628,12 @@ var __vue_sfc__$2 = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps$1(__s
|
|
|
628
628
|
return arr.reduce((pre, cur) => Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur);
|
|
629
629
|
};
|
|
630
630
|
const applyMagnetic = () => {
|
|
631
|
-
if (props.magnetic === "x")
|
|
631
|
+
if (props.magnetic === "x") if (magneticSide.value === "left") state.value.x = boundary.value.left;
|
|
632
|
+
else if (magneticSide.value === "right") state.value.x = boundary.value.right;
|
|
633
|
+
else {
|
|
632
634
|
const nextX = closest([boundary.value.left, boundary.value.right], state.value.x);
|
|
633
635
|
state.value.x = nextX;
|
|
636
|
+
magneticSide.value = nextX === boundary.value.left ? "left" : "right";
|
|
634
637
|
}
|
|
635
638
|
if (props.magnetic === "y") {
|
|
636
639
|
const nextY = closest([boundary.value.top, boundary.value.bottom], state.value.y);
|
|
@@ -639,6 +642,7 @@ var __vue_sfc__$2 = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps$1(__s
|
|
|
639
642
|
};
|
|
640
643
|
const dragging = (0, vue.ref)(false);
|
|
641
644
|
const initialized = (0, vue.ref)(false);
|
|
645
|
+
const magneticSide = (0, vue.ref)(null);
|
|
642
646
|
const rootStyle = (0, vue.computed)(() => {
|
|
643
647
|
const style = {};
|
|
644
648
|
style.transform = `translate3d(${`${state.value.x}px`}, ${`${state.value.y}px`}, 0)`;
|
|
@@ -667,7 +671,9 @@ var __vue_sfc__$2 = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps$1(__s
|
|
|
667
671
|
height: rect.height
|
|
668
672
|
};
|
|
669
673
|
if (!dragging.value) {
|
|
670
|
-
|
|
674
|
+
if (props.magnetic === "x" && magneticSide.value) if (magneticSide.value === "left") state.value.x = boundary.value.left;
|
|
675
|
+
else state.value.x = boundary.value.right;
|
|
676
|
+
else applyMagnetic();
|
|
671
677
|
if (state.value.x !== oldX || state.value.y !== oldY) {
|
|
672
678
|
const offset2 = {
|
|
673
679
|
x: state.value.x,
|
|
@@ -752,6 +758,7 @@ var __vue_sfc__$2 = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps$1(__s
|
|
|
752
758
|
window.removeEventListener("mouseup", onTouchEnd);
|
|
753
759
|
}
|
|
754
760
|
requestAnimationFrame(() => {
|
|
761
|
+
if (props.magnetic === "x" && !touch.isTap.value) magneticSide.value = state.value.x + state.value.width / 2 < windowWidth.value / 2 ? "left" : "right";
|
|
755
762
|
applyMagnetic();
|
|
756
763
|
if (!touch.isTap.value) {
|
|
757
764
|
emit("drag-end");
|
|
@@ -817,6 +824,7 @@ var __vue_sfc__$2 = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps$1(__s
|
|
|
817
824
|
applyMagnetic,
|
|
818
825
|
dragging,
|
|
819
826
|
initialized,
|
|
827
|
+
magneticSide,
|
|
820
828
|
rootStyle,
|
|
821
829
|
updateState,
|
|
822
830
|
touch,
|
|
@@ -1439,7 +1447,7 @@ function useInspector(options) {
|
|
|
1439
1447
|
if (highlight) highlight.style.pointerEvents = "none";
|
|
1440
1448
|
if (tooltip) tooltip.style.pointerEvents = "none";
|
|
1441
1449
|
let elementToHighlight = null;
|
|
1442
|
-
let targetNode
|
|
1450
|
+
let targetNode;
|
|
1443
1451
|
let fileInfo = {
|
|
1444
1452
|
file: null,
|
|
1445
1453
|
line: null,
|
|
@@ -2407,7 +2415,7 @@ __vue_sfc__.render = __vue_render__;
|
|
|
2407
2415
|
var open_code_widget_default = __vue_sfc__;
|
|
2408
2416
|
//#endregion
|
|
2409
2417
|
//#region es/index.js
|
|
2410
|
-
var version = "1.0.
|
|
2418
|
+
var version = "1.0.31";
|
|
2411
2419
|
function install(app, options) {
|
|
2412
2420
|
[open_code_widget_default].forEach((item) => {
|
|
2413
2421
|
if (item.install) app.use(item, options);
|
|
@@ -601,9 +601,12 @@ var __vue_sfc__$2 = /* @__PURE__ */ defineComponent(__spreadProps$1(__spreadValu
|
|
|
601
601
|
return arr.reduce((pre, cur) => Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur);
|
|
602
602
|
};
|
|
603
603
|
const applyMagnetic = () => {
|
|
604
|
-
if (props.magnetic === "x")
|
|
604
|
+
if (props.magnetic === "x") if (magneticSide.value === "left") state.value.x = boundary.value.left;
|
|
605
|
+
else if (magneticSide.value === "right") state.value.x = boundary.value.right;
|
|
606
|
+
else {
|
|
605
607
|
const nextX = closest([boundary.value.left, boundary.value.right], state.value.x);
|
|
606
608
|
state.value.x = nextX;
|
|
609
|
+
magneticSide.value = nextX === boundary.value.left ? "left" : "right";
|
|
607
610
|
}
|
|
608
611
|
if (props.magnetic === "y") {
|
|
609
612
|
const nextY = closest([boundary.value.top, boundary.value.bottom], state.value.y);
|
|
@@ -612,6 +615,7 @@ var __vue_sfc__$2 = /* @__PURE__ */ defineComponent(__spreadProps$1(__spreadValu
|
|
|
612
615
|
};
|
|
613
616
|
const dragging = ref(false);
|
|
614
617
|
const initialized = ref(false);
|
|
618
|
+
const magneticSide = ref(null);
|
|
615
619
|
const rootStyle = computed(() => {
|
|
616
620
|
const style = {};
|
|
617
621
|
style.transform = `translate3d(${`${state.value.x}px`}, ${`${state.value.y}px`}, 0)`;
|
|
@@ -640,7 +644,9 @@ var __vue_sfc__$2 = /* @__PURE__ */ defineComponent(__spreadProps$1(__spreadValu
|
|
|
640
644
|
height: rect.height
|
|
641
645
|
};
|
|
642
646
|
if (!dragging.value) {
|
|
643
|
-
|
|
647
|
+
if (props.magnetic === "x" && magneticSide.value) if (magneticSide.value === "left") state.value.x = boundary.value.left;
|
|
648
|
+
else state.value.x = boundary.value.right;
|
|
649
|
+
else applyMagnetic();
|
|
644
650
|
if (state.value.x !== oldX || state.value.y !== oldY) {
|
|
645
651
|
const offset2 = {
|
|
646
652
|
x: state.value.x,
|
|
@@ -725,6 +731,7 @@ var __vue_sfc__$2 = /* @__PURE__ */ defineComponent(__spreadProps$1(__spreadValu
|
|
|
725
731
|
window.removeEventListener("mouseup", onTouchEnd);
|
|
726
732
|
}
|
|
727
733
|
requestAnimationFrame(() => {
|
|
734
|
+
if (props.magnetic === "x" && !touch.isTap.value) magneticSide.value = state.value.x + state.value.width / 2 < windowWidth.value / 2 ? "left" : "right";
|
|
728
735
|
applyMagnetic();
|
|
729
736
|
if (!touch.isTap.value) {
|
|
730
737
|
emit("drag-end");
|
|
@@ -790,6 +797,7 @@ var __vue_sfc__$2 = /* @__PURE__ */ defineComponent(__spreadProps$1(__spreadValu
|
|
|
790
797
|
applyMagnetic,
|
|
791
798
|
dragging,
|
|
792
799
|
initialized,
|
|
800
|
+
magneticSide,
|
|
793
801
|
rootStyle,
|
|
794
802
|
updateState,
|
|
795
803
|
touch,
|
|
@@ -1412,7 +1420,7 @@ function useInspector(options) {
|
|
|
1412
1420
|
if (highlight) highlight.style.pointerEvents = "none";
|
|
1413
1421
|
if (tooltip) tooltip.style.pointerEvents = "none";
|
|
1414
1422
|
let elementToHighlight = null;
|
|
1415
|
-
let targetNode
|
|
1423
|
+
let targetNode;
|
|
1416
1424
|
let fileInfo = {
|
|
1417
1425
|
file: null,
|
|
1418
1426
|
line: null,
|
|
@@ -2380,7 +2388,7 @@ __vue_sfc__.render = __vue_render__;
|
|
|
2380
2388
|
var open_code_widget_default = __vue_sfc__;
|
|
2381
2389
|
//#endregion
|
|
2382
2390
|
//#region es/index.js
|
|
2383
|
-
var version = "1.0.
|
|
2391
|
+
var version = "1.0.31";
|
|
2384
2392
|
function install(app, options) {
|
|
2385
2393
|
[open_code_widget_default].forEach((item) => {
|
|
2386
2394
|
if (item.install) app.use(item, options);
|
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.31";
|
|
4
4
|
declare function install(app: App<any>, options?: any): void;
|
|
5
5
|
export { install, version, OpenCodeWidget };
|
|
6
6
|
export default install;
|
package/lib/index.js
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"));
|
|
37
|
-
const version = "1.0.
|
|
37
|
+
const version = "1.0.31";
|
|
38
38
|
function install(app, options) {
|
|
39
39
|
const components = [
|
|
40
40
|
import_open_code_widget.default
|
|
@@ -277,7 +277,7 @@ function useInspector(options) {
|
|
|
277
277
|
if (highlight) highlight.style.pointerEvents = "none";
|
|
278
278
|
if (tooltip) tooltip.style.pointerEvents = "none";
|
|
279
279
|
let elementToHighlight = null;
|
|
280
|
-
let targetNode
|
|
280
|
+
let targetNode;
|
|
281
281
|
let fileInfo = { file: null, line: null, column: null };
|
|
282
282
|
try {
|
|
283
283
|
if (inspector) {
|
|
@@ -85,11 +85,18 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)(__spreadProp
|
|
|
85
85
|
};
|
|
86
86
|
const applyMagnetic = () => {
|
|
87
87
|
if (props.magnetic === "x") {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
if (magneticSide.value === "left") {
|
|
89
|
+
state.value.x = boundary.value.left;
|
|
90
|
+
} else if (magneticSide.value === "right") {
|
|
91
|
+
state.value.x = boundary.value.right;
|
|
92
|
+
} else {
|
|
93
|
+
const nextX = closest(
|
|
94
|
+
[boundary.value.left, boundary.value.right],
|
|
95
|
+
state.value.x
|
|
96
|
+
);
|
|
97
|
+
state.value.x = nextX;
|
|
98
|
+
magneticSide.value = nextX === boundary.value.left ? "left" : "right";
|
|
99
|
+
}
|
|
93
100
|
}
|
|
94
101
|
if (props.magnetic === "y") {
|
|
95
102
|
const nextY = closest(
|
|
@@ -101,6 +108,7 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)(__spreadProp
|
|
|
101
108
|
};
|
|
102
109
|
const dragging = (0, import_vue2.ref)(false);
|
|
103
110
|
const initialized = (0, import_vue2.ref)(false);
|
|
111
|
+
const magneticSide = (0, import_vue2.ref)(null);
|
|
104
112
|
const rootStyle = (0, import_vue2.computed)(() => {
|
|
105
113
|
const style = {};
|
|
106
114
|
const x = `${state.value.x}px`;
|
|
@@ -134,7 +142,15 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)(__spreadProp
|
|
|
134
142
|
height: rect.height
|
|
135
143
|
};
|
|
136
144
|
if (!dragging.value) {
|
|
137
|
-
|
|
145
|
+
if (props.magnetic === "x" && magneticSide.value) {
|
|
146
|
+
if (magneticSide.value === "left") {
|
|
147
|
+
state.value.x = boundary.value.left;
|
|
148
|
+
} else {
|
|
149
|
+
state.value.x = boundary.value.right;
|
|
150
|
+
}
|
|
151
|
+
} else {
|
|
152
|
+
applyMagnetic();
|
|
153
|
+
}
|
|
138
154
|
if (state.value.x !== oldX || state.value.y !== oldY) {
|
|
139
155
|
const offset2 = { x: state.value.x, y: state.value.y };
|
|
140
156
|
emit("update:offset", offset2);
|
|
@@ -220,6 +236,11 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)(__spreadProp
|
|
|
220
236
|
window.removeEventListener("mouseup", onTouchEnd);
|
|
221
237
|
}
|
|
222
238
|
requestAnimationFrame(() => {
|
|
239
|
+
if (props.magnetic === "x" && !touch.isTap.value) {
|
|
240
|
+
const centerX = state.value.x + state.value.width / 2;
|
|
241
|
+
const windowCenterX = windowWidth.value / 2;
|
|
242
|
+
magneticSide.value = centerX < windowCenterX ? "left" : "right";
|
|
243
|
+
}
|
|
223
244
|
applyMagnetic();
|
|
224
245
|
if (!touch.isTap.value) {
|
|
225
246
|
emit("drag-end");
|
|
@@ -277,7 +298,7 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)(__spreadProp
|
|
|
277
298
|
__expose({
|
|
278
299
|
offset: (0, import_vue2.computed)(() => ({ x: state.value.x, y: state.value.y }))
|
|
279
300
|
});
|
|
280
|
-
const __returned__ = { props, emit, rootRef, state, isObject, gapX, gapY, windowWidth, windowHeight, boundary, closest, applyMagnetic, dragging, initialized, rootStyle, updateState, touch, get prevX() {
|
|
301
|
+
const __returned__ = { props, emit, rootRef, state, isObject, gapX, gapY, windowWidth, windowHeight, boundary, closest, applyMagnetic, dragging, initialized, magneticSide, rootStyle, updateState, touch, get prevX() {
|
|
281
302
|
return prevX;
|
|
282
303
|
}, set prevX(v) {
|
|
283
304
|
prevX = v;
|
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.31","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.31",
|
|
4
4
|
"description": "Reusable OpenCode widget components built with Pagoda CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -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.31"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@vitejs/plugin-vue": "^6.0.5",
|