@elsahafy/ux-mcp-server 2.0.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/README.md +190 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1766 -0
- package/knowledge/animation.json +469 -0
- package/knowledge/dark-mode.json +212 -0
- package/knowledge/design-tokens.json +286 -0
- package/knowledge/error-messages.json +307 -0
- package/knowledge/i18n.json +464 -0
- package/knowledge/nielsen-heuristics.json +253 -0
- package/knowledge/performance.json +347 -0
- package/knowledge/react-patterns.json +353 -0
- package/knowledge/responsive-design.json +258 -0
- package/knowledge/seo.json +518 -0
- package/knowledge/ui-patterns.json +344 -0
- package/knowledge/wcag-guidelines.json +201 -0
- package/package.json +62 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Design System Principles & Tokens",
|
|
3
|
+
"description": "Foundational design system concepts and token structure",
|
|
4
|
+
"principles": {
|
|
5
|
+
"atomic_design": {
|
|
6
|
+
"name": "Atomic Design Methodology",
|
|
7
|
+
"levels": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Atoms",
|
|
10
|
+
"description": "Basic building blocks (buttons, inputs, labels, icons)",
|
|
11
|
+
"examples": ["Button", "Input", "Label", "Icon", "Badge", "Avatar"],
|
|
12
|
+
"characteristics": [
|
|
13
|
+
"Cannot be broken down further",
|
|
14
|
+
"Highly reusable",
|
|
15
|
+
"Minimal logic"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Molecules",
|
|
20
|
+
"description": "Simple combinations of atoms",
|
|
21
|
+
"examples": ["Search bar (input + button + icon)", "Form field (label + input + helper text)", "Card header (avatar + name + timestamp)"],
|
|
22
|
+
"characteristics": [
|
|
23
|
+
"Single responsibility",
|
|
24
|
+
"Reusable combinations",
|
|
25
|
+
"Simple interactions"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "Organisms",
|
|
30
|
+
"description": "Complex components made of molecules/atoms",
|
|
31
|
+
"examples": ["Navigation bar", "Product card", "Data table", "Form section"],
|
|
32
|
+
"characteristics": [
|
|
33
|
+
"Distinct section of interface",
|
|
34
|
+
"May contain business logic",
|
|
35
|
+
"More specific use cases"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Templates",
|
|
40
|
+
"description": "Page-level layouts",
|
|
41
|
+
"examples": ["Dashboard layout", "Landing page template", "Admin panel"],
|
|
42
|
+
"characteristics": [
|
|
43
|
+
"Define page structure",
|
|
44
|
+
"Show content placement",
|
|
45
|
+
"No actual content yet"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "Pages",
|
|
50
|
+
"description": "Specific instances of templates with real content",
|
|
51
|
+
"examples": ["User dashboard", "Product listing", "Profile page"],
|
|
52
|
+
"characteristics": [
|
|
53
|
+
"Real data and content",
|
|
54
|
+
"Test components in context",
|
|
55
|
+
"End-user facing"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"design_tokens": {
|
|
61
|
+
"description": "Named design decisions that maintain consistency",
|
|
62
|
+
"categories": {
|
|
63
|
+
"color": {
|
|
64
|
+
"structure": {
|
|
65
|
+
"primitive": "Raw values (hex codes)",
|
|
66
|
+
"semantic": "Purpose-based names",
|
|
67
|
+
"component": "Component-specific tokens"
|
|
68
|
+
},
|
|
69
|
+
"example_structure": {
|
|
70
|
+
"primitive": {
|
|
71
|
+
"blue-50": "#eff6ff",
|
|
72
|
+
"blue-500": "#3b82f6",
|
|
73
|
+
"blue-900": "#1e3a8a"
|
|
74
|
+
},
|
|
75
|
+
"semantic": {
|
|
76
|
+
"color-primary": "var(--blue-500)",
|
|
77
|
+
"color-background": "var(--gray-50)",
|
|
78
|
+
"color-text": "var(--gray-900)",
|
|
79
|
+
"color-success": "var(--green-500)",
|
|
80
|
+
"color-error": "var(--red-500)"
|
|
81
|
+
},
|
|
82
|
+
"component": {
|
|
83
|
+
"button-primary-bg": "var(--color-primary)",
|
|
84
|
+
"button-primary-text": "white",
|
|
85
|
+
"input-border": "var(--gray-300)"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"best_practices": [
|
|
89
|
+
"Use semantic naming (not color names in app code)",
|
|
90
|
+
"Define light/dark mode variants",
|
|
91
|
+
"Maintain WCAG AA contrast ratios",
|
|
92
|
+
"Limit palette to 5-7 primary colors"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"spacing": {
|
|
96
|
+
"description": "Consistent spacing scale for margins, padding, gaps",
|
|
97
|
+
"scale": {
|
|
98
|
+
"concept": "Base unit multiplied by scale factor",
|
|
99
|
+
"example": {
|
|
100
|
+
"base_unit": "4px or 8px",
|
|
101
|
+
"scale": {
|
|
102
|
+
"space-1": "4px",
|
|
103
|
+
"space-2": "8px",
|
|
104
|
+
"space-3": "12px",
|
|
105
|
+
"space-4": "16px",
|
|
106
|
+
"space-6": "24px",
|
|
107
|
+
"space-8": "32px",
|
|
108
|
+
"space-12": "48px",
|
|
109
|
+
"space-16": "64px"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"best_practices": [
|
|
114
|
+
"Use scale values only (no arbitrary values)",
|
|
115
|
+
"4px or 8px base unit most common",
|
|
116
|
+
"Consistent spacing creates visual rhythm",
|
|
117
|
+
"Larger spacing for grouping, smaller within groups"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"typography": {
|
|
121
|
+
"scales": {
|
|
122
|
+
"modular_scale": {
|
|
123
|
+
"description": "Mathematically related font sizes",
|
|
124
|
+
"ratios": {
|
|
125
|
+
"minor_third": "1.200",
|
|
126
|
+
"major_third": "1.250",
|
|
127
|
+
"perfect_fourth": "1.333",
|
|
128
|
+
"golden_ratio": "1.618"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"structure": {
|
|
133
|
+
"font_family": {
|
|
134
|
+
"font-sans": "system-ui, -apple-system, sans-serif",
|
|
135
|
+
"font-serif": "Georgia, Cambria, serif",
|
|
136
|
+
"font-mono": "Menlo, Monaco, Courier, monospace"
|
|
137
|
+
},
|
|
138
|
+
"font_size": {
|
|
139
|
+
"text-xs": "0.75rem",
|
|
140
|
+
"text-sm": "0.875rem",
|
|
141
|
+
"text-base": "1rem",
|
|
142
|
+
"text-lg": "1.125rem",
|
|
143
|
+
"text-xl": "1.25rem",
|
|
144
|
+
"text-2xl": "1.5rem",
|
|
145
|
+
"text-3xl": "1.875rem",
|
|
146
|
+
"text-4xl": "2.25rem"
|
|
147
|
+
},
|
|
148
|
+
"font_weight": {
|
|
149
|
+
"font-normal": "400",
|
|
150
|
+
"font-medium": "500",
|
|
151
|
+
"font-semibold": "600",
|
|
152
|
+
"font-bold": "700"
|
|
153
|
+
},
|
|
154
|
+
"line_height": {
|
|
155
|
+
"leading-tight": "1.25",
|
|
156
|
+
"leading-normal": "1.5",
|
|
157
|
+
"leading-relaxed": "1.75"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"best_practices": [
|
|
161
|
+
"Limit to 2-3 font families maximum",
|
|
162
|
+
"Use system fonts for performance",
|
|
163
|
+
"Minimum 16px base font size",
|
|
164
|
+
"1.5 line-height for body text",
|
|
165
|
+
"Scale sizes proportionally"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"shadows": {
|
|
169
|
+
"description": "Elevation and depth",
|
|
170
|
+
"levels": {
|
|
171
|
+
"shadow-sm": "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
172
|
+
"shadow": "0 1px 3px 0 rgba(0, 0, 0, 0.1)",
|
|
173
|
+
"shadow-md": "0 4px 6px -1px rgba(0, 0, 0, 0.1)",
|
|
174
|
+
"shadow-lg": "0 10px 15px -3px rgba(0, 0, 0, 0.1)",
|
|
175
|
+
"shadow-xl": "0 20px 25px -5px rgba(0, 0, 0, 0.1)"
|
|
176
|
+
},
|
|
177
|
+
"usage": {
|
|
178
|
+
"shadow-sm": "Subtle card separation",
|
|
179
|
+
"shadow": "Cards, buttons",
|
|
180
|
+
"shadow-md": "Dropdowns, tooltips",
|
|
181
|
+
"shadow-lg": "Modals, popovers",
|
|
182
|
+
"shadow-xl": "Full-screen overlays"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"border_radius": {
|
|
186
|
+
"scale": {
|
|
187
|
+
"rounded-none": "0",
|
|
188
|
+
"rounded-sm": "2px",
|
|
189
|
+
"rounded": "4px",
|
|
190
|
+
"rounded-md": "6px",
|
|
191
|
+
"rounded-lg": "8px",
|
|
192
|
+
"rounded-xl": "12px",
|
|
193
|
+
"rounded-full": "9999px"
|
|
194
|
+
},
|
|
195
|
+
"usage": {
|
|
196
|
+
"rounded": "Buttons, inputs",
|
|
197
|
+
"rounded-lg": "Cards, panels",
|
|
198
|
+
"rounded-xl": "Modals, large containers",
|
|
199
|
+
"rounded-full": "Pills, avatars, icon buttons"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"animation": {
|
|
203
|
+
"durations": {
|
|
204
|
+
"duration-fast": "150ms",
|
|
205
|
+
"duration-base": "200ms",
|
|
206
|
+
"duration-slow": "300ms",
|
|
207
|
+
"duration-slower": "500ms"
|
|
208
|
+
},
|
|
209
|
+
"easing": {
|
|
210
|
+
"ease-in": "cubic-bezier(0.4, 0, 1, 1)",
|
|
211
|
+
"ease-out": "cubic-bezier(0, 0, 0.2, 1)",
|
|
212
|
+
"ease-in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
213
|
+
},
|
|
214
|
+
"best_practices": [
|
|
215
|
+
"Use ease-out for entrances",
|
|
216
|
+
"Use ease-in for exits",
|
|
217
|
+
"Keep durations under 300ms",
|
|
218
|
+
"Provide prefers-reduced-motion support"
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"component_api_design": {
|
|
224
|
+
"description": "Principles for designing component interfaces",
|
|
225
|
+
"guidelines": [
|
|
226
|
+
{
|
|
227
|
+
"principle": "Composition over Configuration",
|
|
228
|
+
"description": "Favor composable components over complex prop APIs",
|
|
229
|
+
"example": {
|
|
230
|
+
"good": "<Card>\n <CardHeader>Title</CardHeader>\n <CardContent>Body</CardContent>\n</Card>",
|
|
231
|
+
"bad": "<Card title='Title' content='Body' />"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"principle": "Sensible Defaults",
|
|
236
|
+
"description": "Components work well out-of-box without configuration",
|
|
237
|
+
"example": {
|
|
238
|
+
"good": "<Button>Click me</Button> // works without props",
|
|
239
|
+
"bad": "<Button type='button' color='primary' size='medium'>Click</Button> // requires many props"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"principle": "Progressive Enhancement",
|
|
244
|
+
"description": "Start simple, add features as needed",
|
|
245
|
+
"layers": [
|
|
246
|
+
"Basic functionality works with no props",
|
|
247
|
+
"Common customizations via props",
|
|
248
|
+
"Advanced use cases via composition/slots"
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"principle": "Consistent Naming",
|
|
253
|
+
"description": "Use consistent prop names across components",
|
|
254
|
+
"examples": [
|
|
255
|
+
"size: 'sm' | 'md' | 'lg' (not small/medium/large)",
|
|
256
|
+
"variant: 'primary' | 'secondary' | 'ghost'",
|
|
257
|
+
"disabled, loading, error (boolean props)",
|
|
258
|
+
"onX pattern for events: onClick, onChange, onSubmit"
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"implementation_checklist": [
|
|
265
|
+
"Define color palette with semantic naming",
|
|
266
|
+
"Create spacing scale (base 4px or 8px)",
|
|
267
|
+
"Establish typography scale and weights",
|
|
268
|
+
"Define shadow levels for elevation",
|
|
269
|
+
"Set border-radius values",
|
|
270
|
+
"Create animation durations and easing",
|
|
271
|
+
"Build atomic components (buttons, inputs)",
|
|
272
|
+
"Compose molecules from atoms",
|
|
273
|
+
"Document component APIs",
|
|
274
|
+
"Provide usage examples",
|
|
275
|
+
"Test dark mode support",
|
|
276
|
+
"Ensure accessibility (WCAG AA)",
|
|
277
|
+
"Create component playground/storybook"
|
|
278
|
+
],
|
|
279
|
+
"tools": [
|
|
280
|
+
"Figma Variables for design tokens",
|
|
281
|
+
"Style Dictionary for code generation",
|
|
282
|
+
"Storybook for component documentation",
|
|
283
|
+
"Chromatic for visual testing",
|
|
284
|
+
"Axe DevTools for accessibility"
|
|
285
|
+
]
|
|
286
|
+
}
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Error Message Library",
|
|
3
|
+
"description": "User-friendly, accessible error messages for common scenarios",
|
|
4
|
+
"principles": {
|
|
5
|
+
"good_error_messages": [
|
|
6
|
+
"Explain what went wrong in plain language",
|
|
7
|
+
"Tell the user how to fix it",
|
|
8
|
+
"Be specific, not generic",
|
|
9
|
+
"Use positive, helpful tone",
|
|
10
|
+
"Avoid technical jargon",
|
|
11
|
+
"Include relevant context",
|
|
12
|
+
"Provide next steps or alternatives"
|
|
13
|
+
],
|
|
14
|
+
"avoid": [
|
|
15
|
+
"Generic messages ('An error occurred')",
|
|
16
|
+
"Technical error codes alone ('Error 500')",
|
|
17
|
+
"Blaming the user ('You did X wrong')",
|
|
18
|
+
"Overwhelming details",
|
|
19
|
+
"Unclear next steps"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"categories": {
|
|
23
|
+
"authentication": {
|
|
24
|
+
"invalid_credentials": {
|
|
25
|
+
"bad": "Invalid username or password",
|
|
26
|
+
"good": "We couldn't find an account with that email and password combination. Please check your credentials and try again.",
|
|
27
|
+
"extra_help": "Link to password reset",
|
|
28
|
+
"security_note": "Don't reveal which field is wrong (email vs password) to prevent enumeration attacks"
|
|
29
|
+
},
|
|
30
|
+
"account_locked": {
|
|
31
|
+
"message": "Your account has been temporarily locked for security reasons after multiple failed login attempts.",
|
|
32
|
+
"action": "Try again in 15 minutes or reset your password to unlock immediately.",
|
|
33
|
+
"tone": "Reassuring, not alarming"
|
|
34
|
+
},
|
|
35
|
+
"password_reset_required": {
|
|
36
|
+
"message": "For your security, you need to reset your password before continuing.",
|
|
37
|
+
"action": "Click the button below to reset your password.",
|
|
38
|
+
"context": "Explain why (policy, breach, etc.)"
|
|
39
|
+
},
|
|
40
|
+
"session_expired": {
|
|
41
|
+
"message": "Your session has expired for security reasons.",
|
|
42
|
+
"action": "Please log in again to continue.",
|
|
43
|
+
"helpful": "Save your work before expiration with auto-save"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"validation": {
|
|
47
|
+
"required_field": {
|
|
48
|
+
"generic": "[Field name] is required",
|
|
49
|
+
"specific_examples": {
|
|
50
|
+
"email": "Please enter your email address",
|
|
51
|
+
"password": "Please create a password",
|
|
52
|
+
"name": "Please enter your name"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"invalid_format": {
|
|
56
|
+
"email": {
|
|
57
|
+
"message": "Please enter a valid email address (e.g., name@example.com)",
|
|
58
|
+
"trigger": "After @ missing or invalid domain"
|
|
59
|
+
},
|
|
60
|
+
"phone": {
|
|
61
|
+
"message": "Please enter a valid phone number (e.g., (555) 123-4567)",
|
|
62
|
+
"show_format": "Display expected format in helper text"
|
|
63
|
+
},
|
|
64
|
+
"url": {
|
|
65
|
+
"message": "Please enter a valid URL starting with http:// or https://",
|
|
66
|
+
"example": "https://www.example.com"
|
|
67
|
+
},
|
|
68
|
+
"date": {
|
|
69
|
+
"message": "Please enter a valid date in MM/DD/YYYY format",
|
|
70
|
+
"provide_picker": "Use native date picker when possible"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"length_requirements": {
|
|
74
|
+
"too_short": {
|
|
75
|
+
"generic": "[Field] must be at least X characters",
|
|
76
|
+
"password_example": "Password must be at least 8 characters long",
|
|
77
|
+
"show_count": "Display character counter"
|
|
78
|
+
},
|
|
79
|
+
"too_long": {
|
|
80
|
+
"message": "[Field] must be less than X characters",
|
|
81
|
+
"show_count": "Display remaining characters"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"pattern_requirements": {
|
|
85
|
+
"password_weak": {
|
|
86
|
+
"message": "Password must include at least one uppercase letter, one number, and one special character",
|
|
87
|
+
"realtime": "Show requirements checklist that updates as user types"
|
|
88
|
+
},
|
|
89
|
+
"username_invalid": {
|
|
90
|
+
"message": "Username can only contain letters, numbers, and underscores",
|
|
91
|
+
"example": "For example: user_name123"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"value_constraints": {
|
|
95
|
+
"number_too_low": {
|
|
96
|
+
"message": "[Field] must be at least X",
|
|
97
|
+
"example": "Quantity must be at least 1"
|
|
98
|
+
},
|
|
99
|
+
"number_too_high": {
|
|
100
|
+
"message": "[Field] cannot exceed X",
|
|
101
|
+
"example": "You can order a maximum of 10 items"
|
|
102
|
+
},
|
|
103
|
+
"date_in_past": {
|
|
104
|
+
"message": "Date must be in the future",
|
|
105
|
+
"context": "For scheduling, bookings, etc."
|
|
106
|
+
},
|
|
107
|
+
"date_too_far": {
|
|
108
|
+
"message": "Date cannot be more than X days/months in the future",
|
|
109
|
+
"helpful": "Show available date range"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"network_errors": {
|
|
114
|
+
"offline": {
|
|
115
|
+
"message": "You appear to be offline. Please check your internet connection and try again.",
|
|
116
|
+
"action": "Automatically retry when connection restored",
|
|
117
|
+
"helpful": "Show connection status indicator"
|
|
118
|
+
},
|
|
119
|
+
"timeout": {
|
|
120
|
+
"message": "The request is taking longer than expected. This might be due to a slow connection.",
|
|
121
|
+
"action": "Would you like to keep waiting or try again?",
|
|
122
|
+
"buttons": ["Keep Waiting", "Try Again"]
|
|
123
|
+
},
|
|
124
|
+
"server_error": {
|
|
125
|
+
"user_facing": "Something went wrong on our end. We're working to fix it.",
|
|
126
|
+
"action": "Please try again in a few minutes.",
|
|
127
|
+
"helpful": "Include error ID for support: 'Error ID: ABC123'",
|
|
128
|
+
"avoid": "Exposing stack traces or technical details"
|
|
129
|
+
},
|
|
130
|
+
"rate_limited": {
|
|
131
|
+
"message": "You're doing that too quickly. Please wait a moment before trying again.",
|
|
132
|
+
"action": "You can try again in X seconds.",
|
|
133
|
+
"show_timer": "Display countdown"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"permissions": {
|
|
137
|
+
"not_authorized": {
|
|
138
|
+
"message": "You don't have permission to access this feature.",
|
|
139
|
+
"action": "Contact your administrator if you believe this is a mistake.",
|
|
140
|
+
"helpful": "Link to help or support"
|
|
141
|
+
},
|
|
142
|
+
"browser_permission": {
|
|
143
|
+
"camera": {
|
|
144
|
+
"message": "This feature needs access to your camera.",
|
|
145
|
+
"action": "Click 'Allow' in the browser prompt to continue.",
|
|
146
|
+
"alternative": "Or upload a photo instead"
|
|
147
|
+
},
|
|
148
|
+
"location": {
|
|
149
|
+
"message": "We need your location to show nearby results.",
|
|
150
|
+
"action": "Click 'Allow' when prompted, or enter your location manually.",
|
|
151
|
+
"privacy": "Explain how location is used"
|
|
152
|
+
},
|
|
153
|
+
"notifications": {
|
|
154
|
+
"message": "Enable notifications to stay updated.",
|
|
155
|
+
"action": "Click 'Allow' to receive notifications, or adjust this later in settings.",
|
|
156
|
+
"optional": "Make it clear notifications are optional"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"business_logic": {
|
|
161
|
+
"out_of_stock": {
|
|
162
|
+
"message": "This item is currently out of stock.",
|
|
163
|
+
"action": "Get notified when it's back in stock",
|
|
164
|
+
"alternative": "View similar items"
|
|
165
|
+
},
|
|
166
|
+
"promo_expired": {
|
|
167
|
+
"message": "This promotional code has expired.",
|
|
168
|
+
"action": "Check our current offers",
|
|
169
|
+
"helpful": "Show expiration date if known"
|
|
170
|
+
},
|
|
171
|
+
"payment_declined": {
|
|
172
|
+
"message": "Your payment couldn't be processed.",
|
|
173
|
+
"reasons": [
|
|
174
|
+
"The card details might be incorrect",
|
|
175
|
+
"There might be insufficient funds",
|
|
176
|
+
"Your bank might be blocking the transaction"
|
|
177
|
+
],
|
|
178
|
+
"action": "Please check your payment details or try a different payment method.",
|
|
179
|
+
"support": "Contact your bank if the problem persists"
|
|
180
|
+
},
|
|
181
|
+
"age_restriction": {
|
|
182
|
+
"message": "You must be 18 or older to access this content.",
|
|
183
|
+
"action": "Please verify your age to continue.",
|
|
184
|
+
"comply": "Explain legal requirement"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"file_upload": {
|
|
188
|
+
"file_too_large": {
|
|
189
|
+
"message": "This file is too large. Maximum file size is X MB.",
|
|
190
|
+
"action": "Please choose a smaller file or compress your image.",
|
|
191
|
+
"helpful": "Show current file size"
|
|
192
|
+
},
|
|
193
|
+
"invalid_file_type": {
|
|
194
|
+
"message": "This file type isn't supported. Please upload a JPG, PNG, or PDF file.",
|
|
195
|
+
"show_accepted": "Display accepted formats clearly"
|
|
196
|
+
},
|
|
197
|
+
"upload_failed": {
|
|
198
|
+
"message": "Upload failed. This might be due to a connection issue.",
|
|
199
|
+
"action": "Please try again or choose a different file.",
|
|
200
|
+
"preserve": "Don't lose other form data on failure"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"search_results": {
|
|
204
|
+
"no_results": {
|
|
205
|
+
"message": "No results found for '[search term]'",
|
|
206
|
+
"suggestions": [
|
|
207
|
+
"Check your spelling",
|
|
208
|
+
"Try different keywords",
|
|
209
|
+
"Use fewer or more general terms"
|
|
210
|
+
],
|
|
211
|
+
"alternatives": "Show popular searches or categories"
|
|
212
|
+
},
|
|
213
|
+
"too_many_results": {
|
|
214
|
+
"message": "Your search returned too many results to display.",
|
|
215
|
+
"action": "Try adding more specific terms to narrow your search.",
|
|
216
|
+
"helpful": "Suggest filters"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"system_messages": {
|
|
220
|
+
"maintenance": {
|
|
221
|
+
"planned": {
|
|
222
|
+
"advance_notice": "Scheduled maintenance on [date] from [time] to [time]. Some features may be unavailable.",
|
|
223
|
+
"during": "We're currently performing scheduled maintenance. We'll be back shortly.",
|
|
224
|
+
"estimate": "Always provide estimated completion time"
|
|
225
|
+
},
|
|
226
|
+
"unexpected": {
|
|
227
|
+
"message": "We're experiencing technical difficulties and are working to resolve them.",
|
|
228
|
+
"action": "Please check back shortly.",
|
|
229
|
+
"updates": "Link to status page for updates"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"deprecation": {
|
|
233
|
+
"message": "This feature will be discontinued on [date].",
|
|
234
|
+
"action": "Please switch to [new feature] before then.",
|
|
235
|
+
"migration": "Provide migration guide or support"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"tone_guidelines": {
|
|
240
|
+
"do": [
|
|
241
|
+
"Use conversational language",
|
|
242
|
+
"Be empathetic and understanding",
|
|
243
|
+
"Focus on solutions, not problems",
|
|
244
|
+
"Take responsibility when it's our fault",
|
|
245
|
+
"Provide clear next steps",
|
|
246
|
+
"Use 'we' and 'us' (not 'the system')"
|
|
247
|
+
],
|
|
248
|
+
"dont": [
|
|
249
|
+
"Use jargon or technical terms",
|
|
250
|
+
"Blame the user",
|
|
251
|
+
"Be vague or unclear",
|
|
252
|
+
"Use angry or frustrated tone",
|
|
253
|
+
"Overwhelm with information",
|
|
254
|
+
"Make jokes about errors"
|
|
255
|
+
]
|
|
256
|
+
},
|
|
257
|
+
"formatting": {
|
|
258
|
+
"structure": {
|
|
259
|
+
"title": "Brief summary (5-10 words)",
|
|
260
|
+
"description": "Explanation of what went wrong",
|
|
261
|
+
"action": "Clear next step(s)",
|
|
262
|
+
"additional_help": "Links or alternatives (optional)"
|
|
263
|
+
},
|
|
264
|
+
"visual_elements": [
|
|
265
|
+
"Icon to indicate error type (⚠️ warning, ❌ error, ℹ️ info)",
|
|
266
|
+
"Color coding (red for errors, yellow for warnings)",
|
|
267
|
+
"Highlight the problematic field in forms",
|
|
268
|
+
"Use sufficient contrast for readability"
|
|
269
|
+
],
|
|
270
|
+
"placement": {
|
|
271
|
+
"inline": "Next to field for form validation",
|
|
272
|
+
"toast": "For non-critical system messages",
|
|
273
|
+
"modal": "For critical errors requiring acknowledgment",
|
|
274
|
+
"banner": "For system-wide issues"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"accessibility": [
|
|
278
|
+
"Use role='alert' for critical errors",
|
|
279
|
+
"Announce errors to screen readers with aria-live",
|
|
280
|
+
"Link error summary to specific fields with aria-describedby",
|
|
281
|
+
"Don't rely on color alone",
|
|
282
|
+
"Include text with icons",
|
|
283
|
+
"Make error messages keyboard accessible",
|
|
284
|
+
"Move focus to error on form submission"
|
|
285
|
+
],
|
|
286
|
+
"internationalization": {
|
|
287
|
+
"considerations": [
|
|
288
|
+
"Write messages that can be easily translated",
|
|
289
|
+
"Avoid idioms or cultural references",
|
|
290
|
+
"Account for text expansion (some languages are 30-40% longer)",
|
|
291
|
+
"Use placeholders for dynamic content: '{fieldName} is required'",
|
|
292
|
+
"Provide context for translators"
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
"testing": {
|
|
296
|
+
"checklist": [
|
|
297
|
+
"Test all error scenarios",
|
|
298
|
+
"Verify messages are clear to non-technical users",
|
|
299
|
+
"Check tone is appropriate",
|
|
300
|
+
"Ensure next steps are actionable",
|
|
301
|
+
"Test with screen readers",
|
|
302
|
+
"Verify error recovery flows work",
|
|
303
|
+
"Check messages in different languages",
|
|
304
|
+
"Validate character limits for UI"
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
}
|