@salesforce/mcp-provider-lwc-experts 0.6.3 → 0.6.4

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 (58) hide show
  1. package/index.bundle.js +109 -117
  2. package/knowledge/graphql/generation-guide.md +212 -0
  3. package/knowledge/graphql/generation-mutation.md +265 -0
  4. package/knowledge/graphql/generation-query.md +235 -0
  5. package/knowledge/graphql/generation-schema.md +20 -0
  6. package/knowledge/graphql/schema/shared.graphqls +1140 -0
  7. package/knowledge/o11y/activityApi.md +64 -0
  8. package/knowledge/o11y/bestPractices.md +106 -0
  9. package/knowledge/o11y/counterMetrics.md +61 -0
  10. package/knowledge/o11y/errorTracking.md +70 -0
  11. package/knowledge/o11y/initialization.md +46 -0
  12. package/knowledge/o11y/lifecycleInstrumentation.md +91 -0
  13. package/knowledge/o11y/logApi.md +53 -0
  14. package/knowledge/o11y/schemaUsage.md +48 -0
  15. package/knowledge/slds/styling-hooks/README.md +408 -0
  16. package/knowledge/slds/styling-hooks/categories/color.md +963 -0
  17. package/knowledge/slds/styling-hooks/categories/radius.md +526 -0
  18. package/knowledge/slds/styling-hooks/categories/shadow.md +489 -0
  19. package/knowledge/slds/styling-hooks/categories/sizing.md +667 -0
  20. package/knowledge/slds/styling-hooks/categories/spacing.md +501 -0
  21. package/knowledge/slds/styling-hooks/categories/typography.md +708 -0
  22. package/knowledge/slds/styling-hooks/global-semantic/accent-hooks.md +207 -0
  23. package/knowledge/slds/styling-hooks/global-semantic/feedback-hooks.md +819 -0
  24. package/knowledge/slds/styling-hooks/global-semantic/surface-hooks.md +215 -0
  25. package/knowledge/slds/styling-hooks/guidance.md +906 -0
  26. package/knowledge/slds/styling-hooks/metadata/hooks-index.json +6576 -0
  27. package/knowledge/utam/generation-guide.md +499 -0
  28. package/knowledge/utam/generation-workflow.md +243 -0
  29. package/knowledge/utam/namespaces-mapping.md +26 -0
  30. package/knowledge/utam/utam-json-schema.md +720 -0
  31. package/knowledge/utils.ts +27 -0
  32. package/package.json +4 -3
  33. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-create-list-info.md +0 -0
  34. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-create-record.md +0 -0
  35. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-delete-list-info.md +0 -0
  36. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-delete-record.md +0 -0
  37. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-get-list-info-by-name.md +0 -0
  38. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-get-list-infos-by-name.md +0 -0
  39. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-get-list-infos-by-object-name.md +0 -0
  40. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-get-list-object-info.md +0 -0
  41. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-get-list-preferences.md +0 -0
  42. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-get-list-records-by-name.md +0 -0
  43. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-update-list-info.md +0 -0
  44. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-update-list-preferences.md +0 -0
  45. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-update-record.md +0 -0
  46. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/lds-wire-adapter-types.json +0 -0
  47. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-get-related-list-count.md +0 -0
  48. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-get-related-list-info-batch.md +0 -0
  49. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-get-related-list-info.md +0 -0
  50. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-get-related-list-records-batch.md +0 -0
  51. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-get-related-list-records.md +0 -0
  52. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-get-related-lists-info.md +0 -0
  53. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-object-info.md +0 -0
  54. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-object-infos.md +0 -0
  55. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-picklist-values-record.md +0 -0
  56. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-picklist-values.md +0 -0
  57. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-record.md +0 -0
  58. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-records.md +0 -0
