@arcgis/ai-components 5.1.0-next.87 → 5.1.0-next.89
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/cdn/4IESERNN.js +2 -0
- package/dist/cdn/{GJQVEIZF.js → 7AAA466K.js} +1 -1
- package/dist/cdn/B3E2XBTX.js +2 -0
- package/dist/cdn/E2MBKDZ2.js +2 -0
- package/dist/cdn/EUNEQNYC.js +2 -0
- package/dist/cdn/JEO7CHZM.js +2 -0
- package/dist/cdn/{KWBMH7LU.js → K35QKERW.js} +5 -0
- package/dist/cdn/KCSGJGUQ.js +2 -0
- package/dist/cdn/{FTUILS6R.js → KHCTRS6Z.js} +21 -21
- package/dist/cdn/O3Y4IPK5.js +2 -0
- package/dist/cdn/SOJ4DKGV.js +226 -0
- package/dist/cdn/TD74ZINA.js +2 -0
- package/dist/cdn/{NCMEKPIM.js → TFP2SGKU.js} +1 -1
- package/dist/cdn/{4TY43HO3.js → UTCN4YUI.js} +1 -1
- package/dist/cdn/VDGRXEK7.js +2 -0
- package/dist/cdn/VHOF6SUZ.js +120 -0
- package/dist/cdn/{2FQTU6HL.js → WBVJLC7F.js} +1 -1
- package/dist/cdn/X2GSYADT.js +2 -0
- package/dist/cdn/YUZDB6IX.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/slottableRequestUtils.js +11 -0
- package/dist/components/arcgis-assistant/customElement.d.ts +16 -1
- package/dist/components/arcgis-assistant/customElement.js +116 -112
- package/dist/components/arcgis-assistant/index.js +2 -0
- package/dist/components/arcgis-assistant/types.d.ts +2 -4
- package/dist/components/arcgis-assistant-message/customElement.js +26 -12
- package/dist/components/arcgis-assistant-message/index.js +0 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +0 -14
- package/dist/loader.js +0 -1
- package/dist/types/lumina.d.ts +1 -11
- package/dist/types/preact.d.ts +1 -13
- package/dist/types/react.d.ts +1 -15
- package/dist/types/stencil.d.ts +1 -11
- package/package.json +6 -6
- package/dist/cdn/3IWT4SEI.js +0 -2
- package/dist/cdn/AAOF7JQT.js +0 -2
- package/dist/cdn/ERCMPLS4.js +0 -82
- package/dist/cdn/HLDIWEWD.js +0 -2
- package/dist/cdn/KJFC3ZEP.js +0 -2
- package/dist/cdn/MDPF56RC.js +0 -2
- package/dist/cdn/OFWYCHDQ.js +0 -2
- package/dist/cdn/QTH2DYCO.js +0 -2
- package/dist/cdn/UWXD5PFQ.js +0 -2
- package/dist/cdn/VSZNNBU6.js +0 -2
- package/dist/cdn/XMI2K6YV.js +0 -2
- package/dist/cdn/ZIER3BNM.js +0 -226
- package/dist/components/arcgis-assistant-message/customElement.d.ts +0 -18
- package/dist/components/arcgis-assistant-message/index.d.ts +0 -1
- package/dist/components/arcgis-assistant-message-content/customElement.d.ts +0 -12
- package/dist/components/arcgis-assistant-message-content/customElement.js +0 -62
- package/dist/components/arcgis-assistant-message-content/index.d.ts +0 -1
- package/dist/components/arcgis-assistant-message-content/index.js +0 -4
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as l}from"./YUZDB6IX.js";import"./B3E2XBTX.js";import"./YGW7TUNX.js";import{g as a,h as e,k as o,t as i,u as n,v as r,y as c}from"./AKEZZ3RP.js";import"./CFDTXKJ6.js";export default $arcgis.t(([{watch:d}])=>{var g=a`.container{display:flex;align-items:center;width:100%;justify-content:space-between;gap:var(--calcite-spacing-xs)}.start,.end{display:flex;align-items:center;gap:var(--calcite-spacing-xs)}`,t=class extends r{constructor(){super(...arguments),this._messages=l({blocking:!0}),this._endRef=i(),this._showLog=!1,this.feedbackEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.readAloudEnabled=!1}static{this.properties={_showLog:16,feedbackEnabled:5,logEnabled:5,copyEnabled:5,readAloudEnabled:5,message:0}}static{this.styles=g}loaded(){this.manager.onLifecycle(()=>[d(()=>this._showLog,()=>this._scrollToEnd())])}_scrollToEnd(){requestAnimationFrame(()=>{this._endRef.value?.scrollIntoView({behavior:"smooth",block:"end"})})}_renderCopyButton(){return!this.message?.error&&this.copyEnabled?e`<calcite-action id=action-copy icon=copy-to-clipboard scale=s @click=${async()=>{try{let s=this.message?.content?.trim();s&&await navigator.clipboard.writeText(s)}catch(s){o("warn","assistant-message-footer","Failed to copy text to clipboard",{once:!0,detail:{error:s}})}}} text></calcite-action><calcite-tooltip reference-element=action-copy overlay-positioning=fixed placement=bottom><span>${this._messages.copyButtonLabel}</span></calcite-tooltip>`:null}_renderLogButton(){return this.message?.log?.length&&this.logEnabled?e`<calcite-action id=action-log icon=access-string-results scale=s @click=${()=>this._showLog=!this._showLog} .text=${this._messages.logButtonLabel} .active=${this._showLog}></calcite-action><calcite-tooltip reference-element=action-log overlay-positioning=fixed placement=bottom><span>${this._messages.logButtonLabel}</span></calcite-tooltip>`:null}_renderReadAloudButton(){return e`<arcgis-assistant-message-read-aloud .message=${this.message} .readAloudEnabled=${this.readAloudEnabled}></arcgis-assistant-message-read-aloud>`}_renderLog(){return e`<arcgis-assistant-message-log .log=${this.message?.log} .showLog=${this._showLog} .logEnabled=${this.logEnabled}></arcgis-assistant-message-log>`}_renderFeedback(){return e`<arcgis-assistant-message-feedback .message=${this.message} .feedbackEnabled=${this.feedbackEnabled}></arcgis-assistant-message-feedback>`}render(){return e`${this._renderLog()}<div class="container"><div class="start">${this._renderCopyButton()}${this._renderLogButton()}${this._renderReadAloudButton()}<slot name=footer-actions-start></slot></div><div class="end"><slot name=footer-actions-end></slot>${this._renderFeedback()}</div></div><div ${n(this._endRef)}></div>`}};c("arcgis-assistant-message-footer",t);return t},"core/reactiveUtils")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import c from"./
|
|
2
|
+
import c from"./SOJ4DKGV.js";import b from"./KHCTRS6Z.js";import"./PLPJJRCP.js";import{a as i,c as e}from"./B4DEC7PH.js";import"./KVH3PDVW.js";import"./YGW7TUNX.js";import{v as a,y as s}from"./AKEZZ3RP.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{a:r}])=>{var t=class extends a{constructor(){super(...arguments),this.agent=r}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-navigation-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=i(this,"arcgis-assistant-navigation-agent"),e(this)}};s("arcgis-assistant-navigation-agent",t);return t},b,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as N,c as $}from"./YGW7TUNX.js";import{a as C,b as P,c as f,d as m,e as L,f as O,k as g,m as v,n as w,o as A}from"./AKEZZ3RP.js";var _=t=>(...s)=>{let e=m(),r=new t(...s),o=r.exports;f(e.at(-1));let n=r.component.manager;n.W(r,o),r.watchExports(n.W.bind(n,r)),L(r);let a=[r.component,...e].reverse();return v(a,i=>i===void 0?void 0:S(r,i,o),o)},S=(t,{host:s,key:e,isReactive:r},o)=>{let n=s,a=n[e]!==t.exports,i=n[e]!==o,l=o!==t.exports;if(a&&!i&&l&&(n[e]=t.exports),s===t.component){if(r){let p=t.component.manager;i&&p.W(t,n[e]),t.onUpdate(u=>{if(u.has(e)){let x=n[e];x!==t.exports&&p.W(t,x)}})}t.O=r?void 0:e}let c=t.component.constructor.elementProperties.get(e)?.readOnly;t.watchExports(()=>{n[e]!==t.exports&&(c?O(()=>{n[e]=t.exports}):n[e]=t.exports)})};var U="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),F=new Set(U),h="en",W={pt:"pt-BR",nb:"no",nn:"no",zh:"zh-CN"},K=async(t,s,e="")=>{let r=`${s}/${e}`,o=`${r}${t}.json`;return b[o]??(b[o]=j(t,r)),await b[o]},b={},j=async(t,s)=>{let e=`${s}${t}.json`;try{let r=await fetch(e);if(r.ok)return await r.json()}catch(r){return g("error","intl",`An unknown error occurred while fetching localization strings at ${e}`,{detail:{error:r}}),{}}return t===h?{}:await j(h,s)},E=t=>{let s=$(t,"lang",globalThis.navigator?.language||h);return{lang:s,t9nLocale:k(s)}},k=t=>{let[s,e]=t.split("-"),r=s.toLowerCase(),o=r;return e&&(o=`${r}-${e.toUpperCase()}`),o=W[o]??o,F.has(o)?o:e?k(r):h},D=(t,s,e,r)=>{let o,n=()=>R(t,s(),r).then(a=>{(o?.lang!==a.lang||o.t9nLocale!==a.t9nLocale||o.t9nStrings!==a.t9nStrings)&&e(a),o=a}).catch(a=>{g("error","intl","Error updating component locale state",{detail:{error:a}})});return queueMicrotask(n),N(t,["lang"],n)},R=async(t,s,e=t.localName.split("-").slice(1).join("-"))=>{let{lang:r,t9nLocale:o}=E(t),n=`${s}/${e}/t9n`,i=e===null?{}:await K(o,n,"messages.");return{lang:r,t9nLocale:o,t9nStrings:i}};var T=t=>q(void 0,t);var y=class extends A{constructor(s,e){super(s);let r=this.exports;try{P(this.component);let o=e(this.component,this),n=this.exports!==r;if(C(o)){n||this.setProvisionalExports(o);let a=o.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i)});this.onLoad(async()=>await a)}else(!n||o!==void 0)&&(this.exports=o),queueMicrotask(()=>super.catchUpLifecycle())}catch(o){this.P.reject(o)}}catchUpLifecycle(){}},q=_(y);var at=(t,s,e)=>T((r,o)=>{let n=s,a=w({bubbles:!1,composed:!1});return o.onUpdated(i=>{if(!n.some(c=>i.has(c)))return;let l=e(V(t,n,i)),d=e(V(t,n));l.forEach((c,p)=>{d.has(p)||a.emit({...c,data:void 0})}),d.forEach((c,p)=>{let u=l.get(p);(!u||!z(u,c))&&a.emit(c)})}),a});function V(t,s,e){let r={};return s.forEach(o=>{r[o]=e?.has(o)?e.get(o):t[o]}),r}function z(t,s){if(t===s)return!0;if(!t||!s||typeof t!="object"||typeof s!="object"||Array.isArray(t)||Array.isArray(s))return!1;let e=Object.entries(t),r=Object.entries(s);return e.length!==r.length?!1:e.every(([o,n])=>z(n,s[o]))}var it=t=>(s={})=>T((e,r)=>{let o=E(e.el),n={_lang:o.lang,_t9nLocale:o.t9nLocale,_loading:!0},a=e;r.onLifecycle(()=>D(e.el,()=>t("./assets"),({t9nLocale:l,t9nStrings:d,lang:c})=>{let p={...d,_lang:c,_t9nLocale:l,_loading:!1};r.exports=p;let u=d.componentLabel;typeof u=="string"&&"label"in e&&e.label==null&&(e.label??=u),i(a.messageOverrides)},s.name));let i=l=>{let d=r.exports,c=d._original??d,p=M(c,l);l&&(p._original=c),r.exports=p};return"messageOverrides"in a&&r.onUpdate(l=>{l.has("messageOverrides")&&i(a.messageOverrides)}),s.blocking?(r.setProvisionalExports(n,!1),r.ready):n}),M=(t,s)=>{if(!s)return t;let e={...t};return Object.entries(s).forEach(([r,o])=>{t[r]!==void 0&&(typeof o=="object"?e[r]=M(t[r],o):e[r]=o??t[r])}),e};export{at as a,it as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as c}from"./YUZDB6IX.js";import"./B3E2XBTX.js";import"./YGW7TUNX.js";import{g as i,h as s,n as r,v as a,y as p}from"./AKEZZ3RP.js";import"./CFDTXKJ6.js";var l=i`:host{display:block;max-width:100%}.group{max-width:100%}.prompt{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;cursor:pointer}calcite-chip{max-width:100%}`,e=class extends a{constructor(){super(...arguments),this._messages=c({blocking:!0}),this.prompts=[],this.arcgisPromptSelect=r()}static{this.properties={label:1,prompts:0}}static{this.styles=l}_emitPromptSelect(t){this.arcgisPromptSelect.emit({prompt:t})}render(){return this.prompts.length?s`<calcite-chip-group class="group" .label=${this.label??this._messages.suggestedPromptsLabel}>${this.prompts.map(t=>s`<calcite-chip .value=${t} .label=${t} appearance=outline-fill kind=brand @calciteChipSelect=${()=>this._emitPromptSelect(t)}><div class="prompt">${t}</div></calcite-chip>`)}</calcite-chip-group>`:null}};p("arcgis-assistant-suggested-prompts",e);export{e as ArcgisAssistantSuggestedPrompts};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as m}from"./YUZDB6IX.js";import"./B3E2XBTX.js";import"./YGW7TUNX.js";import{g as p,h as u,v as h,y as g}from"./AKEZZ3RP.js";import"./CFDTXKJ6.js";export default $arcgis.t(([{watch:y},f,{property:_,subclass:A}])=>{var S=p``,b=Object.defineProperty,C=Object.getOwnPropertyDescriptor,c=(e,s,i,a)=>{for(var r=a>1?void 0:a?C(s,i):s,t=e.length-1,n;t>=0;t--)(n=e[t])&&(r=(a?n(s,i,r):n(r))||r);return a&&r&&b(s,i,r),r};function l(){return typeof window>"u"?null:window}var o=class extends f{constructor(){super(...arguments),this._utterance=null,this.state="idle",this.supported=o.isSupported()}destroy(){this.stop(),super.destroy()}start(e){let s=e.trim(),i=l(),a=i?.SpeechSynthesisUtterance,r=i?.speechSynthesis;if(this._set("supported",o.isSupported(i)),!s||!a||!r)return;this.stop();let t=new a(s);t.rate=.9,t.pitch=1.1,t.volume=1,t.onend=()=>{this._utterance===t&&this._reset()},t.onerror=()=>{this._utterance===t&&this._reset()};try{r.speak(t),this._utterance=t,this._set("state","playing")}catch{t.onend=null,t.onerror=null,this._reset()}}stop(){let e=l(),s=e?.speechSynthesis;if(this._set("supported",o.isSupported(e)),s)try{(s.speaking||s.pending)&&s.cancel()}catch{}this._reset()}toggle(e){if(this.state==="playing"){this.stop();return}this.start(e)}static isSupported(e=l()){return!!e?.speechSynthesis&&typeof e.SpeechSynthesisUtterance=="function"}_reset(){this._utterance&&(this._utterance.onend=null,this._utterance.onerror=null),this._utterance=null,this._set("state","idle")}};c([_({readOnly:!0})],o.prototype,"state",2);c([_({readOnly:!0})],o.prototype,"supported",2);o=c([A("ReadAloudController")],o);var d=class extends h{constructor(){super(...arguments),this._messages=m({blocking:!0}),this._readAloudController=new o,this.readAloudEnabled=!1}static{this.properties={readAloudEnabled:5,message:0}}static{this.styles=S}loaded(){this.manager.onLifecycle(()=>[y(()=>this._readAloudController.state,()=>this.requestUpdate(),{initial:!0}),{remove:()=>{this._readAloudController.stop()}}])}_toggleReadAloud(){this._readAloudController.toggle(this.message?.content??"")}render(){return this.readAloudEnabled&&!this.message?.error&&this.message?.content?.trim()&&this._readAloudController.supported?u`<calcite-action id=action-read-aloud .icon=${this._readAloudController.state==="playing"?"sound-off":"sound"} scale=s .active=${this._readAloudController.state==="playing"} @click=${()=>this._toggleReadAloud()} text></calcite-action><calcite-tooltip reference-element=action-read-aloud overlay-positioning=fixed placement=bottom><span>${this._readAloudController.state==="playing"?this._messages.stopReadingButtonLabel:this._messages.readAloudButtonLabel}</span></calcite-tooltip>`:null}};g("arcgis-assistant-message-read-aloud",d);return d},"core/reactiveUtils","core/Accessor","core/accessorSupport/decorators")
|
|
@@ -24,6 +24,11 @@ Use chat history only when necessary to understand conversational references, an
|
|
|
24
24
|
|
|
25
25
|
1. If the assigned task is about a **specific calculation** (e.g., average, total, count, min, max), return only the **direct numeric answer** \u2014 short and clear.
|
|
26
26
|
- Example: \u201CThe average price is $4.00.\u201D
|
|
27
|
+
- When a value is already present in \`queryResponse\` (for example in \`details.value\` or \`summary\`), copy that value **verbatim**.
|
|
28
|
+
- Do NOT reformat values (including numbers, dates, and times):
|
|
29
|
+
- Do not add/remove grouping commas.
|
|
30
|
+
- Do not change decimals, round values, or change numeric type/text.
|
|
31
|
+
- Do not change date/time format, timezone notation, separators, or precision.
|
|
27
32
|
|
|
28
33
|
2. If the question is more general or there are **multiple features with varying attributes**, write a **brief summary** (2\u20133 sentences max) that highlights key patterns or insights.
|
|
29
34
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as n}from"./YUZDB6IX.js";import"./B3E2XBTX.js";import"./YGW7TUNX.js";import{g as a,h as e,n as s,v as c,y as l}from"./AKEZZ3RP.js";import"./CFDTXKJ6.js";var o=a``,i=class extends c{constructor(){super(...arguments),this.#t=[],this._messages=n({blocking:!0}),this.arcgisCancel=s(),this.arcgisSubmit=s()}static{this.properties={type:1,message:1,options:0}}static{this.styles=o}#t;_renderInterruptOptions(){switch(this.type){case"single-select":return e`<calcite-list selection-mode=single-persist .label=${this._messages.optionsLabel} @calciteListChange=${t=>this.#t=t.target.selectedItems[0]?.value}>${this.options?.map(t=>e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;case"multi-select":return e`<calcite-list selection-mode=multiple .label=${this._messages.optionsLabel} @calciteListChange=${t=>this.#t=t.target.selectedItems.map(r=>r.value)}>${this.options?.map(t=>e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;case"boolean-choice":return null;case"text-input":return e`<calcite-input .label=${this._messages.enterTextLabel} @calciteInputInput=${t=>this.#t=t.target.value}></calcite-input>`}}render(){return e`<calcite-panel .description=${this.message}>${this._renderInterruptOptions()}<calcite-button slot=footer-end appearance=outline @click=${()=>this.arcgisCancel.emit()}>${this._messages.cancelButtonLabel}</calcite-button><calcite-button slot=footer-end appearance=solid @click=${()=>this.arcgisSubmit.emit(this.type==="boolean-choice"?!0:this.#t)}>${this._messages.submitButtonLabel}</calcite-button></calcite-panel>`}};l("arcgis-assistant-interrupt",i);export{i as ArcgisAssistantInterrupt};
|