Skip to content

Commit 2e548c5

Browse files
iPhone 17 Pro Max frame + CLI catalog integration
- Replaced basic phone frame with realistic iPhone 17 Pro Max: titanium metallic gradient bezel, side buttons (action, volume, power), Dynamic Island, screen reflection overlay, hidden scrollbars - CLI generatePlan now resolves package install commands from catalog.json (62 entries) with alias fallback for name mismatches - Added loadResources(), resolveFromCatalog(), catalogIndex exports - Catalog descriptions/categories/sizes now flow into generated plans
1 parent b0ad990 commit 2e548c5

2 files changed

Lines changed: 130 additions & 20 deletions

File tree

packages/design-forge-cli/index.js

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,38 @@ const fs = require('fs');
22
const path = require('path');
33
const catalog = require('./resources/catalog.json');
44

5+
const CATALOG_INDEX = {};
6+
Object.values(catalog).forEach(category => {
7+
if (Array.isArray(category)) {
8+
category.forEach(entry => {
9+
CATALOG_INDEX[entry.name] = entry;
10+
});
11+
}
12+
});
13+
14+
const CATALOG_ALIASES = {
15+
'Lucide Icons': 'Lucide',
16+
'MagicUI': 'Magic UI',
17+
'Tailwind CSS': null,
18+
'shadcn/ui': 'shadcn/ui',
19+
'Framer Motion': null,
20+
'Aceternity UI': null,
21+
'NextAuth': null,
22+
'React Email': null,
23+
'React Three Fiber': null,
24+
'AutoAnimate': null,
25+
'Fontsource': 'Inter Font',
26+
'Glassmorphism CSS': null,
27+
'Stripe': null,
28+
};
29+
30+
function resolveFromCatalog(key) {
31+
if (CATALOG_INDEX[key]) return CATALOG_INDEX[key];
32+
const alias = CATALOG_ALIASES[key];
33+
if (alias && CATALOG_INDEX[alias]) return CATALOG_INDEX[alias];
34+
return null;
35+
}
36+
537
const RESOURCE_MAP = {
638
'Tailwind CSS': { name: 'Tailwind CSS', description: 'Utility-first CSS framework', install: '', category: 'core' },
739
'shadcn/ui': { name: 'shadcn/ui', description: 'Copy-paste React components', install: 'npx shadcn@latest init -d --force', category: 'ui' },
@@ -27,16 +59,34 @@ const RESOURCE_MAP = {
2759
'Glassmorphism CSS': { name: 'Glassmorphism CSS', description: 'Glassmorphism backdrop utilities', install: '', category: 'css' },
2860
};
2961

62+
function loadResources() {
63+
const flat = [];
64+
Object.values(catalog).forEach(category => {
65+
if (Array.isArray(category)) {
66+
category.forEach(entry => flat.push(entry));
67+
}
68+
});
69+
return flat;
70+
}
71+
3072
function generatePlan(type, styles, features) {
3173
const plan = [];
3274
const added = new Set();
3375

3476
function add(key) {
35-
const resource = RESOURCE_MAP[key];
36-
if (resource && !added.has(key)) {
37-
added.add(key);
38-
plan.push({ ...resource, type: 'install' });
39-
}
77+
if (added.has(key)) return;
78+
const catalogEntry = resolveFromCatalog(key);
79+
const fallback = RESOURCE_MAP[key];
80+
if (!catalogEntry && !fallback) return;
81+
added.add(key);
82+
plan.push({
83+
name: key,
84+
description: (catalogEntry || fallback).description,
85+
install: (catalogEntry && catalogEntry.install) || fallback.install,
86+
category: (catalogEntry && catalogEntry.category) || fallback.category,
87+
size: (catalogEntry && catalogEntry.size) || 'small',
88+
type: 'install',
89+
});
4090
}
4191

4292
add('Tailwind CSS');
@@ -152,4 +202,7 @@ module.exports = {
152202
applyConsistency,
153203
PreviewGenerator,
154204
resources: catalog,
205+
loadResources,
206+
resolveFromCatalog,
207+
catalogIndex: CATALOG_INDEX,
155208
};

src/app/wizard/page.tsx

Lines changed: 72 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -415,28 +415,85 @@ function DesignPreview({ type, style }: { type: ProjectType; style: Style }) {
415415
</div>
416416
</div>
417417
) : (
418-
<div className="flex justify-center py-4">
418+
<div className="flex justify-center py-3">
419419
<div className="relative" style={{
420420
width: '280px',
421-
borderRadius: '36px',
422-
border: '3px solid #1a1a1a',
423-
background: '#000',
424-
padding: '8px',
425-
boxShadow: '0 20px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.08)',
421+
padding: '10px',
422+
borderRadius: '50px',
423+
background: 'linear-gradient(135deg, #c8c9cb 0%, #8e8e93 25%, #636366 50%, #8e8e93 75%, #c8c9cb 100%)',
424+
boxShadow: '0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(255,255,255,0.08)',
426425
}}>
427426
<div style={{
428-
width: '80px', height: '20px', background: '#000',
429-
borderRadius: '16px', margin: '0 auto 6px',
430-
}} />
431-
<div className="overflow-y-auto" style={{
432-
borderRadius: '28px',
433-
maxHeight: '480px',
427+
borderRadius: '40px',
428+
overflow: 'hidden',
429+
background: '#000',
430+
position: 'relative',
434431
}}>
435-
{previews[type]}
432+
<div className="overflow-y-auto" style={{
433+
maxHeight: '480px',
434+
background: t.bg,
435+
scrollbarWidth: 'none',
436+
msOverflowStyle: 'none',
437+
}}>
438+
<style>{`.overflow-y-auto::-webkit-scrollbar { display: none }`}</style>
439+
{previews[type]}
440+
</div>
441+
<div style={{
442+
position: 'absolute', top: '8px', left: '50%',
443+
transform: 'translateX(-50%)',
444+
width: '80px', height: '20px',
445+
background: '#000',
446+
borderRadius: '12px',
447+
zIndex: 20,
448+
}} />
449+
<div style={{
450+
position: 'absolute', bottom: '6px', left: '50%',
451+
transform: 'translateX(-50%)',
452+
width: '90px', height: '3px',
453+
background: '#222',
454+
borderRadius: '2px',
455+
zIndex: 20,
456+
}} />
457+
<div style={{
458+
position: 'absolute', top: 0, left: 0, right: 0,
459+
height: '45%',
460+
background: 'linear-gradient(to bottom, rgba(255,255,255,0.05), transparent 80%)',
461+
borderRadius: '40px 40px 0 0',
462+
pointerEvents: 'none',
463+
zIndex: 15,
464+
}} />
465+
<div style={{
466+
position: 'absolute', bottom: 0, left: 0, right: 0,
467+
height: '15%',
468+
background: 'linear-gradient(to top, rgba(0,0,0,0.15), transparent)',
469+
borderRadius: '0 0 40px 40px',
470+
pointerEvents: 'none',
471+
zIndex: 15,
472+
}} />
436473
</div>
437474
<div style={{
438-
width: '90px', height: '3px', background: '#222',
439-
borderRadius: '2px', margin: '6px auto 0',
475+
position: 'absolute', left: '-3px', top: '85px',
476+
width: '3px', height: '16px',
477+
background: 'linear-gradient(to bottom, #a1a1aa, #71717a)',
478+
borderRadius: '1px 0 0 1px',
479+
}} />
480+
<div style={{
481+
position: 'absolute', left: '-3px', top: '115px',
482+
width: '3px', height: '28px',
483+
background: 'linear-gradient(to bottom, #a1a1aa, #71717a)',
484+
borderRadius: '1px 0 0 1px',
485+
}} />
486+
<div style={{
487+
position: 'absolute', left: '-3px', top: '148px',
488+
width: '3px', height: '28px',
489+
background: 'linear-gradient(to bottom, #a1a1aa, #71717a)',
490+
borderRadius: '1px 0 0 1px',
491+
}} />
492+
<div style={{
493+
position: 'absolute', right: '-3px', top: '130px',
494+
width: '3px', height: '36px',
495+
background: 'linear-gradient(to bottom, #a1a1aa, #71717a)',
496+
borderRadius: '0 1px 1px 0',
440497
}} />
441498
</div>
442499
</div>

0 commit comments

Comments
 (0)