@gui-chat-plugin/canvas 0.3.0 → 0.3.1

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/vue.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./core.cjs"),e=require("vue"),V=require("vue-drawing-canvas"),T={class:"w-full h-full flex flex-col bg-white"},O={class:"flex-shrink-0 p-4 border-b bg-gray-50"},B={class:"flex items-center justify-between gap-4"},D={class:"flex items-center gap-4"},F={class:"flex items-center gap-2"},$={class:"flex gap-1"},j=["onClick"],I={class:"flex items-center gap-2"},L={class:"flex-1 p-4 overflow-hidden"},x=e.defineComponent({__name:"View",props:{selectedResult:{}},emits:["updateResult"],setup(u,{emit:f}){const l=u,N=f,n=e.ref(null),p=e.ref(""),r=e.ref(5),s=e.ref("#000000"),h=e.ref([]),i=e.ref(800),c=e.ref(600),w=e.ref(0),b=()=>{if(l.selectedResult?.viewState?.drawingState){const t=l.selectedResult.viewState.drawingState;r.value=t.brushSize||5,s.value=t.brushColor||"#000000",i.value=t.canvasWidth||800,c.value=t.canvasHeight||600,t.strokes?h.value=t.strokes:h.value=[]}else h.value=[]};b();const R=async()=>{if(n.value)try{n.value.undo(),setTimeout(v,50)}catch(t){console.warn("Undo operation failed:",t)}},S=async()=>{if(n.value)try{n.value.redo(),setTimeout(v,50)}catch(t){console.warn("Redo operation failed:",t)}},M=()=>{if(n.value)try{n.value.reset(),v()}catch(t){console.warn("Clear operation failed:",t)}},_=()=>{v()},v=async()=>{if(n.value&&l.selectedResult)try{const t=await n.value.save(),a={strokes:n.value.getAllStrokes(),brushSize:r.value,brushColor:s.value,canvasWidth:i.value,canvasHeight:c.value},m={...l.selectedResult,data:{prompt:l.selectedResult.data?.prompt||"",imageData:t},viewState:{drawingState:a}};N("updateResult",m)}catch(t){console.error("Failed to save drawing state:",t)}};e.watch(()=>l.selectedResult,()=>{b()},{immediate:!1}),e.watch([r,s],()=>{v()}),e.watch([i,c],()=>{w.value++});const g=()=>{const t=n.value?.$el?.parentElement;if(t){const o=t.getBoundingClientRect(),a=o.width-64,m=o.height-64,y=Math.max(300,Math.min(600,Math.floor(a))),k=Math.max(200,Math.min(400,Math.floor(m)));(y!==i.value||k!==c.value)&&(i.value=y,c.value=k)}};return e.onMounted(async()=>{await e.nextTick(),g(),window.addEventListener("resize",g)}),e.onUnmounted(()=>{window.removeEventListener("resize",g)}),(t,o)=>(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("div",O,[e.createElementVNode("div",B,[e.createElementVNode("div",D,[e.createElementVNode("div",F,[e.createElementVNode("div",$,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([2,5,10,20],a=>e.createElementVNode("button",{key:a,onClick:m=>r.value=a,class:e.normalizeClass(["w-8 h-8 rounded border-2 transition-colors",r.value===a?"border-blue-500 bg-blue-100":"border-gray-300 bg-white hover:bg-gray-50"])},[e.createElementVNode("div",{class:e.normalizeClass("bg-gray-800 rounded-full mx-auto"),style:e.normalizeStyle({width:Math.max(2,a*1)+"px",height:Math.max(2,a*1)+"px"})},null,4)],10,j)),64))])]),e.createElementVNode("div",I,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=a=>s.value=a),type:"color",class:"w-12 h-8 rounded border border-gray-300"},null,512),[[e.vModelText,s.value]])])]),e.createElementVNode("div",{class:"flex items-center gap-1"},[e.createElementVNode("button",{onClick:R,class:"w-8 h-8 flex items-center justify-center rounded border-2 border-gray-300 bg-white hover:bg-gray-50",title:"Undo"}," ↩ "),e.createElementVNode("button",{onClick:S,class:"w-8 h-8 flex items-center justify-center rounded border-2 border-gray-300 bg-white hover:bg-gray-50",title:"Redo"}," ↪ "),e.createElementVNode("button",{onClick:M,class:"w-8 h-8 flex items-center justify-center rounded border-2 border-red-300 bg-white hover:bg-red-50",title:"Clear"}," 🗑 ")])])]),e.createElementVNode("div",L,[(e.openBlock(),e.createBlock(e.unref(V),{ref_key:"canvasRef",ref:n,key:`${u.selectedResult?.uuid||"default"}-${w.value}`,image:p.value,"onUpdate:image":o[1]||(o[1]=a=>p.value=a),width:i.value,height:c.value,"stroke-type":"dash","line-cap":"round","line-join":"round","fill-shape":!1,eraser:!1,lineWidth:r.value,color:s.value,"background-color":"#FFFFFF","background-image":void 0,watermark:void 0,"initial-image":h.value,saveAs:"png",styles:{border:"1px solid #ddd",borderRadius:"8px"},lock:!1,onMouseup:_,onTouchend:_},null,8,["image","width","height","lineWidth","color","initial-image"]))])]))}}),P={class:"min-h-24 flex items-center justify-center"},W=["src"],z={key:1,class:"text-gray-400 text-sm"},E=e.defineComponent({__name:"Preview",props:{result:{}},setup(u){return(f,l)=>(e.openBlock(),e.createElementBlock("div",P,[u.result.data?.imageData?(e.openBlock(),e.createElementBlock("img",{key:0,src:u.result.data.imageData,class:"max-w-full h-auto rounded",alt:"Canvas drawing"},null,8,W)):(e.openBlock(),e.createElementBlock("div",z,"No drawing yet"))]))}}),C={...d.pluginCore,viewComponent:x,previewComponent:E},H={plugin:C};exports.SYSTEM_PROMPT=d.SYSTEM_PROMPT;exports.TOOL_DEFINITION=d.TOOL_DEFINITION;exports.TOOL_NAME=d.TOOL_NAME;exports.executeOpenCanvas=d.executeOpenCanvas;exports.pluginCore=d.pluginCore;exports.Preview=E;exports.View=x;exports.default=H;exports.plugin=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./core.cjs"),e=require("vue"),S=require("vue-drawing-canvas"),V={class:"w-full h-full flex flex-col bg-white"},T={class:"flex-shrink-0 p-4 border-b bg-gray-50"},M={class:"flex items-center justify-between gap-4"},O={class:"flex items-center gap-4"},B={class:"flex items-center gap-2"},D={class:"flex gap-1"},F=["onClick"],$={class:"flex items-center gap-2"},j={class:"flex-1 p-4 overflow-hidden"},y=e.defineComponent({__name:"View",props:{selectedResult:{}},emits:["updateResult"],setup(u,{emit:f}){const n=u,E=f,o=e.ref(null),p=e.ref(""),l=e.ref(5),s=e.ref("#000000"),h=e.ref([]),i=e.ref(800),c=e.ref(600),w=e.ref(0),b=()=>{if(n.selectedResult?.viewState?.drawingState){const t=n.selectedResult.viewState.drawingState;l.value=t.brushSize||5,s.value=t.brushColor||"#000000",i.value=t.canvasWidth||800,c.value=t.canvasHeight||600,t.strokes?h.value=t.strokes:h.value=[]}else h.value=[]};b();const C=async()=>{if(o.value)try{o.value.undo(),setTimeout(v,50)}catch(t){console.warn("Undo operation failed:",t)}},N=async()=>{if(o.value)try{o.value.redo(),setTimeout(v,50)}catch(t){console.warn("Redo operation failed:",t)}},R=()=>{if(o.value)try{o.value.reset(),v()}catch(t){console.warn("Clear operation failed:",t)}},_=()=>{v()},v=async()=>{if(o.value&&n.selectedResult)try{const t=await o.value.save(),a={strokes:o.value.getAllStrokes(),brushSize:l.value,brushColor:s.value,canvasWidth:i.value,canvasHeight:c.value},m={...n.selectedResult,data:{prompt:n.selectedResult.data?.prompt||"",imageData:t},viewState:{drawingState:a}};E("updateResult",m)}catch(t){console.error("Failed to save drawing state:",t)}};e.watch(()=>n.selectedResult,()=>{b()},{immediate:!1}),e.watch([l,s],()=>{v()}),e.watch([i,c],()=>{w.value++});const g=()=>{const t=o.value?.$el?.parentElement;if(t){const r=t.getBoundingClientRect(),a=Math.floor(r.width),m=Math.floor(a*9/16);(a!==i.value||m!==c.value)&&(i.value=a,c.value=m)}};return e.onMounted(async()=>{await e.nextTick(),g(),window.addEventListener("resize",g)}),e.onUnmounted(()=>{window.removeEventListener("resize",g)}),(t,r)=>(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("div",T,[e.createElementVNode("div",M,[e.createElementVNode("div",O,[e.createElementVNode("div",B,[e.createElementVNode("div",D,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([2,5,10,20],a=>e.createElementVNode("button",{key:a,onClick:m=>l.value=a,class:e.normalizeClass(["w-8 h-8 rounded border-2 transition-colors",l.value===a?"border-blue-500 bg-blue-100":"border-gray-300 bg-white hover:bg-gray-50"])},[e.createElementVNode("div",{class:e.normalizeClass("bg-gray-800 rounded-full mx-auto"),style:e.normalizeStyle({width:Math.max(2,a*1)+"px",height:Math.max(2,a*1)+"px"})},null,4)],10,F)),64))])]),e.createElementVNode("div",$,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=a=>s.value=a),type:"color",class:"w-12 h-8 rounded border border-gray-300"},null,512),[[e.vModelText,s.value]])])]),e.createElementVNode("div",{class:"flex items-center gap-1"},[e.createElementVNode("button",{onClick:C,class:"w-8 h-8 flex items-center justify-center rounded border-2 border-gray-300 bg-white hover:bg-gray-50",title:"Undo"}," ↩ "),e.createElementVNode("button",{onClick:N,class:"w-8 h-8 flex items-center justify-center rounded border-2 border-gray-300 bg-white hover:bg-gray-50",title:"Redo"}," ↪ "),e.createElementVNode("button",{onClick:R,class:"w-8 h-8 flex items-center justify-center rounded border-2 border-red-300 bg-white hover:bg-red-50",title:"Clear"}," 🗑 ")])])]),e.createElementVNode("div",j,[(e.openBlock(),e.createBlock(e.unref(S),{ref_key:"canvasRef",ref:o,key:`${u.selectedResult?.uuid||"default"}-${w.value}`,image:p.value,"onUpdate:image":r[1]||(r[1]=a=>p.value=a),width:i.value,height:c.value,"stroke-type":"dash","line-cap":"round","line-join":"round","fill-shape":!1,eraser:!1,lineWidth:l.value,color:s.value,"background-color":"#FFFFFF","background-image":void 0,watermark:void 0,"initial-image":h.value,saveAs:"png",styles:{border:"1px solid #ddd",borderRadius:"8px"},lock:!1,onMouseup:_,onTouchend:_},null,8,["image","width","height","lineWidth","color","initial-image"]))])]))}}),I={class:"min-h-24 flex items-center justify-center"},L=["src"],P={key:1,class:"text-gray-400 text-sm"},k=e.defineComponent({__name:"Preview",props:{result:{}},setup(u){return(f,n)=>(e.openBlock(),e.createElementBlock("div",I,[u.result.data?.imageData?(e.openBlock(),e.createElementBlock("img",{key:0,src:u.result.data.imageData,class:"max-w-full h-auto rounded",alt:"Canvas drawing"},null,8,L)):(e.openBlock(),e.createElementBlock("div",P,"No drawing yet"))]))}}),x={...d.pluginCore,viewComponent:y,previewComponent:k},W={plugin:x};exports.SYSTEM_PROMPT=d.SYSTEM_PROMPT;exports.TOOL_DEFINITION=d.TOOL_DEFINITION;exports.TOOL_NAME=d.TOOL_NAME;exports.executeOpenCanvas=d.executeOpenCanvas;exports.pluginCore=d.pluginCore;exports.Preview=k;exports.View=y;exports.default=W;exports.plugin=x;
package/dist/vue.js CHANGED
@@ -1,37 +1,37 @@
1
- import { pluginCore as $ } from "./core.js";
2
- import { SYSTEM_PROMPT as ue, TOOL_DEFINITION as ve, TOOL_NAME as he, executeOpenCanvas as ge } from "./core.js";
3
- import { defineComponent as M, ref as n, watch as p, onMounted as O, nextTick as W, onUnmounted as j, createElementBlock as g, openBlock as u, createElementVNode as t, Fragment as H, renderList as L, normalizeClass as S, normalizeStyle as N, withDirectives as U, vModelText as V, createBlock as z, unref as B } from "vue";
4
- import I from "vue-drawing-canvas";
5
- const P = { class: "w-full h-full flex flex-col bg-white" }, A = { class: "flex-shrink-0 p-4 border-b bg-gray-50" }, K = { class: "flex items-center justify-between gap-4" }, Y = { class: "flex items-center gap-4" }, q = { class: "flex items-center gap-2" }, G = { class: "flex gap-1" }, J = ["onClick"], Q = { class: "flex items-center gap-2" }, X = { class: "flex-1 p-4 overflow-hidden" }, Z = /* @__PURE__ */ M({
1
+ import { pluginCore as E } from "./core.js";
2
+ import { SYSTEM_PROMPT as ce, TOOL_DEFINITION as de, TOOL_NAME as ue, executeOpenCanvas as ve } from "./core.js";
3
+ import { defineComponent as R, ref as o, watch as p, onMounted as F, nextTick as $, onUnmounted as O, createElementBlock as m, openBlock as u, createElementVNode as a, Fragment as j, renderList as W, normalizeClass as C, normalizeStyle as L, withDirectives as N, vModelText as U, createBlock as V, unref as z } from "vue";
4
+ import B from "vue-drawing-canvas";
5
+ const H = { class: "w-full h-full flex flex-col bg-white" }, I = { class: "flex-shrink-0 p-4 border-b bg-gray-50" }, P = { class: "flex items-center justify-between gap-4" }, A = { class: "flex items-center gap-4" }, K = { class: "flex items-center gap-2" }, Y = { class: "flex gap-1" }, q = ["onClick"], G = { class: "flex items-center gap-2" }, J = { class: "flex-1 p-4 overflow-hidden" }, Q = /* @__PURE__ */ R({
6
6
  __name: "View",
7
7
  props: {
8
8
  selectedResult: {}
9
9
  },
10
10
  emits: ["updateResult"],
11
11
  setup(v, { emit: b }) {
12
- const r = v, T = b, s = n(null), y = n(""), l = n(5), i = n("#000000"), m = n([]), c = n(800), d = n(600), x = n(0), _ = () => {
13
- if (r.selectedResult?.viewState?.drawingState) {
14
- const e = r.selectedResult.viewState.drawingState;
15
- l.value = e.brushSize || 5, i.value = e.brushColor || "#000000", c.value = e.canvasWidth || 800, d.value = e.canvasHeight || 600, e.strokes ? m.value = e.strokes : m.value = [];
12
+ const n = v, S = b, s = o(null), y = o(""), l = o(5), i = o("#000000"), f = o([]), c = o(800), d = o(600), x = o(0), _ = () => {
13
+ if (n.selectedResult?.viewState?.drawingState) {
14
+ const e = n.selectedResult.viewState.drawingState;
15
+ l.value = e.brushSize || 5, i.value = e.brushColor || "#000000", c.value = e.canvasWidth || 800, d.value = e.canvasHeight || 600, e.strokes ? f.value = e.strokes : f.value = [];
16
16
  } else
17
- m.value = [];
17
+ f.value = [];
18
18
  };
19
19
  _();
20
- const D = async () => {
20
+ const M = async () => {
21
21
  if (s.value)
22
22
  try {
23
23
  s.value.undo(), setTimeout(h, 50);
24
24
  } catch (e) {
25
25
  console.warn("Undo operation failed:", e);
26
26
  }
27
- }, E = async () => {
27
+ }, T = async () => {
28
28
  if (s.value)
29
29
  try {
30
30
  s.value.redo(), setTimeout(h, 50);
31
31
  } catch (e) {
32
32
  console.warn("Redo operation failed:", e);
33
33
  }
34
- }, F = () => {
34
+ }, D = () => {
35
35
  if (s.value)
36
36
  try {
37
37
  s.value.reset(), h();
@@ -41,31 +41,31 @@ const P = { class: "w-full h-full flex flex-col bg-white" }, A = { class: "flex-
41
41
  }, k = () => {
42
42
  h();
43
43
  }, h = async () => {
44
- if (s.value && r.selectedResult)
44
+ if (s.value && n.selectedResult)
45
45
  try {
46
- const e = await s.value.save(), a = {
46
+ const e = await s.value.save(), t = {
47
47
  strokes: s.value.getAllStrokes(),
48
48
  brushSize: l.value,
49
49
  brushColor: i.value,
50
50
  canvasWidth: c.value,
51
51
  canvasHeight: d.value
52
- }, f = {
53
- ...r.selectedResult,
52
+ }, g = {
53
+ ...n.selectedResult,
54
54
  data: {
55
- prompt: r.selectedResult.data?.prompt || "",
55
+ prompt: n.selectedResult.data?.prompt || "",
56
56
  imageData: e
57
57
  },
58
58
  viewState: {
59
- drawingState: a
59
+ drawingState: t
60
60
  }
61
61
  };
62
- T("updateResult", f);
62
+ S("updateResult", g);
63
63
  } catch (e) {
64
64
  console.error("Failed to save drawing state:", e);
65
65
  }
66
66
  };
67
67
  p(
68
- () => r.selectedResult,
68
+ () => n.selectedResult,
69
69
  () => {
70
70
  _();
71
71
  },
@@ -78,74 +78,74 @@ const P = { class: "w-full h-full flex flex-col bg-white" }, A = { class: "flex-
78
78
  const w = () => {
79
79
  const e = s.value?.$el?.parentElement;
80
80
  if (e) {
81
- const o = e.getBoundingClientRect(), a = o.width - 64, f = o.height - 64, C = Math.max(300, Math.min(600, Math.floor(a))), R = Math.max(200, Math.min(400, Math.floor(f)));
82
- (C !== c.value || R !== d.value) && (c.value = C, d.value = R);
81
+ const r = e.getBoundingClientRect(), t = Math.floor(r.width), g = Math.floor(t * 9 / 16);
82
+ (t !== c.value || g !== d.value) && (c.value = t, d.value = g);
83
83
  }
84
84
  };
85
- return O(async () => {
86
- await W(), w(), window.addEventListener("resize", w);
87
- }), j(() => {
85
+ return F(async () => {
86
+ await $(), w(), window.addEventListener("resize", w);
87
+ }), O(() => {
88
88
  window.removeEventListener("resize", w);
89
- }), (e, o) => (u(), g("div", P, [
90
- t("div", A, [
91
- t("div", K, [
92
- t("div", Y, [
93
- t("div", q, [
94
- t("div", G, [
95
- (u(), g(H, null, L([2, 5, 10, 20], (a) => t("button", {
96
- key: a,
97
- onClick: (f) => l.value = a,
98
- class: S([
89
+ }), (e, r) => (u(), m("div", H, [
90
+ a("div", I, [
91
+ a("div", P, [
92
+ a("div", A, [
93
+ a("div", K, [
94
+ a("div", Y, [
95
+ (u(), m(j, null, W([2, 5, 10, 20], (t) => a("button", {
96
+ key: t,
97
+ onClick: (g) => l.value = t,
98
+ class: C([
99
99
  "w-8 h-8 rounded border-2 transition-colors",
100
- l.value === a ? "border-blue-500 bg-blue-100" : "border-gray-300 bg-white hover:bg-gray-50"
100
+ l.value === t ? "border-blue-500 bg-blue-100" : "border-gray-300 bg-white hover:bg-gray-50"
101
101
  ])
102
102
  }, [
103
- t("div", {
104
- class: S("bg-gray-800 rounded-full mx-auto"),
105
- style: N({
106
- width: Math.max(2, a * 1) + "px",
107
- height: Math.max(2, a * 1) + "px"
103
+ a("div", {
104
+ class: C("bg-gray-800 rounded-full mx-auto"),
105
+ style: L({
106
+ width: Math.max(2, t * 1) + "px",
107
+ height: Math.max(2, t * 1) + "px"
108
108
  })
109
109
  }, null, 4)
110
- ], 10, J)), 64))
110
+ ], 10, q)), 64))
111
111
  ])
112
112
  ]),
113
- t("div", Q, [
114
- U(t("input", {
115
- "onUpdate:modelValue": o[0] || (o[0] = (a) => i.value = a),
113
+ a("div", G, [
114
+ N(a("input", {
115
+ "onUpdate:modelValue": r[0] || (r[0] = (t) => i.value = t),
116
116
  type: "color",
117
117
  class: "w-12 h-8 rounded border border-gray-300"
118
118
  }, null, 512), [
119
- [V, i.value]
119
+ [U, i.value]
120
120
  ])
121
121
  ])
122
122
  ]),
123
- t("div", { class: "flex items-center gap-1" }, [
124
- t("button", {
125
- onClick: D,
123
+ a("div", { class: "flex items-center gap-1" }, [
124
+ a("button", {
125
+ onClick: M,
126
126
  class: "w-8 h-8 flex items-center justify-center rounded border-2 border-gray-300 bg-white hover:bg-gray-50",
127
127
  title: "Undo"
128
128
  }, " ↩ "),
129
- t("button", {
130
- onClick: E,
129
+ a("button", {
130
+ onClick: T,
131
131
  class: "w-8 h-8 flex items-center justify-center rounded border-2 border-gray-300 bg-white hover:bg-gray-50",
132
132
  title: "Redo"
133
133
  }, " ↪ "),
134
- t("button", {
135
- onClick: F,
134
+ a("button", {
135
+ onClick: D,
136
136
  class: "w-8 h-8 flex items-center justify-center rounded border-2 border-red-300 bg-white hover:bg-red-50",
137
137
  title: "Clear"
138
138
  }, " 🗑 ")
139
139
  ])
140
140
  ])
141
141
  ]),
142
- t("div", X, [
143
- (u(), z(B(I), {
142
+ a("div", J, [
143
+ (u(), V(z(B), {
144
144
  ref_key: "canvasRef",
145
145
  ref: s,
146
146
  key: `${v.selectedResult?.uuid || "default"}-${x.value}`,
147
147
  image: y.value,
148
- "onUpdate:image": o[1] || (o[1] = (a) => y.value = a),
148
+ "onUpdate:image": r[1] || (r[1] = (t) => y.value = t),
149
149
  width: c.value,
150
150
  height: d.value,
151
151
  "stroke-type": "dash",
@@ -158,7 +158,7 @@ const P = { class: "w-full h-full flex flex-col bg-white" }, A = { class: "flex-
158
158
  "background-color": "#FFFFFF",
159
159
  "background-image": void 0,
160
160
  watermark: void 0,
161
- "initial-image": m.value,
161
+ "initial-image": f.value,
162
162
  saveAs: "png",
163
163
  styles: {
164
164
  border: "1px solid #ddd",
@@ -171,37 +171,37 @@ const P = { class: "w-full h-full flex flex-col bg-white" }, A = { class: "flex-
171
171
  ])
172
172
  ]));
173
173
  }
174
- }), ee = { class: "min-h-24 flex items-center justify-center" }, te = ["src"], ae = {
174
+ }), X = { class: "min-h-24 flex items-center justify-center" }, Z = ["src"], ee = {
175
175
  key: 1,
176
176
  class: "text-gray-400 text-sm"
177
- }, se = /* @__PURE__ */ M({
177
+ }, te = /* @__PURE__ */ R({
178
178
  __name: "Preview",
179
179
  props: {
180
180
  result: {}
181
181
  },
182
182
  setup(v) {
183
- return (b, r) => (u(), g("div", ee, [
184
- v.result.data?.imageData ? (u(), g("img", {
183
+ return (b, n) => (u(), m("div", X, [
184
+ v.result.data?.imageData ? (u(), m("img", {
185
185
  key: 0,
186
186
  src: v.result.data.imageData,
187
187
  class: "max-w-full h-auto rounded",
188
188
  alt: "Canvas drawing"
189
- }, null, 8, te)) : (u(), g("div", ae, "No drawing yet"))
189
+ }, null, 8, Z)) : (u(), m("div", ee, "No drawing yet"))
190
190
  ]));
191
191
  }
192
- }), oe = {
193
- ...$,
194
- viewComponent: Z,
195
- previewComponent: se
196
- }, ie = { plugin: oe };
192
+ }), ae = {
193
+ ...E,
194
+ viewComponent: Q,
195
+ previewComponent: te
196
+ }, re = { plugin: ae };
197
197
  export {
198
- se as Preview,
199
- ue as SYSTEM_PROMPT,
200
- ve as TOOL_DEFINITION,
201
- he as TOOL_NAME,
202
- Z as View,
203
- ie as default,
204
- ge as executeOpenCanvas,
205
- oe as plugin,
206
- $ as pluginCore
198
+ te as Preview,
199
+ ce as SYSTEM_PROMPT,
200
+ de as TOOL_DEFINITION,
201
+ ue as TOOL_NAME,
202
+ Q as View,
203
+ re as default,
204
+ ve as executeOpenCanvas,
205
+ ae as plugin,
206
+ E as pluginCore
207
207
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gui-chat-plugin/canvas",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Drawing canvas plugin for GUIChat",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",