@@ -0,0 +1,215 @@
1
+ # Surface Color Styling Hooks
2
+
3
+ ## Overview
4
+
5
+ **Reference:** [Lightning Design System - Color](https://www.lightningdesignsystem.com/2e1ef8501/p/655b28-color/b/25b51f)
6
+
7
+ A surface is a canvas that UI elements sit on. Surface colors express the visual stacking context of an app. Surface colors work together to enable sweeping changes, like dark mode. Surface colors are reserved for the bottom layer of a surface and establish the foundation for visual depth in the application.
8
+
9
+ ---
10
+
11
+ ## `--slds-g-color-surface-*`
12
+
13
+ ### Description
14
+
15
+ Surface colors used for backgrounds and large areas of the application that express a new visual stacking context to create visual depth.
16
+
17
+ ### Available Hooks
18
+
19
+ - `--slds-g-color-surface-1` - Primary page background (lightest, typically white)
20
+ - `--slds-g-color-surface-2` - Secondary page background (light gray, for visual distinction)
21
+ - `--slds-g-color-surface-3` - Tertiary page background (medium gray, for additional hierarchy)
22
+ - `--slds-g-color-surface-inverse-1` - Primary inverse surface background color
23
+ - `--slds-g-color-surface-inverse-2` - Secondary inverse surface background color
24
+
25
+ > **Note on Inverse Hooks:** Inverse hooks provide dark background colors designed for dark mode or inverted color schemes. They enable light content on dark backgrounds, as opposed to standard hooks which provide dark content on light backgrounds. Use inverse hooks for dark mode implementations, high-contrast sections, or visual emphasis through color inversion.
26
+
27
+ ### Understanding Surface Numbering: NOT State-Based
28
+
29
+ **Critical Distinction**: Unlike accent or feedback hooks, surface variant numbers (1-2-3) do **NOT** represent interaction states (default/hover/active). They represent:
30
+
31
+ 1. **Color progression from light to dark** (1 = lightest, 3 = darkest)
32
+ 2. **Designer's aesthetic choice** for visual hierarchy or separation
33
+ 3. **Contextual background needs** (e.g., white cards need gray backgrounds to stand out)
34
+
35
+ **When to choose which:**
36
+
37
+ - **`surface-1` (white)**: Clean, high-contrast base; use when cards/containers need strong definition
38
+ - **`surface-2` (light gray)**: Softer separation; use when layering elements without harsh white backgrounds
39
+ - **`surface-3` (medium gray)**: Additional depth; rare in practice, used for specific hierarchical needs
40
+
41
+ **NOT a rule**: There is no algorithmic decision tree. Designers choose based on composition, not function.
42
+
43
+ ### Usage
44
+
45
+ #### ✅ Do
46
+
47
+ - Works well for application backgrounds to establish the base canvas
48
+ - Effective for panels that create new visual contexts
49
+ - Suitable for modals that sit above other content
50
+ - Can be applied to docked surfaces that establish surfaces
51
+ - Works well for popovers and other elevated UI elements
52
+ - Anything that comes into the application's view with a higher stacking context establishes a new surface
53
+
54
+ #### ❌ Don't
55
+
56
+ - Avoid applying any decoration, brand bands, or textures to application backgrounds
57
+ - Avoid using for container elements that sit on top of surfaces (use surface-container instead)
58
+ - Avoid mixing surface colors with container colors in the same layer
59
+ - Don't use surface colors for text or icon fills
60
+ - **Don't assume numbering indicates states**: Surface variants are NOT for hover/active states—those typically use surface-container variants, accent colors, or component-level styling hooks depending on the theme
61
+
62
+ #### Context
63
+
64
+ - Application background (base canvas)
65
+ - Panels that establish new surfaces
66
+ - Modals and dialog backgrounds
67
+ - Docked containers
68
+ - Popovers and elevated UI elements
69
+ - Any element with a higher stacking context than previous surfaces
70
+
71
+ ### Accessibility
72
+
73
+ - Surface colors are designed to work with on-surface colors for proper contrast
74
+ - Ensure WCAG 2.1 color contrast requirements by pairing with appropriate on-surface values
75
+ - Use `--slds-g-color-on-surface-*` for text and icons on surface backgrounds. Choose on-surface level based on content importance and required contrast, not strict number matching. For example, pair `--slds-g-color-surface-1` with `--slds-g-color-on-surface-1` for consistency, though other on-surface levels may be used based on emphasis needs while maintaining accessibility compliance
76
+
77
+ ---
78
+
79
+ ## `--slds-g-color-surface-container-*`
80
+
81
+ ### Description
82
+
83
+ Surface container colors reserved for elements that sit on top of a surface and contain other UI elements or artifacts, such as text or icons.
84
+
85
+ ### Available Hooks
86
+
87
+ - `--slds-g-color-surface-container-1` - Lightest container background (typically white)
88
+ - `--slds-g-color-surface-container-2` - Light gray container background
89
+ - `--slds-g-color-surface-container-3` - Medium gray container background for additional hierarchy
90
+ - `--slds-g-color-surface-container-inverse-1` - Primary inverse surface container background
91
+ - `--slds-g-color-surface-container-inverse-2` - Secondary inverse surface container background
92
+
93
+ > **Note on Inverse Hooks:** Inverse hooks provide dark background colors for containers in dark mode or inverted color schemes. They work with on-surface-inverse hooks to maintain proper contrast for light content on dark container backgrounds.
94
+
95
+ ### Overlap with Surface Hooks
96
+
97
+ Surface and surface-container hooks use the **same color values** (e.g., `surface-1` and `surface-container-1` are both white). The distinction is **semantic**, not visual:
98
+
99
+ - **`surface-*`**: Reserved for page-level backgrounds that establish stacking context
100
+ - **`surface-container-*`**: For contained elements (cards, buttons, panels) that sit **on top of** surfaces
101
+
102
+ **When in doubt**: If the element contains text/icons/UI artifacts, it's a container. If it's the foundational layer (page, modal base, panel background), it's a surface.
103
+
104
+ ### State Progression Logic
105
+
106
+ **Design Intent-Dependent Patterns**: Unlike semantic accent or feedback containers with universal state progressions, surface-container state behavior varies based on design intent and interaction context:
107
+
108
+ - **For neutral hover states**: Use `surface-container-2` for hover states when default is `surface-container-1`
109
+ - **For brand-emphasized hover states**: Use brand colors (e.g., `brand-base-90` from the color palette) instead of surface-container variants
110
+ - **Context-Dependent**: Choice also depends on parent surface color and desired contrast level
111
+
112
+ **Why the variation**: Surface containers serve as neutral, foundational backgrounds for UI elements. Interactive hover states can either maintain neutral emphasis (using surface-container progression) or add brand emphasis (using brand colors from the palette), depending on the design's intent for that specific component.
113
+
114
+ **Best Practice**: Refer to component-level styling hooks for specific interactive patterns. Button, card, and list item components each have their own hover state definitions that may use surface-container variants, brand colors, accent colors, or component-specific styling hooks based on design requirements.
115
+
116
+ **Example**: A neutral card on `surface-1` might use `surface-container-1` as default with `surface-container-2` on hover to maintain neutral emphasis. Alternatively, the same card could use `brand-base-90` on hover if the design calls for brand color emphasis on interaction.
117
+
118
+ ### Usage
119
+
120
+ #### ✅ Do
121
+
122
+ - Works well for cards or containers that sit on surfaces
123
+ - Can be applied to button icons that contain content
124
+ - Effective for button backgrounds
125
+ - Suitable for tabset backgrounds
126
+ - One of the clearest signals is if the element contains text or icons
127
+
128
+ #### ❌ Don't
129
+
130
+ - Avoid using for the base application background
131
+ - Avoid using for elements that don't contain other UI elements
132
+ - Avoid mixing with surface colors on the same visual layer
133
+ - Avoid using for decorative elements that don't establish containers
134
+
135
+ #### Context
136
+
137
+ - Cards or container components
138
+ - Button backgrounds
139
+ - Button icon containers
140
+ - Tabset backgrounds
141
+ - Any element that contains text, icons, or other UI artifacts
142
+ - Interactive containers that sit above surfaces
143
+
144
+ ### Accessibility
145
+
146
+ - All surface container colors are designed to work with `--slds-g-color-on-surface-*` values for proper contrast
147
+ - Ensures proper WCAG 2.1 color contrast requirements are met
148
+ - Choose on-surface level based on content importance and required contrast, not strict number matching. For example, pair `--slds-g-color-surface-container-3` with `--slds-g-color-on-surface-3` for consistency, though other on-surface levels may be used based on emphasis needs while maintaining accessibility compliance
149
+ - Valid to use accent or feedback colors for text/icons on top of surface containers as alternatives (e.g., `--slds-g-color-accent-1`)
150
+
151
+ ---
152
+
153
+ ## `--slds-g-color-on-surface-*`
154
+
155
+ ### Description
156
+
157
+ Foreground colors for text or icons that appear on top of a surface or surface container, ensuring proper color contrast requirements.
158
+
159
+ ### Available Hooks
160
+
161
+ - `--slds-g-color-on-surface-1` - De-emphasized text (lightest gray, for captions and secondary content)
162
+ - `--slds-g-color-on-surface-2` - Body text (medium gray, for standard content and labels)
163
+ - `--slds-g-color-on-surface-3` - High-emphasis text (darkest/black, for headings and primary content)
164
+ - `--slds-g-color-on-surface-inverse-1` - Primary inverse foreground color for inverse surfaces
165
+ - `--slds-g-color-on-surface-inverse-2` - Secondary inverse foreground color for inverse surfaces
166
+
167
+ > **Note on Inverse Hooks:** Inverse hooks provide light foreground colors (text/icons) designed for use on dark surface or surface-container inverse backgrounds. They ensure proper contrast when displaying content in dark mode or inverted color schemes.
168
+
169
+ ### Pairing Logic: Contrast Over Number-Matching
170
+
171
+ While the naming suggests pairing `on-surface-1` with `surface-1`, this is **NOT a strict rule**. Choose on-surface variants based on:
172
+
173
+ 1. **Content importance**: Headlines use `on-surface-3` (highest contrast), body text uses `on-surface-2`, labels/captions use `on-surface-1`
174
+ 2. **Accessibility requirements**: Always maintain 4.5:1 contrast ratio
175
+ 3. **Visual hierarchy needs**: NOT the surface variant number
176
+
177
+ **Example**: A card using `surface-container-1` (white) might contain:
178
+
179
+ - Heading: `on-surface-3` (black)
180
+ - Body text: `on-surface-2` (medium gray)
181
+ - Caption: `on-surface-1` (light gray)
182
+
183
+ All three `on-surface` variants can appear on the same `surface-container-1` background.
184
+
185
+ ### Usage
186
+
187
+ #### ✅ Do
188
+
189
+ - Works well for text that appears on surface or surface container backgrounds
190
+ - Effective for icons displayed on surfaces
191
+ - Suitable for any content that needs to meet WCAG 2.1 color contrast requirements
192
+
193
+ #### ❌ Don't
194
+
195
+ - Avoid using on accent color backgrounds (use on-accent colors instead)
196
+ - Avoid using on feedback color backgrounds (use on-feedback colors instead)
197
+ - Avoid using for large background areas
198
+ - Avoid using as standalone colors without appropriate surface backgrounds
199
+
200
+ #### Context
201
+
202
+ - Text on surface backgrounds
203
+ - Icons on surface or container backgrounds
204
+ - Body copy and content text
205
+ - UI labels and descriptive text
206
+ - Any foreground content requiring readability
207
+
208
+ ### Accessibility
209
+
210
+ - All on-surface colors are AA compliant and maintain a 4.5:1 contrast ratio with their corresponding surface backgrounds
211
+ - Designed specifically to meet Web Content Accessibility Guidelines (WCAG) 2.1
212
+ - Best paired with matching surface or surface-container colors. Choose on-surface level based on content importance and required contrast, not strict number matching. For example, pair `--slds-g-color-on-surface-1` with `--slds-g-color-surface-1` or `--slds-g-color-surface-container-1` for consistency, though other pairings may be used based on emphasis needs while maintaining accessibility compliance
213
+ - Text links can use `--slds-g-color-accent-2` on surface backgrounds
214
+ - Disabled text uses `--slds-g-color-on-disabled-2`
215
+ - Feedback text uses appropriate `--slds-g-color-on-error-*`, `--slds-g-color-on-warning-*`, etc.