@oh-my-pi/pi-natives 15.6.0 → 15.7.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/native/index.d.ts +28 -1
- package/native/index.js +2 -1
- package/package.json +6 -6
package/native/index.d.ts
CHANGED
|
@@ -136,7 +136,7 @@ export declare class Shell {
|
|
|
136
136
|
* `packages/natives/native/index.js` (which derives the name from
|
|
137
137
|
* `package.json#version`).
|
|
138
138
|
*/
|
|
139
|
-
export declare function
|
|
139
|
+
export declare function __piNativesV15_7_1(): void
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
142
|
* Apply conservative pre-execution rewrites to a bash command.
|
|
@@ -344,6 +344,33 @@ export interface BashFixupResult {
|
|
|
344
344
|
stripped: Array<string>
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
+
export interface BlockRange {
|
|
348
|
+
/** 1-indexed inclusive first line of the resolved block. */
|
|
349
|
+
startLine: number
|
|
350
|
+
/** 1-indexed inclusive last line of the resolved block. */
|
|
351
|
+
endLine: number
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Find the outermost named tree-sitter node that begins on `options.line`.
|
|
356
|
+
*
|
|
357
|
+
* Returns its 1-indexed inclusive line span, or `null` when the language is
|
|
358
|
+
* unrecognized, the line is out of range / blank, no node begins on that line,
|
|
359
|
+
* or the resolved subtree contains a syntax error.
|
|
360
|
+
*/
|
|
361
|
+
export declare function blockRangeAt(options: BlockRangeOptions): BlockRange | null
|
|
362
|
+
|
|
363
|
+
export interface BlockRangeOptions {
|
|
364
|
+
/** Source code to inspect. */
|
|
365
|
+
code: string
|
|
366
|
+
/** Language alias (e.g. "rust", "typescript") used before path inference. */
|
|
367
|
+
lang?: string
|
|
368
|
+
/** File path used to infer language by extension when `lang` is omitted. */
|
|
369
|
+
path?: string
|
|
370
|
+
/** 1-indexed source line the block must begin on. */
|
|
371
|
+
line: number
|
|
372
|
+
}
|
|
373
|
+
|
|
347
374
|
/** Clipboard image payload encoded as PNG bytes. */
|
|
348
375
|
export interface ClipboardImage {
|
|
349
376
|
/** PNG-encoded image bytes. */
|
package/native/index.js
CHANGED
|
@@ -23,10 +23,11 @@ export const PtySession = nativeBindings.PtySession;
|
|
|
23
23
|
export const Shell = nativeBindings.Shell;
|
|
24
24
|
|
|
25
25
|
// functions
|
|
26
|
-
export const
|
|
26
|
+
export const __piNativesV15_7_1 = nativeBindings.__piNativesV15_7_1;
|
|
27
27
|
export const applyBashFixups = nativeBindings.applyBashFixups;
|
|
28
28
|
export const astEdit = nativeBindings.astEdit;
|
|
29
29
|
export const astGrep = nativeBindings.astGrep;
|
|
30
|
+
export const blockRangeAt = nativeBindings.blockRangeAt;
|
|
30
31
|
export const copyToClipboard = nativeBindings.copyToClipboard;
|
|
31
32
|
export const countTokens = nativeBindings.countTokens;
|
|
32
33
|
export const detectMacOSAppearance = nativeBindings.detectMacOSAppearance;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-natives",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.7.1",
|
|
4
4
|
"description": "Native Rust bindings for grep, clipboard, image processing, syntax highlighting, PTY, and shell operations via N-API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"optionalDependencies": {
|
|
69
|
-
"@oh-my-pi/pi-natives-linux-x64": "15.
|
|
70
|
-
"@oh-my-pi/pi-natives-linux-arm64": "15.
|
|
71
|
-
"@oh-my-pi/pi-natives-darwin-x64": "15.
|
|
72
|
-
"@oh-my-pi/pi-natives-darwin-arm64": "15.
|
|
73
|
-
"@oh-my-pi/pi-natives-win32-x64": "15.
|
|
69
|
+
"@oh-my-pi/pi-natives-linux-x64": "15.7.1",
|
|
70
|
+
"@oh-my-pi/pi-natives-linux-arm64": "15.7.1",
|
|
71
|
+
"@oh-my-pi/pi-natives-darwin-x64": "15.7.1",
|
|
72
|
+
"@oh-my-pi/pi-natives-darwin-arm64": "15.7.1",
|
|
73
|
+
"@oh-my-pi/pi-natives-win32-x64": "15.7.1"
|
|
74
74
|
}
|
|
75
75
|
}
|