mani-calc 2.1.0 → 2.1.1

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/CONTRIBUTING.md DELETED
@@ -1,110 +0,0 @@
1
- # Contributing to Mani-Calc
2
-
3
- Thank you for your interest in contributing to Mani-Calc! 🎉
4
-
5
- ## How to Contribute
6
-
7
- ### Reporting Bugs
8
- 1. Check if the bug has already been reported in [Issues](https://github.com/manireddy/mani-calc/issues)
9
- 2. If not, create a new issue with:
10
- - Clear title and description
11
- - Steps to reproduce
12
- - Expected vs actual behavior
13
- - Your environment (Windows version, Node.js version)
14
-
15
- ### Suggesting Features
16
- 1. Check existing [Issues](https://github.com/manireddy/mani-calc/issues) for similar suggestions
17
- 2. Create a new issue with:
18
- - Clear description of the feature
19
- - Use cases and benefits
20
- - Possible implementation approach
21
-
22
- ### Code Contributions
23
-
24
- #### Setup Development Environment
25
- ```bash
26
- # Clone the repository
27
- git clone https://github.com/manireddy/mani-calc.git
28
- cd mani-calc
29
-
30
- # Install dependencies
31
- npm install
32
-
33
- # Run tests
34
- npm test
35
-
36
- # Test locally
37
- node bin/cli.js "2 + 3 * 5"
38
- ```
39
-
40
- #### Making Changes
41
- 1. Fork the repository
42
- 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
43
- 3. Make your changes
44
- 4. Add tests for new functionality
45
- 5. Ensure all tests pass (`npm test`)
46
- 6. Commit with clear messages (`git commit -m 'Add amazing feature'`)
47
- 7. Push to your fork (`git push origin feature/amazing-feature`)
48
- 8. Open a Pull Request
49
-
50
- #### Code Style
51
- - Use clear, descriptive variable names
52
- - Add comments for complex logic
53
- - Follow existing code structure
54
- - Keep functions focused and small
55
- - Use ES6+ features where appropriate
56
-
57
- #### Testing
58
- - Add tests for new features
59
- - Ensure existing tests pass
60
- - Test on Windows 10/11
61
- - Test both CLI and Windows Search integration
62
-
63
- ### Areas for Contribution
64
-
65
- #### High Priority
66
- - [ ] PowerToys Run plugin integration
67
- - [ ] Advanced math functions
68
- - [ ] Currency conversion (with offline rates)
69
- - [ ] Date/time calculations
70
-
71
- #### Medium Priority
72
- - [ ] Graph plotting
73
- - [ ] Step-by-step solutions
74
- - [ ] Custom user commands
75
- - [ ] Plugin system
76
-
77
- #### Nice to Have
78
- - [ ] Voice input support
79
- - [ ] Themes for CLI
80
- - [ ] Export history to CSV
81
- - [ ] Sync history across devices
82
-
83
- ## Code of Conduct
84
-
85
- ### Our Standards
86
- - Be respectful and inclusive
87
- - Welcome newcomers
88
- - Accept constructive criticism
89
- - Focus on what's best for the community
90
-
91
- ### Unacceptable Behavior
92
- - Harassment or discrimination
93
- - Trolling or insulting comments
94
- - Publishing others' private information
95
- - Other unprofessional conduct
96
-
97
- ## Questions?
98
-
99
- Feel free to:
100
- - Open an issue for discussion
101
- - Reach out to maintainers
102
- - Check existing documentation
103
-
104
- ## License
105
-
106
- By contributing, you agree that your contributions will be licensed under the MIT License.
107
-
108
- ---
109
-
110
- **Thank you for making Mani-Calc better!** 🚀
package/EXAMPLES.md DELETED
@@ -1,220 +0,0 @@
1
- # Examples - Mani-Calc
2
-
3
- Comprehensive examples of what you can do with Mani-Calc.
4
-
5
- ## 📐 Basic Math
6
-
7
- ### Arithmetic
8
- ```bash
9
- mani-calc "2 + 3" # 5
10
- mani-calc "10 - 4" # 6
11
- mani-calc "5 * 6" # 30
12
- mani-calc "20 / 4" # 5
13
- mani-calc "2 + 3 * 5" # 17 (order of operations)
14
- mani-calc "(2 + 3) * 5" # 25 (parentheses)
15
- ```
16
-
17
- ### Powers & Roots
18
- ```bash
19
- mani-calc "2^8" # 256
20
- mani-calc "10^3" # 1000
21
- mani-calc "sqrt(49)" # 7
22
- mani-calc "sqrt(144)" # 12
23
- mani-calc "cbrt(27)" # 3 (cube root)
24
- ```
25
-
26
- ### Advanced Math
27
- ```bash
28
- mani-calc "sin(pi/2)" # 1
29
- mani-calc "cos(0)" # 1
30
- mani-calc "tan(pi/4)" # 1
31
- mani-calc "log(100)" # 2 (log base 10)
32
- mani-calc "ln(e)" # 1 (natural log)
33
- mani-calc "abs(-42)" # 42
34
- ```
35
-
36
- ### Constants
37
- ```bash
38
- mani-calc "pi" # 3.14159...
39
- mani-calc "e" # 2.71828...
40
- mani-calc "pi * 2" # 6.28318...
41
- mani-calc "e^2" # 7.38906...
42
- ```
43
-
44
- ## 💬 Natural Language
45
-
46
- ### Percentages
47
- ```bash
48
- mani-calc "what is 25 percent of 200" # 50
49
- mani-calc "15% of 300" # 45
50
- mani-calc "calculate 10 percent of 500" # 50
51
- mani-calc "what is 7.5 percent of 1000" # 75
52
- ```
53
-
54
- ### Fractions
55
- ```bash
56
- mani-calc "half of 80" # 40
57
- mani-calc "quarter of 100" # 25
58
- mani-calc "third of 90" # 30
59
- ```
60
-
61
- ### Powers (Natural Language)
62
- ```bash
63
- mani-calc "10 squared" # 100
64
- mani-calc "5 cubed" # 125
65
- mani-calc "2 to the power of 10" # 1024
66
- mani-calc "3 raised to 4" # 81
67
- ```
68
-
69
- ### Square Roots (Natural Language)
70
- ```bash
71
- mani-calc "square root of 64" # 8
72
- mani-calc "sqrt of 100" # 10
73
- ```
74
-
75
- ## 🔄 Unit Conversions
76
-
77
- ### Length
78
- ```bash
79
- mani-calc "10 km to miles" # 6.21 miles
80
- mani-calc "5 miles to km" # 8.05 km
81
- mani-calc "100 cm to inches" # 39.37 inches
82
- mani-calc "6 feet to meters" # 1.83 meters
83
- mani-calc "1000 mm to cm" # 100 cm
84
- mani-calc "2 yards to feet" # 6 feet
85
- ```
86
-
87
- ### Weight
88
- ```bash
89
- mani-calc "10 kg to pounds" # 22.05 pounds
90
- mani-calc "5 pounds to kg" # 2.27 kg
91
- mani-calc "1000 grams to kg" # 1 kg
92
- mani-calc "16 oz to pounds" # 1 pound
93
- mani-calc "2 tons to kg" # 2000 kg
94
- ```
95
-
96
- ### Temperature
97
- ```bash
98
- mani-calc "0 celsius to fahrenheit" # 32 fahrenheit
99
- mani-calc "100 celsius to fahrenheit" # 212 fahrenheit
100
- mani-calc "98.6 fahrenheit to celsius" # 37 celsius
101
- mani-calc "273.15 kelvin to celsius" # 0 celsius
102
- mani-calc "32 fahrenheit to kelvin" # 273.15 kelvin
103
- ```
104
-
105
- ### Time
106
- ```bash
107
- mani-calc "2 hours to minutes" # 120 minutes
108
- mani-calc "120 seconds to minutes" # 2 minutes
109
- mani-calc "1 day to hours" # 24 hours
110
- mani-calc "1 week to days" # 7 days
111
- mani-calc "365 days to hours" # 8760 hours
112
- ```
113
-
114
- ### Volume
115
- ```bash
116
- mani-calc "5 liters to gallons" # 1.32 gallons
117
- mani-calc "1 gallon to liters" # 3.79 liters
118
- mani-calc "500 ml to liters" # 0.5 liters
119
- mani-calc "2 cups to ml" # 473.18 ml
120
- mani-calc "1 quart to liters" # 0.95 liters
121
- ```
122
-
123
- ### Speed
124
- ```bash
125
- mani-calc "100 km/h to mph" # 62.14 mph
126
- mani-calc "60 mph to km/h" # 96.56 km/h
127
- mani-calc "10 m/s to km/h" # 36 km/h
128
- ```
129
-
130
- ## 📚 History Commands
131
-
132
- ```bash
133
- mani-calc history # View last 10 calculations
134
- mani-calc "clear history" # Clear all history
135
- ```
136
-
137
- ## 🎯 Real-World Use Cases
138
-
139
- ### Shopping
140
- ```bash
141
- # Calculate discount
142
- mani-calc "what is 20 percent of 150" # 30 (discount amount)
143
- mani-calc "150 - 30" # 120 (final price)
144
-
145
- # Tax calculation
146
- mani-calc "what is 8.5 percent of 100" # 8.5 (tax)
147
- ```
148
-
149
- ### Cooking
150
- ```bash
151
- mani-calc "2 cups to ml" # 473.18 ml
152
- mani-calc "350 fahrenheit to celsius" # 176.67 celsius
153
- mani-calc "half of 250" # 125 (halving recipe)
154
- ```
155
-
156
- ### Travel
157
- ```bash
158
- mani-calc "500 km to miles" # 310.69 miles
159
- mani-calc "120 km/h to mph" # 74.56 mph
160
- mani-calc "10 kg to pounds" # 22.05 pounds (luggage weight)
161
- ```
162
-
163
- ### Fitness
164
- ```bash
165
- mani-calc "5 miles to km" # 8.05 km (running distance)
166
- mani-calc "150 pounds to kg" # 68.04 kg (body weight)
167
- ```
168
-
169
- ### Science & Engineering
170
- ```bash
171
- mani-calc "9.8 * 5" # 49 (acceleration * time)
172
- mani-calc "sqrt(2) * 10" # 14.14 (diagonal calculation)
173
- mani-calc "pi * 5^2" # 78.54 (circle area)
174
- ```
175
-
176
- ## 🔧 Advanced Features
177
-
178
- ### Chaining Calculations
179
- ```bash
180
- # In interactive mode
181
- calc> x = 100
182
- calc> x * 2
183
- ✓ 200
184
-
185
- calc> x / 4
186
- ✓ 25
187
- ```
188
-
189
- ### Complex Expressions
190
- ```bash
191
- mani-calc "((10 + 5) * 3 - 20) / 5" # 5
192
- mani-calc "sqrt(16) + sqrt(9)" # 7
193
- mani-calc "2^3 + 3^2" # 17
194
- ```
195
-
196
- ## 💡 Tips
197
-
198
- 1. **Quotes**: Use quotes for queries with spaces
199
- ```bash
200
- mani-calc "10 km to miles" # ✓ Correct
201
- mani-calc 10 km to miles # ✗ Won't work
202
- ```
203
-
204
- 2. **Case Insensitive**: Units are case-insensitive
205
- ```bash
206
- mani-calc "10 KM to MILES" # Works!
207
- mani-calc "10 Km to Miles" # Works!
208
- ```
209
-
210
- 3. **Flexible Syntax**: Multiple ways to express the same thing
211
- ```bash
212
- mani-calc "10 kilometers to miles"
213
- mani-calc "10 km to miles"
214
- mani-calc "10 kilometer to mile"
215
- # All work!
216
- ```
217
-
218
- ---
219
-
220
- **Want more examples? Check out the [README](README.md) or run `mani-calc --help`**
package/OVERLAY_MODE.md DELETED
@@ -1,364 +0,0 @@
1
- # 🎨 Overlay Mode - Floating Search Box
2
-
3
- ## ✨ New Feature: Spotlight-Style Overlay
4
-
5
- Mani-Calc now includes a **beautiful floating search box** that appears anywhere on your screen with a simple keyboard shortcut!
6
-
7
- ---
8
-
9
- ## 🚀 Quick Start
10
-
11
- ### 1. Install Dependencies
12
- ```bash
13
- npm install
14
- ```
15
-
16
- ### 2. Start Overlay Mode
17
- ```bash
18
- npm run overlay
19
- ```
20
-
21
- Or after global installation:
22
- ```bash
23
- mani-calc-overlay
24
- ```
25
-
26
- ### 3. Use the Hotkey
27
- Press **`Alt+Space`** anywhere in Windows to toggle the search box!
28
-
29
- ---
30
-
31
- ## 🎯 Features
32
-
33
- ### ⚡ Global Hotkey
34
- - **Default**: `Alt+Space`
35
- - Works from any application
36
- - Instant access to calculations
37
- - Always-on-top overlay
38
-
39
- ### 🧮 All Calculation Features
40
- - Math expressions
41
- - Natural language queries
42
- - Unit conversions
43
- - Calculation history
44
-
45
- ### 💻 System Commands
46
- Control your computer with simple commands:
47
-
48
- | Command | Action |
49
- |---------|--------|
50
- | `help` | Show available commands |
51
- | `theme` | Toggle Light/Dark mode |
52
- | `quit` | Quit application |
53
- | `sleep` | Put computer to sleep |
54
- | `shutdown` | Shutdown computer |
55
- | `restart` | Restart computer |
56
- | `lock` | Lock computer |
57
- | `logout` | Log out current user |
58
- | `empty recycle bin` | Empty recycle bin |
59
- | `volume up` | Increase volume |
60
- | `volume down` | Decrease volume |
61
- | `mute` | Mute volume |
62
- | `unmute` | Unmute volume |
63
-
64
- ### 🎨 Beautiful UI
65
- - Glassmorphism design
66
- - Smooth animations
67
- - Live preview
68
- - Auto-hide on blur
69
- - Keyboard shortcuts
70
-
71
- ---
72
-
73
- ## 📖 Usage
74
-
75
- ### Basic Calculations
76
- ```
77
- Type: 2 + 3 * 5
78
- Result: ✓ 2 + 3 * 5 = 17
79
- ```
80
-
81
- ### Natural Language
82
- ```
83
- Type: what is 25% of 200
84
- Result: ✓ what is 25% of 200 = 50
85
- ```
86
-
87
- ### Unit Conversions
88
- ```
89
- Type: 10 km to miles
90
- Result: ✓ 10 km = 6.21 miles
91
- ```
92
-
93
- ### System Commands
94
- ```
95
- Type: sleep
96
- Result: ✓ System going to sleep...
97
- ```
98
-
99
- ```
100
- Type: lock
101
- Result: ✓ Locking computer...
102
- ```
103
-
104
- ---
105
-
106
- ## ⌨️ Keyboard Shortcuts
107
-
108
- | Shortcut | Action |
109
- |----------|--------|
110
- | `Alt+Space` | Toggle search box |
111
- | `Enter` | Execute query |
112
- | `Esc` | Close search box |
113
- | `Ctrl+C` | Exit overlay mode |
114
-
115
- ---
116
-
117
- ## 🎨 UI Features
118
-
119
- ### Glassmorphism Design
120
- - Semi-transparent white background
121
- - Blur effect
122
- - Smooth shadows
123
- - Modern aesthetic
124
-
125
- ### Live Preview
126
- - See results as you type
127
- - Instant feedback
128
- - No need to press Enter for simple calculations
129
-
130
- ### Auto-Hide
131
- - Automatically hides when you click outside
132
- - Keeps your desktop clean
133
- - Instant recall with hotkey
134
-
135
- ### Smooth Animations
136
- - Slide-down effect for results
137
- - Fade transitions
138
- - Professional feel
139
-
140
- ---
141
-
142
- ## 🔧 Advanced Configuration
143
-
144
- ### Change Hotkey
145
- Edit `src/ui/floating-search.js`:
146
-
147
- ```javascript
148
- this.hotkey = 'Ctrl+Shift+Space'; // Your custom hotkey
149
- ```
150
-
151
- ### Customize Position
152
- Edit `src/ui/floating-search.js`:
153
-
154
- ```javascript
155
- const y = Math.floor(height * 0.3); // Change 0.3 to adjust vertical position
156
- ```
157
-
158
- ### Customize Appearance
159
- Edit `src/ui/overlay.html` CSS section to change:
160
- - Colors
161
- - Size
162
- - Transparency
163
- - Border radius
164
- - Shadows
165
-
166
- ---
167
-
168
- ## 💡 Use Cases
169
-
170
- ### Quick Calculations While Working
171
- ```
172
- Working in Excel → Alt+Space → "2500 * 0.15" → Enter
173
- Result copied → Paste in Excel
174
- ```
175
-
176
- ### System Control
177
- ```
178
- Finishing work → Alt+Space → "lock" → Enter
179
- Computer locked instantly
180
- ```
181
-
182
- ### Unit Conversions
183
- ```
184
- Reading recipe → Alt+Space → "2 cups to ml" → Enter
185
- Result: 473.18 ml
186
- ```
187
-
188
- ### Quick Sleep
189
- ```
190
- Alt+Space → "sleep" → Enter
191
- Computer goes to sleep
192
- ```
193
-
194
- ---
195
-
196
- ## 🛠️ Troubleshooting
197
-
198
- ### Hotkey Not Working?
199
-
200
- **Check for conflicts:**
201
- ```bash
202
- # Other apps might be using Alt+Space
203
- # Change the hotkey in floating-search.js
204
- ```
205
-
206
- ### Overlay Not Appearing?
207
-
208
- **Restart overlay mode:**
209
- ```bash
210
- # Press Ctrl+C to stop
211
- # Run: npm run overlay
212
- ```
213
-
214
- ### System Commands Not Working?
215
-
216
- **Run as Administrator:**
217
- ```bash
218
- # Right-click Command Prompt → Run as Administrator
219
- # Then: npm run overlay
220
- ```
221
-
222
- ---
223
-
224
- ## 🎯 Comparison: Overlay vs Windows Search
225
-
226
- | Feature | Overlay Mode | Windows Search |
227
- |---------|--------------|----------------|
228
- | **Hotkey** | Alt+Space (customizable) | Win+S |
229
- | **Position** | Center screen | Top-right |
230
- | **Design** | Modern glassmorphism | Windows default |
231
- | **System Commands** | ✅ Yes | ❌ No |
232
- | **Live Preview** | ✅ Yes | ❌ No |
233
- | **Always Available** | ✅ Yes | ✅ Yes |
234
-
235
- **Use Both!**
236
- - **Overlay**: Quick calculations, system commands
237
- - **Windows Search**: File search, web search, calculations
238
-
239
- ---
240
-
241
- ## 🚀 Auto-Start on Windows Boot
242
-
243
- ### Option 1: Task Scheduler
244
- 1. Open Task Scheduler
245
- 2. Create Basic Task
246
- 3. Name: "Mani-Calc Overlay"
247
- 4. Trigger: At log on
248
- 5. Action: Start program
249
- 6. Program: `C:\Program Files\nodejs\node.exe`
250
- 7. Arguments: `C:\Users\[YourName]\AppData\Roaming\npm\node_modules\mani-calc\bin\overlay.js`
251
-
252
- ### Option 2: Startup Folder
253
- 1. Press `Win+R`
254
- 2. Type: `shell:startup`
255
- 3. Create shortcut to overlay.js
256
- 4. Restart computer
257
-
258
- ---
259
-
260
- ## 📊 Performance
261
-
262
- - **Memory Usage**: ~50-80 MB (Electron)
263
- - **CPU Usage**: <1% when idle
264
- - **Startup Time**: ~2 seconds
265
- - **Response Time**: <100ms
266
-
267
- ---
268
-
269
- ## 🎨 Customization Ideas
270
-
271
- ### Change Theme
272
- Edit `overlay.html` CSS:
273
- ```css
274
- /* Dark theme */
275
- .search-box {
276
- background: rgba(30, 30, 30, 0.95);
277
- color: white;
278
- }
279
- ```
280
-
281
- ### Add More System Commands
282
- Edit `floating-search.js`:
283
- ```javascript
284
- 'screenshot': {
285
- action: async () => {
286
- await execAsync('snippingtool');
287
- return 'Opening Snipping Tool...';
288
- }
289
- }
290
- ```
291
-
292
- ### Change Size
293
- Edit `floating-search.js`:
294
- ```javascript
295
- width: 800, // Make wider
296
- height: 100, // Make taller
297
- ```
298
-
299
- ---
300
-
301
- ## 🔐 Privacy & Security
302
-
303
- ### System Commands
304
- - All commands run locally
305
- - No network requests
306
- - Requires user confirmation (Enter key)
307
- - Can be disabled by removing commands
308
-
309
- ### Data Storage
310
- - Same as CLI mode
311
- - History stored locally
312
- - No telemetry
313
-
314
- ---
315
-
316
- ## 🎉 Tips & Tricks
317
-
318
- ### 1. Quick Math
319
- ```
320
- Alt+Space → "15*23" → Enter
321
- Result copied instantly
322
- ```
323
-
324
- ### 2. Chain Commands
325
- ```
326
- Alt+Space → "100 km to miles" → Enter
327
- Alt+Space → "lock" → Enter
328
- ```
329
-
330
- ### 3. Use as Calculator Replacement
331
- ```
332
- Never open Calculator app again!
333
- Alt+Space is faster
334
- ```
335
-
336
- ### 4. System Control Hub
337
- ```
338
- Alt+Space → "sleep"
339
- Alt+Space → "lock"
340
- Alt+Space → "mute"
341
- ```
342
-
343
- ---
344
-
345
- ## 🗺️ Future Enhancements
346
-
347
- - [ ] Custom themes
348
- - [ ] Plugin system
349
- - [ ] File search integration
350
- - [ ] Web search integration
351
- - [ ] Clipboard history
352
- - [ ] Snippets/templates
353
- - [ ] Multi-monitor support
354
- - [ ] Custom hotkeys per command
355
-
356
- ---
357
-
358
- ## 🤝 Contributing
359
-
360
- Want to add more system commands or features? See [CONTRIBUTING.md](../CONTRIBUTING.md)
361
-
362
- ---
363
-
364
- **Enjoy your new productivity superpower!** ⚡