dolphincss 1.3.1 → 1.3.2

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.
File without changes
@@ -1,388 +0,0 @@
1
- export default {
2
- "dolphin-form": `
3
- <div className="glass card p-6 lg:p-8 border border-white/20 rounded-2xl" style={{ backdropFilter: 'blur(20px)' }}>
4
- <h3 className="text-xl font-bold text-white mb-6">Quick Actions</h3>
5
- <form className="flex-col-left w-full gap-5">
6
- <div className="w-full">
7
- <div className="floatinglabel input-icon-left w-full">
8
- <Mail size={20} className="icon-left text-primary-500" style={{ left: '1rem' }} />
9
- <input type="email" id="email" className="floatinglabel-input lg w-full bg-white/10 border-white/20 focus:border-primary-400 transition-colors rounded-xl text-white placeholder:text-transparent" style={{ paddingLeft: '3.5rem' }} placeholder=" " />
10
- <label htmlFor="email" className="floatinglabel-label text-white/70 font-medium" style={{ zIndex: 10 }}>Email Address</label>
11
- </div>
12
- </div>
13
-
14
- <div className="w-full">
15
- <div className="floatinglabel input-icon-both w-full">
16
- <Lock size={20} className="icon-left text-primary-500" style={{ left: '1rem' }} />
17
- <input type="password" id="password" className="floatinglabel-input lg w-full bg-white/10 border-white/20 focus:border-primary-400 transition-colors rounded-xl text-white placeholder:text-transparent" style={{ paddingLeft: '3.5rem', paddingRight: '3.5rem' }} placeholder=" " />
18
- <label htmlFor="password" className="floatinglabel-label text-white/70 font-medium" style={{ zIndex: 10 }}>Password</label>
19
- <button type="button" className="icon-right text-white/50 hover:text-white transition-colors" style={{ zIndex: 20, right: '1rem' }}>
20
- <Eye size={20} />
21
- </button>
22
- </div>
23
- </div>
24
-
25
- <label className="radio-item flex-left gap-2 cursor-pointer w-full mt-2">
26
- <input type="checkbox" className="accent-primary-500 w-4 h-4 rounded border-white/30 bg-white/10" />
27
- <span className="text-sm font-medium text-white/80">Subscribe to newsletter</span>
28
- </label>
29
-
30
- <button type="button" className="filled primary-600 w-full py-3 rounded-xl text-white font-bold hover:shadow-lg hover:-translate-y-0.5 transition-all duration-300 mt-2 glow">
31
- Submit Data
32
- </button>
33
- </form>
34
- </div>
35
- `.trim(),
36
- "dolphin-form-floating": `
37
- <div className="glass card p-6 lg:p-8 border border-white/20 rounded-2xl" style={{ backdropFilter: 'blur(20px)' }}>
38
- <h3 className="text-xl font-bold text-white mb-6">Quick Actions</h3>
39
- <form className="flex-col-left w-full gap-5">
40
- <div className="w-full">
41
- <div className="floatinglabel input-icon-left w-full">
42
- <Mail size={20} className="icon-left text-primary-500" style={{ left: '1rem' }} />
43
- <input type="email" id="email-float" className="floatinglabel-input lg w-full bg-white/10 border-white/20 focus:border-primary-400 transition-colors rounded-xl text-white placeholder:text-transparent" style={{ paddingLeft: '3.5rem' }} placeholder=" " />
44
- <label htmlFor="email-float" className="floatinglabel-label text-white/70 font-medium" style={{ zIndex: 10 }}>Email Address</label>
45
- </div>
46
- </div>
47
-
48
- <div className="w-full">
49
- <div className="floatinglabel input-icon-both w-full">
50
- <Lock size={20} className="icon-left text-primary-500" style={{ left: '1rem' }} />
51
- <input type="password" id="password-float" className="floatinglabel-input lg w-full bg-white/10 border-white/20 focus:border-primary-400 transition-colors rounded-xl text-white placeholder:text-transparent" style={{ paddingLeft: '3.5rem', paddingRight: '3.5rem' }} placeholder=" " />
52
- <label htmlFor="password-float" className="floatinglabel-label text-white/70 font-medium" style={{ zIndex: 10 }}>Password</label>
53
- <button type="button" className="icon-right text-white/50 hover:text-white transition-colors" style={{ zIndex: 20, right: '1rem' }}>
54
- <Eye size={20} />
55
- </button>
56
- </div>
57
- </div>
58
-
59
- <button type="button" className="filled primary-600 w-full py-3 rounded-xl text-white font-bold hover:shadow-lg hover:-translate-y-0.5 transition-all duration-300 mt-2 glow">
60
- Submit Data
61
- </button>
62
- </form>
63
- </div>
64
- `.trim(),
65
- "dolphin-form-standard": `
66
- <div className="card p-6 lg:p-10 border border-border rounded-2xl bg-surface-alt shadow-lg">
67
- <h3 className="text-2xl font-bold text-text mb-2">Welcome Back</h3>
68
- <p className="text-text-muted text-sm mb-8">Please enter your details to sign in.</p>
69
- <form className="flex-col-left w-full gap-8">
70
- <div className="w-full mt-2">
71
- <div className="standardlabel w-full">
72
- <input type="email" id="email-std" className="standardlabel-input lg w-full text-text placeholder:text-transparent bg-transparent" placeholder=" " />
73
- <label htmlFor="email-std" className="standardlabel-label text-text-muted font-medium bg-transparent! left-0! px-0!">Email Address</label>
74
- </div>
75
- </div>
76
-
77
- <div className="w-full">
78
- <div className="standardlabel w-full">
79
- <input type="password" id="password-std" className="standardlabel-input lg w-full text-text placeholder:text-transparent bg-transparent" placeholder=" " />
80
- <label htmlFor="password-std" className="standardlabel-label text-text-muted font-medium bg-transparent! left-0! px-0!">Password</label>
81
- </div>
82
- </div>
83
-
84
- <div className="flex-between w-full">
85
- <label className="radio-item flex-left gap-2 cursor-pointer">
86
- <input type="checkbox" className="accent-primary-500 w-4 h-4 rounded border-border" />
87
- <span className="text-sm font-medium text-text-muted">Remember me</span>
88
- </label>
89
- <a href="#" className="text-sm font-bold text-primary-500 hover:underline">Forgot password?</a>
90
- </div>
91
-
92
- <button type="button" className="filled primary-500 w-full py-3.5 rounded-xl text-white font-bold hover:shadow-xl hover:-translate-y-0.5 transition-all mt-2 glow">
93
- Sign In
94
- </button>
95
- </form>
96
- </div>
97
- `.trim(),
98
- "dolphin-table": `
99
- <div className="glass card p-6 border border-white/20 rounded-2xl overflow-hidden" style={{ backdropFilter: 'blur(20px)' }}>
100
- <div className="flex-between mb-6">
101
- <h3 className="text-xl font-bold text-white m-0">Recent Transactions</h3>
102
- <button className="text-primary-300 text-sm font-medium hover:underline bg-transparent border-none cursor-pointer flex-center">
103
- View All <ChevronRight size={16} />
104
- </button>
105
- </div>
106
-
107
- <div className="w-full overflow-x-auto">
108
- <table className="w-full text-left border-collapse">
109
- <thead>
110
- <tr className="border-b border-white/10 text-white/60 text-sm uppercase tracking-wider">
111
- <th className="pb-3 font-medium">Customer</th>
112
- <th className="pb-3 font-medium">Date</th>
113
- <th className="pb-3 font-medium">Amount</th>
114
- <th className="pb-3 font-medium">Status</th>
115
- </tr>
116
- </thead>
117
- <tbody className="text-white">
118
- <tr className="border-b border-white/5 hover:bg-white/5 transition-colors">
119
- <td className="py-4 flex-left gap-3">
120
- <div className="circle sm filled primary-500 text-white font-bold text-xs flex-center">JD</div>
121
- <span className="font-medium">John Doe</span>
122
- </td>
123
- <td className="py-4 text-white/70">Oct 24, 2025</td>
124
- <td className="py-4 font-bold">$120.50</td>
125
- <td className="py-4"><span className="px-2 py-1 rounded-md bg-success-500/20 text-success-300 text-xs font-bold">Completed</span></td>
126
- </tr>
127
- <tr className="hover:bg-white/5 transition-colors">
128
- <td className="py-4 flex-left gap-3">
129
- <div className="circle sm filled secondary-500 text-white font-bold text-xs flex-center">SS</div>
130
- <span className="font-medium">Sarah Smith</span>
131
- </td>
132
- <td className="py-4 text-white/70">Oct 23, 2025</td>
133
- <td className="py-4 font-bold">$340.00</td>
134
- <td className="py-4"><span className="px-2 py-1 rounded-md bg-warning-500/20 text-warning-300 text-xs font-bold">Pending</span></td>
135
- </tr>
136
- </tbody>
137
- </table>
138
- </div>
139
- </div>
140
- `.trim(),
141
- "dolphin-toast": `
142
- {/* Ultra Simple Toast */}
143
- <div className="fixed bottom-6 right-6 z-[9999]">
144
- <div className="toast">
145
- <span className="text-2xl drop-shadow-md">āœ…</span>
146
- <div className="flex-1">
147
- <span className="font-bold block">Success!</span>
148
- <span className="opacity-70 text-sm">Action completed beautifully.</span>
149
- </div>
150
- <button className="opacity-50 hover:opacity-100 transition-opacity cursor-pointer text-lg">āœ•</button>
151
- </div>
152
- </div>
153
- `.trim(),
154
- "dolphin-modal": `
155
- {/* Ultra Simple Native Modal */}
156
- <dialog className="modal" open>
157
- <h3 className="text-2xl font-bold mb-3">Action Required</h3>
158
- <p className="opacity-80 mb-6 leading-relaxed">
159
- This modal uses the native HTML <code>&lt;dialog&gt;</code> element.
160
- No wrapper divs, no complex positioning classes. Just pure CSS magic!
161
- </p>
162
- <div className="flex-right gap-3">
163
- <button className="outlined plain py-2 px-4 rounded-lg">Cancel</button>
164
- <button className="filled primary-500 text-white py-2 px-4 rounded-lg glow">Confirm Action</button>
165
- </div>
166
- </dialog>
167
- `.trim(),
168
- "dolphin-button": `
169
- <div className="flex-left gap-4 flex-wrap p-4 glass rounded-xl border border-white/10" style={{ backdropFilter: 'blur(10px)' }}>
170
- <button className="filled primary-500 text-white py-2 px-6 rounded-lg font-bold hover:shadow-lg hover:-translate-y-0.5 transition-all glow">
171
- Primary Action
172
- </button>
173
- <button className="filled secondary-500 text-white py-2 px-6 rounded-lg font-bold hover:shadow-lg hover:-translate-y-0.5 transition-all glow">
174
- Secondary
175
- </button>
176
- <button className="outlined plain py-2 px-6 rounded-lg font-bold border-2 border-white/30 hover:border-white hover:bg-white/10 transition-all">
177
- Outlined
178
- </button>
179
- <button className="ghost py-2 px-6 rounded-lg font-bold hover:bg-white/10 transition-colors">
180
- Ghost Button
181
- </button>
182
- </div>
183
- `.trim(),
184
- "dolphin-card": `
185
- <div className="glass card p-6 border border-white/20 rounded-2xl max-w-sm hover:shadow-xl hover:-translate-y-1 transition-all duration-300 relative overflow-hidden" style={{ backdropFilter: 'blur(20px)' }}>
186
- <div className="absolute top-0 right-0 w-32 h-32 bg-primary-500/20 rounded-full blur-2xl"></div>
187
- <div className="flex-left gap-4 mb-4 relative z-10">
188
- <div className="w-16 h-16 rounded-full border-2 border-primary-400 overflow-hidden shadow-lg p-0.5">
189
- <img src="https://i.pravatar.cc/150?img=11" alt="Profile" className="w-full h-full rounded-full object-cover" />
190
- </div>
191
- <div>
192
- <h3 className="text-xl font-bold text-white m-0">Alex Developer</h3>
193
- <p className="text-primary-300 text-sm font-medium">Software Engineer</p>
194
- </div>
195
- </div>
196
- <p className="text-white/70 text-sm leading-relaxed mb-6 relative z-10">
197
- Passionate about building magical user experiences and world-class design systems using DolphinCSS.
198
- </p>
199
- <div className="flex-between relative z-10">
200
- <div className="flex gap-2">
201
- <span className="px-3 py-1 rounded-full bg-white/10 text-xs font-medium text-white/90">React</span>
202
- <span className="px-3 py-1 rounded-full bg-white/10 text-xs font-medium text-white/90">Tailwind</span>
203
- </div>
204
- <button className="circle filled primary-500 text-white p-2 hover:shadow-lg hover:scale-110 transition-all flex-center">
205
- <ChevronRight size={16} />
206
- </button>
207
- </div>
208
- </div>
209
- `.trim(),
210
- "dolphin-navbar": `
211
- <nav className="glass w-full py-4 px-6 md:px-8 border-b border-white/10 flex-between sticky top-0 z-50 shadow-sm" style={{ backdropFilter: 'blur(24px)' }}>
212
- <div className="flex-left gap-2 cursor-pointer">
213
- <div className="circle sm filled primary-500 text-white font-bold flex-center glow">🐬</div>
214
- <span className="text-xl font-bold text-white tracking-tight">Dolphin</span>
215
- </div>
216
- <div className="hidden md:flex gap-6">
217
- <a href="#" className="text-white/80 hover:text-white font-medium transition-colors">Home</a>
218
- <a href="#" className="text-white/80 hover:text-white font-medium transition-colors">Features</a>
219
- <a href="#" className="text-white/80 hover:text-white font-medium transition-colors">Pricing</a>
220
- <a href="#" className="text-white/80 hover:text-white font-medium transition-colors">Docs</a>
221
- </div>
222
- <div className="flex-right gap-3">
223
- <button className="hidden md:block outlined plain py-2 px-4 rounded-lg font-medium text-sm">Log In</button>
224
- <button className="filled primary-600 text-white py-2 px-4 rounded-lg font-medium text-sm hover:shadow-lg transition-all glow">Sign Up</button>
225
- </div>
226
- </nav>
227
- `.trim(),
228
- "dolphin-alert": `
229
- <div className="flex flex-col gap-3">
230
- <div className="w-full p-4 rounded-xl border border-info-500/30 bg-info-500/10 flex-left gap-3 text-info-100">
231
- <Activity size={20} className="text-info-400 shrink-0" />
232
- <div>
233
- <h4 className="font-bold text-info-300 text-sm">System Update</h4>
234
- <p className="text-xs opacity-80 mt-1">A new version of DolphinCSS is available with magical features.</p>
235
- </div>
236
- </div>
237
- <div className="w-full p-4 rounded-xl border border-warning-500/30 bg-warning-500/10 flex-left gap-3 text-warning-100">
238
- <Bell size={20} className="text-warning-400 shrink-0" />
239
- <div>
240
- <h4 className="font-bold text-warning-300 text-sm">Action Needed</h4>
241
- <p className="text-xs opacity-80 mt-1">Please verify your email address to continue using all features.</p>
242
- </div>
243
- </div>
244
- </div>
245
- `.trim(),
246
- "dolphin-badge": `
247
- <div className="flex gap-3 flex-wrap">
248
- <span className="px-3 py-1 rounded-full bg-primary-500/20 text-primary-300 text-xs font-bold border border-primary-500/30">Primary</span>
249
- <span className="px-3 py-1 rounded-full bg-success-500/20 text-success-300 text-xs font-bold border border-success-500/30 flex-left gap-1">
250
- <span className="w-1.5 h-1.5 rounded-full bg-success-400"></span> Active
251
- </span>
252
- <span className="px-3 py-1 rounded-full bg-warning-500/20 text-warning-300 text-xs font-bold border border-warning-500/30">Pending</span>
253
- <span className="px-3 py-1 rounded-full bg-danger-500/20 text-danger-300 text-xs font-bold border border-danger-500/30">Failed</span>
254
- <span className="px-3 py-1 rounded-full bg-white/10 text-white/80 text-xs font-bold border border-white/20">Neutral</span>
255
- </div>
256
- `.trim(),
257
- "dolphin-header": `
258
- <nav className="glass w-full py-4 px-6 md:px-8 border-b border-border flex-between sticky top-0 z-50 shadow-sm" style={{ backdropFilter: 'blur(24px)' }}>
259
- <div className="flex-left gap-2 cursor-pointer">
260
- <div className="circle sm filled primary-500 text-white font-bold flex-center glow">🐬</div>
261
- <span className="text-xl font-bold text-text tracking-tight">Dolphin</span>
262
- </div>
263
- <div className="hidden md:flex gap-6">
264
- <a href="#" className="text-text-muted hover:text-primary-500 font-medium transition-colors">Home</a>
265
- <a href="#" className="text-text-muted hover:text-primary-500 font-medium transition-colors">Features</a>
266
- <a href="#" className="text-text-muted hover:text-primary-500 font-medium transition-colors">Pricing</a>
267
- <a href="#" className="text-text-muted hover:text-primary-500 font-medium transition-colors">Docs</a>
268
- </div>
269
- <div className="flex-right gap-3">
270
- <button className="hidden md:block outlined plain py-2 px-4 rounded-lg font-medium text-sm border-border text-text hover:bg-surface">Log In</button>
271
- <button className="filled primary-600 text-white py-2 px-4 rounded-lg font-medium text-sm hover:shadow-lg transition-all glow">Sign Up</button>
272
- </div>
273
- </nav>
274
- `.trim(),
275
- "dolphin-footer": `
276
- <footer className="w-full bg-surface-dark py-12 px-6 border-t border-border mt-auto">
277
- <div className="max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-4 gap-8">
278
- <div className="col-span-1 md:col-span-2">
279
- <div className="flex-left gap-2 mb-4">
280
- <div className="circle sm filled primary-500 text-white font-bold flex-center glow">🐬</div>
281
- <span className="text-2xl font-bold text-text-light tracking-tight">DolphinCSS</span>
282
- </div>
283
- <p className="text-text-muted max-w-sm mb-6 leading-relaxed">
284
- The next-generation UI library that combines the magic of auto-generation with breathtaking aesthetics.
285
- </p>
286
- <div className="flex-left gap-4">
287
- <button className="circle sm bg-white/5 hover:bg-primary-500 hover:text-white transition-all text-text-muted border border-border">š•</button>
288
- <button className="circle sm bg-white/5 hover:bg-primary-500 hover:text-white transition-all text-text-muted border border-border">in</button>
289
- <button className="circle sm bg-white/5 hover:bg-primary-500 hover:text-white transition-all text-text-muted border border-border">GH</button>
290
- </div>
291
- </div>
292
-
293
- <div>
294
- <h4 className="font-bold text-lg mb-4 text-text-light">Resources</h4>
295
- <ul className="flex-col-left gap-3 text-text-muted">
296
- <li><a href="#" className="hover:text-primary-500 transition-colors">Documentation</a></li>
297
- <li><a href="#" className="hover:text-primary-500 transition-colors">Components</a></li>
298
- <li><a href="#" className="hover:text-primary-500 transition-colors">Themes</a></li>
299
- <li><a href="#" className="hover:text-primary-500 transition-colors">Showcase</a></li>
300
- </ul>
301
- </div>
302
-
303
- <div>
304
- <h4 className="font-bold text-lg mb-4 text-text-light">Legal</h4>
305
- <ul className="flex-col-left gap-3 text-text-muted">
306
- <li><a href="#" className="hover:text-primary-500 transition-colors">Privacy Policy</a></li>
307
- <li><a href="#" className="hover:text-primary-500 transition-colors">Terms of Service</a></li>
308
- <li><a href="#" className="hover:text-primary-500 transition-colors">License</a></li>
309
- </ul>
310
- </div>
311
- </div>
312
-
313
- <div className="max-w-7xl mx-auto mt-12 pt-6 border-t border-border/20 flex-between flex-wrap gap-4 text-sm text-text-muted">
314
- <p>Ā© 2026 DolphinCSS. All rights reserved.</p>
315
- <p className="flex-center gap-1">Made with <span className="text-danger-500 animate-pulse">ā¤ļø</span> in Nepal</p>
316
- </div>
317
- </footer>
318
- `.trim(),
319
- "dolphin-grid": `
320
- <div className="w-full">
321
- <div className="flex-between mb-8">
322
- <div>
323
- <h2 className="text-2xl font-bold text-text mb-1">Featured Collections</h2>
324
- <p className="text-text-muted text-sm">Discover our magical products and items.</p>
325
- </div>
326
- <button className="outlined plain text-sm py-2 px-4 rounded-lg flex-center gap-2 border-border text-text hover:bg-surface transition-colors cursor-pointer">
327
- View All <ChevronRight size={16} />
328
- </button>
329
- </div>
330
-
331
- <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
332
- {/* Product Card 1 */}
333
- <div className="card glass p-4 rounded-2xl group hover:-translate-y-1 transition-all duration-300">
334
- <div className="w-full aspect-[4/3] bg-surface-dark rounded-xl mb-4 overflow-hidden relative">
335
- <div className="absolute top-2 right-2 badge primary sm z-10 shadow-lg">New</div>
336
- <img src="https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=500&q=80" alt="Product" className="w-full h-full object-cover group-hover:scale-110 transition-transform duration-500" />
337
- </div>
338
- <h3 className="font-bold text-text mb-1">Premium Headphones</h3>
339
- <p className="text-text-muted text-sm mb-4 line-clamp-2">High fidelity audio with magical active noise cancellation.</p>
340
- <div className="flex-between">
341
- <span className="text-lg font-bold text-primary-500">$299.00</span>
342
- <button className="circle sm filled primary-500 text-white glow cursor-pointer hover:scale-110 transition-transform"><ShoppingCart size={16} /></button>
343
- </div>
344
- </div>
345
-
346
- {/* Product Card 2 */}
347
- <div className="card glass p-4 rounded-2xl group hover:-translate-y-1 transition-all duration-300">
348
- <div className="w-full aspect-[4/3] bg-surface-dark rounded-xl mb-4 overflow-hidden relative">
349
- <img src="https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=500&q=80" alt="Product" className="w-full h-full object-cover group-hover:scale-110 transition-transform duration-500" />
350
- </div>
351
- <h3 className="font-bold text-text mb-1">Smart Watch Pro</h3>
352
- <p className="text-text-muted text-sm mb-4 line-clamp-2">Track your fitness with the ultimate smart companion.</p>
353
- <div className="flex-between">
354
- <span className="text-lg font-bold text-primary-500">$199.00</span>
355
- <button className="circle sm filled primary-500 text-white glow cursor-pointer hover:scale-110 transition-transform"><ShoppingCart size={16} /></button>
356
- </div>
357
- </div>
358
-
359
- {/* Product Card 3 */}
360
- <div className="card glass p-4 rounded-2xl group hover:-translate-y-1 transition-all duration-300">
361
- <div className="w-full aspect-[4/3] bg-surface-dark rounded-xl mb-4 overflow-hidden relative">
362
- <div className="absolute top-2 right-2 badge danger sm z-10 shadow-lg">-20%</div>
363
- <img src="https://images.unsplash.com/photo-1526170375885-4d8ecf77b99f?w=500&q=80" alt="Product" className="w-full h-full object-cover group-hover:scale-110 transition-transform duration-500" />
364
- </div>
365
- <h3 className="font-bold text-text mb-1">Polaroid Camera</h3>
366
- <p className="text-text-muted text-sm mb-4 line-clamp-2">Capture your magical moments instantly with retro style.</p>
367
- <div className="flex-between">
368
- <span className="text-lg font-bold text-primary-500">$89.00</span>
369
- <button className="circle sm filled primary-500 text-white glow cursor-pointer hover:scale-110 transition-transform"><ShoppingCart size={16} /></button>
370
- </div>
371
- </div>
372
-
373
- {/* Product Card 4 */}
374
- <div className="card glass p-4 rounded-2xl group hover:-translate-y-1 transition-all duration-300">
375
- <div className="w-full aspect-[4/3] bg-surface-dark rounded-xl mb-4 overflow-hidden relative">
376
- <img src="https://images.unsplash.com/photo-1542291026-7eec264c27ff?w=500&q=80" alt="Product" className="w-full h-full object-cover group-hover:scale-110 transition-transform duration-500" />
377
- </div>
378
- <h3 className="font-bold text-text mb-1">Neon Kicks</h3>
379
- <p className="text-text-muted text-sm mb-4 line-clamp-2">Step into the future with glowing soles and comfort.</p>
380
- <div className="flex-between">
381
- <span className="text-lg font-bold text-primary-500">$120.00</span>
382
- <button className="circle sm filled primary-500 text-white glow cursor-pointer hover:scale-110 transition-transform"><ShoppingCart size={16} /></button>
383
- </div>
384
- </div>
385
- </div>
386
- </div>
387
- `.trim()
388
- };
@@ -1,53 +0,0 @@
1
- import chokidar from 'chokidar';
2
- import fs from 'fs';
3
- import path from 'path';
4
- import components from './components.js';
5
-
6
- // Setup watcher for src folder
7
- const targetDir = './src';
8
- const watcher = chokidar.watch(targetDir, {
9
- ignored: /(^|[\/\\])\../, // ignore dotfiles
10
- persistent: true
11
- });
12
-
13
- const log = console.log.bind(console);
14
- log(`\n🐬 DolphinCSS Magic Watcher Started!`);
15
- log(`šŸ‘€ Listening for magic markers (like <div className="dolphin-form"></div>) in ${targetDir} for .js, .jsx, .tsx, .html files\n`);
16
-
17
- watcher.on('all', (event, filePath) => {
18
- if (event !== 'add' && event !== 'change') return;
19
- const ext = path.extname(filePath);
20
- if (!['.jsx', '.tsx', '.js', '.html'].includes(ext)) return;
21
- try {
22
- let content = fs.readFileSync(filePath, 'utf8');
23
- let modified = false;
24
-
25
- for (const [marker, replacement] of Object.entries(components)) {
26
-
27
- // Much simpler: we can just use replace directly if we don't care about the regex complexity
28
- // Let's use simple string replacements for the most common cases:
29
- const cases = [
30
- `<div className="${marker}"></div>`,
31
- `<div class="${marker}"></div>`,
32
- `<div className="${marker}" />`,
33
- `<div class="${marker}" />`,
34
- `<div className='${marker}'></div>`,
35
- `<div class='${marker}'></div>`
36
- ];
37
-
38
- for (const pattern of cases) {
39
- if (content.includes(pattern)) {
40
- content = content.replace(pattern, replacement);
41
- modified = true;
42
- log(`✨ MAGIC INJECTION: Injected '${marker}' into ${path.basename(filePath)}`);
43
- }
44
- }
45
- }
46
-
47
- if (modified) {
48
- fs.writeFileSync(filePath, content, 'utf8');
49
- }
50
- } catch (error) {
51
- console.error(`āŒ Error processing file ${filePath}:`, error);
52
- }
53
- });
@@ -1,44 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- // Determine the root directory of the project where dolphincss is installed
5
- // In npm scripts, INIT_CWD is the directory where the npm command was run
6
- const projectRoot = process.env.INIT_CWD || path.resolve(process.cwd(), '../..');
7
-
8
- console.log(`[DolphinCSS] Post-install setup...`);
9
- console.log(`[DolphinCSS] Checking project root: ${projectRoot}`);
10
-
11
- try {
12
- // If we are in the dolphincss package itself (development mode), don't install snippets to its own root
13
- // We check this by seeing if the package.json name is dolphincss
14
- const rootPackagePath = path.join(projectRoot, 'package.json');
15
- if (fs.existsSync(rootPackagePath)) {
16
- const pkg = JSON.parse(fs.readFileSync(rootPackagePath, 'utf8'));
17
- if (pkg.name === 'dolphincss') {
18
- console.log(`[DolphinCSS] Development mode detected. Skipping snippets auto-install.`);
19
- process.exit(0);
20
- }
21
- }
22
-
23
- const vscodeDir = path.join(projectRoot, '.vscode');
24
- const snippetsDest = path.join(vscodeDir, 'dolphincss.code-snippets');
25
- const snippetsSource = path.join(__dirname, '../snippets/dolphincss.json');
26
-
27
- // Create .vscode directory if it doesn't exist
28
- if (!fs.existsSync(vscodeDir)) {
29
- console.log(`[DolphinCSS] Creating .vscode directory...`);
30
- fs.mkdirSync(vscodeDir, { recursive: true });
31
- }
32
-
33
- // Copy snippets file
34
- if (fs.existsSync(snippetsSource)) {
35
- console.log(`[DolphinCSS] Installing VS Code snippets...`);
36
- fs.copyFileSync(snippetsSource, snippetsDest);
37
- console.log(`[DolphinCSS] Success! IntelliSense snippets added to ${snippetsDest}`);
38
- } else {
39
- console.warn(`[DolphinCSS] Warning: Snippets source file not found at ${snippetsSource}`);
40
- }
41
-
42
- } catch (error) {
43
- console.warn(`[DolphinCSS] Warning: Could not install VS Code snippets automatically. (${error.message})`);
44
- }