mani-calc 1.1.0
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.
- package/ARCHITECTURE.md +249 -0
- package/CHANGELOG.md +69 -0
- package/COMPLETION_SUMMARY.md +304 -0
- package/CONTRIBUTING.md +110 -0
- package/EXAMPLES.md +220 -0
- package/LICENSE +21 -0
- package/OVERLAY_MODE.md +361 -0
- package/PUBLISHING_GUIDE.md +291 -0
- package/QUICKSTART.md +115 -0
- package/QUICK_PUBLISH.md +108 -0
- package/README.md +614 -0
- package/RELEASE_NOTES_v1.1.0.md +262 -0
- package/bin/cli.js +203 -0
- package/bin/overlay.js +46 -0
- package/package.json +47 -0
- package/src/core/clipboard-manager.js +40 -0
- package/src/core/history-manager.js +141 -0
- package/src/core/math-engine.js +95 -0
- package/src/core/nlp-parser.js +146 -0
- package/src/core/unit-converter.js +208 -0
- package/src/index.js +121 -0
- package/src/integration/windows-search.js +126 -0
- package/src/ui/floating-search.js +228 -0
- package/src/ui/overlay.html +254 -0
- package/test/test.js +133 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
# 📦 Publishing Mani-Calc to NPM
|
|
2
|
+
|
|
3
|
+
## ✅ Pre-Publishing Checklist
|
|
4
|
+
|
|
5
|
+
Before publishing, let's make sure everything is ready:
|
|
6
|
+
|
|
7
|
+
- [x] Package name: `mani-calc` (unique and available)
|
|
8
|
+
- [x] Version: `1.1.0`
|
|
9
|
+
- [x] All files committed to Git
|
|
10
|
+
- [x] README.md is comprehensive
|
|
11
|
+
- [x] LICENSE file exists (MIT)
|
|
12
|
+
- [x] package.json is properly configured
|
|
13
|
+
- [x] Tests are passing
|
|
14
|
+
- [x] Dependencies are installed
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 🚀 Step-by-Step Publishing Guide
|
|
19
|
+
|
|
20
|
+
### Step 1: Create NPM Account (if you don't have one)
|
|
21
|
+
|
|
22
|
+
Visit: https://www.npmjs.com/signup
|
|
23
|
+
|
|
24
|
+
Or use the command line:
|
|
25
|
+
```bash
|
|
26
|
+
npm adduser
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Step 2: Login to NPM
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm login
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
You'll be prompted for:
|
|
36
|
+
- **Username**: Your npm username
|
|
37
|
+
- **Password**: Your npm password
|
|
38
|
+
- **Email**: Your email (will be public)
|
|
39
|
+
- **One-time password**: If you have 2FA enabled
|
|
40
|
+
|
|
41
|
+
### Step 3: Verify Login
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm whoami
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This should display your npm username.
|
|
48
|
+
|
|
49
|
+
### Step 4: Test Package Locally (Optional but Recommended)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Create a tarball to see what will be published
|
|
53
|
+
npm pack
|
|
54
|
+
|
|
55
|
+
# This creates mani-calc-1.1.0.tgz
|
|
56
|
+
# You can inspect it to see what files will be included
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Step 5: Publish to NPM
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm publish
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**That's it!** 🎉
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 📋 What Gets Published
|
|
70
|
+
|
|
71
|
+
Based on your `.gitignore` and `package.json`, these files will be published:
|
|
72
|
+
|
|
73
|
+
### ✅ Included
|
|
74
|
+
- `bin/` - CLI scripts
|
|
75
|
+
- `src/` - Source code
|
|
76
|
+
- `test/` - Tests
|
|
77
|
+
- `README.md` - Documentation
|
|
78
|
+
- `LICENSE` - MIT License
|
|
79
|
+
- `CHANGELOG.md` - Version history
|
|
80
|
+
- `QUICKSTART.md` - Quick start guide
|
|
81
|
+
- `EXAMPLES.md` - Usage examples
|
|
82
|
+
- `ARCHITECTURE.md` - Technical docs
|
|
83
|
+
- `CONTRIBUTING.md` - Contribution guide
|
|
84
|
+
- `OVERLAY_MODE.md` - Overlay mode docs
|
|
85
|
+
- `package.json` - Package config
|
|
86
|
+
|
|
87
|
+
### ❌ Excluded (via .gitignore)
|
|
88
|
+
- `node_modules/` - Dependencies
|
|
89
|
+
- `.vscode/` - Editor config
|
|
90
|
+
- `*.log` - Log files
|
|
91
|
+
- `.env` - Environment files
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 🎯 After Publishing
|
|
96
|
+
|
|
97
|
+
### 1. Verify Publication
|
|
98
|
+
|
|
99
|
+
Visit: https://www.npmjs.com/package/mani-calc
|
|
100
|
+
|
|
101
|
+
You should see your package!
|
|
102
|
+
|
|
103
|
+
### 2. Test Installation
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# In a different directory
|
|
107
|
+
npm install -g mani-calc
|
|
108
|
+
|
|
109
|
+
# Test it
|
|
110
|
+
mani-calc "2 + 3 * 5"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 3. Create GitHub Release
|
|
114
|
+
|
|
115
|
+
1. Go to: https://github.com/Maniredii/mani-calc/releases
|
|
116
|
+
2. Click "Create a new release"
|
|
117
|
+
3. Tag: `v1.1.0`
|
|
118
|
+
4. Title: `v1.1.0 - Overlay Mode Release`
|
|
119
|
+
5. Description: Copy from `RELEASE_NOTES_v1.1.0.md`
|
|
120
|
+
6. Publish release
|
|
121
|
+
|
|
122
|
+
### 4. Update README Badge
|
|
123
|
+
|
|
124
|
+
Your npm version badge will now work:
|
|
125
|
+
```markdown
|
|
126
|
+
[](https://www.npmjs.com/package/mani-calc)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## 🔄 Updating the Package (Future)
|
|
132
|
+
|
|
133
|
+
When you want to publish updates:
|
|
134
|
+
|
|
135
|
+
### 1. Update Version
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# For bug fixes (1.1.0 → 1.1.1)
|
|
139
|
+
npm version patch
|
|
140
|
+
|
|
141
|
+
# For new features (1.1.0 → 1.2.0)
|
|
142
|
+
npm version minor
|
|
143
|
+
|
|
144
|
+
# For breaking changes (1.1.0 → 2.0.0)
|
|
145
|
+
npm version major
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
This automatically:
|
|
149
|
+
- Updates `package.json`
|
|
150
|
+
- Creates a git commit
|
|
151
|
+
- Creates a git tag
|
|
152
|
+
|
|
153
|
+
### 2. Push Changes
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
git push origin main --tags
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### 3. Publish
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
npm publish
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## 🛠️ Troubleshooting
|
|
168
|
+
|
|
169
|
+
### Error: "Package name already exists"
|
|
170
|
+
|
|
171
|
+
If `mani-calc` is taken, you'll need to:
|
|
172
|
+
1. Choose a different name (e.g., `@yourusername/mani-calc`)
|
|
173
|
+
2. Update `package.json` name field
|
|
174
|
+
3. Try publishing again
|
|
175
|
+
|
|
176
|
+
### Error: "You must be logged in"
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
npm login
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Error: "You do not have permission"
|
|
183
|
+
|
|
184
|
+
Make sure you're logged in as the correct user:
|
|
185
|
+
```bash
|
|
186
|
+
npm whoami
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Error: "Version already published"
|
|
190
|
+
|
|
191
|
+
You can't republish the same version. Bump the version:
|
|
192
|
+
```bash
|
|
193
|
+
npm version patch
|
|
194
|
+
npm publish
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## 📊 NPM Package Stats
|
|
200
|
+
|
|
201
|
+
After publishing, you can track:
|
|
202
|
+
|
|
203
|
+
- **Downloads**: https://npm-stat.com/charts.html?package=mani-calc
|
|
204
|
+
- **Package page**: https://www.npmjs.com/package/mani-calc
|
|
205
|
+
- **Unpkg CDN**: https://unpkg.com/mani-calc/
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 🎯 Marketing After Publishing
|
|
210
|
+
|
|
211
|
+
### 1. Share on Social Media
|
|
212
|
+
|
|
213
|
+
**Twitter/X:**
|
|
214
|
+
```
|
|
215
|
+
🎉 Just published mani-calc v1.1.0 to npm!
|
|
216
|
+
|
|
217
|
+
⚡ Spotlight-style calculator for Windows
|
|
218
|
+
🎨 NEW: Floating search box (Alt+Space)
|
|
219
|
+
💻 System commands (sleep, lock, etc.)
|
|
220
|
+
🔄 Unit conversions & natural language
|
|
221
|
+
|
|
222
|
+
npm install -g mani-calc
|
|
223
|
+
|
|
224
|
+
https://www.npmjs.com/package/mani-calc
|
|
225
|
+
https://github.com/Maniredii/mani-calc
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### 2. Post on Reddit
|
|
229
|
+
|
|
230
|
+
Subreddits:
|
|
231
|
+
- r/node
|
|
232
|
+
- r/javascript
|
|
233
|
+
- r/Windows
|
|
234
|
+
- r/productivity
|
|
235
|
+
- r/programming
|
|
236
|
+
|
|
237
|
+
### 3. Submit to Product Hunt
|
|
238
|
+
|
|
239
|
+
https://www.producthunt.com/posts/create
|
|
240
|
+
|
|
241
|
+
### 4. Write a Blog Post
|
|
242
|
+
|
|
243
|
+
Platforms:
|
|
244
|
+
- Dev.to
|
|
245
|
+
- Hashnode
|
|
246
|
+
- Medium
|
|
247
|
+
|
|
248
|
+
### 5. Create a Demo Video
|
|
249
|
+
|
|
250
|
+
Record yourself using:
|
|
251
|
+
- Windows Search integration
|
|
252
|
+
- Overlay mode
|
|
253
|
+
- System commands
|
|
254
|
+
|
|
255
|
+
Upload to YouTube and link in README.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## 📈 Success Metrics
|
|
260
|
+
|
|
261
|
+
Track these after publishing:
|
|
262
|
+
|
|
263
|
+
- **Week 1 Goal**: 100 downloads
|
|
264
|
+
- **Month 1 Goal**: 500 downloads
|
|
265
|
+
- **GitHub Stars**: 50+
|
|
266
|
+
- **Issues/PRs**: Community engagement
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## 🎉 Ready to Publish!
|
|
271
|
+
|
|
272
|
+
Your package is production-ready. Just run:
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
npm login
|
|
276
|
+
npm publish
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
And you're live! 🚀
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## 📞 Need Help?
|
|
284
|
+
|
|
285
|
+
- NPM Docs: https://docs.npmjs.com/
|
|
286
|
+
- Publishing Guide: https://docs.npmjs.com/cli/v8/commands/npm-publish
|
|
287
|
+
- Package Naming: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#name
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
**Good luck with your launch!** 🎊
|
package/QUICKSTART.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# 🚀 Quick Start Guide - Mani-Calc
|
|
2
|
+
|
|
3
|
+
Get up and running with Mani-Calc in under 2 minutes!
|
|
4
|
+
|
|
5
|
+
## Step 1: Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g mani-calc
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Step 2: Set Up Windows Search Integration
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
mani-calc install
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Note:** You may need to run this as Administrator for full Windows Search integration.
|
|
18
|
+
|
|
19
|
+
## Step 3: Start Using!
|
|
20
|
+
|
|
21
|
+
### Option A: Windows Search (Recommended)
|
|
22
|
+
1. Press `Win + S` to open Windows Search
|
|
23
|
+
2. Type: `calc: 2 + 3 * 5`
|
|
24
|
+
3. See instant result: **17**
|
|
25
|
+
4. Result is automatically copied to clipboard!
|
|
26
|
+
|
|
27
|
+
### Option B: Command Line
|
|
28
|
+
```bash
|
|
29
|
+
mani-calc "2 + 3 * 5"
|
|
30
|
+
# Output: ✓ 2 + 3 * 5 = 17
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Option C: Interactive Mode
|
|
34
|
+
```bash
|
|
35
|
+
mani-calc
|
|
36
|
+
# Then type your calculations:
|
|
37
|
+
calc> 2 + 3 * 5
|
|
38
|
+
✓ 2 + 3 * 5 = 17
|
|
39
|
+
|
|
40
|
+
calc> 10 km to miles
|
|
41
|
+
✓ 10 km = 6.21 miles
|
|
42
|
+
|
|
43
|
+
calc> what is 25 percent of 200
|
|
44
|
+
✓ what is 25 percent of 200 = 50
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Common Examples
|
|
48
|
+
|
|
49
|
+
### Math
|
|
50
|
+
```bash
|
|
51
|
+
mani-calc "sqrt(144)" # 12
|
|
52
|
+
mani-calc "2^10" # 1024
|
|
53
|
+
mani-calc "(100 - 20) / 4" # 20
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Natural Language
|
|
57
|
+
```bash
|
|
58
|
+
mani-calc "what is 15 percent of 300" # 45
|
|
59
|
+
mani-calc "half of 120" # 60
|
|
60
|
+
mani-calc "square root of 81" # 9
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Unit Conversions
|
|
64
|
+
```bash
|
|
65
|
+
mani-calc "5 miles to km" # 8.05 km
|
|
66
|
+
mani-calc "10 kg to pounds" # 22.05 pounds
|
|
67
|
+
mani-calc "25 celsius to fahrenheit" # 77 fahrenheit
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### History
|
|
71
|
+
```bash
|
|
72
|
+
mani-calc history # View recent calculations
|
|
73
|
+
mani-calc "clear history" # Clear all history
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Tips & Tricks
|
|
77
|
+
|
|
78
|
+
### 💡 Pro Tips
|
|
79
|
+
- Results are **automatically copied** to your clipboard
|
|
80
|
+
- Type `calc:` in Windows Search for instant access
|
|
81
|
+
- Use `history` to review past calculations
|
|
82
|
+
- All calculations work **100% offline**
|
|
83
|
+
|
|
84
|
+
### 🎯 Keyboard Shortcuts
|
|
85
|
+
- `Ctrl+C` in interactive mode to exit
|
|
86
|
+
- Type `exit` or `quit` to leave interactive mode
|
|
87
|
+
- Type `clear` to clear the screen
|
|
88
|
+
- Type `help` for examples
|
|
89
|
+
|
|
90
|
+
## Troubleshooting
|
|
91
|
+
|
|
92
|
+
### Windows Search not working?
|
|
93
|
+
```bash
|
|
94
|
+
# Run as Administrator
|
|
95
|
+
mani-calc install
|
|
96
|
+
|
|
97
|
+
# Then restart Windows Explorer
|
|
98
|
+
taskkill /f /im explorer.exe && start explorer.exe
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Need help?
|
|
102
|
+
```bash
|
|
103
|
+
mani-calc --help
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## What's Next?
|
|
107
|
+
|
|
108
|
+
- ⭐ Star the project on [GitHub](https://github.com/manireddy/mani-calc)
|
|
109
|
+
- 📖 Read the full [README](README.md) for all features
|
|
110
|
+
- 🐛 Report bugs or request features in [Issues](https://github.com/manireddy/mani-calc/issues)
|
|
111
|
+
- 🤝 Contribute! See [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
**Happy calculating! 🧮**
|
package/QUICK_PUBLISH.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# 🚀 Quick Publishing Commands
|
|
2
|
+
|
|
3
|
+
## Step 1: Login to NPM
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm login
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
**You'll be asked for:**
|
|
10
|
+
- Username
|
|
11
|
+
- Password
|
|
12
|
+
- Email
|
|
13
|
+
- One-time password (if 2FA enabled)
|
|
14
|
+
|
|
15
|
+
**Don't have an npm account?**
|
|
16
|
+
Create one at: https://www.npmjs.com/signup
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 2: Verify Login
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm whoami
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Should show your npm username.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Step 3: Publish!
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm publish
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**That's it!** Your package will be live at:
|
|
37
|
+
https://www.npmjs.com/package/mani-calc
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 🎉 After Publishing
|
|
42
|
+
|
|
43
|
+
### Test Installation
|
|
44
|
+
```bash
|
|
45
|
+
npm install -g mani-calc
|
|
46
|
+
mani-calc "2 + 3 * 5"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Share the News!
|
|
50
|
+
```
|
|
51
|
+
🎉 mani-calc v1.1.0 is now on npm!
|
|
52
|
+
|
|
53
|
+
⚡ Spotlight for Windows
|
|
54
|
+
🎨 Floating search box (Alt+Space)
|
|
55
|
+
💻 System commands
|
|
56
|
+
🔄 Unit conversions
|
|
57
|
+
|
|
58
|
+
npm install -g mani-calc
|
|
59
|
+
|
|
60
|
+
https://www.npmjs.com/package/mani-calc
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 📊 Your Package Info
|
|
66
|
+
|
|
67
|
+
- **Name**: `mani-calc`
|
|
68
|
+
- **Version**: `1.1.0`
|
|
69
|
+
- **Description**: Spotlight-style instant calculator for Windows Search
|
|
70
|
+
- **License**: MIT
|
|
71
|
+
- **Repository**: https://github.com/Maniredii/mani-calc
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## ⚠️ Important Notes
|
|
76
|
+
|
|
77
|
+
1. **Package name must be unique** - `mani-calc` should be available
|
|
78
|
+
2. **Can't unpublish** - After 24 hours, you can only deprecate
|
|
79
|
+
3. **Version must be unique** - Can't republish same version
|
|
80
|
+
4. **Email will be public** - Your npm email is visible
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 🔄 Future Updates
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Update version
|
|
88
|
+
npm version patch # 1.1.0 → 1.1.1
|
|
89
|
+
npm version minor # 1.1.0 → 1.2.0
|
|
90
|
+
npm version major # 1.1.0 → 2.0.0
|
|
91
|
+
|
|
92
|
+
# Push to GitHub
|
|
93
|
+
git push origin main --tags
|
|
94
|
+
|
|
95
|
+
# Publish
|
|
96
|
+
npm publish
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
**Ready? Run these commands:**
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npm login
|
|
105
|
+
npm publish
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
🚀 **Let's make mani-calc available to the world!**
|