@gui-chat-plugin/moodboard 0.1.1 → 0.1.2
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 +1 -17
- package/dist/core.js +2 -325
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -9
- package/dist/react.cjs +2 -18
- package/dist/react.js +305 -411
- package/dist/samples-B2-ZKxci.js +413 -0
- package/dist/samples-CQDcSeUn.cjs +17 -0
- package/dist/style.css +3 -1
- package/dist/vue/Preview.vue.d.ts +2 -1
- package/dist/vue/View.vue.d.ts +4 -1
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +111 -147
- package/package.json +37 -21
package/dist/core.cjs
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
2
|
-
- The user wants to capture an aesthetic or vibe
|
|
3
|
-
- Exploring color palettes and themes
|
|
4
|
-
- Visualizing brand identity or style direction
|
|
5
|
-
- Collecting inspiration for a project
|
|
6
|
-
- Expressing emotions or moods visually
|
|
7
|
-
|
|
8
|
-
When creating a mood board:
|
|
9
|
-
- Start with colors that represent the core mood
|
|
10
|
-
- Add emojis for quick visual communication
|
|
11
|
-
- Include text for key concepts and words
|
|
12
|
-
- Consider balance and visual harmony
|
|
13
|
-
|
|
14
|
-
Color meanings:
|
|
15
|
-
- Warm colors (red, orange, yellow): energy, passion, warmth
|
|
16
|
-
- Cool colors (blue, green, purple): calm, nature, creativity
|
|
17
|
-
- Neutral colors (black, white, gray): sophistication, balance`,p={vibrant:["#FF6B6B","#4ECDC4","#45B7D1","#FFA07A","#98D8C8","#F7DC6F"],minimal:["#2C3E50","#ECF0F1","#95A5A6","#BDC3C7","#34495E","#FFFFFF"],vintage:["#D4A373","#CCD5AE","#E9EDC9","#FEFAE0","#FAEDCD","#A8DADC"],modern:["#6366F1","#8B5CF6","#EC4899","#14B8A6","#F59E0B","#10B981"],nature:["#2D5016","#52734D","#91C788","#FEFFDE","#DDFFBC","#BFEDC1"],ocean:["#0077B6","#00B4D8","#90E0EF","#CAF0F8","#03045E","#48CAE4"]},g={happy:["😊","🌟","✨","🎉","💫","🌈"],calm:["🌿","🍃","☁️","🌙","💭","🕊️"],creative:["🎨","💡","🎭","🖌️","📐","🎬"],energy:["⚡","🔥","💪","🚀","⭐","💥"],love:["❤️","💕","💖","🌹","💝","🥰"],nature:["🌸","🌺","🌻","🍀","🌴","🌊"]};function h(){return`item_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}function f(i){return p[i]||p.modern}function E(i){const e=i.toLowerCase();for(const[t,o]of Object.entries(g))if(e.includes(t))return o;return g.creative}function u(i,e,t,o){const r=Math.ceil(Math.sqrt(e)),n=Math.floor(i/r),a=i%r,m=t/r,d=o/Math.ceil(e/r),l=(Math.random()-.5)*20,s=(Math.random()-.5)*20;return{x:a*m+m/2+l,y:n*d+d/2+s}}function M(i,e,t){const n=f(e),a=[];return n.slice(0,4).forEach((d,l)=>{const s=u(l,t.length+8,800,600);a.push({id:h(),type:"color",content:d,x:s.x,y:s.y,width:80,height:80,rotation:(Math.random()-.5)*10})}),t.forEach((d,l)=>{const s=u(l+4,t.length+8,800,600);a.push({id:h(),type:"text",content:d,label:d,x:s.x,y:s.y,width:120,height:40,rotation:(Math.random()-.5)*8})}),E(e).slice(0,4).forEach((d,l)=>{const s=u(t.length+4+l,t.length+8,800,600);a.push({id:h(),type:"emoji",content:d,x:s.x,y:s.y,width:60,height:60,rotation:(Math.random()-.5)*15})}),{title:i,theme:e,items:a,backgroundColor:n[n.length-1]+"20"}}function F(i,e,t,o,r){const n={id:h(),type:e,content:t,label:o,mood:r,x:400+(Math.random()-.5)*200,y:300+(Math.random()-.5)*200,width:e==="color"?80:e==="emoji"?60:120,height:e==="color"?80:e==="emoji"?60:40,rotation:(Math.random()-.5)*10};return{...i,items:[...i.items,n]}}function w(i,e){const t=f(e);let o=0;const r=i.items.map(n=>{if(n.type==="color"){const a=t[o%t.length];return o++,{...n,content:a}}return n});return{...i,theme:e,items:r,backgroundColor:t[t.length-1]+"20"}}const C=async(i,e)=>{const{action:t}=e;let o,r,n;switch(t){case"create":{if(!e.title)return{toolName:c,message:"Title is required for creating a mood board",instructions:"Ask the user for a title and theme."};o=M(e.title,e.theme||"modern",e.concepts||[]),r=`Created mood board "${e.title}" with ${o.items.length} elements`,n="Tell the user the mood board has been created. Ask if they want to add more elements or change the theme.";break}case"add_item":{if(!e.existingBoard||!e.itemType||!e.itemContent)return{toolName:c,message:"Existing board, item type, and content are required",instructions:"Ask the user what type of item to add."};o=F(e.existingBoard,e.itemType,e.itemContent,e.itemLabel,e.itemMood),r=`Added ${e.itemType} to the mood board`,n="Confirm the item was added. Ask if they want to add more or adjust the layout.";break}case"update_theme":{if(!e.existingBoard||!e.theme)return{toolName:c,message:"Existing board and new theme are required",instructions:"Ask the user which theme they prefer."};o=w(e.existingBoard,e.theme),r=`Updated mood board theme to "${e.theme}"`,n="Confirm the theme was changed. Ask if they like the new look.";break}case"rearrange":{if(!e.existingBoard)return{toolName:c,message:"Existing board is required for rearranging",instructions:"The mood board data is missing."};o=e.existingBoard,r="Mood board rearranged",n="The mood board has been refreshed.";break}default:return{toolName:c,message:`Unknown action: ${t}`,instructions:"Invalid action specified."}}const a={itemCount:o.items.length,theme:o.theme,items:o.items.map(m=>({id:m.id,type:m.type,label:m.label}))};return{toolName:c,message:r,title:o.title,data:o,jsonData:a,instructions:n,updating:t!=="create"}},x={toolDefinition:b,execute:C,generatingMessage:"Creating mood board...",isEnabled:()=>!0,systemPrompt:y},D=[{name:"Vibrant Energy",args:{action:"create",title:"Vibrant Energy",theme:"vibrant",concepts:["Bold","Dynamic","Exciting","Fresh"]}},{name:"Minimal Zen",args:{action:"create",title:"Minimal Zen",theme:"minimal",concepts:["Simple","Clean","Peaceful","Balanced"]}},{name:"Vintage Charm",args:{action:"create",title:"Vintage Charm",theme:"vintage",concepts:["Nostalgic","Warm","Classic","Timeless"]}},{name:"Ocean Dreams",args:{action:"create",title:"Ocean Dreams",theme:"ocean",concepts:["Calm","Flowing","Deep","Refreshing"]}},{name:"Nature Escape",args:{action:"create",title:"Nature Escape",theme:"nature",concepts:["Organic","Growth","Harmony","Life"]}}];exports.SYSTEM_PROMPT=y;exports.TOOL_DEFINITION=b;exports.TOOL_NAME=c;exports.executeMoodBoard=C;exports.pluginCore=x;exports.samples=D;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./samples-CQDcSeUn.cjs`);exports.SYSTEM_PROMPT=e.i,exports.TOOL_DEFINITION=e.a,exports.TOOL_NAME=e.o,exports.executeMoodBoard=e.n,exports.pluginCore=e.r,exports.samples=e.t;
|
package/dist/core.js
CHANGED
|
@@ -1,325 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
name: c,
|
|
4
|
-
description: "Create or update a visual mood board to capture inspiration, themes, and aesthetics. Use colors, emojis, and text to represent moods, concepts, and ideas visually.",
|
|
5
|
-
parameters: {
|
|
6
|
-
type: "object",
|
|
7
|
-
properties: {
|
|
8
|
-
action: {
|
|
9
|
-
type: "string",
|
|
10
|
-
enum: ["create", "add_item", "update_theme", "rearrange"],
|
|
11
|
-
description: "Action to perform: create (new mood board), add_item (add element), update_theme (change style), rearrange (reorganize)"
|
|
12
|
-
},
|
|
13
|
-
title: {
|
|
14
|
-
type: "string",
|
|
15
|
-
description: "Title of the mood board (required for create action)"
|
|
16
|
-
},
|
|
17
|
-
theme: {
|
|
18
|
-
type: "string",
|
|
19
|
-
description: "Overall theme (e.g., 'minimal', 'vibrant', 'vintage', 'modern')"
|
|
20
|
-
},
|
|
21
|
-
concepts: {
|
|
22
|
-
type: "array",
|
|
23
|
-
items: { type: "string" },
|
|
24
|
-
description: "Concepts, keywords, or moods to visualize on the board"
|
|
25
|
-
},
|
|
26
|
-
existingBoard: {
|
|
27
|
-
type: "object",
|
|
28
|
-
description: "Current mood board state for updates"
|
|
29
|
-
},
|
|
30
|
-
itemType: {
|
|
31
|
-
type: "string",
|
|
32
|
-
enum: ["color", "text", "emoji"],
|
|
33
|
-
description: "Type of item to add"
|
|
34
|
-
},
|
|
35
|
-
itemContent: {
|
|
36
|
-
type: "string",
|
|
37
|
-
description: "Content for the item (hex color, text, or emoji)"
|
|
38
|
-
},
|
|
39
|
-
itemLabel: {
|
|
40
|
-
type: "string",
|
|
41
|
-
description: "Optional label describing the item"
|
|
42
|
-
},
|
|
43
|
-
itemMood: {
|
|
44
|
-
type: "string",
|
|
45
|
-
description: "Mood or feeling associated with the item"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
required: ["action"]
|
|
49
|
-
}
|
|
50
|
-
}, f = `Use ${c} to create visual mood boards when:
|
|
51
|
-
- The user wants to capture an aesthetic or vibe
|
|
52
|
-
- Exploring color palettes and themes
|
|
53
|
-
- Visualizing brand identity or style direction
|
|
54
|
-
- Collecting inspiration for a project
|
|
55
|
-
- Expressing emotions or moods visually
|
|
56
|
-
|
|
57
|
-
When creating a mood board:
|
|
58
|
-
- Start with colors that represent the core mood
|
|
59
|
-
- Add emojis for quick visual communication
|
|
60
|
-
- Include text for key concepts and words
|
|
61
|
-
- Consider balance and visual harmony
|
|
62
|
-
|
|
63
|
-
Color meanings:
|
|
64
|
-
- Warm colors (red, orange, yellow): energy, passion, warmth
|
|
65
|
-
- Cool colors (blue, green, purple): calm, nature, creativity
|
|
66
|
-
- Neutral colors (black, white, gray): sophistication, balance`, p = {
|
|
67
|
-
vibrant: ["#FF6B6B", "#4ECDC4", "#45B7D1", "#FFA07A", "#98D8C8", "#F7DC6F"],
|
|
68
|
-
minimal: ["#2C3E50", "#ECF0F1", "#95A5A6", "#BDC3C7", "#34495E", "#FFFFFF"],
|
|
69
|
-
vintage: ["#D4A373", "#CCD5AE", "#E9EDC9", "#FEFAE0", "#FAEDCD", "#A8DADC"],
|
|
70
|
-
modern: ["#6366F1", "#8B5CF6", "#EC4899", "#14B8A6", "#F59E0B", "#10B981"],
|
|
71
|
-
nature: ["#2D5016", "#52734D", "#91C788", "#FEFFDE", "#DDFFBC", "#BFEDC1"],
|
|
72
|
-
ocean: ["#0077B6", "#00B4D8", "#90E0EF", "#CAF0F8", "#03045E", "#48CAE4"]
|
|
73
|
-
}, g = {
|
|
74
|
-
happy: ["😊", "🌟", "✨", "🎉", "💫", "🌈"],
|
|
75
|
-
calm: ["🌿", "🍃", "☁️", "🌙", "💭", "🕊️"],
|
|
76
|
-
creative: ["🎨", "💡", "🎭", "🖌️", "📐", "🎬"],
|
|
77
|
-
energy: ["⚡", "🔥", "💪", "🚀", "⭐", "💥"],
|
|
78
|
-
love: ["❤️", "💕", "💖", "🌹", "💝", "🥰"],
|
|
79
|
-
nature: ["🌸", "🌺", "🌻", "🍀", "🌴", "🌊"]
|
|
80
|
-
};
|
|
81
|
-
function h() {
|
|
82
|
-
return `item_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
83
|
-
}
|
|
84
|
-
function b(i) {
|
|
85
|
-
return p[i] || p.modern;
|
|
86
|
-
}
|
|
87
|
-
function C(i) {
|
|
88
|
-
const e = i.toLowerCase();
|
|
89
|
-
for (const [t, o] of Object.entries(g))
|
|
90
|
-
if (e.includes(t))
|
|
91
|
-
return o;
|
|
92
|
-
return g.creative;
|
|
93
|
-
}
|
|
94
|
-
function u(i, e, t, o) {
|
|
95
|
-
const r = Math.ceil(Math.sqrt(e)), n = Math.floor(i / r), a = i % r, m = t / r, d = o / Math.ceil(e / r), l = (Math.random() - 0.5) * 20, s = (Math.random() - 0.5) * 20;
|
|
96
|
-
return {
|
|
97
|
-
x: a * m + m / 2 + l,
|
|
98
|
-
y: n * d + d / 2 + s
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
function E(i, e, t) {
|
|
102
|
-
const n = b(e), a = [];
|
|
103
|
-
return n.slice(0, 4).forEach((d, l) => {
|
|
104
|
-
const s = u(l, t.length + 8, 800, 600);
|
|
105
|
-
a.push({
|
|
106
|
-
id: h(),
|
|
107
|
-
type: "color",
|
|
108
|
-
content: d,
|
|
109
|
-
x: s.x,
|
|
110
|
-
y: s.y,
|
|
111
|
-
width: 80,
|
|
112
|
-
height: 80,
|
|
113
|
-
rotation: (Math.random() - 0.5) * 10
|
|
114
|
-
});
|
|
115
|
-
}), t.forEach((d, l) => {
|
|
116
|
-
const s = u(l + 4, t.length + 8, 800, 600);
|
|
117
|
-
a.push({
|
|
118
|
-
id: h(),
|
|
119
|
-
type: "text",
|
|
120
|
-
content: d,
|
|
121
|
-
label: d,
|
|
122
|
-
x: s.x,
|
|
123
|
-
y: s.y,
|
|
124
|
-
width: 120,
|
|
125
|
-
height: 40,
|
|
126
|
-
rotation: (Math.random() - 0.5) * 8
|
|
127
|
-
});
|
|
128
|
-
}), C(e).slice(0, 4).forEach((d, l) => {
|
|
129
|
-
const s = u(t.length + 4 + l, t.length + 8, 800, 600);
|
|
130
|
-
a.push({
|
|
131
|
-
id: h(),
|
|
132
|
-
type: "emoji",
|
|
133
|
-
content: d,
|
|
134
|
-
x: s.x,
|
|
135
|
-
y: s.y,
|
|
136
|
-
width: 60,
|
|
137
|
-
height: 60,
|
|
138
|
-
rotation: (Math.random() - 0.5) * 15
|
|
139
|
-
});
|
|
140
|
-
}), {
|
|
141
|
-
title: i,
|
|
142
|
-
theme: e,
|
|
143
|
-
items: a,
|
|
144
|
-
backgroundColor: n[n.length - 1] + "20"
|
|
145
|
-
// Light tint of last color
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
function F(i, e, t, o, r) {
|
|
149
|
-
const n = {
|
|
150
|
-
id: h(),
|
|
151
|
-
type: e,
|
|
152
|
-
content: t,
|
|
153
|
-
label: o,
|
|
154
|
-
mood: r,
|
|
155
|
-
x: 400 + (Math.random() - 0.5) * 200,
|
|
156
|
-
y: 300 + (Math.random() - 0.5) * 200,
|
|
157
|
-
width: e === "color" ? 80 : e === "emoji" ? 60 : 120,
|
|
158
|
-
height: e === "color" ? 80 : e === "emoji" ? 60 : 40,
|
|
159
|
-
rotation: (Math.random() - 0.5) * 10
|
|
160
|
-
};
|
|
161
|
-
return {
|
|
162
|
-
...i,
|
|
163
|
-
items: [...i.items, n]
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
function w(i, e) {
|
|
167
|
-
const t = b(e);
|
|
168
|
-
let o = 0;
|
|
169
|
-
const r = i.items.map((n) => {
|
|
170
|
-
if (n.type === "color") {
|
|
171
|
-
const a = t[o % t.length];
|
|
172
|
-
return o++, { ...n, content: a };
|
|
173
|
-
}
|
|
174
|
-
return n;
|
|
175
|
-
});
|
|
176
|
-
return {
|
|
177
|
-
...i,
|
|
178
|
-
theme: e,
|
|
179
|
-
items: r,
|
|
180
|
-
backgroundColor: t[t.length - 1] + "20"
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
const x = async (i, e) => {
|
|
184
|
-
const { action: t } = e;
|
|
185
|
-
let o, r, n;
|
|
186
|
-
switch (t) {
|
|
187
|
-
case "create": {
|
|
188
|
-
if (!e.title)
|
|
189
|
-
return {
|
|
190
|
-
toolName: c,
|
|
191
|
-
message: "Title is required for creating a mood board",
|
|
192
|
-
instructions: "Ask the user for a title and theme."
|
|
193
|
-
};
|
|
194
|
-
o = E(
|
|
195
|
-
e.title,
|
|
196
|
-
e.theme || "modern",
|
|
197
|
-
e.concepts || []
|
|
198
|
-
), r = `Created mood board "${e.title}" with ${o.items.length} elements`, n = "Tell the user the mood board has been created. Ask if they want to add more elements or change the theme.";
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
case "add_item": {
|
|
202
|
-
if (!e.existingBoard || !e.itemType || !e.itemContent)
|
|
203
|
-
return {
|
|
204
|
-
toolName: c,
|
|
205
|
-
message: "Existing board, item type, and content are required",
|
|
206
|
-
instructions: "Ask the user what type of item to add."
|
|
207
|
-
};
|
|
208
|
-
o = F(
|
|
209
|
-
e.existingBoard,
|
|
210
|
-
e.itemType,
|
|
211
|
-
e.itemContent,
|
|
212
|
-
e.itemLabel,
|
|
213
|
-
e.itemMood
|
|
214
|
-
), r = `Added ${e.itemType} to the mood board`, n = "Confirm the item was added. Ask if they want to add more or adjust the layout.";
|
|
215
|
-
break;
|
|
216
|
-
}
|
|
217
|
-
case "update_theme": {
|
|
218
|
-
if (!e.existingBoard || !e.theme)
|
|
219
|
-
return {
|
|
220
|
-
toolName: c,
|
|
221
|
-
message: "Existing board and new theme are required",
|
|
222
|
-
instructions: "Ask the user which theme they prefer."
|
|
223
|
-
};
|
|
224
|
-
o = w(
|
|
225
|
-
e.existingBoard,
|
|
226
|
-
e.theme
|
|
227
|
-
), r = `Updated mood board theme to "${e.theme}"`, n = "Confirm the theme was changed. Ask if they like the new look.";
|
|
228
|
-
break;
|
|
229
|
-
}
|
|
230
|
-
case "rearrange": {
|
|
231
|
-
if (!e.existingBoard)
|
|
232
|
-
return {
|
|
233
|
-
toolName: c,
|
|
234
|
-
message: "Existing board is required for rearranging",
|
|
235
|
-
instructions: "The mood board data is missing."
|
|
236
|
-
};
|
|
237
|
-
o = e.existingBoard, r = "Mood board rearranged", n = "The mood board has been refreshed.";
|
|
238
|
-
break;
|
|
239
|
-
}
|
|
240
|
-
default:
|
|
241
|
-
return {
|
|
242
|
-
toolName: c,
|
|
243
|
-
message: `Unknown action: ${t}`,
|
|
244
|
-
instructions: "Invalid action specified."
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
const a = {
|
|
248
|
-
itemCount: o.items.length,
|
|
249
|
-
theme: o.theme,
|
|
250
|
-
items: o.items.map((m) => ({
|
|
251
|
-
id: m.id,
|
|
252
|
-
type: m.type,
|
|
253
|
-
label: m.label
|
|
254
|
-
}))
|
|
255
|
-
};
|
|
256
|
-
return {
|
|
257
|
-
toolName: c,
|
|
258
|
-
message: r,
|
|
259
|
-
title: o.title,
|
|
260
|
-
data: o,
|
|
261
|
-
jsonData: a,
|
|
262
|
-
instructions: n,
|
|
263
|
-
updating: t !== "create"
|
|
264
|
-
};
|
|
265
|
-
}, M = {
|
|
266
|
-
toolDefinition: y,
|
|
267
|
-
execute: x,
|
|
268
|
-
generatingMessage: "Creating mood board...",
|
|
269
|
-
isEnabled: () => !0,
|
|
270
|
-
systemPrompt: f
|
|
271
|
-
}, D = [
|
|
272
|
-
{
|
|
273
|
-
name: "Vibrant Energy",
|
|
274
|
-
args: {
|
|
275
|
-
action: "create",
|
|
276
|
-
title: "Vibrant Energy",
|
|
277
|
-
theme: "vibrant",
|
|
278
|
-
concepts: ["Bold", "Dynamic", "Exciting", "Fresh"]
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
name: "Minimal Zen",
|
|
283
|
-
args: {
|
|
284
|
-
action: "create",
|
|
285
|
-
title: "Minimal Zen",
|
|
286
|
-
theme: "minimal",
|
|
287
|
-
concepts: ["Simple", "Clean", "Peaceful", "Balanced"]
|
|
288
|
-
}
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
name: "Vintage Charm",
|
|
292
|
-
args: {
|
|
293
|
-
action: "create",
|
|
294
|
-
title: "Vintage Charm",
|
|
295
|
-
theme: "vintage",
|
|
296
|
-
concepts: ["Nostalgic", "Warm", "Classic", "Timeless"]
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
name: "Ocean Dreams",
|
|
301
|
-
args: {
|
|
302
|
-
action: "create",
|
|
303
|
-
title: "Ocean Dreams",
|
|
304
|
-
theme: "ocean",
|
|
305
|
-
concepts: ["Calm", "Flowing", "Deep", "Refreshing"]
|
|
306
|
-
}
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
name: "Nature Escape",
|
|
310
|
-
args: {
|
|
311
|
-
action: "create",
|
|
312
|
-
title: "Nature Escape",
|
|
313
|
-
theme: "nature",
|
|
314
|
-
concepts: ["Organic", "Growth", "Harmony", "Life"]
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
];
|
|
318
|
-
export {
|
|
319
|
-
f as SYSTEM_PROMPT,
|
|
320
|
-
y as TOOL_DEFINITION,
|
|
321
|
-
c as TOOL_NAME,
|
|
322
|
-
x as executeMoodBoard,
|
|
323
|
-
M as pluginCore,
|
|
324
|
-
D as samples
|
|
325
|
-
};
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./samples-B2-ZKxci.js";
|
|
2
|
+
export { t as SYSTEM_PROMPT, e as TOOL_DEFINITION, r as TOOL_NAME, n as executeMoodBoard, i as pluginCore, a as samples };
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./samples-CQDcSeUn.cjs`);require(`./core.cjs`),exports.SYSTEM_PROMPT=e.i,exports.TOOL_DEFINITION=e.a,exports.TOOL_NAME=e.o,exports.executeMoodBoard=e.n,exports.pluginCore=e.r,exports.samples=e.t;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
T as TOOL_DEFINITION,
|
|
5
|
-
r as TOOL_NAME,
|
|
6
|
-
M as executeMoodBoard,
|
|
7
|
-
p as pluginCore,
|
|
8
|
-
E as samples
|
|
9
|
-
};
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./samples-B2-ZKxci.js";
|
|
2
|
+
import "./core.js";
|
|
3
|
+
export { t as SYSTEM_PROMPT, e as TOOL_DEFINITION, r as TOOL_NAME, n as executeMoodBoard, i as pluginCore, a as samples };
|
package/dist/react.cjs
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var F;function ae(){if(F)return x;F=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function u(d,c,r){var p=null;if(r!==void 0&&(p=""+r),c.key!==void 0&&(p=""+c.key),"key"in c){r={};for(var h in c)h!=="key"&&(r[h]=c[h])}else r=c;return c=r.ref,{$$typeof:a,type:d,key:p,ref:c!==void 0?c:null,props:r}}return x.Fragment=i,x.jsx=u,x.jsxs=u,x}var _={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var D;function se(){return D||(D=1,process.env.NODE_ENV!=="production"&&(function(){function a(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case G:return"Profiler";case J:return"StrictMode";case Q:return"Suspense";case K:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case U:return"Portal";case H:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case Z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return t=e.displayName||null,t!==null?t:a(e.type)||"Memo";case g:t=e._payload,e=e._init;try{return a(e(t))}catch{}}return null}function i(e){return""+e}function u(e){try{i(e);var t=!1}catch{t=!0}if(t){t=console;var n=t.error,s=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",s),i(e)}}function d(e){if(e===T)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===g)return"<...>";try{var t=a(e);return t?"<"+t+">":"<...>"}catch{return"<...>"}}function c(){var e=R.A;return e===null?null:e.getOwner()}function r(){return Error("react-stack-top-frame")}function p(e){if(P.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function h(e,t){function n(){C||(C=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function q(){var e=a(this.type);return I[e]||(I[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function B(e,t,n,s,v,w){var l=n.ref;return e={$$typeof:S,type:e,key:t,props:n,_owner:s},(l!==void 0?l:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:q}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:v}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:w}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function y(e,t,n,s,v,w){var l=t.children;if(l!==void 0)if(s)if(ne(l)){for(s=0;s<l.length;s++)k(l[s]);Object.freeze&&Object.freeze(l)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else k(l);if(P.call(t,"key")){l=a(e);var m=Object.keys(t).filter(function(oe){return oe!=="key"});s=0<m.length?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}",M[l+s]||(m=0<m.length?"{"+m.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);const t=require(`./samples-CQDcSeUn.cjs`);;/* empty css */let n=require(`react`);var r=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),i=e((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===O?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var n=e.render;return e=e.displayName,e||=(e=n.displayName||n.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return n=e.displayName||null,n===null?t(e.type)||`Memo`:n;case E:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function n(e){return``+e}function r(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var r=t.error,i=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return r.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,i),n(e)}}function i(e){if(e===_)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===E)return`<...>`;try{var n=t(e);return n?`<`+n+`>`:`<...>`}catch{return`<...>`}}function a(){var e=k.A;return e===null?null:e.getOwner()}function o(){return Error(`react-stack-top-frame`)}function s(e){if(A.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){N||(N=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,`key`,{get:n,configurable:!0})}function l(){var e=t(this.type);return P[e]||(P[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function u(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:h,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,`ref`,{enumerable:!1,value:null}):Object.defineProperty(e,`ref`,{enumerable:!1,get:l}),e._store={},Object.defineProperty(e._store,`validated`,{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,`_debugInfo`,{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,`_debugStack`,{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,`_debugTask`,{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function d(e,n,i,o,l,d){var p=n.children;if(p!==void 0)if(o)if(j(p)){for(o=0;o<p.length;o++)f(p[o]);Object.freeze&&Object.freeze(p)}else console.error(`React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.`);else f(p);if(A.call(n,`key`)){p=t(e);var m=Object.keys(n).filter(function(e){return e!==`key`});o=0<m.length?`{key: someKey, `+m.join(`: ..., `)+`: ...}`:`{key: someKey}`,L[p+o]||(m=0<m.length?`{`+m.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
2
|
let props = %s;
|
|
19
3
|
<%s {...props} />
|
|
20
4
|
React keys must be passed directly to JSX without using spread:
|
|
21
5
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,
|
|
6
|
+
<%s key={someKey} {...props} />`,o,p,m,p),L[p+o]=!0)}if(p=null,i!==void 0&&(r(i),p=``+i),s(n)&&(r(n.key),p=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return p&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,p,i,a(),l,d)}function f(e){p(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===E&&(e._payload.status===`fulfilled`?p(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function p(e){return typeof e==`object`&&!!e&&e.$$typeof===h}var m=require(`react`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.client.reference`),k=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,j=Array.isArray,M=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(e){return e()}};var N,P={},F=m.react_stack_bottom_frame.bind(m,o)(),I=M(i(o)),L={};e.Fragment=_,e.jsx=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!1,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)},e.jsxs=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!0,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)}})()})),a=e(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=r():t.exports=i()}))(),o=800,s=600;function c(e,t){return e.length<=t?e:e.slice(0,t-3)+`...`}function l({selectedResult:e,sendTextMessage:t}){let[r,i]=(0,n.useState)(null);(0,n.useEffect)(()=>{e?.toolName===`createMoodBoard`&&e.data&&i(e.data)},[e]);let l=e=>{t&&(e.type===`color`?t(`Add more elements that complement the color ${e.content}`):e.type===`text`?t(`Expand on the concept "${e.content}" - add related moods and colors`):e.type===`emoji`&&t(`Add more elements that match the mood of ${e.content}`))};return r?(0,a.jsx)(`div`,{className:`size-full overflow-hidden`,style:{backgroundColor:r.backgroundColor||`#F9FAFB`},children:(0,a.jsxs)(`div`,{className:`size-full relative`,children:[(0,a.jsxs)(`div`,{className:`absolute top-4 left-4 z-10`,children:[(0,a.jsx)(`h2`,{className:`text-xl font-bold text-gray-800 bg-white/80 px-3 py-1 rounded-lg shadow`,children:r.title}),r.theme&&(0,a.jsx)(`span`,{className:`text-xs text-gray-500 bg-white/60 px-2 py-0.5 rounded mt-1 inline-block`,children:r.theme})]}),(0,a.jsx)(`svg`,{className:`size-full`,viewBox:`0 0 ${o} ${s}`,preserveAspectRatio:`xMidYMid meet`,children:(0,a.jsx)(`g`,{className:`items`,children:r.items.map(e=>(0,a.jsxs)(`g`,{transform:`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`,className:`cursor-pointer transition-transform duration-200 hover:scale-110`,onClick:()=>l(e),children:[e.type===`color`&&(0,a.jsx)(`rect`,{x:-e.width/2,y:-e.height/2,width:e.width,height:e.height,fill:e.content,rx:8,className:`drop-shadow-lg`,stroke:`white`,strokeWidth:3}),e.type===`emoji`&&(0,a.jsx)(`text`,{textAnchor:`middle`,dominantBaseline:`middle`,className:`select-none pointer-events-none`,style:{fontSize:`${e.width}px`},children:e.content}),e.type===`text`&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`rect`,{x:-e.width/2,y:-e.height/2,width:e.width,height:e.height,fill:`white`,rx:4,className:`drop-shadow-md`}),(0,a.jsx)(`text`,{textAnchor:`middle`,dominantBaseline:`middle`,fill:`#374151`,className:`text-sm font-medium select-none pointer-events-none`,children:c(e.content,15)})]})]},e.id))})}),(0,a.jsx)(`div`,{className:`absolute bottom-4 left-4 right-4 text-center`,children:(0,a.jsx)(`p`,{className:`text-sm text-gray-500 bg-white/80 px-3 py-2 rounded-lg inline-block`,children:`Click an item to explore related concepts`})})]})}):(0,a.jsx)(`div`,{className:`size-full flex items-center justify-center`,children:(0,a.jsx)(`p`,{className:`text-gray-400`,children:`No mood board data`})})}function u({result:e}){let t=e.data;if(!t)return null;let n=t.title||`Mood Board`,r=t.items?.length||0;return(0,a.jsxs)(`div`,{className:`p-3 bg-gradient-to-br from-purple-50 to-pink-50 rounded-lg text-center`,children:[(0,a.jsx)(`div`,{className:`text-2xl mb-1`,children:`🎨`}),(0,a.jsx)(`div`,{className:`text-purple-700 font-medium text-sm truncate`,children:n}),(0,a.jsxs)(`div`,{className:`text-xs text-gray-500 mt-1`,children:[r,` elements`]})]})}var d={...t.r,ViewComponent:l,PreviewComponent:u,samples:t.t},f={plugin:d};exports.Preview=u,exports.SYSTEM_PROMPT=t.i,exports.TOOL_DEFINITION=t.a,exports.TOOL_NAME=t.o,exports.View=l,exports.default=f,exports.executeMoodBoard=t.n,exports.plugin=d,exports.pluginCore=t.r,exports.samples=t.t;
|