antigravity-rtl-patch 1.0.2 → 1.0.3

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/README.md CHANGED
@@ -1,79 +1,83 @@
1
- # Antigravity RTL Patcher
1
+ # Antigravity RTL Patch
2
2
 
3
- > RTL (Right-to-Left) support for [Antigravity](https://antigravity.dev) desktop app with Persian/Arabic text.
3
+ <div align="center">
4
+ <img src="https://img.shields.io/npm/v/antigravity-rtl-patch?color=blue&style=flat-square" alt="NPM Version">
5
+ <img src="https://img.shields.io/npm/dm/antigravity-rtl-patch?color=green&style=flat-square" alt="NPM Downloads">
6
+ <img src="https://img.shields.io/github/license/VaFa1726/antigravity-rtl-patcher?style=flat-square" alt="License">
7
+ </div>
4
8
 
5
- [![npm version](https://img.shields.io/npm/v/antigravity-rtl-patcher)](https://www.npmjs.com/package/antigravity-rtl-patcher)
6
- [![npm downloads](https://img.shields.io/npm/dt/antigravity-rtl-patcher)](https://www.npmjs.com/package/antigravity-rtl-patcher)
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
9
+ <br>
10
+
11
+ **Antigravity RTL Patch** is an advanced, smart typography and layout patcher designed specifically for the [Antigravity](https://github.com/vafa1726) application. It seamlessly adds intelligent Right-to-Left (RTL) support for Persian, Arabic, and Hebrew languages without breaking the application's core LTR user interface.
8
12
 
9
13
  ## ✨ Features
10
14
 
11
- - 🌐 Smart RTL detection for Persian/Arabic text
12
- - 📝 RTL support for messages, tables, and code blocks
13
- - 🎨 UI elements (sidebar, navigation) stay LTR
14
- - ⌨️ Toggle with `Alt + R` keyboard shortcut
15
- - 💾 Settings saved automatically
16
- - 🔤 Proper character rendering with system fonts
15
+ - **🧠 Smart RTL Detection:** Automatically detects Persian/Arabic text and applies RTL direction *only* where necessary. The main application layout (sidebars, navbars, menus) remains completely intact.
16
+ - **💬 Intelligent Input Fields:** Text inputs (like "Ask a question...") remain LTR while empty. As soon as you type an RTL character, the field instantly switches direction.
17
+ - **🎨 Native UI Widget:** Includes a sleek, non-intrusive floating settings panel (Alt+R) to toggle RTL on and off in real-time.
18
+ - **⚡ Zero Overhead:** Highly optimized DOM `TreeWalker` ensures zero performance impact on large chats.
19
+ - **🛡️ Safe & Reversible:** Automatically backs up your original `app.asar` before making any changes. You can restore to the factory state at any time.
17
20
 
18
- ## 🚀 Installation
21
+ ---
19
22
 
20
- ### Option 1: From npm (Recommended)
23
+ ## 🚀 Installation & Usage
21
24
 
22
- ```bash
23
- npx antigravity-rtl-patcher@latest patch
24
- ```
25
+ You do **not** need to download or clone this repository manually. The tool runs directly via `npx`, which comes pre-installed with [Node.js](https://nodejs.org/).
25
26
 
26
- ### Option 2: Direct from GitHub
27
+ > **Note:** If you don't have `npx`, please install Node.js first.
28
+
29
+ ### 1. Apply the Patch (Install)
30
+ Close the Antigravity application, open your terminal (or Command Prompt), and run:
27
31
 
28
32
  ```bash
29
- npx github:VaFa1726/antigravity-rtl-patcher patch
33
+ npx antigravity-rtl-patch patch
30
34
  ```
31
35
 
32
- Then restart Antigravity and press `Alt + R` to toggle RTL mode.
36
+ *The tool will automatically find your Antigravity installation, create a backup, and apply the patch. If it cannot find the app, it will prompt you to enter the path manually.*
33
37
 
34
- ## 📋 Commands
38
+ ### 2. Update to the Latest Version
39
+ To ensure you have the latest stable release with all bug fixes, run the patch command with the `@latest` tag:
35
40
 
36
- | Command | Description |
37
- |---------|-------------|
38
- | `agy-rtl patch` | Apply RTL patch |
39
- | `agy-rtl restore` | Restore original |
40
- | `agy-rtl status` | Check patch status |
41
- | `agy-rtl update` | Check for updates |
41
+ ```bash
42
+ npx antigravity-rtl-patch@latest patch
43
+ ```
42
44
 
43
- ## 🔧 Custom Installation Path
45
+ ### 3. Restore Original (Uninstall)
46
+ If you want to remove the patch and revert Antigravity to its original, unpatched state:
44
47
 
45
48
  ```bash
46
- npx antigravity-rtl-patcher patch --path /your/custom/path
49
+ npx antigravity-rtl-patch restore
47
50
  ```
48
51
 
49
- ## 🔄 After Antigravity Updates
52
+ ---
50
53
 
51
- Re-apply the patch after updating Antigravity:
54
+ ## 🔐 A Note on Permissions (Linux / macOS)
52
55
 
53
- **From npm:**
54
- ```bash
55
- npx antigravity-rtl-patcher@latest patch
56
- ```
56
+ Depending on how and where you installed Antigravity, you might get a **Permission Denied (EACCES)** error when running the tool. This happens because system directories (like `/opt/` on Linux or `/Applications/` on Mac) require Administrator rights to modify files.
57
+
58
+ If you encounter a permission error, simply run the command with `sudo`:
57
59
 
58
- **From GitHub:**
59
60
  ```bash
60
- npx github:VaFa1726/antigravity-rtl-patcher patch
61
+ sudo npx antigravity-rtl-patch patch
61
62
  ```
63
+ *(You will be prompted to enter your computer's password).*
62
64
 
63
- > **💡 Tip:** Use GitHub installation to get the latest changes immediately. npm version is updated every 24 hours.
65
+ ---
64
66
 
65
- ## 🛠️ Troubleshooting
67
+ ## 🛠️ Operating System Support
66
68
 
67
- **Restore original if needed:**
69
+ - **🐧 Linux:** Fully supported (Searches `/opt`, `/usr/lib`, `~/.local/share`, AppImage extracted locations, etc.)
70
+ - **🪟 Windows:** Fully supported (Searches `AppData\Local`, `Program Files`, etc.)
71
+ - **🍎 macOS:** Fully supported (Searches `/Applications/` and `~/Applications/`)
68
72
 
69
- ```bash
70
- npx antigravity-rtl-patcher restore
71
- ```
73
+ ---
72
74
 
73
- ## 📄 License
75
+ ## ⌨️ Keyboard Shortcuts
74
76
 
75
- MIT © [VaFa1726](https://github.com/VaFa1726)
77
+ Once patched, open Antigravity. You can quickly toggle the RTL mode using:
78
+ - **`Alt + R`**: Toggles the Smart RTL engine on/off globally.
76
79
 
77
80
  ---
78
81
 
79
- **Made with ❤️ for Persian/Arabic Developers**
82
+ ## 📝 License
83
+ This project is open-source and available under the [MIT License](LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antigravity-rtl-patch",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Advanced RTL and Persian/Arabic typography patcher for Antigravity with customizable UI",
5
5
  "main": "src/patcher.js",
6
6
  "bin": {
@@ -341,7 +341,7 @@ win.webContents.on('dom-ready', () => {
341
341
  panel.id = 'rtl-panel';
342
342
  panel.className = 'rtl-ui';
343
343
  panel.innerHTML = \`
344
- <div class="rtl-panel-header rtl-ui">Antigravity Smart RTL</div>
344
+ <div class="rtl-panel-header rtl-ui">Antigravity RTL</div>
345
345
  <div class="rtl-panel-body rtl-ui">
346
346
  <div class="rtl-row rtl-ui">
347
347
  <span class="rtl-label rtl-ui">RTL Mode</span>