@saschabrunnerch/arcgis-maps-sdk-js-ai-context 0.0.2 → 0.1.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.
Files changed (52) hide show
  1. package/README.md +163 -203
  2. package/bin/cli.js +157 -173
  3. package/contexts/4.34/{claude → skills}/arcgis-3d-advanced/SKILL.md +586 -586
  4. package/contexts/4.34/{claude → skills}/arcgis-advanced-layers/SKILL.md +431 -431
  5. package/contexts/4.34/{claude → skills}/arcgis-analysis-services/SKILL.md +607 -607
  6. package/contexts/4.34/{claude → skills}/arcgis-authentication/SKILL.md +301 -301
  7. package/contexts/4.34/{claude → skills}/arcgis-cim-symbols/SKILL.md +486 -486
  8. package/contexts/4.34/{claude → skills}/arcgis-coordinates-projection/SKILL.md +406 -406
  9. package/contexts/4.34/{claude → skills}/arcgis-core-maps/SKILL.md +739 -739
  10. package/contexts/4.34/{claude → skills}/arcgis-core-utilities/SKILL.md +732 -732
  11. package/contexts/4.34/{claude → skills}/arcgis-custom-rendering/SKILL.md +445 -445
  12. package/contexts/4.34/{claude → skills}/arcgis-editing-advanced/SKILL.md +702 -702
  13. package/contexts/4.34/{claude → skills}/arcgis-feature-effects/SKILL.md +393 -393
  14. package/contexts/4.34/{claude → skills}/arcgis-geometry-operations/SKILL.md +489 -489
  15. package/contexts/4.34/{claude → skills}/arcgis-imagery/SKILL.md +307 -307
  16. package/contexts/4.34/{claude → skills}/arcgis-interaction/SKILL.md +572 -572
  17. package/contexts/4.34/{claude → skills}/arcgis-knowledge-graphs/SKILL.md +582 -582
  18. package/contexts/4.34/{claude → skills}/arcgis-layers/SKILL.md +601 -601
  19. package/contexts/4.34/{claude → skills}/arcgis-map-tools/SKILL.md +668 -668
  20. package/contexts/4.34/{claude → skills}/arcgis-media-layers/SKILL.md +290 -290
  21. package/contexts/4.34/{claude → skills}/arcgis-portal-content/SKILL.md +679 -679
  22. package/contexts/4.34/{claude → skills}/arcgis-scene-effects/SKILL.md +512 -512
  23. package/contexts/4.34/{claude → skills}/arcgis-smart-mapping/SKILL.md +686 -686
  24. package/contexts/4.34/{claude → skills}/arcgis-starter-app-extended/SKILL.md +649 -649
  25. package/contexts/4.34/{claude → skills}/arcgis-tables-forms/SKILL.md +877 -877
  26. package/contexts/4.34/{claude → skills}/arcgis-time-animation/SKILL.md +722 -722
  27. package/contexts/4.34/{claude → skills}/arcgis-utility-networks/SKILL.md +301 -301
  28. package/contexts/4.34/{claude → skills}/arcgis-visualization/SKILL.md +580 -580
  29. package/contexts/4.34/{claude → skills}/arcgis-widgets-ui/SKILL.md +574 -574
  30. package/lib/installer.js +19 -104
  31. package/package.json +45 -45
  32. package/contexts/4.34/copilot/arcgis-3d.instructions.md +0 -267
  33. package/contexts/4.34/copilot/arcgis-analysis.instructions.md +0 -294
  34. package/contexts/4.34/copilot/arcgis-arcade.instructions.md +0 -234
  35. package/contexts/4.34/copilot/arcgis-authentication.instructions.md +0 -187
  36. package/contexts/4.34/copilot/arcgis-cim-symbols.instructions.md +0 -177
  37. package/contexts/4.34/copilot/arcgis-core-maps.instructions.md +0 -246
  38. package/contexts/4.34/copilot/arcgis-core-utilities.instructions.md +0 -247
  39. package/contexts/4.34/copilot/arcgis-editing.instructions.md +0 -262
  40. package/contexts/4.34/copilot/arcgis-geometry.instructions.md +0 -225
  41. package/contexts/4.34/copilot/arcgis-layers.instructions.md +0 -278
  42. package/contexts/4.34/copilot/arcgis-popup-templates.instructions.md +0 -266
  43. package/contexts/4.34/copilot/arcgis-portal-advanced.instructions.md +0 -275
  44. package/contexts/4.34/copilot/arcgis-smart-mapping.instructions.md +0 -184
  45. package/contexts/4.34/copilot/arcgis-starter-app-extended.instructions.md +0 -643
  46. package/contexts/4.34/copilot/arcgis-starter-app.instructions.md +0 -268
  47. package/contexts/4.34/copilot/arcgis-time-animation.instructions.md +0 -112
  48. package/contexts/4.34/copilot/arcgis-visualization.instructions.md +0 -321
  49. package/contexts/4.34/copilot/arcgis-widgets-ui.instructions.md +0 -277
  50. /package/contexts/4.34/{claude → skills}/arcgis-arcade/SKILL.md +0 -0
  51. /package/contexts/4.34/{claude → skills}/arcgis-popup-templates/SKILL.md +0 -0
  52. /package/contexts/4.34/{claude → skills}/arcgis-starter-app/SKILL.md +0 -0
