agent-docs 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/PLAN.md CHANGED
@@ -607,7 +607,7 @@ Standard MIT license with copyright holder: starch-uk
607
607
 
608
608
  - Name: `agent-docs`
609
609
  - Type: module
610
- - Version: `1.1.0` (current)
610
+ - Version: `1.0.0`
611
611
  - Scripts: `format`, `format:fix`, `format:check`, `postinstall`
612
612
  - Dev dependencies: `prettier`
613
613
  - Engines: Node.js >= 20.0.0
@@ -642,15 +642,15 @@ The plan should:
642
642
  (patch/minor/major based on the greatest change in any docs file) compared to
643
643
  the version in the latest commit in the `main` branch
644
644
  - **Document initialization of existing docs:** The existing documentation files
645
- in the `docs/` directory (A4DRULES.md, APEXANNOTATIONS.md, APEXDOC.md, CML.md,
646
- CODEANALYZER.md, CONTEXTDEFINITIONS.md, ESLINT.md, ESLINTJSDOC.md,
647
- FIELDSERVICE.md, GRAPHBINARY.md, GRAPHENGINE.md, GRAPHML.md, GRAPHSON.md,
648
- GREMLIN.md, GRYO.md, HUSKY.md, JEST.md, JORJE.md, JSDOC.md, PMD.md, PNPM.md,
649
- PRETTIER.md, PRETTIERAPEX.md, REVENUETRANSACTIONMANAGEMENT.md, TINKERPOP.md,
650
- VITEST.md, XPATH31.md) need to be initialized with version `1.0.0` (or
651
- appropriate version based on their current state) when the versioning system
652
- is first implemented. These existing docs will be tracked going forward using
653
- the same semver system.
645
+ in the `docs/` directory (A4DRULES.md, A4DWORKFLOWS.md, APEXANNOTATIONS.md,
646
+ APEXDOC.md, CML.md, CODEANALYZER.md, CONTEXTDEFINITIONS.md, ESLINT.md,
647
+ ESLINTJSDOC.md, FIELDSERVICE.md, GRAPHBINARY.md, GRAPHENGINE.md, GRAPHML.md,
648
+ GRAPHSON.md, GREMLIN.md, GRYO.md, HUSKY.md, JEST.md, JORJE.md, JSDOC.md,
649
+ LIGHTNINGBASECOMPONENTS.md, LWCHTMLTEMPLATES.md, PMD.md, PNPM.md, PRETTIER.md,
650
+ PRETTIERAPEX.md, REVENUETRANSACTIONMANAGEMENT.md, TINKERPOP.md, VITEST.md,
651
+ XPATH31.md) need to be initialized with version `1.0.0` (or appropriate version
652
+ based on their current state) when the versioning system is first implemented.
653
+ These existing docs will be tracked going forward using the same semver system.
654
654
  - Describe how scripts can help with versioning by:
655
655
  - Reading markdown files and detecting headers/sections
656
656
  - Comparing current state with the latest commit in `main` branch
package/README.md CHANGED
@@ -77,6 +77,7 @@ The `docs/` directory contains generated documentation files. Each doc follows a
77
77
  structured format optimized for AI agent consumption:
78
78
 
79
79
  - **[A4DRULES.md](docs/A4DRULES.md)** - Agentforce Rules Reference
80
+ - **[A4DWORKFLOWS.md](docs/A4DWORKFLOWS.md)** - Agentforce Workflows reference
80
81
  - **[APEXANNOTATIONS.md](docs/APEXANNOTATIONS.md)** - Apex annotations reference
81
82
  - **[APEXDOC.md](docs/APEXDOC.md)** - ApexDoc documentation tool reference
82
83
  - **[CML.md](docs/CML.md)** - Constraint Modeling Language (CML) reference for
@@ -100,6 +101,9 @@ structured format optimized for AI agent consumption:
100
101
  - **[JEST.md](docs/JEST.md)** - Jest testing framework reference
101
102
  - **[JORJE.md](docs/JORJE.md)** - Jorje Apex parser reference
