13 Commits

Author SHA1 Message Date
df2691d918 Add reverse lookup, passthrough, and expand icon map
- Reverse lookup: resolveNative() maps Material/FA names to semantic keys
- Passthrough: unknown Material icon names render as-is when theme uses Material
- New icons: cancel, check-circle, error-circle, return, add-to-cart, payment,
  wallet, cloud-upload, sync, swap-vert, send, undo, attach, hand, note,
  summary, category, grid, view-grid, layers, palette, aspect-ratio, ruler,
  architecture, scale, zoom-in, zoom-out, security, file-document, quote, receipt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 11:12:36 +00:00
beee228691 Add reverse-lookup, send/quote/receipt/undo icons
- MprIcons::get() now accepts native Material/FA icon names via reverse lookup
  (e.g. {mpr_icon name='person'} resolves to 'account' semantic)
- New icons: send, quote, receipt, undo
- Enables dynamic icon rendering from PHP data without semantic mapping

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 10:25:47 +00:00
ddcc8093a0 Increase CSS scan to 200KB for font-face detection
PS 8.2 classic theme.css is 194KB with Material Icons font-face
at byte 85693 — the 50KB limit missed it entirely. Now reads
in 100KB chunks up to 200KB.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v1.0.0
2026-02-14 09:58:13 +00:00
b75eb1454f Fix icon detection: check theme.css content for Material Icons
PS 1.7+ classic theme bundles Material Icons inside theme.css via
webpack — no separate material-icons.css file exists. The old
detection only scanned filenames, so it wrongly defaulted to FA.

Now reads the first 50KB of theme.css to check for 'Material Icons'
or 'FontAwesome' font-face declarations. Falls back to version-based
default: Material for PS 1.7+, FA for PS 1.6.

Also fixes themeHasIconFont() to use the same CSS content check,
so self-hosted icons are correctly skipped when the theme provides them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 09:56:49 +00:00
5b3374e2d5 Add Smarty plugin, auto-detect theme icons, PS 1.6 compat, new icons
- Add {mpr_icon name='x'} Smarty plugin for .tpl templates
- Auto-detect theme icon set (FA vs Material) without config
- Self-host icon fonts automatically if theme doesn't include them
- PS 1.6 compatible (addCSS fallback for registerStylesheet)
- Add 16 new icons: camera, play, video, chart, pie-chart, trending-up/down,
  tune, build, swap, touch, inventory, payments, campaign, trophy,
  schedule, history, verified, bolt
- Simplify MprIconsAssets: automatic inclusion, no config toggle needed
- Multiple modules calling registerAssets = single CSS load (dedup)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 09:33:48 +00:00
99a8f5bf9b Add shape prefix to symbol IDs, fix brand naming, add assets
- Symbol IDs now include shape for uniqueness: {shape}_{brand}_{mode}
  e.g., text-only_paypal_lm, rectangle_visa_la, icon_mastercard_dm
- Fixed brand name inconsistencies:
  - amazon_pay → amazon
  - naverpay → naver_pay
  - p24 → przelewy24
  - direct_debit → bacs (unified BACS Direct Debit name)
- Added font assets (FontAwesome, Material Icons)
- Added MprIconsAssets and MprIconsConfig classes
- Updated preview.html with shape parameter support
- All 752 icons complete (38 payment × 4 shapes × 4 modes + 12 social × 3 shapes × 4 modes)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 10:17:23 +00:00
f292284a2e Update preview.html with better descriptions and all shapes
- Clarify shape descriptions (icon = logo mark only, rectangle = icon + text)
- Add text-only sections for both payments and socials
- Use proper 150x100 aspect ratio for rectangle/full-logo/text-only
- Add grid-wide CSS class for wider icon display

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:46:42 +00:00
d694f9f21f Fix source file naming, rebuild sprites, add dev tools
- Fix bank_transfer -> bank naming in icon/square shapes
- Fix quote_la -> quote_lm in light-mode directories
- Fix rectangle naming (amazon_pay, bacs, naverpay, p24)
- Fix case sensitivity (LinkedIn -> linkedin, Bancontact -> bancontact, etc.)
- Add _lm suffix to rectangle/light-mode files
- Copy X icon to full-logo and text-only (same symbol)
- Add preview.html for visual testing
- Add .htaccess restricting access to dev IP
- Update README with correct lowercase brand names

All 38 payment brands and 12 social brands now complete.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:27:17 +00:00
724eba4cd6 Fix SVG sprites: convert classes to inline styles, prefix IDs
- Convert Adobe Illustrator .st0/.st1 classes to inline styles
- Prefix all IDs (defs, clipPaths) with icon name to avoid conflicts
- Fix clip-path references in both attributes and inline styles
- Keep defs/clipPaths intact for proper rendering

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:08:23 +00:00
19a7fe06a8 Add complete SVG sprite system with all variants
Payment sprites (16 files, 38 brands each):
- Shapes: icon, square, rectangle, text-only
- Modes: lm (light), dm (dark), la (light-accent), da (dark-accent)

Social sprites (12 files, 11-12 brands each):
- Shapes: icon, full-logo, text-only
- Same 4 color modes

Includes build-sprites.php to regenerate from source materials.
Updated README with complete documentation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 19:15:09 +00:00
4b2a9f7138 Update payment icons to match template naming convention
- Renamed all icon IDs to use -color suffix (visa-color, mastercard-color, etc.)
- Changed underscore naming for multi-word icons (apple_pay-color, google_pay-color, etc.)
- Added missing icons: discover, jcb, unionpay, affirm, afterpay
- Now contains 27 payment icons matching actual template usage
- Updated README with categorized icon list

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:45:40 +00:00
ed8559e418 Add SVG sprites for payments and social icons
- sprites/payments.svg: Visa, Mastercard, Amex, PayPal, Stripe, Apple Pay, Google Pay, Klarna, iDEAL, Bancontact, SEPA
- sprites/socials.svg: Facebook, Twitter/X, Instagram, LinkedIn, YouTube, TikTok, Pinterest, WhatsApp, Telegram
- Updated README with sprite usage documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:26:14 +00:00
19db248bb4 Initial commit - prestashop-icons package
Semantic icon helper for PrestaShop modules.
- Maps icon names to Font Awesome or Material Icons
- Auto-detects admin context (Material) vs front (FA default)
- Reads icon preference from ps_mpr_config table
- Theme detection for Material Icons
- PHP class + JavaScript helper

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 14:49:04 +01:00