@arcgis/ai-components 5.0.0-next.150 → 5.1.0-next.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/cdn/26V7SXDR.js +4 -0
- package/dist/cdn/3EBDE5UU.js +2 -0
- package/dist/cdn/4Y73V2HU.js +2 -0
- package/dist/cdn/62K6RJZZ.js +41 -0
- package/dist/cdn/63ACCRM5.js +239 -0
- package/dist/cdn/6T2EIYO4.js +59 -0
- package/dist/cdn/AF7UTDDE.js +4 -0
- package/dist/cdn/AQZDEJJZ.js +2 -0
- package/dist/cdn/CFDTXKJ6.js +2 -0
- package/dist/cdn/CFT5BBC6.js +69 -0
- package/dist/cdn/CN6VFVA2.js +19 -0
- package/dist/cdn/GCFT45CD.js +2 -0
- package/dist/cdn/HN2HMAMX.js +28 -0
- package/dist/cdn/I22GHLAO.js +2 -0
- package/dist/cdn/IFWK7P7O.js +2 -0
- package/dist/cdn/JDL3HFFX.js +56 -0
- package/dist/cdn/JOZLOFW3.js +271 -0
- package/dist/cdn/KJZARHAM.js +2 -0
- package/dist/cdn/KKHKKCYH.js +17 -0
- package/dist/cdn/KQ6LEQHH.js +14 -0
- package/dist/cdn/LSGRWCAO.js +5 -0
- package/dist/cdn/LTBEINKG.js +25 -0
- package/dist/cdn/M672SFG6.js +2 -0
- package/dist/cdn/M7XUI5KY.js +77 -0
- package/dist/cdn/NKNUZCLA.js +17 -0
- package/dist/cdn/OLPFL2NN.js +2 -0
- package/dist/cdn/OUVX4QS2.js +2 -0
- package/dist/cdn/PWXNH5LQ.js +2 -0
- package/dist/cdn/Q674OE2M.js +2 -0
- package/dist/cdn/QTP47HEP.js +2 -0
- package/dist/cdn/SOWNHB7F.js +30 -0
- package/dist/cdn/UY4FI7AP.js +2 -0
- package/dist/cdn/VUHDKXFM.js +2 -0
- package/dist/cdn/W5CHGOOR.js +109 -0
- package/dist/cdn/WBSNYWJJ.js +2 -0
- package/dist/cdn/X7WF7TCS.js +2 -0
- package/dist/cdn/XVUE27HC.js +2 -0
- package/dist/cdn/ZYQ6U2YH.js +88 -0
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/runtime.js +2 -2
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/components/arcgis-assistant/customElement.js +1 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-chat/customElement.js +1 -1
- package/dist/components/arcgis-assistant-chat-card/customElement.js +1 -1
- package/dist/components/arcgis-assistant-chat-card-content/customElement.js +1 -1
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-interrupt/customElement.js +1 -1
- package/dist/components/arcgis-assistant-layer-filter-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-layer-query-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-shell/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),n=(b,a)=>{for(var c in a)e(b,c,{get:a[c],enumerable:!0})},l=(b,a,c,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&e(b,d,{get:()=>a[d],enumerable:!(f=h(a,d))||f.enumerable});return b};var o=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?e(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b,o as c};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"./CFDTXKJ6.js";var e=`# ArcGIS Online Map Viewer \u2014 Smart Mapping Assistant
|
|
3
|
+
|
|
4
|
+
You are a Smart Mapping Assistant for ArcGIS Online Map Viewer.
|
|
5
|
+
|
|
6
|
+
**Your job:**
|
|
7
|
+
Given a set of layers with their fields and a user request, call the appropriate layer styling tools to apply the best mapping style(s) for each layer.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## **Available Layers and Fields:**
|
|
12
|
+
|
|
13
|
+
{layerFieldInfo}
|
|
14
|
+
|
|
15
|
+
**FieldInfo:**
|
|
16
|
+
|
|
17
|
+
- \`name\`: the actual field name (use this exact name)
|
|
18
|
+
- \`type\`: one of \`string\`, \`number\`, \`date\`, etc.
|
|
19
|
+
- \`alias\`: a human-readable label
|
|
20
|
+
- \`description\`: optional field metadata
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## **Available Color Schemes:**
|
|
25
|
+
|
|
26
|
+
\`reds\`, \`yellows\`, \`oranges\`, \`greens\`, \`blues\`, \`purples\`, \`pinks\`, \`browns\`, \`grays\`, \`subdued\`, \`diverging\`, \`sequential\`, \`categorical\`
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## **Available Themes:**
|
|
31
|
+
|
|
32
|
+
1. **high-to-low** - High values are emphasized with saturated colors. Low values are de-emphasized with diminished colors.
|
|
33
|
+
- Keywords: continuous, high to low, unclassed, gradient, sequential
|
|
34
|
+
- Example: Show the percent of the population that owns a home along a sequential color ramp.
|
|
35
|
+
|
|
36
|
+
2. **above** - Emphasize values that are above a value, such as the mean.
|
|
37
|
+
- Keywords: over, increasing, up, growth, above
|
|
38
|
+
- Example: Use color to show areas where the hispanic population is above the mean.
|
|
39
|
+
|
|
40
|
+
3. **below** - Emphasize values that are below a value, such as the mean.
|
|
41
|
+
- Keywords: under, decreasing, down, shrinking, decline, drop, below
|
|
42
|
+
- Example: Show the number of vacant homes below the mean.
|
|
43
|
+
|
|
44
|
+
4. **centered-on** - Emphasize values that are near a key value.
|
|
45
|
+
- Keywords: centered on, focused on average, highlight average, competitive, close
|
|
46
|
+
- Example: Use color to show the areas where the percent of the republican votes is close to the percent of democratic votes.
|
|
47
|
+
|
|
48
|
+
5. **above-and-below** - When both high values and low values need emphasis.
|
|
49
|
+
- Keywords: diverging, above or below, bi-directional, over or under, growing or shrinking, growth or decline
|
|
50
|
+
- Example: Show the median household income above and below the national average.
|
|
51
|
+
|
|
52
|
+
6. **extremes** - When only the highest or lowest values need emphasis.
|
|
53
|
+
- Keywords: extremes, outliers
|
|
54
|
+
- Example: Emphasize the outliers of the votes for Democrats in the 2020 presidential election.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## **Instructions:**
|
|
59
|
+
|
|
60
|
+
- Call the appropriate tool for the layer based on the user's request
|
|
61
|
+
- Use exact field names from the layer info (not aliases)
|
|
62
|
+
- Use exact layer IDs from the layer info
|
|
63
|
+
- Match field types to tool requirements (each tool describes its field requirements in its description)
|
|
64
|
+
- Select appropriate color schemes and themes based on the data and user intent, only if user asks for them
|
|
65
|
+
- If the user asks for a specific style, use that tool
|
|
66
|
+
- If the user is vague, use your judgment to recommend the best tool
|
|
67
|
+
|
|
68
|
+
**Remember:** Each layer styling tool will apply a renderer to a layer, make it visible, and return results.
|
|
69
|
+
`;export{e as default};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"./CFDTXKJ6.js";var e=`## GIS Feature Layer Intent Classifier
|
|
3
|
+
|
|
4
|
+
You are an assistant that classifies user intent in ArcGIS Online Map Viewer.
|
|
5
|
+
|
|
6
|
+
Return **up to {maxIntents} intents in the exact order they should be executed** for the user's request.
|
|
7
|
+
If none apply, return an **empty list** (no "none" label).
|
|
8
|
+
|
|
9
|
+
Choose only from registered agents. Input format will be: {{id: string, name: string, description: string}}[]
|
|
10
|
+
{registeredAgents}
|
|
11
|
+
|
|
12
|
+
Rules:
|
|
13
|
+
|
|
14
|
+
- Output 0\u2013{maxIntents} items, ordered for execution.
|
|
15
|
+
- Do **not** include any labels outside the list above.
|
|
16
|
+
- Do **not** include "none"; return an empty list instead when unrelated questions like labels, popups, etc.
|
|
17
|
+
- If none apply, return an empty array [].
|
|
18
|
+
- Each returned intent must be supported by evidence in the user request. Don\u2019t add \u2018nice-to-have\u2019 follow-up intents.
|
|
19
|
+
`;export{e as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{a as c}from"./UY4FI7AP.js";import"./WBSNYWJJ.js";import{g as e,h as t,p as s,t as i}from"./26V7SXDR.js";import"./CFDTXKJ6.js";var r=e`.assistant-chat-card__prompt-container{display:flex;align-items:center;gap:var(--calcite-spacing-md);background:color-mix(in srgb,var(--calcite-color-brand) 25%,transparent);padding:var(--calcite-spacing-md);border-radius:var(--calcite-border-radius);width:fit-content;margin-left:auto;justify-content:flex-end}.assistant-chat-card__prompt-avatar{display:flex;align-items:center;justify-content:center}.assistant-chat-card__content-container{display:flex;flex:1;flex-direction:column;width:100%}.assistant-chat-card__response-container{display:flex;flex-direction:column;align-items:flex-start;gap:var(--calcite-spacing-sm);width:100%;text-align:left}.assistant-chat-card__response-icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.assistant-chat-card__footer{display:flex;width:100%;justify-content:space-between;padding:0 var(--calcite-spacing-xxs)}.assistant-chat-card__feedback-actions{display:flex;flex-direction:row;gap:var(--calcite-spacing-xxs)}.assistant-chat-card__log-container{padding:0 var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);margin-bottom:var(--calcite-spacing-sm)}.assistant-chat-card__log{margin:0;font-size:var(--calcite-font-size-sm);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);width:100%;overflow:auto}.assistant-chat-card__footer-start{display:flex;gap:var(--calcite-spacing-xxs)}@media(min-width:1280px){.assistant-chat-card__prompt-container,.assistant-chat-card__response-container{max-width:80%}}`,a=class extends s{constructor(){super(...arguments),this._messages=c({blocking:!0}),this._showLog=!1,this.loading=!1,this.type="prompt",this.feedbackDisabled=!1,this.timestampDisabled=!1}static{this.properties={_showLog:16,loading:5,type:1,feedbackDisabled:5,timestampDisabled:5,content:1,loadingMessage:1,log:1,error:1,user:1}}static{this.styles=r}_renderLog(){return this.log&&this._showLog?t`<div class="assistant-chat-card__log-container"><pre class="assistant-chat-card__log">${this.log}</pre></div>`:null}_renderThumbsUpButton(){return t`<calcite-action id=action-thumbs-up icon=thumbs-up scale=s appearance=transparent @click=${()=>{}} text></calcite-action><calcite-tooltip reference-element=action-thumbs-up overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsUpLabel}</span></calcite-tooltip>`}_renderThumbsDownButton(){return t`<calcite-action id=action-thumbs-down icon=thumbs-down scale=s appearance=transparent @click=${()=>{}} text></calcite-action><calcite-tooltip reference-element=action-thumbs-down overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsDownLabel}</span></calcite-tooltip>`}_renderFeedback(){return!this.feedbackDisabled&&!this.error?t`<div class="assistant-chat-card__feedback-actions">${this._renderThumbsUpButton()}${this._renderThumbsDownButton()}</div>`:null}_renderCopyButton(){return this.error?null:t`<calcite-action id=action-copy icon=copy-to-clipboard scale=s appearance=transparent @click=${async()=>{try{this.content&&await navigator.clipboard.writeText(this.content)}catch(n){console.error("Failed to copy text to clipboard:",n)}}} text></calcite-action><calcite-tooltip reference-element=action-copy overlay-positioning=fixed placement=bottom><span>${this._messages.copyButtonLabel}</span></calcite-tooltip>`}_renderLogButton(){return this.log?t`<calcite-action id=action-log icon=access-string-results scale=s appearance=transparent @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}_renderFooter(){return this.loading?null:t`<div class="assistant-chat-card__footer"><slot name=footer-start class="assistant-chat-card__footer-start">${this._renderCopyButton()}${this._renderLogButton()}</slot>${this._renderFeedback()}</div>`}render(){return this.type==="prompt"?t`<div class="assistant-chat-card__prompt-container"><div>${this.content}</div><div class="assistant-chat-card__prompt-avatar"><calcite-avatar .fullName=${this.user} scale=s></calcite-avatar></div></div>`:t`<div class="assistant-chat-card__response-container"><calcite-icon icon=effects class="assistant-chat-card__response-icon"></calcite-icon><div class="assistant-chat-card__content-container"><arcgis-assistant-chat-card-content .loading=${this.loading} .loadingMessage=${this.loadingMessage} .type=${this.error?"error":"text"} .content=${this.error??this.content}></arcgis-assistant-chat-card-content>${this._renderLog()}${this._renderFooter()}</div></div>`}};i("arcgis-assistant-chat-card",a);export{a as ArcgisAssistantChatCard};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"./CFDTXKJ6.js";var e=`## Task: Summarize Geographic Features
|
|
3
|
+
|
|
4
|
+
You are given features from ArcGIS Feature layer for multiple layers:
|
|
5
|
+
{queryResponse}
|
|
6
|
+
|
|
7
|
+
Also consider any **relevant context from the chat history**, such as user questions or instructions.
|
|
8
|
+
|
|
9
|
+
### Your goal:
|
|
10
|
+
|
|
11
|
+
1. If the user question is about a **specific calculation** (e.g., average, total, count, min, max), return only the **direct numeric answer** \u2014 short and clear.
|
|
12
|
+
- Example: \u201CThe average price is $4.00.\u201D
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
3. The response can be per layer, or summarize based on the question.
|
|
17
|
+
|
|
18
|
+
4. When the user asks "where" a feature is located: Simply confirm whether the feature was found and in which layer. DO NOT attempt to provide coordinates, addresses, or geographic descriptions.
|
|
19
|
+
|
|
20
|
+
5. DO NOT ramble.
|
|
21
|
+
|
|
22
|
+
In all cases:
|
|
23
|
+
|
|
24
|
+
- Focus on **notable attribute values**, **commonalities or differences**, and **interesting trends**.
|
|
25
|
+
- If the feature list is empty or not meaningful, state that clearly.
|
|
26
|
+
|
|
27
|
+
**Keep your response concise and relevant to the user\u2019s question.**
|
|
28
|
+
`;export{e as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{g as e,h as t,n as i,o,p as r,t as n}from"./26V7SXDR.js";import"./CFDTXKJ6.js";export default $arcgis.t(([c,{watch:l}])=>{var g=e`.assistant-chat__messages-container{display:flex;flex:1;flex-direction:column}.assistant-chat__messages-list{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;gap:var(--calcite-spacing-md);flex:1 1 auto;min-height:0;justify-content:flex-end;overflow:auto}`,a=class extends r{constructor(){super(...arguments),this.#s=i(),this.loading=!1,this.loadingMessage="",this.messages=new c([])}static{this.properties={loading:5,loadingMessage:1,user:1,messages:0}}static{this.styles=g}#s;firstUpdated(){this._scrollToEnd()}loaded(){this.manager.onLifecycle(()=>[this.messages.on("change",()=>{this.requestUpdate(),this._scrollToEnd()}),l(()=>this.loading,()=>{this._scrollToEnd()})])}_scrollToEnd(){requestAnimationFrame(()=>{this.#s.value?.scrollIntoView({behavior:"smooth"})})}render(){return t`<div class="assistant-chat__messages-container"><div class="assistant-chat__messages-list"><slot></slot>${this.messages.map(s=>t`<arcgis-assistant-chat-card .type=${s.type} .content=${s.content} .log=${s.log} .error=${s.error} .user=${this.user}></arcgis-assistant-chat-card>`)}${this.loading?t`<arcgis-assistant-chat-card .loading=${this.loading} .loadingMessage=${this.loadingMessage} type=response></arcgis-assistant-chat-card>`:null}</div><div ${o(this.#s)}></div></div>`}};n("arcgis-assistant-chat",a);return a},"core/Collection","core/reactiveUtils")
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"./CFDTXKJ6.js";var e=`This Feature Layer is part of a Feature Service. The Feature Layer contains various fields, each with its own name, type, and description.
|
|
3
|
+
The Feature Layer is a collection of geographic features that represent real-world entities. Each feature in the layer has attributes that provide additional information about the feature. The layer may include point, line, or polygon geometries, depending on the type of data it represents.
|
|
4
|
+
The geometry type for this layer is {layerGeometryType}.
|
|
5
|
+
|
|
6
|
+
Here is the field information for each field in the Feature Layer. Each field has a name, alias, type, valueType and description. These should help you understand the data represented in the Feature Layer.
|
|
7
|
+
|
|
8
|
+
Field Descriptions:
|
|
9
|
+
{fieldInformation}
|
|
10
|
+
|
|
11
|
+
Your task is to :
|
|
12
|
+
|
|
13
|
+
- analyze the field descriptions to understand the data represented in the Feature Layer.
|
|
14
|
+
- Generate the following for the layer:
|
|
15
|
+
- a title: a concise title that accurately reflects the content and purpose of the feature service.
|
|
16
|
+
- a description: a detailed description of the feature layer
|
|
17
|
+
|
|
18
|
+
Consider the following aspects in your description:
|
|
19
|
+
|
|
20
|
+
- purpose of this feature layer
|
|
21
|
+
- types of data and geometric entities represented in the layer
|
|
22
|
+
- sources of the layer information and the geographic area covered
|
|
23
|
+
- potential applications and usefulness of the feature layer in the GIS world
|
|
24
|
+
|
|
25
|
+
If any of the above topics are not applicable, you can skip them. Don't include statements that indicate something this Feature Layer is not or does not have. Avoid listing field names, types, and other technical details.
|
|
26
|
+
|
|
27
|
+
Instructions while generating the title:
|
|
28
|
+
|
|
29
|
+
- Avoid using special characters in the title.
|
|
30
|
+
- Avoid using 'layer' in the title.
|
|
31
|
+
- Avoid using all uppercase letters in the title. Use title case instead.
|
|
32
|
+
- The title should not be too long.
|
|
33
|
+
|
|
34
|
+
You are given Feature Layer descriptions and title.
|
|
35
|
+
|
|
36
|
+
## Existing layer details filled in by a human:
|
|
37
|
+
|
|
38
|
+
{existingLayerTitle}
|
|
39
|
+
{existingLayerSnippet}
|
|
40
|
+
{existingLayerDescription}
|
|
41
|
+
|
|
42
|
+
## Instructions on how to use the information filled in by a human:
|
|
43
|
+
|
|
44
|
+
Remember humans may have more information about the item than just the field and layer descriptions.
|
|
45
|
+
|
|
46
|
+
- Use this information ONLY IF it helps you understand the item better.
|
|
47
|
+
- Use this information ONLY IF it helps you generate a better description and title.
|
|
48
|
+
- Use your knowledge from this information to compensate for any important information that is missing in the field and layer descriptions.
|
|
49
|
+
|
|
50
|
+
## Instructions on what to avoid doing with the information filled in by a human:
|
|
51
|
+
|
|
52
|
+
- you must not use this information in your response as it is.
|
|
53
|
+
- you must not think of this information as the final version.
|
|
54
|
+
- you must not use this information to generate a response without analyzing it.
|
|
55
|
+
- you must not copy this information verbatim in your response.
|
|
56
|
+
`;export{e as default};
|