102
103
  - **[JSDOC.md](docs/JSDOC.md)** - JSDoc documentation generator reference
104
+ - **[LIGHTNINGBASECOMPONENTS.md](docs/LIGHTNINGBASECOMPONENTS.md)** - Lightning Base
105
+ Components reference
106
+ - **[LWCHTMLTEMPLATES.md](docs/LWCHTMLTEMPLATES.md)** - LWC HTML Templates reference
103
107
  - **[PMD.md](docs/PMD.md)** - PMD static analysis tool reference (includes Apex
104
108
  AST reference and suppressing warnings)
105
109
  - **[PNPM.md](docs/PNPM.md)** - pnpm package manager reference
@@ -0,0 +1,121 @@
1
+ # Agentforce Workflows — Agent Guide
2
+
3
+ > **Version**: 1.0.0
4
+
5
+ ## Overview
6
+
7
+ Workflows are reusable `.md` files defining multi-step Salesforce dev tasks. Invoke with `/[workflow-name.md]` in chat.
8
+
9
+ **Benefits:** Automation, consistency, error reduction, time savings, team sharing.
10
+
11
+ ---
12
+
13
+ ## Creating & Managing
14
+
15
+ | Action | Method |
16
+ |--------|--------|
17
+ | Access | Click **Rules & Workflows** (justice icon) in chat |
18
+ | Scope | Choose **Global** or **Workspace** workflows |
19
+ | Create | Click **+** |
20
+ | Storage | Workspace: `.a4drules/workflows/` folder |
21
+
22
+ Interface allows: view active workflows, toggle on/off, add/delete.
23
+
24
+ ---
25
+
26
+ ## Workflow Capabilities
27
+
28
+ - **Built-in tools:** `ask_followup_question`, `read_file`, `search_files`, `new_task`
29
+ - **CLI tools:** `sf` (Salesforce CLI), `git`
30
+ - **External:** MCP tool calls
31
+ - **Chaining:** Sequential action execution
32
+
33
+ ---
34
+
35
+ ## Common Workflow Types
36
+
37
+ | Type | Purpose |
38
+ |------|---------|
39
+ | Deployment | Deploy/validate components across orgs |
40
+ | Testing | Run test suites, analyze results |
41
+ | Release | Package, validate, deploy releases |
42
+ | Component | Create/test/deploy Lightning components |
43
+ | Integration | Set up/validate external integrations |
44
+
45
+ ---
46
+
47
+ ## Example: `salesforce-deploy.md`
48
+
49
+ ```text
50
+ You have access to the `sf` terminal command. Deploy components following this process:
51
+
52
+ 1. **Gather Info**
53
+ <ask_followup_question>
54
+ <question>Which components to deploy and to which org?</question>
55
+ <options>["Specific files/folders", "All local changes", "Specific metadata types"]</options>
56
+ </ask_followup_question>
57
+
58
+ sf org display --target-org <target-org>
59
+
60
+ 2. **Pre-Deployment Validation**
61
+ sf project retrieve start --dry-run --target-org <target-org>
62
+ sf apex test run --code-coverage --result-format human
63
+ sf project deploy start --dry-run --target-org <target-org>
64
+
65
+ 3. **Confirm**
66
+ <ask_followup_question>
67
+ <question>Validation complete. Proceed with deployment?</question>
68
+ <options>["Yes, deploy now", "No, make changes first", "Show details"]</options>
69
+ </ask_followup_question>
70
+
71
+ 4. **Execute**
72
+ sf project deploy start --target-org <target-org>
73
+ sf project deploy report --target-org <target-org>
74
+
75
+ 5. **Post-Validation**
76
+ sf apex test run --target-org <target-org> --code-coverage --result-format human
77
+ ```
78
+
79
+ ---
80
+
81
+ ## SF CLI Quick Reference
82
+
83
+ ### Org Commands
84
+ ```bash
85
+ sf org list # List authorized orgs
86
+ sf org display --target-org <alias> # Display org info
87
+ sf config set target-org <alias> # Set default org
88
+ ```
89
+
90
+ ### Deployment
91
+ ```bash
92
+ sf project deploy start --target-org <alias> # Deploy
93
+ sf project deploy start --dry-run --target-org <alias> # Validate only
94
+ sf project deploy report --target-org <alias> # Check status
95
+ sf project retrieve start --target-org <alias> # Retrieve metadata
96
+ ```
97
+
98
+ ### Testing
99
+ ```bash
100
+ sf apex test run --target-org <alias> --code-coverage --result-format human
101
+ sf apex test run --class-names "Test1,Test2" --target-org <alias>
102
+ sf apex test report --target-org <alias>
103
+ ```
104
+
105
+ ### Data
106
+ ```bash
107
+ sf data query --query "SELECT Id FROM Account LIMIT 10" --target-org <alias>
108
+ sf data import tree --plan data/plan.json --target-org <alias>
109
+ sf data export tree --query "SELECT Id FROM Account" --target-org <alias>
110
+ ```
111
+
112
+ ---
113
+
114
+ ## Custom Workflow Ideas
115
+
116
+ | Workflow | Key Steps |
117
+ |----------|-----------|
118
+ | **Release** | Gather merged changes → Build changelog → Bump version → Create/validate package |
119
+ | **New Component** | Create folder structure → Generate boilerplate files → Set up Jest tests → Deploy to dev |
120
+ | **Integration Test** | Validate credentials → Test endpoints → Check error handling → Generate reports |
121
+ | **Code Quality** | Run PMD analysis → Check accessibility → Validate naming → Generate reports |
@@ -0,0 +1,328 @@
1
+ # Lightning Base Components
2
+
3
+ > **Version**: 1.0.0
4
+
5
+ ## Guidelines
6
+ - Prefer base components over custom HTML - built-in SLDS, a11y, less maintenance
7
+ - A11y: Always provide accessible names via `label`, `aria-label`, `alternative-text`
8
+ - Events: `onclick` (buttons), `onchange`/`onselect` (inputs/menus), `onstatuschange` (flows), `onuploadfinished` (files), `onscan`/`onerror` (barcode)
9
+ - Nav: Use `lightning/navigation` not `href`
10
+ - Style: SLDS utilities + `--slds-c-*` CSS vars. Avoid internal overrides
11
+ - Files: Guest uploads via org prefs. `file-field-name`/`value` for guests, `record-id` for auth users
12
+ - Limits: combobox no multi-select/autocomplete; barcode/click-to-dial no iFrames; carousel max 6 images; flow restrictions on LWR+custom components
13
+
14
+ ## ValidityState & Validation
15
+ **ValidityState props** (all boolean): `valid`, `valueMissing`, `typeMismatch`, `patternMismatch`, `tooLong`, `tooShort`, `rangeOverflow`, `rangeUnderflow`, `stepMismatch`, `badInput`, `customError`
16
+
17
+ **Methods**: `setCustomValidity(msg)`, `reportValidity()`, `checkValidity()`
18
+
19
+ **Custom messages**: `message-when-value-missing`, `message-when-type-mismatch`, `message-when-pattern-mismatch`, `message-when-too-long`, `message-when-too-short`, `message-when-range-overflow`, `message-when-range-underflow`, `message-when-step-mismatch`, `message-when-bad-input`
20
+
21
+ Start w/ LDS components for built-in validation. Client+server validation together.
22
+
23
+ ## Components
24
+
25
+ **Legend**: `*` = required, `|` = options, `→` = returns
26
+
27
+ ### lightning-accordion-section
28
+ Nest in `lightning-accordion`
29
+ - `class`, `heading-level` (1-6), `label`, `name`*
30
+ - Slots: default, `actions`
31
+ - ARIA: `role="listitem"`, `aria-expanded`, `aria-controls`
32
+ - Event: `onactive`
33
+
34
+ ### lightning-alert (lightning/alert)
35
+ `LightningAlert.open(config)` → Promise
36
+ - `label`, `message`*, `theme` (default|shade|inverse|alt-inverse|success|info|warning|error|offline), `variant` (header|headerless)
37
+ - ARIA: `role="alertdialog"`, focus trap
38
+
39
+ ### lightning-avatar
40
+ - `alternative-text`* (if informational), `class`, `fallback-icon-name` (standard/custom only), `initials`, `src`, `variant` (circle|square)
41
+ - Initials+fallback: initials show w/ icon bg color
42
+
43
+ ### lightning-badge
44
+ - `class`, `icon-name`, `icon-position` (end|start), `label`
45
+ - No links/nested elements. Use `slds-theme_*` for colors
46
+
47
+ ### lightning-barcode-scanner
48
+ Mobile only, no iFrames
49
+ - `disabled`, `disabled-alternative-text`, `disabled-icon-src`, `enable-continuous-scan`, `enabled-alternative-text`, `enabled-icon-src`, `icon-size`
50
+ - Events: `onerror`, `onscan` → `event.detail.scannedBarcodes`
51
+
52
+ ### lightning-breadcrumb
53
+ Nest in `lightning-breadcrumbs`
54
+ - `class`, `href` (defaults "#"), `label`*, `name`
55
+ - Event: `onclick` (use w/ lightning/navigation)
56
+
57
+ ### lightning-breadcrumbs
58
+ - `class`
59
+ - Slots: `lightning-breadcrumb`
60
+ - ARIA: `role="navigation"`, last item `aria-current="page"`
61
+
62
+ ### lightning-button
63
+ - `accesskey`, `aria-atomic`, `aria-controls`, `aria-describedby`, `aria-expanded`, `aria-haspopup`, `aria-label`, `aria-labelledby`, `aria-live`, `class`, `disabled`, `disable-animation`, `icon-name` (utility), `icon-position` (end|start), `label`*, `stretch`, `tabindex`, `title`, `type` (button|reset|submit), `variant` (base|brand|brand-outline|destructive|destructive-text|inverse|neutral|success)
64
+ - Event: `onclick`
65
+ - Use button-icon for icon-only. Min 44x44px mobile
66
+
67
+ ### lightning-button-group
68
+ - `class`
69
+ - Slots: `lightning-button*`
70
+
71
+ ### lightning-button-icon-stateful
72
+ - `accesskey`, `alternative-text`, `aria-atomic`, `aria-controls`, `aria-describedby`, `aria-expanded`, `aria-haspopup`, `aria-label`*, `aria-live`, `class`, `disabled`, `icon-name`* (utility), `selected`, `size`, `variant` (border|border-filled|border-inverse)
73
+ - ARIA: `aria-pressed`
74
+ - Event: `onclick`
75
+
76
+ ### lightning-button-menu
77
+ - `alternative-text`, `class`, `disabled`, `icon-name`, `icon-size`, `is-draft`, `draft-alternative-text`, `is-loading`, `loading-state-alternative-text`, `label`, `menu-alignment`, `size`, `tooltip`, `title`, `variant` (bare|bare-inverse|border|border-filled|border-inverse|container)
78
+ - Slots: `lightning-menu-item`, `lightning-menu-divider`, `lightning-menu-subheader`
79
+ - ARIA: `aria-haspopup="true"`, `aria-expanded`
80
+ - Events: `onclose`, `onopen`, `onselect`
81
+
82
+ ### lightning-button-stateful
83
+ - `accesskey`, `aria-*` (same as button), `class`, `disabled`, `icon-name` (utility), `label-when-hover`, `label-when-off`, `label-when-on`, `selected`, `tabindex`, `variant` (brand|destructive|inverse|neutral|success|text)
84
+ - ARIA: `aria-pressed`, `aria-live="polite"`
85
+ - Event: `onclick` (toggle selected)
86
+
87
+ ### lightning-card
88
+ - `class`, `icon-name`, `title`
89
+ - Slots: `actions`, `footer`, `title`, default
90
+
91
+ ### lightning-carousel
92
+ Max 6 images
93
+ - `class`, `disable-auto-refresh`, `disable-auto-scroll`, `scroll-duration`
94
+ - Slots: `lightning-carousel-image`
95
+ - ARIA: indicators `role="tablist"`
96
+
97
+ ### lightning-carousel-image
98
+ - `alternative-text`, `description`, `header`, `href`, `src`*
99
+
100
+ ### lightning-click-to-dial
101
+ Lightning Experience only, no iFrames. Requires Open CTI `enableClickToDial`
102
+ - `record-id`, `value` (phone)
103
+ - Event: `onclicktodial`
104
+
105
+ ### lightning-combobox
106
+ No multi-select/autocomplete. Mobile issues - consider HTML `<select>`
107
+ - `autocomplete`, `class`, `label`*, `message-when-value-missing`, `options`* [{value,label,description?}], `required`, `validity`, `value`, `variant` (label-hidden)
108
+ - Events: `onchange` → `event.detail.selectedValue`, `onopen`
109
+
110
+ ### lightning-dynamic-icon
111
+ - `alternative-text` (provide on small screens), `type`* (ellie|eq|score|strength|trend|waffle)
112
+
113
+ ### lightning-file-upload
114
+ Max 25 files, 2GB each. Guest: create `*fileupload__c` field
115
+ - `accept`, `class`, `file-field-name`, `file-field-value`, `label`, `record-id`
116
+ - Event: `onuploadfinished` → `event.detail.files` [{name,documentId}]
117
+
118
+ ### lightning-flow
119
+ Custom components unsupported on LWR
120
+ - `flow-api-name`*, `flow-input-variables`, `flow-finish-behavior` (NONE|RESTART)
121
+ - Event: `onstatuschange` → status, outputVariables
122
+
123
+ ### lightning-formatted-address
124
+ Format by user locale. Links Google Maps
125
+ - `city`, `country`, `disabled`, `latitude`, `longitude`, `postal-code`, `province`, `show-static-map`, `street`, `variant` (plain)
126
+
127
+ ### lightning-formatted-email
128
+ - `bcc`, `body`, `cc`, `disable-linkify`, `hide-icon`, `label`, `subject`, `value`
129
+
130
+ ### lightning-formatted-location
131
+ - `latitude`*, `longitude`*
132
+
133
+ ### lightning-formatted-number
134
+ User locale
135
+ - `currency-code`, `currency-display-as` (code|name|symbol), `format-style` (currency|decimal|percent|percent-fixed), `maximum-fraction-digits`, `maximum-significant-digits`, `minimum-fraction-digits`, `minimum-significant-digits`, `value`*
136
+
137
+ ### lightning-formatted-rich-text
138
+ - `disable-linkify`, `value`
139
+ - Supported: a, div, p, h1-h6, strong, em, ul, ol, li, table, img, etc.
140
+
141
+ ### lightning-formatted-time
142
+ - `value`* (ISO8601)
143
+
144
+ ### lightning-input
145
+ - `accept`, `aria-describedby`, `aria-labelledby`, `autocomplete`, `checked`, `class`, `date-aria-describedby`, `date-aria-labelledby`, `disabled`, `field-level-help`, `files`, `label`*, `max`, `maxlength`, `message-when-*` (all validation msgs), `min`, `minlength`, `multiple`, `name`, `pattern`, `placeholder`, `readonly`, `required`, `step`, `time-aria-describedby`, `time-aria-labelledby`, `type` (checkbox|checkbox-button|color|date|datetime|datetime-local|email|file|number|password|search|tel|text|time|toggle|url), `validity`, `value`, `variant` (label-hidden|label-inline|label-stacked|standard)
146
+ - Events: `onblur`, `onchange`, `onfocus`, `oninput`
147
+
148
+ ### lightning-input-field
149
+ - `field-name`*, `required`, `value`, `variant`
150
+ - Event: `onchange`
151
+
152
+ ### lightning-input-location
153
+ Validates lat -90/90, lon -180/180
154
+ - `city`, `country`, `latitude`, `longitude`, `postal-code`, `province`, `street`
155
+ - Event: `onchange` → lat, lon
156
+
157
+ ### lightning-layout-item
158
+ - `flexibility`, `large-device-size` (1-12), `medium-device-size`, `padding`, `size`, `small-device-size`
159
+
160
+ ### lightning-map
161
+ - `center`, `list-view`, `map-markers`*, `markers-title`, `show-footer-address`, `zoom-level`
162
+
163
+ ### lightning-menu-divider
164
+ - `variant` (compact|default)
165
+
166
+ ### lightning-menu-item
167
+ - `accesskey`, `checked`, `class`, `draft-alternative-text`, `href`, `icon-name`, `icon-type` (color|standard), `is-draft`, `label`, `prefix-icon-name`, `tabindex`, `target`, `value`
168
+ - Selection via parent `onselect`
169
+
170
+ ### lightning-menu-subheader
171
+ - `label`*
172
+
173
+ ### lightning-modal (lightning/modal)
174
+ Extend `LightningModal`
175
+ - `description`, `disableClose`, `label`*, `size` (full|large|medium|small)
176
+ - ARIA: focus trap
177
+ - Events bubble to opener
178
+
179
+ ### lightning-modal-body/footer
180
+ Slots: default
181
+
182
+ ### lightning-modal-header
183
+ - `icon-assistive-text`, `icon-name`, `label`*
184
+
185
+ ### lightning-omnistudio-flexcard
186
+ - `flexcard-name`*, `input`, `record-id`
187
+
188
+ ### lightning-omnistudio-omniscript
189
+ - `input`, `record-id`, `script-name`*
190
+
191
+ ### lightning-output-field
192
+ - `field-name`*, `record-id`, `variant` (label-hidden|standard)
193
+
194
+ ### lightning-pill
195
+ 3 clickable areas: icon/avatar, label, remove btn
196
+ - `class`, `has-error`, `href`, `label`, `name`, `variant` (link|plain)
197
+ - Slots: default (icon/avatar)
198
+ - Events: `onclick`, `onremove`
199
+
200
+ ### lightning-pill-container
201
+ - `class`, `is-collapsible`, `is-expanded`, `items`*, `single-line`, `variant` (bare|standard)
202
+ - Event: `onitemremove` → item, index
203
+
204
+ ### lightning-progress-bar
205
+ - `size` (large|medium|small|x-large), `value`* (0-100), `variant` (circular|circular-with-label|light)
206
+
207
+ ### lightning-progress-indicator
208
+ - `class`, `current-step`, `type` (horizontal|vertical), `variant` (base|path)
209
+ - Slots: `lightning-progress-step`
210
+
211
+ ### lightning-progress-ring
212
+ - `direction` (clockwise|counterclockwise), `value`* (0-100), `variant` (active-step|base|base-autocomplete|expired|warning)
213
+
214
+ ### lightning-prompt (lightning/prompt)
215
+ `LightningPrompt.open()` → Promise
216
+ - `defaultValue`, `label`*, `message`, `options`, `variant` (header|headerless)
217
+
218
+ ### lightning-quick-action-panel
219
+ - `object-api-name`*, `quick-action-api-name`, `record-id`*
220
+ - Event: `onquickactionmenu`
221
+
222
+ ### lightning-record-edit-form
223
+ Uses LDS. Shows first validation error
224
+ - `class`, `layout-type` (Compact|Full), `mode` (edit|readonly), `object-api-name`, `record-id`
225
+ - Events: `onerror`, `onload`, `onsubmit`, `onsuccess`
226
+
227
+ ### lightning-relative-date-time
228
+ - `class`, `options`, `value`*
229
+
230
+ ### lightning-rich-text-toolbar-button
231
+ - `class`, `disabled`, `icon-name`, `pressed`, `value`
232
+
233
+ ### lightning-rich-text-toolbar-button-group
234
+ Slots: `lightning-rich-text-toolbar-button`
235
+
236
+ ### lightning-select
237
+ - `class`, `disabled`, `field-level-help`, `label`*, `message-when-value-missing`, `multiple`, `options` [{value,label,disabled?}], `required`, `size`, `validity`, `value`, `variant`
238
+ - Event: `onchange` → `event.detail.value`
239
+
240
+ ### lightning-slider
241
+ Use onchange not onblur (Safari). Values clamped to min/max
242
+ - `class`, `disabled`, `label`, `max` (100), `min` (0), `step`, `type` (horizontal|vertical), `value`
243
+ - Event: `onchange`
244
+
245
+ ### lightning-spinner
246
+ - `variant` (brand|inverse|default)
247
+ - Use w/ `if:true`
248
+
249
+ ### lightning-tab
250
+ Lazy loaded. Only query active/prev-active content
251
+ - `class`, `end-icon-alternative-text`, `end-icon-name`, `icon-assistive-text`, `icon-name`, `label`*, `show-error-indicator`
252
+ - Event: `onactive`
253
+
254
+ ### lightning-textarea
255
+ - `aria-describedby`, `aria-labelledby`, `autocomplete`, `class`, `disabled`, `label`*, `maxlength`, `message-when-*`, `minlength`, `placeholder`, `read-only`, `required`, `validity`, `value`, `variant`
256
+ - Events: `onblur`, `onchange`, `onfocus`
257
+
258
+ ### lightning-tile
259
+ - `class`, `label`*
260
+ - Slots: `media`, default
261
+ - Event: `onactiontriggered`
262
+
263
+ ### lightning-toast (lightning/toast)
264
+ `Toast.show()` → Promise
265
+ - `label`*, `labelLinks`, `message`, `messageLinks`, `mode` (dismissible|sticky), `variant` (error|info|success|warning)
266
+
267
+ ### lightning-toast-container (lightning/toastContainer)
268
+ One per page. Ctrl+F6/Cmd+F6 nav
269
+ - `containerPosition` (absolute|fixed), `maxToasts` (3), `toastPosition` (bottom-center|bottom-left|bottom-right|top-center|top-left|top-right)
270
+
271
+ ### lightning-tree
272
+ - `class`, `header`, `items`*
273
+ - Event: `onselect` → name
274
+
275
+ ### lightning-tree-grid
276
+ Set `sortable:true` on columns for sorting
277
+ - `class`, `columns`*, `data`, `expanded-rows`, `hide-checkbox-column`, `key-field`*, `max-column-width`, `min-column-width`, `resize-column-disabled`, `selected-rows`, `show-row-number-column`, `variant`
278
+ - Events: `onrowaction`, `onrowselection`, `onsort`
279
+
280
+ ### lightning-vertical-navigation
281
+ - `class`, `selected-item`
282
+ - Slots: `lightning-vertical-navigation-item*`
283
+ - Events: `onbeforeselect`, `onselect`
284
+
285
+ ### lightning-vertical-navigation-item
286
+ - `badge`, `class`, `href`, `icon-name`, `label`*, `name`
287
+ - Event: `onselect`
288
+
289
+ ### lightning-vertical-navigation-item-badge
290
+ - `class`, `label`, `variant` (default|inverse|lightest)
291
+
292
+ ### lightning-vertical-navigation-item-icon
293
+ - `alternative-text`, `class`, `icon-name`, `position` (end|start)
294
+
295
+ ## Patterns
296
+
297
+ ### Validation
298
+ ```js
299
+ // Check validity
300
+ if (!this.template.querySelector('lightning-input').checkValidity()) {
301
+ this.template.querySelector('lightning-input').reportValidity();
302
+ }
303
+ ```
304
+
305
+ ### Styling
306
+ ```html
307
+ <lightning-button class="slds-m-left_small">
308
+ ```
309
+ ```css
310
+ --slds-c-button-color-background
311
+ --slds-c-button-text-color
312
+ ```
313
+
314
+ ### Navigation
315
+ ```js
316
+ import { NavigationMixin } from 'lightning/navigation';
317
+ this[NavigationMixin.Navigate]({
318
+ type: 'standard__recordPage',
319
+ attributes: { recordId, actionName: 'view' }
320
+ });
321
+ ```
322
+
323
+ ### Events
324
+ ```js
325
+ handleChange(event) {
326
+ const value = event.detail.value; // or .selectedValue
327
+ }
328
+ ```