@@ -1,277 +0,0 @@
1
- ---
2
- applyTo: "**/*.{js,ts,jsx,tsx,html}"
3
- ---
4
-
5
- # ArcGIS Maps SDK - Widgets & UI
6
-
7
- ## Map Components (Recommended)
8
-
9
- ### Available Components
10
-
11
- | Component | Purpose |
12
- |-----------|---------|
13
- | `arcgis-zoom` | Zoom buttons |
14
- | `arcgis-compass` | Orientation indicator |
15
- | `arcgis-home` | Return to initial extent |
16
- | `arcgis-locate` | Find user location |
17
- | `arcgis-fullscreen` | Toggle fullscreen |
18
- | `arcgis-scale-bar` | Display scale |
19
- | `arcgis-legend` | Layer symbology |
20
- | `arcgis-layer-list` | Layer visibility |
21
- | `arcgis-basemap-gallery` | Switch basemaps |
22
- | `arcgis-search` | Location search |
23
- | `arcgis-editor` | Feature editing |
24
- | `arcgis-sketch` | Draw geometries |
25
- | `arcgis-feature-table` | Tabular data |
26
- | `arcgis-time-slider` | Temporal navigation |
27
- | `arcgis-print` | Map printing |
28
- | `arcgis-expand` | Collapsible container |
29
-
30
- ### Slot-Based Positioning
31
-
32
- ```html
33
- <arcgis-map basemap="streets-vector">
34
- <arcgis-zoom slot="top-left"></arcgis-zoom>
35
- <arcgis-home slot="top-left"></arcgis-home>
36
- <arcgis-search slot="top-right"></arcgis-search>
37
- <arcgis-legend slot="bottom-left"></arcgis-legend>
38
- <arcgis-scale-bar slot="bottom-right"></arcgis-scale-bar>
39
- <arcgis-popup slot="popup"></arcgis-popup>
40
- </arcgis-map>
41
- ```
42
-
43
- Available slots: `top-left`, `top-right`, `bottom-left`, `bottom-right`, `popup`, `manual`
44
-
45
- ### Expand Component
46
-
47
- ```html
48
- <arcgis-expand slot="top-right" expand-tooltip="Show Legend" mode="floating">
49
- <arcgis-legend></arcgis-legend>
50
- </arcgis-expand>
51
- ```
52
-
53
- ### Reference Element (External Components)
54
-
55
- ```html
56
- <calcite-shell-panel slot="panel-start">
57
- <arcgis-legend reference-element="arcgis-map"></arcgis-legend>
58
- </calcite-shell-panel>
59
-
60
- <arcgis-map id="arcgis-map" basemap="topo-vector"></arcgis-map>
61
- ```
62
-
63
- ## Core API Widgets
64
-
65
- ### Adding Widgets
66
-
67
- ```javascript
68
- import Legend from "@arcgis/core/widgets/Legend.js";
69
- import Search from "@arcgis/core/widgets/Search.js";
70
-
71
- const legend = new Legend({ view: view });
72
- view.ui.add(legend, "bottom-left");
73
-
74
- // Add multiple widgets
75
- view.ui.add([
76
- { component: legend, position: "bottom-left" },
77
- { component: search, position: "top-right" }
78
- ]);
79
-
80
- // Remove widget
81
- view.ui.remove(legend);
82
- ```
83
-
84
- ### Widget in Custom Container
85
-
86
- ```javascript
87
- const legend = new Legend({
88
- view: view,
89
- container: "legendDiv"
90
- });
91
- ```
92
-
93
- ## Common Widgets
94
-
95
- ### Legend
96
-
97
- ```javascript
98
- import Legend from "@arcgis/core/widgets/Legend.js";
99
-
100
- const legend = new Legend({
101
- view: view,
102
- layerInfos: [{
103
- layer: featureLayer,
104
- title: "Custom Title"
105
- }]
106
- });
107
- ```
108
-
109
- ### LayerList with Actions
110
-
111
- ```javascript
112
- import LayerList from "@arcgis/core/widgets/LayerList.js";
113
-
114
- const layerList = new LayerList({
115
- view: view,
116
- listItemCreatedFunction: (event) => {
117
- event.item.actionsSections = [[{
118
- title: "Zoom to layer",
119
- icon: "zoom-to-object",
120
- id: "zoom-to"
121
- }]];
122
- }
123
- });
124
-
125
- layerList.on("trigger-action", (event) => {
126
- if (event.action.id === "zoom-to") {
127
- view.goTo(event.item.layer.fullExtent);
128
- }
129
- });
130
- ```
131
-
132
- ### Search with Custom Sources
133
-
134
- ```javascript
135
- import Search from "@arcgis/core/widgets/Search.js";
136
-
137
- const search = new Search({
138
- view: view,
139
- sources: [{
140
- layer: featureLayer,
141
- searchFields: ["name", "address"],
142
- displayField: "name",
143
- placeholder: "Search features"
144
- }]
145
- });
146
-
147
- search.on("select-result", (event) => {
148
- console.log("Selected:", event.result);
149
- });
150
- ```
151
-
152
- ### FeatureTable
153
-
154
- ```javascript
155
- import FeatureTable from "@arcgis/core/widgets/FeatureTable.js";
156
-
157
- const table = new FeatureTable({
158
- view: view,
159
- layer: featureLayer,
160
- container: "tableDiv",
161
- visibleElements: {
162
- header: true,
163
- columnMenus: true,
164
- selectionColumn: true
165
- }
166
- });
167
-
168
- table.on("selection-change", (event) => {
169
- console.log("Selected:", event.added);
170
- });
171
- ```
172
-
173
- ### TimeSlider
174
-
175
- ```javascript
176
- import TimeSlider from "@arcgis/core/widgets/TimeSlider.js";
177
-
178
- const timeSlider = new TimeSlider({
179
- view: view,
180
- mode: "time-window",
181
- fullTimeExtent: layer.timeInfo.fullTimeExtent,
182
- stops: { interval: { value: 1, unit: "hours" } },
183
- playRate: 1000,
184
- loop: true
185
- });
186
-
187
- timeSlider.watch("timeExtent", (timeExtent) => {
188
- console.log("Time:", timeExtent.start, timeExtent.end);
189
- });
190
- ```
191
-
192
- ### Print
193
-
194
- ```javascript
195
- import Print from "@arcgis/core/widgets/Print.js";
196
-
197
- const print = new Print({
198
- view: view,
199
- printServiceUrl: "https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
200
- });
201
- ```
202
-
203
- ## Calcite Design System
204
-
205
- ### Basic Layout
206
-
207
- ```html
208
- <calcite-shell>
209
- <calcite-navigation slot="header">
210
- <calcite-navigation-logo slot="logo" heading="My App"></calcite-navigation-logo>
211
- </calcite-navigation>
212
-
213
- <calcite-shell-panel slot="panel-start">
214
- <calcite-panel heading="Layers">
215
- <arcgis-layer-list reference-element="map"></arcgis-layer-list>
216
- </calcite-panel>
217
- </calcite-shell-panel>
218
-
219
- <arcgis-map id="map" basemap="streets-vector">
220
- <arcgis-zoom slot="top-left"></arcgis-zoom>
221
- </arcgis-map>
222
- </calcite-shell>
223
- ```
224
-
225
- ### Action Bar
226
-
227
- ```html
228
- <calcite-action-bar slot="action-bar">
229
- <calcite-action icon="layers" text="Layers"></calcite-action>
230
- <calcite-action icon="legend" text="Legend"></calcite-action>
231
- <calcite-action icon="bookmark" text="Bookmarks"></calcite-action>
232
- </calcite-action-bar>
233
- ```
234
-
235
- ### Common Calcite Components
236
-
237
- | Component | Purpose |
238
- |-----------|---------|
239
- | `calcite-shell` | App container |
240
- | `calcite-shell-panel` | Side panels |
241
- | `calcite-panel` | Content panel |
242
- | `calcite-navigation` | Header/footer |
243
- | `calcite-action-bar` | Icon button bar |
244
- | `calcite-button` | Standard button |
245
- | `calcite-input` | Text input |
246
- | `calcite-modal` | Modal dialog |
247
- | `calcite-alert` | Alert message |
248
- | `calcite-loader` | Loading indicator |
249
-
250
- ### Theming
251
-
252
- ```html
253
- <body class="calcite-mode-light">
254
- <body class="calcite-mode-dark">
255
-
256
- <style>
257
- :root {
258
- --calcite-color-brand: #007ac2;
259
- }
260
- </style>
261
- ```
262
-
263
- ## Widget Events
264
-
265
- ```javascript
266
- search.on("select-result", (event) => console.log(event.result));
267
- layerList.on("trigger-action", (event) => console.log(event.action));
268
- timeSlider.watch("timeExtent", (value) => console.log(value));
269
- featureTable.on("selection-change", (event) => console.log(event.added));
270
- ```
271
-
272
- ## Common Pitfalls
273
-
274
- 1. **Missing reference-element** - Use when placing components outside the map
275
- 2. **Slot names exact** - Use `top-left`, not `topleft`
276
- 3. **Calcite CSS** - Ensure Calcite script is loaded first
277
- 4. **Dark/light mode** - Add `calcite-mode-light` or `calcite-mode-dark` to body