@gui-chat-plugin/mindmap 0.3.0
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/definition.d.ts +7 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/plugin.d.ts +8 -0
- package/dist/core/samples.d.ts +5 -0
- package/dist/core/types.d.ts +48 -0
- package/dist/core.cjs +8 -0
- package/dist/core.js +512 -0
- package/dist/html2canvas.esm-C4Mnoizn.cjs +22 -0
- package/dist/html2canvas.esm-dgT_1dIT.js +4871 -0
- package/dist/index-BKA83b0n.js +10298 -0
- package/dist/index-Cz2dMDg5.cjs +193 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.es-BBQdtsGG.cjs +18 -0
- package/dist/index.es-DOcwUzox.js +6682 -0
- package/dist/index.js +9 -0
- package/dist/purify.es-BpFm6ZGf.js +553 -0
- package/dist/purify.es-Cv8QDpGd.cjs +2 -0
- package/dist/react.cjs +22 -0
- package/dist/react.js +404 -0
- package/dist/style.css +1 -0
- package/dist/vue/Preview.vue.d.ts +7 -0
- package/dist/vue/View.vue.d.ts +9 -0
- package/dist/vue/index.d.ts +17 -0
- package/dist/vue.cjs +1 -0
- package/dist/vue.js +15 -0
- package/package.json +95 -0
package/dist/react.cjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */const p=require("./core.cjs"),k=require("react");var T={exports:{}},E={};/**
|
|
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 D;function oe(){if(D)return E;D=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function u(x,f,d){var t=null;if(d!==void 0&&(t=""+d),f.key!==void 0&&(t=""+f.key),"key"in f){d={};for(var i in f)i!=="key"&&(d[i]=f[i])}else d=f;return f=d.ref,{$$typeof:n,type:x,key:t,ref:f!==void 0?f:null,props:d}}return E.Fragment=a,E.jsx=u,E.jsxs=u,E}var v={};/**
|
|
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 F;function ie(){return F||(F=1,process.env.NODE_ENV!=="production"&&(function(){function n(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case g:return"Fragment";case X:return"Profiler";case G:return"StrictMode";case K:return"Suspense";case ee:return"SuspenseList";case te: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 B:return"Portal";case Z:return e.displayName||"Context";case H:return(e._context.displayName||"Context")+".Consumer";case Q:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case re:return r=e.displayName||null,r!==null?r:n(e.type)||"Memo";case R:r=e._payload,e=e._init;try{return n(e(r))}catch{}}return null}function a(e){return""+e}function u(e){try{a(e);var r=!1}catch{r=!0}if(r){r=console;var s=r.error,l=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",l),a(e)}}function x(e){if(e===g)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===R)return"<...>";try{var r=n(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function f(){var e=O.A;return e===null?null:e.getOwner()}function d(){return Error("react-stack-top-frame")}function t(e){if(C.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function i(e,r){function s(){M||(M=!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)",r))}s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}function m(){var e=n(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 J(e,r,s,l,b,y){var c=s.ref;return e={$$typeof:S,type:e,key:r,props:s,_owner:l},(c!==void 0?c:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:m}):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:b}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:y}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function N(e,r,s,l,b,y){var c=r.children;if(c!==void 0)if(l)if(ae(c)){for(l=0;l<c.length;l++)A(c[l]);Object.freeze&&Object.freeze(c)}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 A(c);if(C.call(r,"key")){c=n(e);var _=Object.keys(r).filter(function(se){return se!=="key"});l=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",W[c+l]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,l,c,_,c),W[c+l]=!0)}if(c=null,s!==void 0&&(u(s),c=""+s),t(r)&&(u(r.key),c=""+r.key),"key"in r){s={};for(var w in r)w!=="key"&&(s[w]=r[w])}else s=r;return c&&i(s,typeof e=="function"?e.displayName||e.name||"Unknown":e),J(e,c,s,f(),b,y)}function A(e){P(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===R&&(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!==null&&e.$$typeof===S}var h=k,S=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),Z=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),ne=Symbol.for("react.client.reference"),O=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=Object.prototype.hasOwnProperty,ae=Array.isArray,j=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(e){return e()}};var M,I={},$=h.react_stack_bottom_frame.bind(h,d)(),Y=j(x(d)),W={};v.Fragment=g,v.jsx=function(e,r,s){var l=1e4>O.recentlyCreatedOwnerStacks++;return N(e,r,s,!1,l?Error("react-stack-top-frame"):$,l?j(x(e)):Y)},v.jsxs=function(e,r,s){var l=1e4>O.recentlyCreatedOwnerStacks++;return N(e,r,s,!0,l?Error("react-stack-top-frame"):$,l?j(x(e)):Y)}})()),v}var L;function le(){return L||(L=1,process.env.NODE_ENV==="production"?T.exports=oe():T.exports=ie()),T.exports}var o=le();const ce=800,ue=600;function V(n){return Math.max(80,n.length*8+40)}function fe(n,a){return n.length<=a?n:n.slice(0,a-3)+"..."}function z({selectedResult:n,sendTextMessage:a}){const[u,x]=k.useState(null);k.useEffect(()=>{(n==null?void 0:n.toolName)===p.TOOL_NAME&&n.data&&x(n.data)},[n]);const f=t=>u==null?void 0:u.nodes.find(i=>i.id===t),d=t=>{a&&a(`I want to expand the "${t.text}" branch. Add related sub-ideas.`)};return u?o.jsx("div",{className:"size-full bg-gray-50 overflow-hidden",children:o.jsxs("div",{className:"size-full relative",children:[o.jsx("div",{className:"absolute top-4 left-4 z-10",children:o.jsx("h2",{className:"text-xl font-bold text-gray-800 bg-white/80 px-3 py-1 rounded-lg shadow",children:u.title})}),o.jsxs("svg",{className:"size-full",viewBox:`0 0 ${ce} ${ue}`,preserveAspectRatio:"xMidYMid meet",children:[o.jsx("g",{className:"connections",children:u.connections.map(t=>{const i=f(t.from),m=f(t.to);return o.jsxs("g",{children:[o.jsx("line",{x1:(i==null?void 0:i.x)||0,y1:(i==null?void 0:i.y)||0,x2:(m==null?void 0:m.x)||0,y2:(m==null?void 0:m.y)||0,stroke:"#94A3B8",strokeWidth:"2",className:"transition-all duration-300"}),t.label&&o.jsx("text",{x:(((i==null?void 0:i.x)||0)+((m==null?void 0:m.x)||0))/2,y:(((i==null?void 0:i.y)||0)+((m==null?void 0:m.y)||0))/2-5,textAnchor:"middle",className:"text-xs fill-gray-500",children:t.label})]},`${t.from}-${t.to}`)})}),o.jsx("g",{className:"nodes",children:u.nodes.map(t=>o.jsxs("g",{transform:`translate(${t.x}, ${t.y})`,className:"cursor-pointer transition-transform duration-200 hover:scale-110",onClick:()=>d(t),children:[o.jsx("rect",{x:-V(t.text)/2,y:-20,width:V(t.text),height:40,rx:20,fill:t.color||"#4F46E5",className:"drop-shadow-md"}),o.jsx("text",{textAnchor:"middle",dominantBaseline:"middle",fill:"white",className:"text-sm font-medium select-none pointer-events-none",children:fe(t.text,20)})]},t.id))})]}),o.jsx("div",{className:"absolute bottom-4 left-4 right-4 text-center",children:o.jsx("p",{className:"text-sm text-gray-500 bg-white/80 px-3 py-2 rounded-lg inline-block",children:"Click a node to expand it with new ideas"})})]})}):o.jsx("div",{className:"size-full flex items-center justify-center",children:o.jsx("p",{className:"text-gray-400",children:"No mind map data"})})}function q({result:n}){var d;const a=n.data,u=(a==null?void 0:a.nodes)&&a.nodes.length>0,x=(a==null?void 0:a.title)||"Mind Map",f=((d=a==null?void 0:a.nodes)==null?void 0:d.length)||0;return o.jsxs("div",{className:"p-3 bg-indigo-50 rounded-lg text-center",children:[o.jsx("div",{className:"text-2xl mb-1",children:"🧠"}),o.jsx("div",{className:"text-indigo-700 font-medium text-sm truncate",children:x}),u?o.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[f," ideas"]}):o.jsx("div",{className:"text-xs text-amber-600 mt-1",children:n.message||"No data"})]})}const U={...p.pluginCore,ViewComponent:z,PreviewComponent:q,samples:p.samples},de={plugin:U};exports.SYSTEM_PROMPT=p.SYSTEM_PROMPT;exports.TOOL_DEFINITION=p.TOOL_DEFINITION;exports.TOOL_NAME=p.TOOL_NAME;exports.executeMindMap=p.executeMindMap;exports.pluginCore=p.pluginCore;exports.samples=p.samples;exports.Preview=q;exports.View=z;exports.default=de;exports.plugin=U;
|
package/dist/react.js
ADDED
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { TOOL_NAME as re, samples as te, pluginCore as ne } from "./core.js";
|
|
3
|
+
import { SYSTEM_PROMPT as ge, TOOL_DEFINITION as Re, executeMindMap as je } from "./core.js";
|
|
4
|
+
import ae, { useState as se, useEffect as oe } from "react";
|
|
5
|
+
var b = { exports: {} }, h = {};
|
|
6
|
+
/**
|
|
7
|
+
* @license React
|
|
8
|
+
* react-jsx-runtime.production.js
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
var M;
|
|
16
|
+
function ie() {
|
|
17
|
+
if (M) return h;
|
|
18
|
+
M = 1;
|
|
19
|
+
var n = Symbol.for("react.transitional.element"), a = Symbol.for("react.fragment");
|
|
20
|
+
function u(x, f, d) {
|
|
21
|
+
var t = null;
|
|
22
|
+
if (d !== void 0 && (t = "" + d), f.key !== void 0 && (t = "" + f.key), "key" in f) {
|
|
23
|
+
d = {};
|
|
24
|
+
for (var i in f)
|
|
25
|
+
i !== "key" && (d[i] = f[i]);
|
|
26
|
+
} else d = f;
|
|
27
|
+
return f = d.ref, {
|
|
28
|
+
$$typeof: n,
|
|
29
|
+
type: x,
|
|
30
|
+
key: t,
|
|
31
|
+
ref: f !== void 0 ? f : null,
|
|
32
|
+
props: d
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return h.Fragment = a, h.jsx = u, h.jsxs = u, h;
|
|
36
|
+
}
|
|
37
|
+
var E = {};
|
|
38
|
+
/**
|
|
39
|
+
* @license React
|
|
40
|
+
* react-jsx-runtime.development.js
|
|
41
|
+
*
|
|
42
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the MIT license found in the
|
|
45
|
+
* LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/
|
|
47
|
+
var W;
|
|
48
|
+
function le() {
|
|
49
|
+
return W || (W = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
50
|
+
function n(e) {
|
|
51
|
+
if (e == null) return null;
|
|
52
|
+
if (typeof e == "function")
|
|
53
|
+
return e.$$typeof === Q ? null : e.displayName || e.name || null;
|
|
54
|
+
if (typeof e == "string") return e;
|
|
55
|
+
switch (e) {
|
|
56
|
+
case T:
|
|
57
|
+
return "Fragment";
|
|
58
|
+
case U:
|
|
59
|
+
return "Profiler";
|
|
60
|
+
case V:
|
|
61
|
+
return "StrictMode";
|
|
62
|
+
case G:
|
|
63
|
+
return "Suspense";
|
|
64
|
+
case X:
|
|
65
|
+
return "SuspenseList";
|
|
66
|
+
case Z:
|
|
67
|
+
return "Activity";
|
|
68
|
+
}
|
|
69
|
+
if (typeof e == "object")
|
|
70
|
+
switch (typeof e.tag == "number" && console.error(
|
|
71
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
72
|
+
), e.$$typeof) {
|
|
73
|
+
case L:
|
|
74
|
+
return "Portal";
|
|
75
|
+
case J:
|
|
76
|
+
return e.displayName || "Context";
|
|
77
|
+
case q:
|
|
78
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
79
|
+
case B:
|
|
80
|
+
var r = e.render;
|
|
81
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
82
|
+
case H:
|
|
83
|
+
return r = e.displayName || null, r !== null ? r : n(e.type) || "Memo";
|
|
84
|
+
case g:
|
|
85
|
+
r = e._payload, e = e._init;
|
|
86
|
+
try {
|
|
87
|
+
return n(e(r));
|
|
88
|
+
} catch {
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
function a(e) {
|
|
94
|
+
return "" + e;
|
|
95
|
+
}
|
|
96
|
+
function u(e) {
|
|
97
|
+
try {
|
|
98
|
+
a(e);
|
|
99
|
+
var r = !1;
|
|
100
|
+
} catch {
|
|
101
|
+
r = !0;
|
|
102
|
+
}
|
|
103
|
+
if (r) {
|
|
104
|
+
r = console;
|
|
105
|
+
var s = r.error, l = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
106
|
+
return s.call(
|
|
107
|
+
r,
|
|
108
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
|
+
l
|
|
110
|
+
), a(e);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
function x(e) {
|
|
114
|
+
if (e === T) return "<>";
|
|
115
|
+
if (typeof e == "object" && e !== null && e.$$typeof === g)
|
|
116
|
+
return "<...>";
|
|
117
|
+
try {
|
|
118
|
+
var r = n(e);
|
|
119
|
+
return r ? "<" + r + ">" : "<...>";
|
|
120
|
+
} catch {
|
|
121
|
+
return "<...>";
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function f() {
|
|
125
|
+
var e = R.A;
|
|
126
|
+
return e === null ? null : e.getOwner();
|
|
127
|
+
}
|
|
128
|
+
function d() {
|
|
129
|
+
return Error("react-stack-top-frame");
|
|
130
|
+
}
|
|
131
|
+
function t(e) {
|
|
132
|
+
if (P.call(e, "key")) {
|
|
133
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
134
|
+
if (r && r.isReactWarning) return !1;
|
|
135
|
+
}
|
|
136
|
+
return e.key !== void 0;
|
|
137
|
+
}
|
|
138
|
+
function i(e, r) {
|
|
139
|
+
function s() {
|
|
140
|
+
S || (S = !0, console.error(
|
|
141
|
+
"%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)",
|
|
142
|
+
r
|
|
143
|
+
));
|
|
144
|
+
}
|
|
145
|
+
s.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
146
|
+
get: s,
|
|
147
|
+
configurable: !0
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function m() {
|
|
151
|
+
var e = n(this.type);
|
|
152
|
+
return C[e] || (C[e] = !0, console.error(
|
|
153
|
+
"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."
|
|
154
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
155
|
+
}
|
|
156
|
+
function z(e, r, s, l, v, y) {
|
|
157
|
+
var c = s.ref;
|
|
158
|
+
return e = {
|
|
159
|
+
$$typeof: N,
|
|
160
|
+
type: e,
|
|
161
|
+
key: r,
|
|
162
|
+
props: s,
|
|
163
|
+
_owner: l
|
|
164
|
+
}, (c !== void 0 ? c : null) !== null ? Object.defineProperty(e, "ref", {
|
|
165
|
+
enumerable: !1,
|
|
166
|
+
get: m
|
|
167
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
168
|
+
configurable: !1,
|
|
169
|
+
enumerable: !1,
|
|
170
|
+
writable: !0,
|
|
171
|
+
value: 0
|
|
172
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
173
|
+
configurable: !1,
|
|
174
|
+
enumerable: !1,
|
|
175
|
+
writable: !0,
|
|
176
|
+
value: null
|
|
177
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
178
|
+
configurable: !1,
|
|
179
|
+
enumerable: !1,
|
|
180
|
+
writable: !0,
|
|
181
|
+
value: v
|
|
182
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
183
|
+
configurable: !1,
|
|
184
|
+
enumerable: !1,
|
|
185
|
+
writable: !0,
|
|
186
|
+
value: y
|
|
187
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
188
|
+
}
|
|
189
|
+
function w(e, r, s, l, v, y) {
|
|
190
|
+
var c = r.children;
|
|
191
|
+
if (c !== void 0)
|
|
192
|
+
if (l)
|
|
193
|
+
if (K(c)) {
|
|
194
|
+
for (l = 0; l < c.length; l++)
|
|
195
|
+
O(c[l]);
|
|
196
|
+
Object.freeze && Object.freeze(c);
|
|
197
|
+
} else
|
|
198
|
+
console.error(
|
|
199
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
200
|
+
);
|
|
201
|
+
else O(c);
|
|
202
|
+
if (P.call(r, "key")) {
|
|
203
|
+
c = n(e);
|
|
204
|
+
var p = Object.keys(r).filter(function(ee) {
|
|
205
|
+
return ee !== "key";
|
|
206
|
+
});
|
|
207
|
+
l = 0 < p.length ? "{key: someKey, " + p.join(": ..., ") + ": ...}" : "{key: someKey}", Y[c + l] || (p = 0 < p.length ? "{" + p.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
208
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
209
|
+
let props = %s;
|
|
210
|
+
<%s {...props} />
|
|
211
|
+
React keys must be passed directly to JSX without using spread:
|
|
212
|
+
let props = %s;
|
|
213
|
+
<%s key={someKey} {...props} />`,
|
|
214
|
+
l,
|
|
215
|
+
c,
|
|
216
|
+
p,
|
|
217
|
+
c
|
|
218
|
+
), Y[c + l] = !0);
|
|
219
|
+
}
|
|
220
|
+
if (c = null, s !== void 0 && (u(s), c = "" + s), t(r) && (u(r.key), c = "" + r.key), "key" in r) {
|
|
221
|
+
s = {};
|
|
222
|
+
for (var k in r)
|
|
223
|
+
k !== "key" && (s[k] = r[k]);
|
|
224
|
+
} else s = r;
|
|
225
|
+
return c && i(
|
|
226
|
+
s,
|
|
227
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
228
|
+
), z(
|
|
229
|
+
e,
|
|
230
|
+
c,
|
|
231
|
+
s,
|
|
232
|
+
f(),
|
|
233
|
+
v,
|
|
234
|
+
y
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
function O(e) {
|
|
238
|
+
A(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === g && (e._payload.status === "fulfilled" ? A(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
239
|
+
}
|
|
240
|
+
function A(e) {
|
|
241
|
+
return typeof e == "object" && e !== null && e.$$typeof === N;
|
|
242
|
+
}
|
|
243
|
+
var _ = ae, N = Symbol.for("react.transitional.element"), L = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), V = Symbol.for("react.strict_mode"), U = Symbol.for("react.profiler"), q = Symbol.for("react.consumer"), J = Symbol.for("react.context"), B = Symbol.for("react.forward_ref"), G = Symbol.for("react.suspense"), X = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), Z = Symbol.for("react.activity"), Q = Symbol.for("react.client.reference"), R = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, P = Object.prototype.hasOwnProperty, K = Array.isArray, j = console.createTask ? console.createTask : function() {
|
|
244
|
+
return null;
|
|
245
|
+
};
|
|
246
|
+
_ = {
|
|
247
|
+
react_stack_bottom_frame: function(e) {
|
|
248
|
+
return e();
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
var S, C = {}, $ = _.react_stack_bottom_frame.bind(
|
|
252
|
+
_,
|
|
253
|
+
d
|
|
254
|
+
)(), I = j(x(d)), Y = {};
|
|
255
|
+
E.Fragment = T, E.jsx = function(e, r, s) {
|
|
256
|
+
var l = 1e4 > R.recentlyCreatedOwnerStacks++;
|
|
257
|
+
return w(
|
|
258
|
+
e,
|
|
259
|
+
r,
|
|
260
|
+
s,
|
|
261
|
+
!1,
|
|
262
|
+
l ? Error("react-stack-top-frame") : $,
|
|
263
|
+
l ? j(x(e)) : I
|
|
264
|
+
);
|
|
265
|
+
}, E.jsxs = function(e, r, s) {
|
|
266
|
+
var l = 1e4 > R.recentlyCreatedOwnerStacks++;
|
|
267
|
+
return w(
|
|
268
|
+
e,
|
|
269
|
+
r,
|
|
270
|
+
s,
|
|
271
|
+
!0,
|
|
272
|
+
l ? Error("react-stack-top-frame") : $,
|
|
273
|
+
l ? j(x(e)) : I
|
|
274
|
+
);
|
|
275
|
+
};
|
|
276
|
+
})()), E;
|
|
277
|
+
}
|
|
278
|
+
var D;
|
|
279
|
+
function ce() {
|
|
280
|
+
return D || (D = 1, process.env.NODE_ENV === "production" ? b.exports = ie() : b.exports = le()), b.exports;
|
|
281
|
+
}
|
|
282
|
+
var o = ce();
|
|
283
|
+
const ue = 800, fe = 600;
|
|
284
|
+
function F(n) {
|
|
285
|
+
return Math.max(80, n.length * 8 + 40);
|
|
286
|
+
}
|
|
287
|
+
function de(n, a) {
|
|
288
|
+
return n.length <= a ? n : n.slice(0, a - 3) + "...";
|
|
289
|
+
}
|
|
290
|
+
function me({ selectedResult: n, sendTextMessage: a }) {
|
|
291
|
+
const [u, x] = se(null);
|
|
292
|
+
oe(() => {
|
|
293
|
+
(n == null ? void 0 : n.toolName) === re && n.data && x(n.data);
|
|
294
|
+
}, [n]);
|
|
295
|
+
const f = (t) => u == null ? void 0 : u.nodes.find((i) => i.id === t), d = (t) => {
|
|
296
|
+
a && a(
|
|
297
|
+
`I want to expand the "${t.text}" branch. Add related sub-ideas.`
|
|
298
|
+
);
|
|
299
|
+
};
|
|
300
|
+
return u ? /* @__PURE__ */ o.jsx("div", { className: "size-full bg-gray-50 overflow-hidden", children: /* @__PURE__ */ o.jsxs("div", { className: "size-full relative", children: [
|
|
301
|
+
/* @__PURE__ */ o.jsx("div", { className: "absolute top-4 left-4 z-10", children: /* @__PURE__ */ o.jsx("h2", { className: "text-xl font-bold text-gray-800 bg-white/80 px-3 py-1 rounded-lg shadow", children: u.title }) }),
|
|
302
|
+
/* @__PURE__ */ o.jsxs(
|
|
303
|
+
"svg",
|
|
304
|
+
{
|
|
305
|
+
className: "size-full",
|
|
306
|
+
viewBox: `0 0 ${ue} ${fe}`,
|
|
307
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
308
|
+
children: [
|
|
309
|
+
/* @__PURE__ */ o.jsx("g", { className: "connections", children: u.connections.map((t) => {
|
|
310
|
+
const i = f(t.from), m = f(t.to);
|
|
311
|
+
return /* @__PURE__ */ o.jsxs("g", { children: [
|
|
312
|
+
/* @__PURE__ */ o.jsx(
|
|
313
|
+
"line",
|
|
314
|
+
{
|
|
315
|
+
x1: (i == null ? void 0 : i.x) || 0,
|
|
316
|
+
y1: (i == null ? void 0 : i.y) || 0,
|
|
317
|
+
x2: (m == null ? void 0 : m.x) || 0,
|
|
318
|
+
y2: (m == null ? void 0 : m.y) || 0,
|
|
319
|
+
stroke: "#94A3B8",
|
|
320
|
+
strokeWidth: "2",
|
|
321
|
+
className: "transition-all duration-300"
|
|
322
|
+
}
|
|
323
|
+
),
|
|
324
|
+
t.label && /* @__PURE__ */ o.jsx(
|
|
325
|
+
"text",
|
|
326
|
+
{
|
|
327
|
+
x: (((i == null ? void 0 : i.x) || 0) + ((m == null ? void 0 : m.x) || 0)) / 2,
|
|
328
|
+
y: (((i == null ? void 0 : i.y) || 0) + ((m == null ? void 0 : m.y) || 0)) / 2 - 5,
|
|
329
|
+
textAnchor: "middle",
|
|
330
|
+
className: "text-xs fill-gray-500",
|
|
331
|
+
children: t.label
|
|
332
|
+
}
|
|
333
|
+
)
|
|
334
|
+
] }, `${t.from}-${t.to}`);
|
|
335
|
+
}) }),
|
|
336
|
+
/* @__PURE__ */ o.jsx("g", { className: "nodes", children: u.nodes.map((t) => /* @__PURE__ */ o.jsxs(
|
|
337
|
+
"g",
|
|
338
|
+
{
|
|
339
|
+
transform: `translate(${t.x}, ${t.y})`,
|
|
340
|
+
className: "cursor-pointer transition-transform duration-200 hover:scale-110",
|
|
341
|
+
onClick: () => d(t),
|
|
342
|
+
children: [
|
|
343
|
+
/* @__PURE__ */ o.jsx(
|
|
344
|
+
"rect",
|
|
345
|
+
{
|
|
346
|
+
x: -F(t.text) / 2,
|
|
347
|
+
y: -20,
|
|
348
|
+
width: F(t.text),
|
|
349
|
+
height: 40,
|
|
350
|
+
rx: 20,
|
|
351
|
+
fill: t.color || "#4F46E5",
|
|
352
|
+
className: "drop-shadow-md"
|
|
353
|
+
}
|
|
354
|
+
),
|
|
355
|
+
/* @__PURE__ */ o.jsx(
|
|
356
|
+
"text",
|
|
357
|
+
{
|
|
358
|
+
textAnchor: "middle",
|
|
359
|
+
dominantBaseline: "middle",
|
|
360
|
+
fill: "white",
|
|
361
|
+
className: "text-sm font-medium select-none pointer-events-none",
|
|
362
|
+
children: de(t.text, 20)
|
|
363
|
+
}
|
|
364
|
+
)
|
|
365
|
+
]
|
|
366
|
+
},
|
|
367
|
+
t.id
|
|
368
|
+
)) })
|
|
369
|
+
]
|
|
370
|
+
}
|
|
371
|
+
),
|
|
372
|
+
/* @__PURE__ */ o.jsx("div", { className: "absolute bottom-4 left-4 right-4 text-center", children: /* @__PURE__ */ o.jsx("p", { className: "text-sm text-gray-500 bg-white/80 px-3 py-2 rounded-lg inline-block", children: "Click a node to expand it with new ideas" }) })
|
|
373
|
+
] }) }) : /* @__PURE__ */ o.jsx("div", { className: "size-full flex items-center justify-center", children: /* @__PURE__ */ o.jsx("p", { className: "text-gray-400", children: "No mind map data" }) });
|
|
374
|
+
}
|
|
375
|
+
function xe({ result: n }) {
|
|
376
|
+
var d;
|
|
377
|
+
const a = n.data, u = (a == null ? void 0 : a.nodes) && a.nodes.length > 0, x = (a == null ? void 0 : a.title) || "Mind Map", f = ((d = a == null ? void 0 : a.nodes) == null ? void 0 : d.length) || 0;
|
|
378
|
+
return /* @__PURE__ */ o.jsxs("div", { className: "p-3 bg-indigo-50 rounded-lg text-center", children: [
|
|
379
|
+
/* @__PURE__ */ o.jsx("div", { className: "text-2xl mb-1", children: "🧠" }),
|
|
380
|
+
/* @__PURE__ */ o.jsx("div", { className: "text-indigo-700 font-medium text-sm truncate", children: x }),
|
|
381
|
+
u ? /* @__PURE__ */ o.jsxs("div", { className: "text-xs text-gray-500 mt-1", children: [
|
|
382
|
+
f,
|
|
383
|
+
" ideas"
|
|
384
|
+
] }) : /* @__PURE__ */ o.jsx("div", { className: "text-xs text-amber-600 mt-1", children: n.message || "No data" })
|
|
385
|
+
] });
|
|
386
|
+
}
|
|
387
|
+
const pe = {
|
|
388
|
+
...ne,
|
|
389
|
+
ViewComponent: me,
|
|
390
|
+
PreviewComponent: xe,
|
|
391
|
+
samples: te
|
|
392
|
+
}, ve = { plugin: pe };
|
|
393
|
+
export {
|
|
394
|
+
xe as Preview,
|
|
395
|
+
ge as SYSTEM_PROMPT,
|
|
396
|
+
Re as TOOL_DEFINITION,
|
|
397
|
+
re as TOOL_NAME,
|
|
398
|
+
me as View,
|
|
399
|
+
ve as default,
|
|
400
|
+
je as executeMindMap,
|
|
401
|
+
pe as plugin,
|
|
402
|
+
ne as pluginCore,
|
|
403
|
+
te as samples
|
|
404
|
+
};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
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-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--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;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@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-100:oklch(93.6% .032 17.717);--color-red-700:oklch(50.5% .213 27.518);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-600:oklch(66.6% .179 58.318);--color-green-600:oklch(62.7% .194 149.214);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--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-indigo-800:oklch(39.8% .195 277.366);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-800:oklch(45.5% .188 13.697);--color-slate-100:oklch(96.8% .007 247.896);--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-500:oklch(55.1% .027 264.364);--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-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--drop-shadow-md:0 3px 3px #0000001f;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--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{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.top-3{top:calc(var(--spacing)*3)}.top-4{top:calc(var(--spacing)*4)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.bottom-3{bottom:calc(var(--spacing)*3)}.bottom-4{bottom:calc(var(--spacing)*4)}.left-3{left:calc(var(--spacing)*3)}.left-4{left:calc(var(--spacing)*4)}.z-10{z-index:10}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.contents{display:contents}.flex{display:flex}.grid{display:grid}.inline-block{display:inline-block}.size-full{width:100%;height:100%}.h-4{height:calc(var(--spacing)*4)}.h-\[600px\]{height:600px}.min-h-screen{min-height:100vh}.w-4{width:calc(var(--spacing)*4)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-32{max-width:calc(var(--spacing)*32)}.max-w-\[85\%\]{max-width:85%}.max-w-\[200px\]{max-width:200px}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.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-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-emerald-700{border-color:var(--color-emerald-700)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-indigo-700{border-color:var(--color-indigo-700)}.border-rose-700{border-color:var(--color-rose-700)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-red-100{background-color:var(--color-red-100)}.bg-rose-600{background-color:var(--color-rose-600)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-white{background-color:var(--color-white)}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.fill-gray-500{fill:var(--color-gray-500)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.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-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-600{color:var(--color-amber-600)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.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-green-600{color:var(--color-green-600)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-red-700{color:var(--color-red-700)}.text-white{color:var(--color-white)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px 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)}.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)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px 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)}.drop-shadow-md{--tw-drop-shadow-size:drop-shadow(0 3px 3px var(--tw-drop-shadow-color,#0000001f));--tw-drop-shadow:drop-shadow(var(--drop-shadow-md));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-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))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:bg-emerald-700:hover{background-color:var(--color-emerald-700)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-300:hover{background-color:var(--color-gray-300)}.hover\:bg-indigo-200:hover{background-color:var(--color-indigo-200)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\:bg-rose-700:hover{background-color:var(--color-rose-700)}}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + 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:focus{--tw-ring-color:var(--color-indigo-500)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\:bg-emerald-800:active{background-color:var(--color-emerald-800)}.active\:bg-indigo-800:active{background-color:var(--color-indigo-800)}.active\:bg-rose-800:active{background-color:var(--color-rose-800)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:border-gray-400:disabled{border-color:var(--color-gray-400)}.disabled\:bg-gray-100:disabled{background-color:var(--color-gray-100)}.disabled\:bg-gray-400:disabled{background-color:var(--color-gray-400)}@media(min-width:64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}}body{margin:calc(var(--spacing)*0);background-color:var(--color-gray-100);padding:calc(var(--spacing)*5);font-family:var(--font-sans)}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@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}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes pulse{50%{opacity:.5}}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ToolResult } from "gui-chat-protocol";
|
|
2
|
+
import type { MindMapData } from "../core/types";
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
result: ToolResult<MindMapData>;
|
|
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>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ToolResult } from "gui-chat-protocol";
|
|
2
|
+
import type { MindMapData } from "../core/types";
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
selectedResult: ToolResult<MindMapData>;
|
|
5
|
+
sendTextMessage?: (text?: string) => void;
|
|
6
|
+
onUpdateResult?: (result: ToolResult<MindMapData>) => void;
|
|
7
|
+
};
|
|
8
|
+
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>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mind Map Plugin - Vue Implementation
|
|
3
|
+
*/
|
|
4
|
+
import "../style.css";
|
|
5
|
+
import type { ToolPlugin } from "gui-chat-protocol/vue";
|
|
6
|
+
import type { MindMapData, MindMapArgs, MindMapJsonData } from "../core/types";
|
|
7
|
+
import View from "./View.vue";
|
|
8
|
+
import Preview from "./Preview.vue";
|
|
9
|
+
export declare const plugin: ToolPlugin<MindMapData, MindMapJsonData, MindMapArgs>;
|
|
10
|
+
export type { MindMapData, MindMapArgs, MindMapJsonData } from "../core/types";
|
|
11
|
+
export { TOOL_NAME, TOOL_DEFINITION, SYSTEM_PROMPT, executeMindMap, pluginCore, } from "../core/plugin";
|
|
12
|
+
export { samples } from "../core/samples";
|
|
13
|
+
export { View, Preview };
|
|
14
|
+
declare const _default: {
|
|
15
|
+
plugin: ToolPlugin<MindMapData, MindMapJsonData, MindMapArgs, import("gui-chat-protocol/vue").InputHandler, Record<string, unknown>>;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
package/dist/vue.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */const e=require("./core.cjs"),i=require("./index-Cz2dMDg5.cjs");exports.SYSTEM_PROMPT=e.SYSTEM_PROMPT;exports.TOOL_DEFINITION=e.TOOL_DEFINITION;exports.TOOL_NAME=e.TOOL_NAME;exports.executeMindMap=e.executeMindMap;exports.pluginCore=e.pluginCore;exports.samples=e.samples;exports.Preview=i._sfc_main;exports.View=i._sfc_main$1;exports.default=i.index;exports.plugin=i.plugin;
|
package/dist/vue.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { SYSTEM_PROMPT as i, TOOL_DEFINITION as r, TOOL_NAME as o, executeMindMap as s, pluginCore as O, samples as t } from "./core.js";
|
|
3
|
+
import { a as T, b as l, i as m, p as u } from "./index-BKA83b0n.js";
|
|
4
|
+
export {
|
|
5
|
+
T as Preview,
|
|
6
|
+
i as SYSTEM_PROMPT,
|
|
7
|
+
r as TOOL_DEFINITION,
|
|
8
|
+
o as TOOL_NAME,
|
|
9
|
+
l as View,
|
|
10
|
+
m as default,
|
|
11
|
+
s as executeMindMap,
|
|
12
|
+
u as plugin,
|
|
13
|
+
O as pluginCore,
|
|
14
|
+
t as samples
|
|
15
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gui-chat-plugin/mindmap",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Interactive mind map plugin for visual brainstorming",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./core": {
|
|
16
|
+
"types": "./dist/core/index.d.ts",
|
|
17
|
+
"import": "./dist/core.js",
|
|
18
|
+
"require": "./dist/core.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./vue": {
|
|
21
|
+
"types": "./dist/vue/index.d.ts",
|
|
22
|
+
"import": "./dist/vue.js",
|
|
23
|
+
"require": "./dist/vue.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./react": {
|
|
26
|
+
"types": "./dist/react/index.d.ts",
|
|
27
|
+
"import": "./dist/react.js",
|
|
28
|
+
"require": "./dist/react.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./style.css": "./dist/style.css"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"dev": "vite",
|
|
37
|
+
"dev:react": "vite --config vite.config.react.ts",
|
|
38
|
+
"build": "vite build && vue-tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
39
|
+
"typecheck": "vue-tsc --noEmit",
|
|
40
|
+
"lint": "eslint src demo"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"gui-chat-protocol": "^0.0.3",
|
|
44
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
45
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
46
|
+
"vue": "^3.5.0"
|
|
47
|
+
},
|
|
48
|
+
"peerDependenciesMeta": {
|
|
49
|
+
"vue": {
|
|
50
|
+
"optional": true
|
|
51
|
+
},
|
|
52
|
+
"react": {
|
|
53
|
+
"optional": true
|
|
54
|
+
},
|
|
55
|
+
"react-dom": {
|
|
56
|
+
"optional": true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
61
|
+
"@types/react": "^19.1.8",
|
|
62
|
+
"@types/react-dom": "^19.1.6",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
64
|
+
"@typescript-eslint/parser": "^8.32.1",
|
|
65
|
+
"@vitejs/plugin-react": "^4.5.2",
|
|
66
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
67
|
+
"eslint": "^9.27.0",
|
|
68
|
+
"eslint-plugin-react": "^7.37.5",
|
|
69
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
70
|
+
"eslint-plugin-vue": "^10.0.0",
|
|
71
|
+
"globals": "^16.1.0",
|
|
72
|
+
"gui-chat-protocol": "^0.0.3",
|
|
73
|
+
"openai": "^4.77.0",
|
|
74
|
+
"react": "^19.1.0",
|
|
75
|
+
"react-dom": "^19.1.0",
|
|
76
|
+
"tailwindcss": "^4.1.7",
|
|
77
|
+
"typescript": "~5.8.3",
|
|
78
|
+
"vite": "^6.3.5",
|
|
79
|
+
"vue": "^3.5.13",
|
|
80
|
+
"vue-eslint-parser": "^10.1.3",
|
|
81
|
+
"vue-tsc": "^2.2.10"
|
|
82
|
+
},
|
|
83
|
+
"keywords": [
|
|
84
|
+
"guichat",
|
|
85
|
+
"plugin",
|
|
86
|
+
"mindmap",
|
|
87
|
+
"brainstorming",
|
|
88
|
+
"visualization"
|
|
89
|
+
],
|
|
90
|
+
"license": "MIT",
|
|
91
|
+
"dependencies": {
|
|
92
|
+
"gui-chat-protocol": "^0.0.3",
|
|
93
|
+
"jspdf": "^4.0.0"
|
|
94
|
+
}
|
|
95
|
+
}
|