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 +49 -45
- package/package.json +1 -1
- package/payload/utils-inject.js +1 -1
package/README.md
CHANGED
|
@@ -1,79 +1,83 @@
|
|
|
1
|
-
# Antigravity RTL
|
|
1
|
+
# Antigravity RTL Patch
|
|
2
2
|
|
|
3
|
-
>
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
[
|
|
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
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
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
|
-
|
|
21
|
+
---
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
## 🚀 Installation & Usage
|
|
21
24
|
|
|
22
|
-
|
|
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
|
-
|
|
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
|
|
33
|
+
npx antigravity-rtl-patch patch
|
|
30
34
|
```
|
|
31
35
|
|
|
32
|
-
|
|
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
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
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-
|
|
49
|
+
npx antigravity-rtl-patch restore
|
|
47
50
|
```
|
|
48
51
|
|
|
49
|
-
|
|
52
|
+
---
|
|
50
53
|
|
|
51
|
-
|
|
54
|
+
## 🔐 A Note on Permissions (Linux / macOS)
|
|
52
55
|
|
|
53
|
-
**
|
|
54
|
-
|
|
55
|
-
|
|
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
|
|
61
|
+
sudo npx antigravity-rtl-patch patch
|
|
61
62
|
```
|
|
63
|
+
*(You will be prompted to enter your computer's password).*
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
---
|
|
64
66
|
|
|
65
|
-
## 🛠️
|
|
67
|
+
## 🛠️ Operating System Support
|
|
66
68
|
|
|
67
|
-
|
|
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
|
-
|
|
70
|
-
npx antigravity-rtl-patcher restore
|
|
71
|
-
```
|
|
73
|
+
---
|
|
72
74
|
|
|
73
|
-
##
|
|
75
|
+
## ⌨️ Keyboard Shortcuts
|
|
74
76
|
|
|
75
|
-
|
|
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
|
-
|
|
82
|
+
## 📝 License
|
|
83
|
+
This project is open-source and available under the [MIT License](LICENSE).
|
package/package.json
CHANGED
package/payload/utils-inject.js
CHANGED
|
@@ -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
|
|
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>
|