dolphincss 1.3.0 → 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,195 +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-table": `
37
- <div className="glass card p-6 border border-white/20 rounded-2xl overflow-hidden" style={{ backdropFilter: 'blur(20px)' }}>
38
- <div className="flex-between mb-6">
39
- <h3 className="text-xl font-bold text-white m-0">Recent Transactions</h3>
40
- <button className="text-primary-300 text-sm font-medium hover:underline bg-transparent border-none cursor-pointer flex-center">
41
- View All <ChevronRight size={16} />
42
- </button>
43
- </div>
44
-
45
- <div className="w-full overflow-x-auto">
46
- <table className="w-full text-left border-collapse">
47
- <thead>
48
- <tr className="border-b border-white/10 text-white/60 text-sm uppercase tracking-wider">
49
- <th className="pb-3 font-medium">Customer</th>
50
- <th className="pb-3 font-medium">Date</th>
51
- <th className="pb-3 font-medium">Amount</th>
52
- <th className="pb-3 font-medium">Status</th>
53
- </tr>
54
- </thead>
55
- <tbody className="text-white">
56
- <tr className="border-b border-white/5 hover:bg-white/5 transition-colors">
57
- <td className="py-4 flex-left gap-3">
58
- <div className="circle sm filled primary-500 text-white font-bold text-xs flex-center">JD</div>
59
- <span className="font-medium">John Doe</span>
60
- </td>
61
- <td className="py-4 text-white/70">Oct 24, 2025</td>
62
- <td className="py-4 font-bold">$120.50</td>
63
- <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>
64
- </tr>
65
- <tr className="hover:bg-white/5 transition-colors">
66
- <td className="py-4 flex-left gap-3">
67
- <div className="circle sm filled secondary-500 text-white font-bold text-xs flex-center">SS</div>
68
- <span className="font-medium">Sarah Smith</span>
69
- </td>
70
- <td className="py-4 text-white/70">Oct 23, 2025</td>
71
- <td className="py-4 font-bold">$340.00</td>
72
- <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>
73
- </tr>
74
- </tbody>
75
- </table>
76
- </div>
77
- </div>
78
- `.trim(),
79
- "dolphin-toast": `
80
- {/* Ultra Simple Toast */}
81
- <div className="fixed bottom-6 right-6 z-[9999]">
82
- <div className="toast">
83
- <span className="text-2xl drop-shadow-md">✅</span>
84
- <div className="flex-1">
85
- <span className="font-bold block">Success!</span>
86
- <span className="opacity-70 text-sm">Action completed beautifully.</span>
87
- </div>
88
- <button className="opacity-50 hover:opacity-100 transition-opacity cursor-pointer text-lg">✕</button>
89
- </div>
90
- </div>
91
- `.trim(),
92
- "dolphin-modal": `
93
- {/* Ultra Simple Native Modal */}
94
- <dialog className="modal" open>
95
- <h3 className="text-2xl font-bold mb-3">Action Required</h3>
96
- <p className="opacity-80 mb-6 leading-relaxed">
97
- This modal uses the native HTML <code>&lt;dialog&gt;</code> element.
98
- No wrapper divs, no complex positioning classes. Just pure CSS magic!
99
- </p>
100
- <div className="flex-right gap-3">
101
- <button className="outlined plain py-2 px-4 rounded-lg">Cancel</button>
102
- <button className="filled primary-500 text-white py-2 px-4 rounded-lg glow">Confirm Action</button>
103
- </div>
104
- </dialog>
105
- `.trim(),
106
- "dolphin-button": `
107
- <div className="flex-left gap-4 flex-wrap p-4 glass rounded-xl border border-white/10" style={{ backdropFilter: 'blur(10px)' }}>
108
- <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">
109
- Primary Action
110
- </button>
111
- <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">
112
- Secondary
113
- </button>
114
- <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">
115
- Outlined
116
- </button>
117
- <button className="ghost py-2 px-6 rounded-lg font-bold hover:bg-white/10 transition-colors">
118
- Ghost Button
119
- </button>
120
- </div>
121
- `.trim(),
122
- "dolphin-card": `
123
- <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)' }}>
124
- <div className="absolute top-0 right-0 w-32 h-32 bg-primary-500/20 rounded-full blur-2xl"></div>
125
- <div className="flex-left gap-4 mb-4 relative z-10">
126
- <div className="w-16 h-16 rounded-full border-2 border-primary-400 overflow-hidden shadow-lg p-0.5">
127
- <img src="https://i.pravatar.cc/150?img=11" alt="Profile" className="w-full h-full rounded-full object-cover" />
128
- </div>
129
- <div>
130
- <h3 className="text-xl font-bold text-white m-0">Alex Developer</h3>
131
- <p className="text-primary-300 text-sm font-medium">Software Engineer</p>
132
- </div>
133
- </div>
134
- <p className="text-white/70 text-sm leading-relaxed mb-6 relative z-10">
135
- Passionate about building magical user experiences and world-class design systems using DolphinCSS.
136
- </p>
137
- <div className="flex-between relative z-10">
138
- <div className="flex gap-2">
139
- <span className="px-3 py-1 rounded-full bg-white/10 text-xs font-medium text-white/90">React</span>
140
- <span className="px-3 py-1 rounded-full bg-white/10 text-xs font-medium text-white/90">Tailwind</span>
141
- </div>
142
- <button className="circle filled primary-500 text-white p-2 hover:shadow-lg hover:scale-110 transition-all flex-center">
143
- <ChevronRight size={16} />
144
- </button>
145
- </div>
146
- </div>
147
- `.trim(),
148
- "dolphin-navbar": `
149
- <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)' }}>
150
- <div className="flex-left gap-2 cursor-pointer">
151
- <div className="circle sm filled primary-500 text-white font-bold flex-center glow">🐬</div>
152
- <span className="text-xl font-bold text-white tracking-tight">Dolphin</span>
153
- </div>
154
- <div className="hidden md:flex gap-6">
155
- <a href="#" className="text-white/80 hover:text-white font-medium transition-colors">Home</a>
156
- <a href="#" className="text-white/80 hover:text-white font-medium transition-colors">Features</a>
157
- <a href="#" className="text-white/80 hover:text-white font-medium transition-colors">Pricing</a>
158
- <a href="#" className="text-white/80 hover:text-white font-medium transition-colors">Docs</a>
159
- </div>
160
- <div className="flex-right gap-3">
161
- <button className="hidden md:block outlined plain py-2 px-4 rounded-lg font-medium text-sm">Log In</button>
162
- <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>
163
- </div>
164
- </nav>
165
- `.trim(),
166
- "dolphin-alert": `
167
- <div className="flex flex-col gap-3">
168
- <div className="w-full p-4 rounded-xl border border-info-500/30 bg-info-500/10 flex-left gap-3 text-info-100">
169
- <Activity size={20} className="text-info-400 shrink-0" />
170
- <div>
171
- <h4 className="font-bold text-info-300 text-sm">System Update</h4>
172
- <p className="text-xs opacity-80 mt-1">A new version of DolphinCSS is available with magical features.</p>
173
- </div>
174
- </div>
175
- <div className="w-full p-4 rounded-xl border border-warning-500/30 bg-warning-500/10 flex-left gap-3 text-warning-100">
176
- <Bell size={20} className="text-warning-400 shrink-0" />
177
- <div>
178
- <h4 className="font-bold text-warning-300 text-sm">Action Needed</h4>
179
- <p className="text-xs opacity-80 mt-1">Please verify your email address to continue using all features.</p>
180
- </div>
181
- </div>
182
- </div>
183
- `.trim(),
184
- "dolphin-badge": `
185
- <div className="flex gap-3 flex-wrap">
186
- <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>
187
- <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">
188
- <span className="w-1.5 h-1.5 rounded-full bg-success-400"></span> Active
189
- </span>
190
- <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>
191
- <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>
192
- <span className="px-3 py-1 rounded-full bg-white/10 text-white/80 text-xs font-bold border border-white/20">Neutral</span>
193
- </div>
194
- `.trim()
195
- };
@@ -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
- }