antigravity-rtl 1.0.2 → 1.0.6
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 +18 -0
- package/index.js +11 -4
- package/package.json +1 -1
- package/payload.js +4 -4
package/README.md
CHANGED
|
@@ -25,6 +25,8 @@ Because the tool needs to modify the Antigravity application files, you must run
|
|
|
25
25
|
```bash
|
|
26
26
|
sudo npx antigravity-rtl
|
|
27
27
|
```
|
|
28
|
+
> **macOS Users:** If you get a "Permission Denied" error even with sudo, ensure your terminal (e.g. Terminal, iTerm2, VS Code) has **App Management** permissions enabled in `System Settings > Privacy & Security > App Management`.
|
|
29
|
+
|
|
28
30
|
|
|
29
31
|
### Windows
|
|
30
32
|
Open **PowerShell** or **Command Prompt** as **Administrator** (Right-click -> Run as Administrator), then run:
|
|
@@ -34,6 +36,9 @@ npx antigravity-rtl
|
|
|
34
36
|
|
|
35
37
|
> **Note:** You must have [Node.js](https://nodejs.org) installed on your system to run this command.
|
|
36
38
|
|
|
39
|
+
> [!WARNING]
|
|
40
|
+
> **App Updates:** Since updating the Antigravity application overwrites its internal files, the RTL patch will be removed. You will need to run the installation command again after each update to re-apply the patch.
|
|
41
|
+
|
|
37
42
|
## Restoring to Original (Uninstall)
|
|
38
43
|
|
|
39
44
|
If you ever want to revert Antigravity back to its original state (before the patch), simply run the command with the `--restore` flag:
|
|
@@ -51,6 +56,10 @@ This CLI tool:
|
|
|
51
56
|
3. Extracts the application and safely injects the Smart RTL Engine into the core logic (`utils.js`).
|
|
52
57
|
4. Repacks the application so you can start using it immediately.
|
|
53
58
|
|
|
59
|
+
## Future Plans (Roadmap)
|
|
60
|
+
|
|
61
|
+
- Add Right-to-Left (RTL) support for **Antigravity IDE**.
|
|
62
|
+
|
|
54
63
|
## Contributing
|
|
55
64
|
|
|
56
65
|
Feel free to open issues or submit pull requests. Let's make Antigravity accessible and beautiful for everyone!
|
|
@@ -84,6 +93,8 @@ Feel free to open issues or submit pull requests. Let's make Antigravity accessi
|
|
|
84
93
|
```bash
|
|
85
94
|
sudo npx antigravity-rtl
|
|
86
95
|
```
|
|
96
|
+
> **کاربران مک (macOS):** اگر با وجود استفاده از sudo باز هم خطای Permission Denied دریافت کردید، باید به ترمینال خود (مثل Terminal، iTerm2 یا VS Code) دسترسی **App Management** بدهید. برای این کار به مسیر `System Settings > Privacy & Security > App Management` بروید و دسترسی ترمینال خود را فعال کنید.
|
|
97
|
+
|
|
87
98
|
|
|
88
99
|
### در ویندوز
|
|
89
100
|
برنامهٔ **PowerShell** یا **Command Prompt** را در حالت **Administrator** (راستکلیک -> Run as Administrator) باز کنید و دستور زیر را بنویسید:
|
|
@@ -93,6 +104,9 @@ npx antigravity-rtl
|
|
|
93
104
|
|
|
94
105
|
> **نکته:** برای اجرای این دستور باید حتماً [Node.js](https://nodejs.org) روی سیستم شما نصب باشد.
|
|
95
106
|
|
|
107
|
+
> [!WARNING]
|
|
108
|
+
> **بهروزرسانی برنامه:** از آنجا که آپدیت کردنِ برنامهٔ آنتیگرویتی کدهای آن را بازنویسی میکند، پچِ اعمالشده از بین خواهد رفت و لازم است پس از هر بار آپدیت، دستور نصب را مجدداً اجرا کنید.
|
|
109
|
+
|
|
96
110
|
## بازگردانی به حالت اولیه (Uninstall)
|
|
97
111
|
|
|
98
112
|
اگر زمانی خواستید آنتیگرویتی را به حالتِ کارخانه (قبل از نصب این پچ) برگردانید، فقط کافیست دستور بالا را با فلگ `--restore` اجرا کنید:
|
|
@@ -109,6 +123,10 @@ sudo npx antigravity-rtl --restore
|
|
|
109
123
|
3. فایل را استخراج کرده و کدهای موتورِ RTL را به ایمنترین شکل ممکن به هستهٔ برنامه تزریق میکند.
|
|
110
124
|
4. در نهایت برنامه را مجدداً بستهبندی میکند تا بتوانید بلافاصله از آن لذت ببرید.
|
|
111
125
|
|
|
126
|
+
## کارهای آینده (Roadmap)
|
|
127
|
+
|
|
128
|
+
- اضافه کردن قابلیت حل مشکل راستبهچپ برای **Antigravity IDE**.
|
|
129
|
+
|
|
112
130
|
## مشارکت در توسعه
|
|
113
131
|
|
|
114
132
|
با کمال میل از نظرات، گزارشِ باگها و Pull Request های شما استقبال میشود.
|
package/index.js
CHANGED
|
@@ -12,7 +12,9 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
12
12
|
const __dirname = path.dirname(__filename);
|
|
13
13
|
const { blue, cyan, green, red, yellow, bold } = picocolors;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
const pkgPath = path.join(__dirname, 'package.json');
|
|
16
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
17
|
+
console.log(bold(cyan(`\n✨ Antigravity Smart RTL Patcher v${pkg.version}\n`)));
|
|
16
18
|
|
|
17
19
|
function getDefaultPath() {
|
|
18
20
|
if (os.platform() === 'darwin') {
|
|
@@ -81,10 +83,13 @@ async function main() {
|
|
|
81
83
|
console.error(red('\nSystem Error: ' + e.message));
|
|
82
84
|
if (os.platform() === 'win32') {
|
|
83
85
|
console.error(yellow('\nPlease run your terminal (PowerShell/CMD) as Administrator and try again.\n'));
|
|
86
|
+
} else if (os.platform() === 'darwin') {
|
|
87
|
+
console.error(yellow('\nPlease ensure you run this command with sudo.'));
|
|
88
|
+
console.error(yellow('If you are using sudo, macOS requires your terminal to have "App Management" permission.'));
|
|
89
|
+
console.error(yellow('Go to: System Settings > Privacy & Security > App Management'));
|
|
90
|
+
console.error(yellow('And enable the toggle for your terminal (e.g. Terminal, iTerm2, VS Code), then try again.\n'));
|
|
84
91
|
} else {
|
|
85
|
-
console.error(yellow('\
|
|
86
|
-
console.error(bold(' sudo npm install -g antigravity-rtl'));
|
|
87
|
-
console.error(bold(' sudo antigravity-rtl\n'));
|
|
92
|
+
console.error(yellow('\nPlease run this command with sudo.\n'));
|
|
88
93
|
}
|
|
89
94
|
process.exit(1);
|
|
90
95
|
}
|
|
@@ -127,6 +132,8 @@ async function main() {
|
|
|
127
132
|
}
|
|
128
133
|
|
|
129
134
|
utilsCode = utilsCode.replace(anchor, payload);
|
|
135
|
+
// Force-enable DevTools in packaged app
|
|
136
|
+
utilsCode = utilsCode.replace(/devTools:\s*!electron_1?\.app\.isPackaged/g, 'devTools: true');
|
|
130
137
|
fs.writeFileSync(utilsPath, utilsCode);
|
|
131
138
|
|
|
132
139
|
const fontSource = path.join(__dirname, 'Vazirmatn-Variable.woff2');
|
package/package.json
CHANGED
package/payload.js
CHANGED
|
@@ -98,7 +98,7 @@ win.webContents.on('console-message', (event, level, message) => {
|
|
|
98
98
|
[data-testid="user-input-step"] > *:not(pre):not(code) {
|
|
99
99
|
direction: rtl !important;
|
|
100
100
|
text-align: right !important;
|
|
101
|
-
unicode-bidi:
|
|
101
|
+
unicode-bidi: isolate !important;
|
|
102
102
|
}
|
|
103
103
|
\` : '';
|
|
104
104
|
|
|
@@ -145,14 +145,14 @@ win.webContents.on('console-message', (event, level, message) => {
|
|
|
145
145
|
.cursor-edit.text-secondary-foreground * {
|
|
146
146
|
direction: ltr !important;
|
|
147
147
|
text-align: left !important;
|
|
148
|
-
unicode-bidi:
|
|
148
|
+
unicode-bidi: isolate !important;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
/* Custom CSS removed to rely on Tailwind completely */
|
|
152
152
|
|
|
153
153
|
/* Code Blocks */
|
|
154
154
|
pre, code, pre *, code * {
|
|
155
|
-
unicode-bidi:
|
|
155
|
+
unicode-bidi: isolate !important;
|
|
156
156
|
direction: ltr !important;
|
|
157
157
|
text-align: left !important;
|
|
158
158
|
font-family: \${codeFontStr} !important;
|
|
@@ -164,7 +164,7 @@ win.webContents.on('console-message', (event, level, message) => {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
[contenteditable="true"], [contenteditable="true"] * {
|
|
167
|
-
unicode-bidi:
|
|
167
|
+
unicode-bidi: isolate !important;
|
|
168
168
|
text-align: start !important;
|
|
169
169
|
}
|
|
170
170
|
|