@salesforce/webapp-template-feature-react-authentication-experimental 1.109.4 → 1.109.5

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 (25) hide show
  1. package/dist/CHANGELOG.md +8 -0
  2. package/dist/force-app/main/default/webapplications/feature-react-authentication/package.json +5 -5
  3. package/dist/package-lock.json +2 -2
  4. package/dist/package.json +1 -1
  5. package/package.json +2 -2
  6. package/dist/.a4drules/skills/designing-webapp-ui-ux/SKILL.md +0 -271
  7. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/charts.csv +0 -26
  8. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/colors.csv +0 -97
  9. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/icons.csv +0 -101
  10. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/landing.csv +0 -31
  11. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/products.csv +0 -97
  12. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/react-performance.csv +0 -45
  13. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/stacks/html-tailwind.csv +0 -56
  14. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/stacks/react.csv +0 -54
  15. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/stacks/shadcn.csv +0 -61
  16. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/styles.csv +0 -68
  17. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/typography.csv +0 -58
  18. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/ui-reasoning.csv +0 -101
  19. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/ux-guidelines.csv +0 -100
  20. package/dist/.a4drules/skills/designing-webapp-ui-ux/data/web-interface.csv +0 -31
  21. package/dist/.a4drules/skills/designing-webapp-ui-ux/scripts/core.js +0 -255
  22. package/dist/.a4drules/skills/designing-webapp-ui-ux/scripts/design_system.js +0 -861
  23. package/dist/.a4drules/skills/designing-webapp-ui-ux/scripts/search.js +0 -98
  24. package/dist/.a4drules/skills/integrating-unsplash-images/SKILL.md +0 -71
  25. package/dist/.a4drules/skills/integrating-unsplash-images/implementation/usage.md +0 -159
