@gui-chat-plugin/map 0.1.1 → 0.2.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.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="presentMap",n={type:"function",name:t,description:"Show a location on a map by providing a location name or address",parameters:{type:"object",properties:{location:{type:"string",description:"The location name, address, or place to show on the map (e.g., 'Seattle', 'Paris, France', '123 Main St, New York')"}},required:["location"]}},o=async(a,i)=>{const{location:e}=i;if(!e||typeof e!="string")throw new Error("Location parameter is required and must be a string");return{message:`Showing ${e} on the map`,data:{location:e}}},r={toolDefinition:n,execute:o,generatingMessage:"Loading map...",isEnabled:a=>!!a?.googleMapKey,backends:["map"]},s=o,c=[{name:"Tokyo Station",args:{location:"Tokyo Station, Japan"}},{name:"Eiffel Tower",args:{location:"Eiffel Tower, Paris, France"}}];exports.TOOL_DEFINITION=n;exports.TOOL_NAME=t;exports.executeMap=s;exports.pluginCore=r;exports.samples=c;exports.showMap=o;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./samples-D1TNzgJI.cjs`);exports.TOOL_DEFINITION=e.a,exports.TOOL_NAME=e.o,exports.executeMap=e.n,exports.pluginCore=e.r,exports.samples=e.t,exports.showMap=e.i;
package/dist/core.js CHANGED
@@ -1,50 +1,2 @@
1
- const t = "presentMap", i = {
2
- type: "function",
3
- name: t,
4
- description: "Show a location on a map by providing a location name or address",
5
- parameters: {
6
- type: "object",
7
- properties: {
8
- location: {
9
- type: "string",
10
- description: "The location name, address, or place to show on the map (e.g., 'Seattle', 'Paris, France', '123 Main St, New York')"
11
- }
12
- },
13
- required: ["location"]
14
- }
15
- }, a = async (o, n) => {
16
- const { location: e } = n;
17
- if (!e || typeof e != "string")
18
- throw new Error("Location parameter is required and must be a string");
19
- return {
20
- message: `Showing ${e} on the map`,
21
- data: { location: e }
22
- };
23
- }, r = {
24
- toolDefinition: i,
25
- execute: a,
26
- generatingMessage: "Loading map...",
27
- isEnabled: (o) => !!o?.googleMapKey,
28
- backends: ["map"]
29
- }, s = a, c = [
30
- {
31
- name: "Tokyo Station",
32
- args: {
33
- location: "Tokyo Station, Japan"
34
- }
35
- },
36
- {
37
- name: "Eiffel Tower",
38
- args: {
39
- location: "Eiffel Tower, Paris, France"
40
- }
41
- }
42
- ];
43
- export {
44
- i as TOOL_DEFINITION,
45
- t as TOOL_NAME,
46
- s as executeMap,
47
- r as pluginCore,
48
- c as samples,
49
- a as showMap
50
- };
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./samples-Bdh0NQGC.js";
2
+ export { e as TOOL_DEFINITION, r as TOOL_NAME, n as executeMap, i as pluginCore, a as samples, t as showMap };
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.executeMap=e.executeMap;exports.pluginCore=e.pluginCore;exports.samples=e.samples;exports.showMap=e.showMap;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./samples-D1TNzgJI.cjs`);require(`./core.cjs`),exports.TOOL_DEFINITION=e.a,exports.TOOL_NAME=e.o,exports.executeMap=e.n,exports.pluginCore=e.r,exports.samples=e.t,exports.showMap=e.i;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./core";
1
+ export * from "./core/index";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -1,9 +1,3 @@
1
- import { TOOL_DEFINITION as O, TOOL_NAME as o, executeMap as a, pluginCore as r, samples as s, showMap as I } from "./core.js";
2
- export {
3
- O as TOOL_DEFINITION,
4
- o as TOOL_NAME,
5
- a as executeMap,
6
- r as pluginCore,
7
- s as samples,
8
- I as showMap
9
- };
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./samples-Bdh0NQGC.js";
2
+ import "./core.js";
3
+ export { e as TOOL_DEFINITION, r as TOOL_NAME, n as executeMap, i as pluginCore, a as samples, t as showMap };
@@ -0,0 +1,35 @@
1
+ //#region src/core/definition.ts
2
+ var e = "presentMap", t = {
3
+ type: "function",
4
+ name: e,
5
+ description: "Show a location on a map by providing a location name or address",
6
+ parameters: {
7
+ type: "object",
8
+ properties: { location: {
9
+ type: "string",
10
+ description: "The location name, address, or place to show on the map (e.g., 'Seattle', 'Paris, France', '123 Main St, New York')"
11
+ } },
12
+ required: ["location"]
13
+ }
14
+ }, n = async (e, t) => {
15
+ let { location: n } = t;
16
+ if (!n || typeof n != "string") throw Error("Location parameter is required and must be a string");
17
+ return {
18
+ message: `Showing ${n} on the map`,
19
+ data: { location: n }
20
+ };
21
+ }, r = {
22
+ toolDefinition: t,
23
+ execute: n,
24
+ generatingMessage: "Loading map...",
25
+ isEnabled: (e) => !!e?.googleMapKey,
26
+ backends: ["map"]
27
+ }, i = n, a = [{
28
+ name: "Tokyo Station",
29
+ args: { location: "Tokyo Station, Japan" }
30
+ }, {
31
+ name: "Eiffel Tower",
32
+ args: { location: "Eiffel Tower, Paris, France" }
33
+ }];
34
+ //#endregion
35
+ export { t as a, n as i, i as n, e as o, r, a as t };
@@ -0,0 +1 @@
1
+ var e=`presentMap`,t={type:`function`,name:e,description:`Show a location on a map by providing a location name or address`,parameters:{type:`object`,properties:{location:{type:`string`,description:`The location name, address, or place to show on the map (e.g., 'Seattle', 'Paris, France', '123 Main St, New York')`}},required:[`location`]}},n=async(e,t)=>{let{location:n}=t;if(!n||typeof n!=`string`)throw Error(`Location parameter is required and must be a string`);return{message:`Showing ${n} on the map`,data:{location:n}}},r={toolDefinition:t,execute:n,generatingMessage:`Loading map...`,isEnabled:e=>!!e?.googleMapKey,backends:[`map`]},i=n,a=[{name:`Tokyo Station`,args:{location:`Tokyo Station, Japan`}},{name:`Eiffel Tower`,args:{location:`Eiffel Tower, Paris, France`}}];Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
package/dist/style.css CHANGED
@@ -1 +1,3 @@
1
- @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-blue-50:oklch(97% .014 254.604);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--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-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--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;--font-weight-bold:700;--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;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-1{margin-top:calc(var(--spacing)*1)}.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}.inline-block{display:inline-block}.h-full{height:100%}.min-h-0{min-height:calc(var(--spacing)*0)}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[200px\]{max-width:200px}.flex-1{flex:1}.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)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-x-auto{overflow-x: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-0{border-style:var(--tw-border-style);border-width:0}.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-blue-50{background-color:var(--color-blue-50)}.bg-blue-600{background-color:var(--color-blue-600)}.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)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-8{padding:calc(var(--spacing)*8)}.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)}.text-center{text-align:center}.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-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)}.whitespace-pre-wrap{white-space:pre-wrap}.text-blue-600{color:var(--color-blue-600)}.text-emerald-800{color:var(--color-emerald-800)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.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-blue-700:hover{background-color:var(--color-blue-700)}.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.2 | 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-blue-50:oklch(97% .014 254.604);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--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-slate-900:oklch(20.8% .042 265.755);--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-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--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;--font-weight-bold:700;--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{.start{inset-inline-start:var(--spacing)}.m-0{margin:calc(var(--spacing) * 0)}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing) * 1)}.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}.inline-block{display:inline-block}.h-full{height:100%}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-24{width:calc(var(--spacing) * 24)}.w-\[100px\]{width:100px}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[200px\]{max-width:200px}.flex-1{flex:1}.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)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-x-auto{overflow-x: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-0{border-style:var(--tw-border-style);border-width:0}.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-\[\#1a1a2e\]{background-color:#1a1a2e}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-600{background-color:var(--color-blue-600)}.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-slate-900{background-color:var(--color-slate-900)}.bg-white{background-color:var(--color-white)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-8{padding:calc(var(--spacing) * 8)}.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)}.text-center{text-align:center}.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-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)}.whitespace-pre-wrap{white-space:pre-wrap}.text-blue-600{color:var(--color-blue-600)}.text-emerald-800{color:var(--color-emerald-800)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.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-blue-700:hover{background-color:var(--color-blue-700)}.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*/
package/dist/vue.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./core.cjs"),e=require("vue"),p={class:"w-full h-full p-4 bg-white"},m={key:0,class:"h-full flex flex-col"},g={class:"mb-4"},f={class:"text-gray-600"},y={class:"flex-1 min-h-0"},v=["src"],_={key:1,class:"w-full h-full flex items-center justify-center bg-gray-100 rounded-lg"},x={class:"text-center p-8"},h=["href"],E={key:1,class:"h-full flex items-center justify-center"},c=e.defineComponent({__name:"View",props:{selectedResult:{},googleMapKey:{}},setup(o){const a=o,n=e.computed(()=>{const t=a.selectedResult?.data?.location;return t?typeof t=="string"?t:`${t.lat}, ${t.lng}`:""}),d=e.computed(()=>{if(!a.googleMapKey||!a.selectedResult?.data?.location)return"";const t=n.value;return`https://www.google.com/maps/embed/v1/place?key=${a.googleMapKey}&q=${encodeURIComponent(t)}`}),u=e.computed(()=>{const t=n.value;return`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(t)}`});return(t,s)=>(e.openBlock(),e.createElementBlock("div",p,[o.selectedResult?.data?.location?(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("div",g,[s[0]||(s[0]=e.createElementVNode("h2",{class:"text-xl font-bold text-gray-800"},"Map Location",-1)),e.createElementVNode("p",f,e.toDisplayString(n.value),1)]),e.createElementVNode("div",y,[o.googleMapKey?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:d.value,class:"w-full h-full border-0 rounded-lg",allowfullscreen:"",loading:"lazy",referrerpolicy:"no-referrer-when-downgrade"},null,8,v)):(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("div",x,[s[1]||(s[1]=e.createElementVNode("div",{class:"text-gray-500 mb-4"},"Google Maps API key not configured",-1)),e.createElementVNode("a",{href:u.value,target:"_blank",class:"inline-block px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors"}," Open in Google Maps ",8,h)])]))])])):(e.openBlock(),e.createElementBlock("div",E,[...s[2]||(s[2]=[e.createElementVNode("div",{class:"text-gray-500"},"No location data available",-1)])]))]))}}),b={class:"text-center p-4 bg-blue-50 rounded"},k={class:"text-xs text-gray-600 mt-1 truncate"},r=e.defineComponent({__name:"Preview",props:{result:{}},setup(o){return(a,n)=>(e.openBlock(),e.createElementBlock("div",b,[n[0]||(n[0]=e.createElementVNode("div",{class:"text-blue-600 font-medium"},"Map Location",-1)),e.createElementVNode("div",k,e.toDisplayString(typeof o.result.data?.location=="string"?o.result.data.location:`${o.result.data?.location?.lat}, ${o.result.data?.location?.lng}`),1)]))}}),i={...l.pluginCore,viewComponent:c,previewComponent:r,samples:l.samples},w={plugin:i};exports.TOOL_DEFINITION=l.TOOL_DEFINITION;exports.TOOL_NAME=l.TOOL_NAME;exports.executeMap=l.executeMap;exports.pluginCore=l.pluginCore;exports.samples=l.samples;exports.Preview=r;exports.View=c;exports.default=w;exports.plugin=i;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./samples-D1TNzgJI.cjs`);let t=require(`vue`);var n={class:`w-full h-full p-4 bg-white`},r={key:0,class:`h-full flex flex-col`},i={class:`mb-4`},a={class:`text-gray-600`},o={class:`flex-1 min-h-0`},s=[`src`],c={key:1,class:`w-full h-full flex items-center justify-center bg-gray-100 rounded-lg`},l={class:`text-center p-8`},u=[`href`],d={key:1,class:`h-full flex items-center justify-center`},f=(0,t.defineComponent)({__name:`View`,props:{selectedResult:{},googleMapKey:{}},setup(e){let f=e,p=(0,t.computed)(()=>{let e=f.selectedResult?.data?.location;return e?typeof e==`string`?e:`${e.lat}, ${e.lng}`:``}),m=(0,t.computed)(()=>{if(!f.googleMapKey||!f.selectedResult?.data?.location)return``;let e=p.value;return`https://www.google.com/maps/embed/v1/place?key=${f.googleMapKey}&q=${encodeURIComponent(e)}`}),h=(0,t.computed)(()=>{let e=p.value;return`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(e)}`});return(f,g)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,n,[e.selectedResult?.data?.location?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,r,[(0,t.createElementVNode)(`div`,i,[g[0]||=(0,t.createElementVNode)(`h2`,{class:`text-xl font-bold text-gray-800`},`Map Location`,-1),(0,t.createElementVNode)(`p`,a,(0,t.toDisplayString)(p.value),1)]),(0,t.createElementVNode)(`div`,o,[e.googleMapKey?((0,t.openBlock)(),(0,t.createElementBlock)(`iframe`,{key:0,src:m.value,class:`w-full h-full border-0 rounded-lg`,allowfullscreen:``,loading:`lazy`,referrerpolicy:`no-referrer-when-downgrade`},null,8,s)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,c,[(0,t.createElementVNode)(`div`,l,[g[1]||=(0,t.createElementVNode)(`div`,{class:`text-gray-500 mb-4`},`Google Maps API key not configured`,-1),(0,t.createElementVNode)(`a`,{href:h.value,target:`_blank`,class:`inline-block px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors`},` Open in Google Maps `,8,u)])]))])])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,d,[...g[2]||=[(0,t.createElementVNode)(`div`,{class:`text-gray-500`},`No location data available`,-1)]]))]))}}),p={class:`text-center p-4 bg-blue-50 rounded`},m={class:`text-xs text-gray-600 mt-1 truncate`},h=(0,t.defineComponent)({__name:`Preview`,props:{result:{}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,p,[r[0]||=(0,t.createElementVNode)(`div`,{class:`text-blue-600 font-medium`},`Map Location`,-1),(0,t.createElementVNode)(`div`,m,(0,t.toDisplayString)(typeof e.result.data?.location==`string`?e.result.data.location:`${e.result.data?.location?.lat}, ${e.result.data?.location?.lng}`),1)]))}}),g={...e.r,viewComponent:f,previewComponent:h,samples:e.t},_={plugin:g};exports.Preview=h,exports.TOOL_DEFINITION=e.a,exports.TOOL_NAME=e.o,exports.View=f,exports.default=_,exports.executeMap=e.n,exports.plugin=g,exports.pluginCore=e.r,exports.samples=e.t;
package/dist/vue.js CHANGED
@@ -1,88 +1,57 @@
1
- import { samples as g, pluginCore as f } from "./core.js";
2
- import { TOOL_DEFINITION as P, TOOL_NAME as T, executeMap as V } from "./core.js";
3
- import { defineComponent as c, computed as i, createElementBlock as n, openBlock as a, createElementVNode as t, toDisplayString as d } from "vue";
4
- const m = { class: "w-full h-full p-4 bg-white" }, y = {
5
- key: 0,
6
- class: "h-full flex flex-col"
7
- }, x = { class: "mb-4" }, v = { class: "text-gray-600" }, h = { class: "flex-1 min-h-0" }, _ = ["src"], w = {
8
- key: 1,
9
- class: "w-full h-full flex items-center justify-center bg-gray-100 rounded-lg"
10
- }, b = { class: "text-center p-8" }, M = ["href"], k = {
11
- key: 1,
12
- class: "h-full flex items-center justify-center"
13
- }, $ = /* @__PURE__ */ c({
14
- __name: "View",
15
- props: {
16
- selectedResult: {},
17
- googleMapKey: {}
18
- },
19
- setup(o) {
20
- const r = o, l = i(() => {
21
- const e = r.selectedResult?.data?.location;
22
- return e ? typeof e == "string" ? e : `${e.lat}, ${e.lng}` : "";
23
- }), u = i(() => {
24
- if (!r.googleMapKey || !r.selectedResult?.data?.location) return "";
25
- const e = l.value;
26
- return `https://www.google.com/maps/embed/v1/place?key=${r.googleMapKey}&q=${encodeURIComponent(e)}`;
27
- }), p = i(() => {
28
- const e = l.value;
29
- return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(e)}`;
30
- });
31
- return (e, s) => (a(), n("div", m, [
32
- o.selectedResult?.data?.location ? (a(), n("div", y, [
33
- t("div", x, [
34
- s[0] || (s[0] = t("h2", { class: "text-xl font-bold text-gray-800" }, "Map Location", -1)),
35
- t("p", v, d(l.value), 1)
36
- ]),
37
- t("div", h, [
38
- o.googleMapKey ? (a(), n("iframe", {
39
- key: 0,
40
- src: u.value,
41
- class: "w-full h-full border-0 rounded-lg",
42
- allowfullscreen: "",
43
- loading: "lazy",
44
- referrerpolicy: "no-referrer-when-downgrade"
45
- }, null, 8, _)) : (a(), n("div", w, [
46
- t("div", b, [
47
- s[1] || (s[1] = t("div", { class: "text-gray-500 mb-4" }, "Google Maps API key not configured", -1)),
48
- t("a", {
49
- href: p.value,
50
- target: "_blank",
51
- class: "inline-block px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors"
52
- }, " Open in Google Maps ", 8, M)
53
- ])
54
- ]))
55
- ])
56
- ])) : (a(), n("div", k, [...s[2] || (s[2] = [
57
- t("div", { class: "text-gray-500" }, "No location data available", -1)
58
- ])]))
59
- ]));
60
- }
61
- }), C = { class: "text-center p-4 bg-blue-50 rounded" }, I = { class: "text-xs text-gray-600 mt-1 truncate" }, O = /* @__PURE__ */ c({
62
- __name: "Preview",
63
- props: {
64
- result: {}
65
- },
66
- setup(o) {
67
- return (r, l) => (a(), n("div", C, [
68
- l[0] || (l[0] = t("div", { class: "text-blue-600 font-medium" }, "Map Location", -1)),
69
- t("div", I, d(typeof o.result.data?.location == "string" ? o.result.data.location : `${o.result.data?.location?.lat}, ${o.result.data?.location?.lng}`), 1)
70
- ]));
71
- }
72
- }), R = {
73
- ...f,
74
- viewComponent: $,
75
- previewComponent: O,
76
- samples: g
77
- }, N = { plugin: R };
78
- export {
79
- O as Preview,
80
- P as TOOL_DEFINITION,
81
- T as TOOL_NAME,
82
- $ as View,
83
- N as default,
84
- V as executeMap,
85
- R as plugin,
86
- f as pluginCore,
87
- g as samples
88
- };
1
+ import { a as e, n as t, o as n, r, t as i } from "./samples-Bdh0NQGC.js";
2
+ import { computed as a, createElementBlock as o, createElementVNode 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 p-4 bg-white" }, f = {
5
+ key: 0,
6
+ class: "h-full flex flex-col"
7
+ }, p = { class: "mb-4" }, m = { class: "text-gray-600" }, h = { class: "flex-1 min-h-0" }, g = ["src"], _ = {
8
+ key: 1,
9
+ class: "w-full h-full flex items-center justify-center bg-gray-100 rounded-lg"
10
+ }, v = { class: "text-center p-8" }, y = ["href"], b = {
11
+ key: 1,
12
+ class: "h-full flex items-center justify-center"
13
+ }, x = /* @__PURE__ */ c({
14
+ __name: "View",
15
+ props: {
16
+ selectedResult: {},
17
+ googleMapKey: {}
18
+ },
19
+ setup(e) {
20
+ let t = e, n = a(() => {
21
+ let e = t.selectedResult?.data?.location;
22
+ return e ? typeof e == "string" ? e : `${e.lat}, ${e.lng}` : "";
23
+ }), r = a(() => {
24
+ if (!t.googleMapKey || !t.selectedResult?.data?.location) return "";
25
+ let e = n.value;
26
+ return `https://www.google.com/maps/embed/v1/place?key=${t.googleMapKey}&q=${encodeURIComponent(e)}`;
27
+ }), i = a(() => {
28
+ let e = n.value;
29
+ return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(e)}`;
30
+ });
31
+ return (t, a) => (l(), o("div", d, [e.selectedResult?.data?.location ? (l(), o("div", f, [s("div", p, [a[0] ||= s("h2", { class: "text-xl font-bold text-gray-800" }, "Map Location", -1), s("p", m, u(n.value), 1)]), s("div", h, [e.googleMapKey ? (l(), o("iframe", {
32
+ key: 0,
33
+ src: r.value,
34
+ class: "w-full h-full border-0 rounded-lg",
35
+ allowfullscreen: "",
36
+ loading: "lazy",
37
+ referrerpolicy: "no-referrer-when-downgrade"
38
+ }, null, 8, g)) : (l(), o("div", _, [s("div", v, [a[1] ||= s("div", { class: "text-gray-500 mb-4" }, "Google Maps API key not configured", -1), s("a", {
39
+ href: i.value,
40
+ target: "_blank",
41
+ class: "inline-block px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors"
42
+ }, " Open in Google Maps ", 8, y)])]))])])) : (l(), o("div", b, [...a[2] ||= [s("div", { class: "text-gray-500" }, "No location data available", -1)]]))]));
43
+ }
44
+ }), S = { class: "text-center p-4 bg-blue-50 rounded" }, C = { class: "text-xs text-gray-600 mt-1 truncate" }, w = /* @__PURE__ */ c({
45
+ __name: "Preview",
46
+ props: { result: {} },
47
+ setup(e) {
48
+ return (t, n) => (l(), o("div", S, [n[0] ||= s("div", { class: "text-blue-600 font-medium" }, "Map Location", -1), s("div", C, u(typeof e.result.data?.location == "string" ? e.result.data.location : `${e.result.data?.location?.lat}, ${e.result.data?.location?.lng}`), 1)]));
49
+ }
50
+ }), T = {
51
+ ...r,
52
+ viewComponent: x,
53
+ previewComponent: w,
54
+ samples: i
55
+ }, E = { plugin: T };
56
+ //#endregion
57
+ export { w as Preview, e as TOOL_DEFINITION, n as TOOL_NAME, x as View, E as default, t as executeMap, T as plugin, r as pluginCore, i as samples };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gui-chat-plugin/map",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "description": "Google Map location plugin for GUI Chat applications",
6
6
  "author": "receptron",
@@ -31,23 +31,24 @@
31
31
  "lint": "eslint src"
32
32
  },
33
33
  "dependencies": {
34
- "gui-chat-protocol": "^0.0.3"
34
+ "gui-chat-protocol": "^0.1.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@eslint/js": "^9.0.0",
38
- "@tailwindcss/vite": "^4.1.0",
39
- "@typescript-eslint/eslint-plugin": "^8.0.0",
40
- "@typescript-eslint/parser": "^8.0.0",
41
- "@vitejs/plugin-vue": "^6.0.0",
42
- "eslint": "^9.0.0",
43
- "eslint-plugin-vue": "^10.0.0",
44
- "globals": "^17.0.0",
45
- "tailwindcss": "^4.1.0",
46
- "typescript": "^5.8.0",
47
- "vite": "^7.0.0",
48
- "vue": "^3.5.0",
49
- "vue-eslint-parser": "^10.0.0",
50
- "vue-tsc": "^3.0.0"
37
+ "@eslint/js": "^10.0.1",
38
+ "@tailwindcss/vite": "^4.2.2",
39
+ "@typescript-eslint/eslint-plugin": "^8.58.0",
40
+ "@typescript-eslint/parser": "^8.58.0",
41
+ "@vitejs/plugin-vue": "^6.0.5",
42
+ "eslint": "^10.1.0",
43
+ "eslint-plugin-vue": "^10.8.0",
44
+ "globals": "^17.4.0",
45
+ "gui-chat-protocol": "^0.1.0",
46
+ "tailwindcss": "^4.2.2",
47
+ "typescript": "~6.0.2",
48
+ "vite": "^8.0.3",
49
+ "vue": "^3.5.31",
50
+ "vue-eslint-parser": "^10.4.0",
51
+ "vue-tsc": "^3.2.6"
51
52
  },
52
53
  "peerDependencies": {
53
54
  "vue": "^3.5.0"