Commit b08e7cd
committed
fix: enable Lucide icon rendering in component palette dialog
Fixed two critical issues preventing Lucide icons from rendering in the
palette dialog:
1. Added CommonJS exports shim to allow lucide.js to load in browser
context (matching pattern used in component-dialog.html)
2. Updated Content Security Policy to allow inline scripts by adding
'unsafe-inline' to script-src directive
Changes:
- palette.html: Added lucide.min.js, exports shim, and lucide.js scripts
- palette.html: Updated CSP from "script-src 'self'" to include 'unsafe-inline'
- palette.ts: Removed direct import of initializeLucideIconsFromGlobal
- palette.ts: Added LucideHelperWindow type to access window.lucideHelpers
- palette.ts: Updated all icon hydration calls to use window.lucideHelpers
- palette.ts: Added global icon initialization on DOMContentLoaded
This resolves the issue where component icons and status badge icons
(pin, check) were displaying as empty blue squares instead of SVG icons.1 parent 1488405 commit b08e7cd
2 files changed
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
11 | 18 | | |
12 | 19 | | |
13 | 20 | | |
| |||
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
34 | | - | |
| 41 | + | |
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
| |||
182 | 189 | | |
183 | 190 | | |
184 | 191 | | |
185 | | - | |
| 192 | + | |
186 | 193 | | |
187 | 194 | | |
188 | 195 | | |
| |||
247 | 254 | | |
248 | 255 | | |
249 | 256 | | |
| 257 | + | |
250 | 258 | | |
251 | 259 | | |
252 | 260 | | |
| |||
0 commit comments