@gui-chat-plugin/edit-image 0.3.0 → 0.4.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/core.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i="editImage",n={type:"function",name:i,description:"Edit the previously generated image based on a text prompt.",parameters:{type:"object",properties:{prompt:{type:"string",description:"Description of the edits to be made to the image in English"}},required:["prompt"]}},e=async(t,s)=>{var a;const{prompt:o}=s;return(a=t.app)!=null&&a.editImage?t.app.editImage(o):{message:"editImage function not available"}},r={toolDefinition:n,execute:e,generatingMessage:"Editing image...",isEnabled:()=>!0,backends:["imageGen"]},g=e,p=[{name:"Add Sunglasses",args:{prompt:"Add stylish sunglasses to the subject"}},{name:"Change Background",args:{prompt:"Change the background to a beautiful sunset beach"}},{name:"Make it Artistic",args:{prompt:"Transform into an oil painting style"}}];exports.TOOL_DEFINITION=n;exports.TOOL_NAME=i;exports.editImage=e;exports.executeEditImage=g;exports.pluginCore=r;exports.samples=p;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./samples-365rWmrl.cjs`);exports.TOOL_DEFINITION=e.a,exports.TOOL_NAME=e.o,exports.editImage=e.n,exports.executeEditImage=e.r,exports.pluginCore=e.i,exports.samples=e.t;
package/dist/core.js CHANGED
@@ -1,52 +1,2 @@
1
- const s = "editImage", o = {
2
- type: "function",
3
- name: s,
4
- description: "Edit the previously generated image based on a text prompt.",
5
- parameters: {
6
- type: "object",
7
- properties: {
8
- prompt: {
9
- type: "string",
10
- description: "Description of the edits to be made to the image in English"
11
- }
12
- },
13
- required: ["prompt"]
14
- }
15
- }, a = async (e, n) => {
16
- var t;
17
- const { prompt: i } = n;
18
- return (t = e.app) != null && t.editImage ? e.app.editImage(i) : { message: "editImage function not available" };
19
- }, r = {
20
- toolDefinition: o,
21
- execute: a,
22
- generatingMessage: "Editing image...",
23
- isEnabled: () => !0,
24
- backends: ["imageGen"]
25
- }, p = a, g = [
26
- {
27
- name: "Add Sunglasses",
28
- args: {
29
- prompt: "Add stylish sunglasses to the subject"
30
- }
31
- },
32
- {
33
- name: "Change Background",
34
- args: {
35
- prompt: "Change the background to a beautiful sunset beach"
36
- }
37
- },
38
- {
39
- name: "Make it Artistic",
40
- args: {
41
- prompt: "Transform into an oil painting style"
42
- }
43
- }
44
- ];
45
- export {
46
- o as TOOL_DEFINITION,
47
- s as TOOL_NAME,
48
- a as editImage,
49
- p as executeEditImage,
50
- r as pluginCore,
51
- g as samples
52
- };
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./samples-DIPfxXaL.js";
2
+ export { e as TOOL_DEFINITION, r as TOOL_NAME, n as editImage, i as executeEditImage, t as pluginCore, a as samples };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./core.cjs");exports.TOOL_DEFINITION=e.TOOL_DEFINITION;exports.TOOL_NAME=e.TOOL_NAME;exports.editImage=e.editImage;exports.executeEditImage=e.executeEditImage;exports.pluginCore=e.pluginCore;exports.samples=e.samples;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./samples-365rWmrl.cjs`);require(`./core.cjs`),exports.TOOL_DEFINITION=e.a,exports.TOOL_NAME=e.o,exports.editImage=e.n,exports.executeEditImage=e.r,exports.pluginCore=e.i,exports.samples=e.t;
package/dist/index.js CHANGED
@@ -1,9 +1,3 @@
1
- import { TOOL_DEFINITION as O, TOOL_NAME as m, editImage as t, executeEditImage as a, pluginCore as g, samples as i } from "./core.js";
2
- export {
3
- O as TOOL_DEFINITION,
4
- m as TOOL_NAME,
5
- t as editImage,
6
- a as executeEditImage,
7
- g as pluginCore,
8
- i as samples
9
- };
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./samples-DIPfxXaL.js";
2
+ import "./core.js";
3
+ export { e as TOOL_DEFINITION, r as TOOL_NAME, n as editImage, i as executeEditImage, t as pluginCore, a as samples };
@@ -0,0 +1 @@
1
+ var e=`editImage`,t={type:`function`,name:e,description:`Edit the previously generated image based on a text prompt.`,parameters:{type:`object`,properties:{prompt:{type:`string`,description:`Description of the edits to be made to the image in English`}},required:[`prompt`]}},n=async(e,t)=>{let{prompt:n}=t;return e.app?.editImage?e.app.editImage(n):{message:`editImage function not available`}},r={toolDefinition:t,execute:n,generatingMessage:`Editing image...`,isEnabled:()=>!0,backends:[`imageGen`]},i=n,a=[{name:`Add Sunglasses`,args:{prompt:`Add stylish sunglasses to the subject`}},{name:`Change Background`,args:{prompt:`Change the background to a beautiful sunset beach`}},{name:`Make it Artistic`,args:{prompt:`Transform into an oil painting style`}}];Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
@@ -0,0 +1,38 @@
1
+ //#region src/core/definition.ts
2
+ var e = "editImage", t = {
3
+ type: "function",
4
+ name: e,
5
+ description: "Edit the previously generated image based on a text prompt.",
6
+ parameters: {
7
+ type: "object",
8
+ properties: { prompt: {
9
+ type: "string",
10
+ description: "Description of the edits to be made to the image in English"
11
+ } },
12
+ required: ["prompt"]
13
+ }
14
+ }, n = async (e, t) => {
15
+ let { prompt: n } = t;
16
+ return e.app?.editImage ? e.app.editImage(n) : { message: "editImage function not available" };
17
+ }, r = {
18
+ toolDefinition: t,
19
+ execute: n,
20
+ generatingMessage: "Editing image...",
21
+ isEnabled: () => !0,
22
+ backends: ["imageGen"]
23
+ }, i = n, a = [
24
+ {
25
+ name: "Add Sunglasses",
26
+ args: { prompt: "Add stylish sunglasses to the subject" }
27
+ },
28
+ {
29
+ name: "Change Background",
30
+ args: { prompt: "Change the background to a beautiful sunset beach" }
31
+ },
32
+ {
33
+ name: "Make it Artistic",
34
+ args: { prompt: "Transform into an oil painting style" }
35
+ }
36
+ ];
37
+ //#endregion
38
+ export { t as a, r as i, n, e as o, i as r, a as t };
package/dist/style.css CHANGED
@@ -1 +1,3 @@
1
- /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-600:oklch(57.7% .245 27.325);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-800:oklch(43.2% .095 166.913);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.m-0{margin:calc(var(--spacing)*0)}.mx-auto{margin-inline:auto}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.block{display:block}.contents{display:contents}.flex{display:flex}.h-auto{height:auto}.h-full{height:100%}.max-h-full{max-height:100%}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-24{min-height:calc(var(--spacing)*24)}.min-h-full{min-height:100%}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[200px\]{max-width:200px}.max-w-full{max-width:100%}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-emerald-200{border-color:var(--color-emerald-200)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-indigo-200{border-color:var(--color-indigo-200)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-white{background-color:var(--color-white)}.object-contain{object-fit:contain}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.whitespace-pre-wrap{white-space:pre-wrap}.text-emerald-800{color:var(--color-emerald-800)}.text-gray-400{color:var(--color-gray-400)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-indigo-700{color:var(--color-indigo-700)}.text-red-600{color:var(--color-red-600)}.text-white{color:var(--color-white)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.hover\:border-indigo-300:hover{border-color:var(--color-indigo-300)}.hover\:bg-indigo-200:hover{background-color:var(--color-indigo-200)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\:ring-\[3px\]:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-indigo-500\/10:focus{--tw-ring-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.focus\:ring-indigo-500\/10:focus{--tw-ring-color:color-mix(in oklab,var(--color-indigo-500)10%,transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
1
+ /*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-600:oklch(57.7% .245 27.325);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-800:oklch(43.2% .095 166.913);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.m-0{margin:calc(var(--spacing) * 0)}.mx-auto{margin-inline:auto}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.block{display:block}.contents{display:contents}.flex{display:flex}.h-auto{height:auto}.h-full{height:100%}.max-h-full{max-height:100%}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-24{min-height:calc(var(--spacing) * 24)}.min-h-full{min-height:100%}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[200px\]{max-width:200px}.max-w-full{max-width:100%}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-emerald-200{border-color:var(--color-emerald-200)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-indigo-200{border-color:var(--color-indigo-200)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-white{background-color:var(--color-white)}.object-contain{object-fit:contain}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.whitespace-pre-wrap{white-space:pre-wrap}.text-emerald-800{color:var(--color-emerald-800)}.text-gray-400{color:var(--color-gray-400)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-indigo-700{color:var(--color-indigo-700)}.text-red-600{color:var(--color-red-600)}.text-white{color:var(--color-white)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (hover:hover){.hover\:border-indigo-300:hover{border-color:var(--color-indigo-300)}.hover\:bg-indigo-200:hover{background-color:var(--color-indigo-200)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\:ring-\[3px\]:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-indigo-500\/10:focus{--tw-ring-color:#625fff1a}@supports (color:color-mix(in lab, red, red)){.focus\:ring-indigo-500\/10:focus{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 10%, transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
3
+ /*$vite$:1*/
@@ -3,6 +3,7 @@ import type { ImageToolData } from "../core/types";
3
3
  type __VLS_Props = {
4
4
  result: ToolResult<ImageToolData>;
5
5
  };
6
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
7
8
  export default _default;
8
9
  //# sourceMappingURL=Preview.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Preview.vue.d.ts","sourceRoot":"","sources":["../../src/vue/Preview.vue"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;CACnC,CAAC;;AAsDF,wBAMG"}
1
+ {"version":3,"file":"Preview.vue.d.ts","sourceRoot":"","sources":["../../src/vue/Preview.vue"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;CACnC,CAAC;AA4CF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -3,6 +3,7 @@ import type { ImageToolData } from "../core/types";
3
3
  type __VLS_Props = {
4
4
  selectedResult: ToolResult<ImageToolData>;
5
5
  };
6
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
7
8
  export default _default;
8
9
  //# sourceMappingURL=View.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"View.vue.d.ts","sourceRoot":"","sources":["../../src/vue/View.vue"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;CAC3C,CAAC;;AAmFF,wBAMG"}
1
+ {"version":3,"file":"View.vue.d.ts","sourceRoot":"","sources":["../../src/vue/View.vue"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;CAC3C,CAAC;AAyEF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
package/dist/vue.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./core.cjs"),e=require("vue"),u={class:"w-full h-full overflow-y-auto"},p={class:"min-h-full flex flex-col items-center justify-center p-4"},_={class:"flex-1 flex items-center justify-center min-h-0"},g=["src"],f={key:0,class:"mt-4 p-3 bg-gray-100 rounded-lg max-w-full flex-shrink-0"},E={class:"text-sm text-gray-700"},a=e.defineComponent({__name:"View",props:{selectedResult:{}},setup(t){return(d,n)=>{var l,o;return e.openBlock(),e.createElementBlock("div",u,[e.createElementVNode("div",p,[e.createElementVNode("div",_,[e.createElementVNode("img",{src:(l=t.selectedResult.data)==null?void 0:l.imageData,class:"max-w-full max-h-full object-contain rounded",alt:"Edited image"},null,8,g)]),(o=t.selectedResult.data)!=null&&o.prompt?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("p",E,[n[0]||(n[0]=e.createElementVNode("span",{class:"font-medium"},"Edit prompt:",-1)),e.createTextVNode(" "+e.toDisplayString(t.selectedResult.data.prompt),1)])])):e.createCommentVNode("",!0)])])}}}),x={class:"min-h-24 flex items-center justify-center"},h=["src"],k={key:1,class:"text-gray-400 text-sm"},c=e.defineComponent({__name:"Preview",props:{result:{}},setup(t){return(d,n)=>{var l;return e.openBlock(),e.createElementBlock("div",x,[(l=t.result.data)!=null&&l.imageData?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.result.data.imageData,class:"max-w-full h-auto rounded",alt:"Edited image"},null,8,h)):(e.openBlock(),e.createElementBlock("div",k,"No image yet"))])}}}),i="editImage",r=`When the user asks 'turn this image into ...', call ${i} API to generate a new image.`,m={...s.pluginCore,viewComponent:a,previewComponent:c,samples:s.samples,systemPrompt:r},v={plugin:m};exports.TOOL_DEFINITION=s.TOOL_DEFINITION;exports.executeEditImage=s.executeEditImage;exports.pluginCore=s.pluginCore;exports.samples=s.samples;exports.Preview=c;exports.SYSTEM_PROMPT=r;exports.TOOL_NAME=i;exports.View=a;exports.default=v;exports.plugin=m;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./samples-365rWmrl.cjs`);let t=require(`vue`);var n={class:`w-full h-full overflow-y-auto`},r={class:`min-h-full flex flex-col items-center justify-center p-4`},i={class:`flex-1 flex items-center justify-center min-h-0`},a=[`src`],o={key:0,class:`mt-4 p-3 bg-gray-100 rounded-lg max-w-full flex-shrink-0`},s={class:`text-sm text-gray-700`},c=(0,t.defineComponent)({__name:`View`,props:{selectedResult:{}},setup(e){return(c,l)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,n,[(0,t.createElementVNode)(`div`,r,[(0,t.createElementVNode)(`div`,i,[(0,t.createElementVNode)(`img`,{src:e.selectedResult.data?.imageData,class:`max-w-full max-h-full object-contain rounded`,alt:`Edited image`},null,8,a)]),e.selectedResult.data?.prompt?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,o,[(0,t.createElementVNode)(`p`,s,[l[0]||=(0,t.createElementVNode)(`span`,{class:`font-medium`},`Edit prompt:`,-1),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(e.selectedResult.data.prompt),1)])])):(0,t.createCommentVNode)(``,!0)])]))}}),l={class:`min-h-24 flex items-center justify-center`},u=[`src`],d={key:1,class:`text-gray-400 text-sm`},f=(0,t.defineComponent)({__name:`Preview`,props:{result:{}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,l,[e.result.data?.imageData?((0,t.openBlock)(),(0,t.createElementBlock)(`img`,{key:0,src:e.result.data.imageData,class:`max-w-full h-auto rounded`,alt:`Edited image`},null,8,u)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,d,`No image yet`))]))}}),p=`editImage`,m=`When the user asks 'turn this image into ...', call ${p} API to generate a new image.`,h={...e.i,viewComponent:c,previewComponent:f,samples:e.t,systemPrompt:m},g={plugin:h};exports.Preview=f,exports.SYSTEM_PROMPT=m,exports.TOOL_DEFINITION=e.a,exports.TOOL_NAME=p,exports.View=c,exports.default=g,exports.executeEditImage=e.r,exports.plugin=h,exports.pluginCore=e.i,exports.samples=e.t;
package/dist/vue.js CHANGED
@@ -1,73 +1,39 @@
1
- import { samples as r, pluginCore as m } from "./core.js";
2
- import { TOOL_DEFINITION as $, executeEditImage as j } from "./core.js";
3
- import { defineComponent as i, createElementBlock as a, openBlock as o, createElementVNode as s, createCommentVNode as d, createTextVNode as u, toDisplayString as f } from "vue";
4
- const _ = { class: "w-full h-full overflow-y-auto" }, p = { class: "min-h-full flex flex-col items-center justify-center p-4" }, g = { class: "flex-1 flex items-center justify-center min-h-0" }, x = ["src"], h = {
5
- key: 0,
6
- class: "mt-4 p-3 bg-gray-100 rounded-lg max-w-full flex-shrink-0"
7
- }, y = { class: "text-sm text-gray-700" }, w = /* @__PURE__ */ i({
8
- __name: "View",
9
- props: {
10
- selectedResult: {}
11
- },
12
- setup(e) {
13
- return (c, n) => {
14
- var t, l;
15
- return o(), a("div", _, [
16
- s("div", p, [
17
- s("div", g, [
18
- s("img", {
19
- src: (t = e.selectedResult.data) == null ? void 0 : t.imageData,
20
- class: "max-w-full max-h-full object-contain rounded",
21
- alt: "Edited image"
22
- }, null, 8, x)
23
- ]),
24
- (l = e.selectedResult.data) != null && l.prompt ? (o(), a("div", h, [
25
- s("p", y, [
26
- n[0] || (n[0] = s("span", { class: "font-medium" }, "Edit prompt:", -1)),
27
- u(" " + f(e.selectedResult.data.prompt), 1)
28
- ])
29
- ])) : d("", !0)
30
- ])
31
- ]);
32
- };
33
- }
34
- }), v = { class: "min-h-24 flex items-center justify-center" }, E = ["src"], k = {
35
- key: 1,
36
- class: "text-gray-400 text-sm"
37
- }, N = /* @__PURE__ */ i({
38
- __name: "Preview",
39
- props: {
40
- result: {}
41
- },
42
- setup(e) {
43
- return (c, n) => {
44
- var t;
45
- return o(), a("div", v, [
46
- (t = e.result.data) != null && t.imageData ? (o(), a("img", {
47
- key: 0,
48
- src: e.result.data.imageData,
49
- class: "max-w-full h-auto rounded",
50
- alt: "Edited image"
51
- }, null, 8, E)) : (o(), a("div", k, "No image yet"))
52
- ]);
53
- };
54
- }
55
- }), I = "editImage", O = `When the user asks 'turn this image into ...', call ${I} API to generate a new image.`, P = {
56
- ...m,
57
- viewComponent: w,
58
- previewComponent: N,
59
- samples: r,
60
- systemPrompt: O
61
- }, D = { plugin: P };
62
- export {
63
- N as Preview,
64
- O as SYSTEM_PROMPT,
65
- $ as TOOL_DEFINITION,
66
- I as TOOL_NAME,
67
- w as View,
68
- D as default,
69
- j as executeEditImage,
70
- P as plugin,
71
- m as pluginCore,
72
- r as samples
73
- };
1
+ import { a as e, i as t, r as n, t as r } from "./samples-DIPfxXaL.js";
2
+ import { createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, defineComponent as c, openBlock as l, toDisplayString as u } from "vue";
3
+ //#region src/vue/View.vue?vue&type=script&setup=true&lang.ts
4
+ var d = { class: "w-full h-full overflow-y-auto" }, f = { class: "min-h-full flex flex-col items-center justify-center p-4" }, p = { class: "flex-1 flex items-center justify-center min-h-0" }, m = ["src"], h = {
5
+ key: 0,
6
+ class: "mt-4 p-3 bg-gray-100 rounded-lg max-w-full flex-shrink-0"
7
+ }, g = { class: "text-sm text-gray-700" }, _ = /* @__PURE__ */ c({
8
+ __name: "View",
9
+ props: { selectedResult: {} },
10
+ setup(e) {
11
+ return (t, n) => (l(), a("div", d, [o("div", f, [o("div", p, [o("img", {
12
+ src: e.selectedResult.data?.imageData,
13
+ class: "max-w-full max-h-full object-contain rounded",
14
+ alt: "Edited image"
15
+ }, null, 8, m)]), e.selectedResult.data?.prompt ? (l(), a("div", h, [o("p", g, [n[0] ||= o("span", { class: "font-medium" }, "Edit prompt:", -1), s(" " + u(e.selectedResult.data.prompt), 1)])])) : i("", !0)])]));
16
+ }
17
+ }), v = { class: "min-h-24 flex items-center justify-center" }, y = ["src"], b = {
18
+ key: 1,
19
+ class: "text-gray-400 text-sm"
20
+ }, x = /* @__PURE__ */ c({
21
+ __name: "Preview",
22
+ props: { result: {} },
23
+ setup(e) {
24
+ return (t, n) => (l(), a("div", v, [e.result.data?.imageData ? (l(), a("img", {
25
+ key: 0,
26
+ src: e.result.data.imageData,
27
+ class: "max-w-full h-auto rounded",
28
+ alt: "Edited image"
29
+ }, null, 8, y)) : (l(), a("div", b, "No image yet"))]));
30
+ }
31
+ }), S = "editImage", C = `When the user asks 'turn this image into ...', call ${S} API to generate a new image.`, w = {
32
+ ...t,
33
+ viewComponent: _,
34
+ previewComponent: x,
35
+ samples: r,
36
+ systemPrompt: C
37
+ }, T = { plugin: w };
38
+ //#endregion
39
+ export { x as Preview, C as SYSTEM_PROMPT, e as TOOL_DEFINITION, S as TOOL_NAME, _ as View, T as default, n as executeEditImage, w as plugin, t as pluginCore, r as samples };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gui-chat-plugin/edit-image",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Image editing plugin for GUI Chat applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -30,25 +30,25 @@
30
30
  "preview": "vite preview"
31
31
  },
32
32
  "dependencies": {
33
- "gui-chat-protocol": "^0.0.3"
33
+ "gui-chat-protocol": "^0.3.3"
34
34
  },
35
35
  "devDependencies": {
36
- "@eslint/js": "^9.0.0",
37
- "@tailwindcss/vite": "^4.0.0",
36
+ "@eslint/js": "^10.0.1",
37
+ "@tailwindcss/vite": "^4.2.4",
38
38
  "@types/node": "^22.10.5",
39
- "@typescript-eslint/eslint-plugin": "^8.0.0",
40
- "@typescript-eslint/parser": "^8.0.0",
41
- "@vitejs/plugin-vue": "^5.2.1",
42
- "eslint": "^9.17.0",
43
- "eslint-plugin-vue": "^10.0.0",
44
- "globals": "^17.0.0",
45
- "tailwindcss": "^4.0.0",
46
- "typescript": "^5.7.2",
47
- "vite": "^6.0.7",
39
+ "@typescript-eslint/eslint-plugin": "^8.59.2",
40
+ "@typescript-eslint/parser": "^8.59.2",
41
+ "@vitejs/plugin-vue": "^6.0.5",
42
+ "eslint": "^10.3.0",
43
+ "eslint-plugin-vue": "^10.9.1",
44
+ "globals": "^17.6.0",
45
+ "tailwindcss": "^4.2.4",
46
+ "typescript": "~6.0.3",
47
+ "vite": "^8.0.11",
48
48
  "vite-plugin-dts": "^4.4.0",
49
- "vue": "^3.5.13",
50
- "vue-eslint-parser": "^10.0.0",
51
- "vue-tsc": "^2.2.0"
49
+ "vue": "^3.5.34",
50
+ "vue-eslint-parser": "^10.4.0",
51
+ "vue-tsc": "^3.2.8"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "vue": "^3.5.0"