refactor(pi-natives): simplified NAPI naming by removing explicit js_name attributes

- Removed explicit js_name attributes from NAPI macros across all modules, relying on automatic snake_case to camelCase conversion.
- Renamed internal functions in keys.rs for clarity: parse_kitty_sequence_napi() -> parse_kitty_sequence() and parse_kitty_sequence() -> parse_kitty_sequence_bytes().
- Renamed text.rs functions for consistency: set_env_tab_width() -> set_default_tab_width() and get_env_tab_width() -> get_default_tab_width().
- Updated documentation to reflect automatic NAPI naming convention and simplified export mapping tables.
This commit is contained in:
can1357
2026-04-08 09:45:59 +02:00
parent fb67603a88
commit 6e19642315
23 changed files with 86 additions and 196 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ Maintainer rule: if a wrapper is not re-exported from `src/index.ts`, it is not
## JS API ↔ native export mapping (representative)
The Rust side uses N-API export names (typically via `#[napi(js_name = ...)]`) that must match these binding keys.
The Rust side uses N-API export names (typically from `#[napi]` snake_case -> camelCase conversion, with occasional explicit aliases) that must match these binding keys.
| Category | Public JS API (wrapper) | Native binding key | Return type | Async? |
|---|---|---|---|---|