@@ -1,98 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, searchStack } from './core.js';
4
- import { generateDesignSystem } from './design_system.js';
5
-
6
- // ============ ARG PARSER ============
7
-
8
- function parseArgs(argv) {
9
- const args = { query: null, maxResults: MAX_RESULTS, format: 'ascii' };
10
- let i = 2;
11
- while (i < argv.length) {
12
- const a = argv[i];
13
- if (a === '--domain' || a === '-d') { args.domain = argv[++i]; }
14
- else if (a === '--stack' || a === '-s') { args.stack = argv[++i]; }
15
- else if (a === '--max-results' || a === '-n') { args.maxResults = parseInt(argv[++i], 10); }
16
- else if (a === '--json') { args.json = true; }
17
- else if (a === '--design-system' || a === '-ds') { args.designSystem = true; }
18
- else if (a === '--project-name' || a === '-p') { args.projectName = argv[++i]; }
19
- else if (a === '--format' || a === '-f') { args.format = argv[++i]; }
20
- else if (a === '--persist') { args.persist = true; }
21
- else if (a === '--page') { args.page = argv[++i]; }
22
- else if (a === '--output-dir' || a === '-o') { args.outputDir = argv[++i]; }
23
- else if (!a.startsWith('-') && !args.query) { args.query = a; }
24
- i++;
25
- }
26
- return args;
27
- }
28
-
29
- // ============ FORMATTER ============
30
-
31
- function formatOutput(result) {
32
- if (result.error) return `Error: ${result.error}`;
33
-
34
- const lines = [];
35
- if (result.stack) {
36
- lines.push('## UI Pro Max Stack Guidelines');
37
- lines.push(`**Stack:** ${result.stack} | **Query:** ${result.query}`);
38
- } else {
39
- lines.push('## UI Pro Max Search Results');
40
- lines.push(`**Domain:** ${result.domain} | **Query:** ${result.query}`);
41
- }
42
- lines.push(`**Source:** ${result.file} | **Found:** ${result.count} results\n`);
43
-
44
- (result.results || []).forEach((row, i) => {
45
- lines.push(`### Result ${i + 1}`);
46
- for (const [key, value] of Object.entries(row)) {
47
- const v = String(value);
48
- lines.push(`- **${key}:** ${v.length > 300 ? v.slice(0, 300) + '...' : v}`);
49
- }
50
- lines.push('');
51
- });
52
-
53
- return lines.join('\n');
54
- }
55
-
56
- // ============ MAIN ============
57
-
58
- const args = parseArgs(process.argv);
59
-
60
- if (!args.query) {
61
- console.error('Usage: node search.js "<query>" [--domain <d>] [--stack <s>] [--design-system] [-p "Name"]');
62
- console.error(`Domains: ${Object.keys(CSV_CONFIG).join(', ')}`);
63
- console.error(`Stacks: ${AVAILABLE_STACKS.join(', ')}`);
64
- process.exit(1);
65
- }
66
-
67
- if (args.designSystem) {
68
- const result = generateDesignSystem(
69
- args.query,
70
- args.projectName,
71
- args.format,
72
- !!args.persist,
73
- args.page || null,
74
- args.outputDir || null
75
- );
76
- console.log(result);
77
-
78
- if (args.persist) {
79
- const slug = args.projectName ? args.projectName.toLowerCase().replace(/\s+/g, '-') : 'default';
80
- console.log('\n' + '='.repeat(60));
81
- console.log(`✅ Design system persisted to design-system/${slug}/`);
82
- console.log(` 📄 design-system/${slug}/MASTER.md (Global Source of Truth)`);
83
- if (args.page) {
84
- const pageSlug = args.page.toLowerCase().replace(/\s+/g, '-');
85
- console.log(` 📄 design-system/${slug}/pages/${pageSlug}.md (Page Overrides)`);
86
- }
87
- console.log('');
88
- console.log(`📖 Usage: When building a page, check design-system/${slug}/pages/[page].md first.`);
89
- console.log(` If exists, its rules override MASTER.md. Otherwise, use MASTER.md.`);
90
- console.log('='.repeat(60));
91
- }
92
- } else if (args.stack) {
93
- const result = searchStack(args.query, args.stack, args.maxResults);
94
- console.log(args.json ? JSON.stringify(result, null, 2) : formatOutput(result));
95
- } else {
96
- const result = search(args.query, args.domain, args.maxResults);
97
- console.log(args.json ? JSON.stringify(result, null, 2) : formatOutput(result));
98
- }
@@ -1,71 +0,0 @@
1
- ---
2
- name: integrating-unsplash-images
3
- description: Adds high-quality Unsplash images to React pages. Use when the user asks to add a hero image, background image, placeholder image, stock photo, decorative image, or any Unsplash-sourced imagery to the web application.
4
- ---
5
-
6
- # Unsplash Images
7
-
8
- ## When to Use
9
-
10
- Use this skill when:
11
- - Adding hero banners, section backgrounds, or decorative images
12
- - The user asks for stock photography or placeholder images
13
- - A page needs visual appeal without custom assets
14
-
15
- ---
16
-
17
- ## Step 1 — Determine image purpose
18
-
19
- Identify what the image is for:
20
-
21
- - **Hero / banner** — full-width background behind text or a CTA
22
- - **Section accent** — smaller image alongside content (stats, testimonials, features)
23
- - **Card thumbnail** — image inside a card component
24
- - **Background texture** — subtle decorative background
25
-
26
- If unclear, ask:
27
-
28
- > "Where should the image appear — as a hero banner, a section accent, or a card thumbnail?"
29
-
30
- ---
31
-
32
- ## Step 2 — Select the right Unsplash URL format
33
-
34
- Read `implementation/usage.md` for the full reference. Key rules:
35
-
36
- 1. **Always use `images.unsplash.com/photo-{id}` format** with explicit `w` and `q` parameters.
37
- 2. **Never use `source.unsplash.com`** — it is deprecated and returns 404s.
38
- 3. **Pin every image by its photo ID** — never rely on random or search endpoints.
39
-
40
- ---
41
-
42
- ## Step 3 — Validate image URLs
43
-
44
- Before using any Unsplash URL in code:
45
-
46
- 1. Open the URL in a browser or fetch it to confirm it returns a 200 status and a valid image.
47
- 2. If the URL returns a 404, redirect loop, or broken image, **discard it** and pick a different photo ID.
48
- 3. Never ship a URL you have not personally verified.
49
-
50
- ---
51
-
52
- ## Step 4 — Implementation
53
-
54
- Read `implementation/usage.md` and follow the instructions there.
55
-
56
- ---
57
-
58
- ## Verification
59
-
60
- Before completing:
61
-
62
- 1. Confirm every Unsplash URL loads a valid image (no 404, no redirect loops).
63
- 2. Confirm `alt` text is set appropriately (empty `alt=""` for decorative, descriptive for meaningful).
64
- 3. Run from the web app directory:
65
-
66
- ```bash
67
- cd force-app/main/default/webapplications/<appName> && npm run lint && npm run build
68
- ```
69
-
70
- - **Lint:** MUST result in 0 errors.
71
- - **Build:** MUST succeed.
@@ -1,159 +0,0 @@
1
- # Unsplash Images — Implementation Guide
2
-
3
- ## URL Format
4
-
5
- Always use the direct `images.unsplash.com` format with explicit sizing:
6
-
7
- ```
8
- https://images.unsplash.com/photo-{PHOTO_ID}?w={WIDTH}&q={QUALITY}
9
- ```
10
-
11
- | Parameter | Purpose | Recommended values |
12
- |-----------|---------|--------------------|
13
- | `w` | Pixel width served by the CDN | `600` card, `800` section, `1200` hero, `1920` full-bleed |
14
- | `q` | JPEG quality 1–100 | `80`–`85` (good balance of quality vs size) |
15
-
16
- ### Deprecated / broken formats — do NOT use
17
-
18
- | Format | Why it fails |
19
- |--------|-------------|
20
- | `source.unsplash.com/random` | Deprecated; returns 404 |
21
- | `source.unsplash.com/{WIDTH}x{HEIGHT}` | Deprecated; returns 404 |
22
- | `source.unsplash.com/featured/?{query}` | Deprecated; returns 404 |
23
-
24
- ---
25
-
26
- ## How to find a valid photo ID
27
-
28
- 1. Go to [unsplash.com](https://unsplash.com) and search for the subject (e.g. "modern apartment").
29
- 2. Open a photo. The URL will look like `unsplash.com/photos/{slug}-{PHOTO_ID}` or `unsplash.com/photos/{PHOTO_ID}`.
30
- 3. The `PHOTO_ID` is the last hyphen-separated segment (e.g. `photo-1600596542815-ffad4c1539a9`).
31
- 4. Build your URL: `https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=1200&q=85`
32
- 5. **Test the URL** in a browser before committing.
33
-
34
- ---
35
-
36
- ## Declaring image constants
37
-
38
- Define all Unsplash URLs as named constants at the top of the file. Never inline URLs in JSX.
39
-
40
- ```tsx
41
- const HERO_IMAGE = "https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=1200&q=85";
42
- const SECTION_IMAGE = "https://images.unsplash.com/photo-1514565131-fce0801e5785?w=800&q=85";
43
- ```
44
-
45
- ---
46
-
47
- ## Rendering images in JSX
48
-
49
- ### Hero / banner (decorative — empty alt)
50
-
51
- ```tsx
52
- <div className="relative w-full overflow-hidden rounded-2xl">
53
- <div className="relative aspect-[21/9] min-h-[280px] w-full md:aspect-[3/1]">
54
- <img
55
- src={HERO_IMAGE}
56
- alt=""
57
- className="h-full w-full object-cover"
58
- loading="eager"
59
- fetchPriority="high"
60
- />
61
- <div className="absolute inset-0 bg-black/40" />
62
- <div className="absolute inset-0 flex flex-col items-center justify-center px-4">
63
- {/* overlay content */}
64
- </div>
65
- </div>
66
- </div>
67
- ```
68
-
69
- Key points:
70
- - `alt=""` for decorative images (screen readers skip them).
71
- - `loading="eager"` and `fetchPriority="high"` for above-the-fold heroes.
72
- - `object-cover` prevents stretching.
73
- - Semi-transparent overlay (`bg-black/40`) ensures text readability.
74
-
75
- ### Section accent (meaningful — descriptive alt)
76
-
77
- ```tsx
78
- <div className="relative min-h-[240px] overflow-hidden rounded-2xl">
79
- <img src={SECTION_IMAGE} alt="City skyline at sunset" className="h-full w-full object-cover" />
80
- <div className="absolute inset-0 bg-gradient-to-r from-black/20 to-transparent" />
81
- </div>
82
- ```
83
-
84
- ### Card thumbnail
85
-
86
- ```tsx
87
- <div className="aspect-[4/3] overflow-hidden bg-muted">
88
- <img
89
- src={imageUrl}
90
- alt=""
91
- className="h-full w-full object-cover transition-transform hover:scale-105"
92
- loading="lazy"
93
- />
94
- </div>
95
- ```
96
-
97
- Key points:
98
- - `loading="lazy"` for below-the-fold images.
99
- - `hover:scale-105` subtle zoom on hover.
100
- - `bg-muted` fallback color while loading.
101
-
102
- ---
103
-
104
- ## Fallback when no image is available
105
-
106
- Always provide a placeholder when the image URL may be null:
107
-
108
- ```tsx
109
- {imageUrl ? (
110
- <img src={imageUrl} alt="" className="h-full w-full object-cover" />
111
- ) : (
112
- <div className="flex h-full items-center justify-center text-muted-foreground">
113
- No image
114
- </div>
115
- )}
116
- ```
117
-
118
- ---
119
-
120
- ## Content Security Policy (CSP)
121
-
122
- If the application enforces CSP headers, add `images.unsplash.com` to `img-src`:
123
-
124
- ```
125
- img-src 'self' https://images.unsplash.com;
126
- ```
127
-
128
- Other commonly needed origins for stock images:
129
-
130
- | Origin | Purpose |
131
- |--------|---------|
132
- | `images.unsplash.com` | Unsplash photos |
133
- | `images.pexels.com` | Pexels photos |
134
- | `fonts.googleapis.com` | Google Fonts CSS |
135
- | `fonts.gstatic.com` | Google Fonts files |
136
-
137
- ---
138
-
139
- ## Accessibility checklist
140
-
141
- - [ ] Decorative images have `alt=""`
142
- - [ ] Meaningful images have descriptive `alt` text
143
- - [ ] Hero images use `loading="eager"` and `fetchPriority="high"`
144
- - [ ] Below-fold images use `loading="lazy"`
145
- - [ ] Text over images has sufficient contrast (use overlay like `bg-black/40`)
146
- - [ ] All URLs verified to return a valid image (no 404s)
147
-
148
- ---
149
-
150
- ## Common mistakes
151
-
152
- | Mistake | Fix |
153
- |---------|-----|
154
- | Using `source.unsplash.com` | Replace with `images.unsplash.com/photo-{id}?w=…&q=…` |
155
- | Hardcoding an unverified URL | Open URL in browser first; replace if broken |
156
- | Missing `w` parameter | Always set width — CDN returns full-res (5000px+) otherwise |
157
- | `loading="lazy"` on hero | Use `loading="eager"` for above-the-fold images |
158
- | No fallback for nullable URLs | Wrap in conditional with placeholder div |
159
- | Inline URLs in JSX | Extract to named constants at file top |