mani-calc 1.2.2 โ†’ 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/QUICK_PUBLISH.md DELETED
@@ -1,108 +0,0 @@
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!**
@@ -1,262 +0,0 @@
1
- # ๐ŸŽ‰ Mani-Calc v1.1.0 - Overlay Mode Release!
2
-
3
- ## โœจ What's New
4
-
5
- ### ๐ŸŽจ Overlay Mode - The Game Changer!
6
-
7
- You asked for improvements, and we delivered! **Mani-Calc now has a beautiful floating search box** that appears anywhere on your screen with a simple keyboard shortcut!
8
-
9
- ---
10
-
11
- ## ๐Ÿš€ New Features
12
-
13
- ### 1. **Floating Search Box**
14
- - Press **`Alt+Space`** anywhere in Windows
15
- - Beautiful glassmorphism design
16
- - Always-on-top overlay
17
- - Auto-hide when you click outside
18
- - Smooth animations
19
-
20
- ### 2. **System Commands**
21
- Control your computer with simple commands:
22
-
23
- | Command | Action |
24
- |---------|--------|
25
- | `sleep` | Put computer to sleep |
26
- | `shutdown` | Shutdown computer |
27
- | `restart` | Restart computer |
28
- | `lock` | Lock computer |
29
- | `logout` | Log out current user |
30
- | `empty recycle bin` | Empty recycle bin |
31
- | `volume up` | Increase volume |
32
- | `volume down` | Decrease volume |
33
- | `mute` | Mute volume |
34
- | `unmute` | Unmute volume |
35
-
36
- ### 3. **Live Preview**
37
- - See results as you type
38
- - Instant feedback
39
- - No need to press Enter for simple calculations
40
-
41
- ### 4. **Enhanced UI**
42
- - Glassmorphism design (semi-transparent, blurred background)
43
- - Smooth slide-down animations
44
- - Color-coded results (success, error, system commands)
45
- - Keyboard shortcuts displayed
46
-
47
- ---
48
-
49
- ## ๐Ÿ“– How to Use
50
-
51
- ### Start Overlay Mode
52
- ```bash
53
- npm run overlay
54
-
55
- # Or after global install
56
- mani-calc-overlay
57
- ```
58
-
59
- ### Use the Hotkey
60
- Press **`Alt+Space`** anywhere in Windows!
61
-
62
- ### Examples
63
- ```
64
- Alt+Space โ†’ "2 + 3 * 5" โ†’ Enter
65
- Result: โœ“ 2 + 3 * 5 = 17
66
-
67
- Alt+Space โ†’ "10 km to miles" โ†’ Enter
68
- Result: โœ“ 10 km = 6.21 miles
69
-
70
- Alt+Space โ†’ "sleep" โ†’ Enter
71
- Result: โœ“ System going to sleep...
72
-
73
- Alt+Space โ†’ "lock" โ†’ Enter
74
- Result: โœ“ Locking computer...
75
- ```
76
-
77
- ---
78
-
79
- ## ๐ŸŽฏ Why This is Amazing
80
-
81
- ### Before
82
- 1. Open Calculator app
83
- 2. Type calculation
84
- 3. Copy result
85
- 4. Switch back to work
86
-
87
- ### After
88
- 1. Press `Alt+Space`
89
- 2. Type calculation
90
- 3. Done! (result auto-copied)
91
-
92
- **That's 3x faster!** โšก
93
-
94
- ---
95
-
96
- ## ๐Ÿ“ New Files
97
-
98
- - `src/ui/floating-search.js` - Floating search box logic
99
- - `src/ui/overlay.html` - Beautiful UI
100
- - `bin/overlay.js` - Overlay mode entry point
101
- - `OVERLAY_MODE.md` - Complete documentation
102
-
103
- ---
104
-
105
- ## ๐Ÿ”ง Technical Details
106
-
107
- ### Stack
108
- - **Electron** - For native window management
109
- - **Global Shortcuts** - `Alt+Space` hotkey
110
- - **IPC** - Communication between UI and backend
111
- - **Glassmorphism CSS** - Modern, beautiful design
112
-
113
- ### Performance
114
- - **Memory**: ~50-80 MB (Electron overhead)
115
- - **CPU**: <1% when idle
116
- - **Startup**: ~2 seconds
117
- - **Response**: <100ms
118
-
119
- ---
120
-
121
- ## ๐Ÿ“Š Comparison
122
-
123
- | Feature | v1.0.0 | v1.1.0 |
124
- |---------|--------|--------|
125
- | **Windows Search** | โœ… | โœ… |
126
- | **CLI** | โœ… | โœ… |
127
- | **Interactive Mode** | โœ… | โœ… |
128
- | **Overlay Mode** | โŒ | โœ… NEW! |
129
- | **System Commands** | โŒ | โœ… NEW! |
130
- | **Live Preview** | โŒ | โœ… NEW! |
131
- | **Global Hotkey** | โŒ | โœ… NEW! |
132
-
133
- ---
134
-
135
- ## ๐ŸŽจ UI Screenshots
136
-
137
- The overlay features:
138
- - **Glassmorphism design** - Semi-transparent with blur effect
139
- - **Smooth animations** - Slide-down results
140
- - **Color-coded feedback** - Green for success, red for errors, orange for system commands
141
- - **Keyboard shortcuts** - Displayed at bottom
142
- - **Auto-focus** - Input ready when you open it
143
-
144
- ---
145
-
146
- ## ๐Ÿ—บ๏ธ Roadmap Update
147
-
148
- ### โœ… Completed (v1.1.0)
149
- - [x] Floating search box overlay
150
- - [x] Global hotkey support
151
- - [x] System commands
152
- - [x] Live preview
153
- - [x] Glassmorphism UI
154
-
155
- ### ๐Ÿ”œ Coming Next (v1.2.0)
156
- - [ ] Custom themes
157
- - [ ] Plugin system
158
- - [ ] File search integration
159
- - [ ] Web search integration
160
- - [ ] Clipboard history
161
- - [ ] Multi-monitor support
162
-
163
- ---
164
-
165
- ## ๐Ÿ“– Documentation
166
-
167
- All documentation has been updated:
168
-
169
- - **README.md** - Added overlay mode section
170
- - **OVERLAY_MODE.md** - NEW: Complete overlay guide
171
- - **CHANGELOG.md** - v1.1.0 release notes
172
- - **package.json** - Updated to v1.1.0
173
-
174
- ---
175
-
176
- ## ๐Ÿš€ Installation
177
-
178
- ### For New Users
179
- ```bash
180
- npm install -g mani-calc
181
- npm run overlay
182
- ```
183
-
184
- ### For Existing Users
185
- ```bash
186
- npm update -g mani-calc
187
- npm run overlay
188
- ```
189
-
190
- ---
191
-
192
- ## ๐Ÿ’ก Tips & Tricks
193
-
194
- ### 1. Auto-Start on Boot
195
- Add to Windows Startup folder for always-available calculator
196
-
197
- ### 2. Customize Hotkey
198
- Edit `src/ui/floating-search.js` to change `Alt+Space` to your preference
199
-
200
- ### 3. Add Custom Commands
201
- Edit `floating-search.js` to add your own system commands
202
-
203
- ### 4. Change Theme
204
- Edit `overlay.html` CSS for dark mode or custom colors
205
-
206
- ---
207
-
208
- ## ๐ŸŽฏ Use Cases
209
-
210
- ### Quick Math While Working
211
- ```
212
- Working in Excel โ†’ Alt+Space โ†’ "2500 * 0.15" โ†’ Enter
213
- Result copied โ†’ Paste in Excel
214
- ```
215
-
216
- ### System Control
217
- ```
218
- Finishing work โ†’ Alt+Space โ†’ "lock" โ†’ Enter
219
- Computer locked instantly
220
- ```
221
-
222
- ### Unit Conversions
223
- ```
224
- Reading recipe โ†’ Alt+Space โ†’ "2 cups to ml" โ†’ Enter
225
- Result: 473.18 ml
226
- ```
227
-
228
- ---
229
-
230
- ## ๐Ÿค Community Feedback
231
-
232
- This feature was inspired by your request! Keep the feedback coming:
233
- - ๐Ÿ› Report bugs
234
- - ๐Ÿ’ก Suggest features
235
- - โญ Star the repo
236
- - ๐Ÿค Contribute code
237
-
238
- ---
239
-
240
- ## ๐Ÿ“ˆ What's Next?
241
-
242
- We're listening to the community! Vote on features:
243
- 1. Custom themes?
244
- 2. Plugin system?
245
- 3. File search integration?
246
- 4. Web search integration?
247
-
248
- [Open an issue](https://github.com/Maniredii/mani-calc/issues) to vote!
249
-
250
- ---
251
-
252
- ## ๐ŸŽ‰ Thank You!
253
-
254
- Thank you for using Mani-Calc and providing feedback. This overlay mode makes Windows productivity even better!
255
-
256
- **Enjoy your new floating calculator!** โšก
257
-
258
- ---
259
-
260
- **Version**: 1.1.0
261
- **Release Date**: January 21, 2026
262
- **Major Features**: Overlay Mode, System Commands, Live Preview
package/test/test.js DELETED
@@ -1,133 +0,0 @@
1
- const MathEngine = require('../src/core/math-engine');
2
- const NLPParser = require('../src/core/nlp-parser');
3
- const UnitConverter = require('../src/core/unit-converter');
4
- const chalk = require('chalk');
5
-
6
- console.log(chalk.cyan.bold('\n๐Ÿงช Running Mani-Calc Tests...\n'));
7
-
8
- let passed = 0;
9
- let failed = 0;
10
-
11
- function test(name, fn) {
12
- try {
13
- fn();
14
- console.log(chalk.green(`โœ“ ${name}`));
15
- passed++;
16
- } catch (error) {
17
- console.log(chalk.red(`โœ— ${name}`));
18
- console.log(chalk.gray(` ${error.message}`));
19
- failed++;
20
- }
21
- }
22
-
23
- function assertEqual(actual, expected, message = '') {
24
- if (actual !== expected) {
25
- throw new Error(`Expected ${expected}, got ${actual}. ${message}`);
26
- }
27
- }
28
-
29
- // Math Engine Tests
30
- console.log(chalk.yellow('\n๐Ÿ“ Math Engine Tests:'));
31
-
32
- const mathEngine = new MathEngine();
33
-
34
- test('Basic addition', () => {
35
- assertEqual(mathEngine.evaluate('2 + 3'), 5);
36
- });
37
-
38
- test('Order of operations', () => {
39
- assertEqual(mathEngine.evaluate('2 + 3 * 5'), 17);
40
- });
41
-
42
- test('Parentheses', () => {
43
- assertEqual(mathEngine.evaluate('(10 + 20) / 5'), 6);
44
- });
45
-
46
- test('Square root', () => {
47
- assertEqual(mathEngine.evaluate('sqrt(49)'), 7);
48
- });
49
-
50
- test('Power', () => {
51
- assertEqual(mathEngine.evaluate('2^8'), 256);
52
- });
53
-
54
- test('Decimal operations', () => {
55
- assertEqual(mathEngine.evaluate('10.5 + 5.5'), 16);
56
- });
57
-
58
- // NLP Parser Tests
59
- console.log(chalk.yellow('\n๐Ÿ’ฌ NLP Parser Tests:'));
60
-
61
- const nlpParser = new NLPParser();
62
-
63
- test('Percentage parsing', () => {
64
- const result = nlpParser.parse('what is 25 percent of 200');
65
- assertEqual(result.type, 'natural_language');
66
- assertEqual(result.expression, '(25 / 100) * 200');
67
- });
68
-
69
- test('Fraction parsing', () => {
70
- const result = nlpParser.parse('half of 80');
71
- assertEqual(result.type, 'natural_language');
72
- assertEqual(result.expression, '80 / 2');
73
- });
74
-
75
- test('Square root parsing', () => {
76
- const result = nlpParser.parse('square root of 64');
77
- assertEqual(result.type, 'natural_language');
78
- assertEqual(result.expression, 'sqrt(64)');
79
- });
80
-
81
- test('Conversion parsing', () => {
82
- const result = nlpParser.parse('10 km to miles');
83
- assertEqual(result.type, 'conversion');
84
- assertEqual(result.value, 10);
85
- assertEqual(result.fromUnit, 'km');
86
- assertEqual(result.toUnit, 'miles');
87
- });
88
-
89
- // Unit Converter Tests
90
- console.log(chalk.yellow('\n๐Ÿ”„ Unit Converter Tests:'));
91
-
92
- const unitConverter = new UnitConverter();
93
-
94
- test('Kilometers to miles', () => {
95
- const result = unitConverter.convert(10, 'km', 'miles');
96
- assertEqual(Math.round(result * 100), 621); // 6.21 miles
97
- });
98
-
99
- test('Kilograms to pounds', () => {
100
- const result = unitConverter.convert(5, 'kg', 'pounds');
101
- assertEqual(Math.round(result * 100), 1102); // 11.02 pounds
102
- });
103
-
104
- test('Celsius to Fahrenheit', () => {
105
- const result = unitConverter.convert(100, 'celsius', 'fahrenheit');
106
- assertEqual(result, 212);
107
- });
108
-
109
- test('Celsius to Fahrenheit (0ยฐC)', () => {
110
- const result = unitConverter.convert(0, 'celsius', 'fahrenheit');
111
- assertEqual(result, 32);
112
- });
113
-
114
- test('Hours to seconds', () => {
115
- const result = unitConverter.convert(2, 'hours', 'seconds');
116
- assertEqual(result, 7200);
117
- });
118
-
119
- test('Meters to feet', () => {
120
- const result = unitConverter.convert(10, 'meters', 'feet');
121
- assertEqual(Math.round(result * 100), 3281); // 32.81 feet
122
- });
123
-
124
- // Summary
125
- console.log(chalk.cyan.bold('\n๐Ÿ“Š Test Summary:'));
126
- console.log(chalk.green(`โœ“ Passed: ${passed}`));
127
- if (failed > 0) {
128
- console.log(chalk.red(`โœ— Failed: ${failed}`));
129
- process.exit(1);
130
- } else {
131
- console.log(chalk.green('\n๐ŸŽ‰ All tests passed!\n'));
132
- process.exit(0);
133
- }