@oh-my-pi/pi-natives 18.4.8 → 18.4.9

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.
@@ -7,3 +7,6 @@ export declare function copyToClipboard(text: string): void;
7
7
 
8
8
  /** Read an image from the clipboard, loading the native addon on first use. */
9
9
  export declare function readImageFromClipboard(): Promise<ClipboardImage | undefined | null>;
10
+
11
+ /** Read plain text from the clipboard, loading the native addon on first use. */
12
+ export declare function readTextFromClipboard(): Promise<string | undefined | null>;
@@ -9,3 +9,8 @@ export function copyToClipboard(text) {
9
9
  export function readImageFromClipboard() {
10
10
  return loadNative().readImageFromClipboard();
11
11
  }
12
+
13
+ /** Read plain text from the clipboard, loading the native addon on first use. */
14
+ export function readTextFromClipboard() {
15
+ return loadNative().readTextFromClipboard();
16
+ }
package/native/index.d.ts CHANGED
@@ -364,6 +364,15 @@ export declare class Shell {
364
364
  * dropping it (which would SIGKILL them via kill-on-drop).
365
365
  */
366
366
  liveBackgroundJobCount(): Promise<number>
367
+ /**
368
+ * Pids of the still-alive processes spawned by this session's in-flight
369
+ * `run`, in spawn order: foreground commands, pipeline stages, and `&`
370
+ * jobs started by that run. Builtins run in-process and never appear.
371
+ * Empty when no run is executing; children that outlive their run are no
372
+ * longer reported once it returns. Synchronous and never waits on the
373
+ * running command.
374
+ */
375
+ pids(): Array<number>
367
376
  }
368
377
 
369
378
  /** One word-completion engine running on its own thread. */
@@ -2588,6 +2597,17 @@ export declare function rasterizeSvg(input: Uint8Array, maxWidthPx: number, maxH
2588
2597
  */
2589
2598
  export declare function readImageFromClipboard(): Promise<ClipboardImage | undefined | null>
2590
2599
 
2600
+ /**
2601
+ * Read plain text from the system clipboard.
2602
+ *
2603
+ * Returns `Ok(None)` when the clipboard holds no text, so callers can tell
2604
+ * "empty" from "unreadable" without spawning a shell bridge.
2605
+ *
2606
+ * # Errors
2607
+ * Returns an error if clipboard access fails.
2608
+ */
2609
+ export declare function readTextFromClipboard(): Promise<string | undefined | null>
2610
+
2591
2611
  /**
2592
2612
  * Render Mermaid diagram text (flowchart, state, sequence, class, ER, or
2593
2613
  * xychart) to ASCII/Unicode art. Synchronous: callers render inside the
package/native/index.js CHANGED
@@ -114,6 +114,7 @@ export const parseKittySequence = nativeBindings.parseKittySequence ?? missingNa
114
114
  export const pdfToMarkdown = nativeBindings.pdfToMarkdown ?? missingNativeExport("pdfToMarkdown");
115
115
  export const rasterizeSvg = nativeBindings.rasterizeSvg ?? missingNativeExport("rasterizeSvg");
116
116
  export const readImageFromClipboard = nativeBindings.readImageFromClipboard ?? missingNativeExport("readImageFromClipboard");
117
+ export const readTextFromClipboard = nativeBindings.readTextFromClipboard ?? missingNativeExport("readTextFromClipboard");
117
118
  export const renderMermaidAscii = nativeBindings.renderMermaidAscii ?? missingNativeExport("renderMermaidAscii");
118
119
  export const renderSnapcompactPng = nativeBindings.renderSnapcompactPng ?? missingNativeExport("renderSnapcompactPng");
119
120
  export const search = nativeBindings.search ?? missingNativeExport("search");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-natives",
3
- "version": "18.4.8",
3
+ "version": "18.4.9",
4
4
  "description": "Native Rust bindings for PDF conversion, audio, WebRTC, grep, clipboard, image processing, syntax highlighting, PTY, and shell operations via N-API",
5
5
  "type": "module",
6
6
  "homepage": "https://omp.sh",
@@ -114,11 +114,11 @@
114
114
  }
115
115
  },
116
116
  "optionalDependencies": {
117
- "@oh-my-pi/pi-natives-linux-x64": "18.4.8",
118
- "@oh-my-pi/pi-natives-linux-arm64": "18.4.8",
119
- "@oh-my-pi/pi-natives-darwin-x64": "18.4.8",
120
- "@oh-my-pi/pi-natives-darwin-arm64": "18.4.8",
121
- "@oh-my-pi/pi-natives-win32-x64": "18.4.8",
122
- "@oh-my-pi/pi-natives-win32-arm64": "18.4.8"
117
+ "@oh-my-pi/pi-natives-linux-x64": "18.4.9",
118
+ "@oh-my-pi/pi-natives-linux-arm64": "18.4.9",
119
+ "@oh-my-pi/pi-natives-darwin-x64": "18.4.9",
120
+ "@oh-my-pi/pi-natives-darwin-arm64": "18.4.9",
121
+ "@oh-my-pi/pi-natives-win32-x64": "18.4.9",
122
+ "@oh-my-pi/pi-natives-win32-arm64": "18.4.9"
123
123
  }
124
124
  }