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

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. */
@@ -554,6 +563,11 @@ export declare class VcsGitRepo {
554
563
  stageHunks(selections: Array<VcsHunkSelection>, rawDiff?: string | undefined | null, signal?: unknown | undefined | null): Promise<undefined>
555
564
  /** Create commit. */
556
565
  commitCreate(message: string, options: VcsCommitOptions, signal?: unknown | undefined | null): Promise<string>
566
+ /**
567
+ * Write a commit object for `tree` on `parents` without moving any ref or
568
+ * touching the index/worktree (`git commit-tree`).
569
+ */
570
+ commitTree(tree: string, parents: Array<string>, message: string, author?: VcsCommitAuthor | undefined | null, signal?: unknown | undefined | null): Promise<string>
557
571
  /** Checkout revision. */
558
572
  checkout(rev: string, signal?: unknown | undefined | null): Promise<undefined>
559
573
  /** Create branch. */
@@ -2588,6 +2602,17 @@ export declare function rasterizeSvg(input: Uint8Array, maxWidthPx: number, maxH
2588
2602
  */
2589
2603
  export declare function readImageFromClipboard(): Promise<ClipboardImage | undefined | null>
2590
2604
 
2605
+ /**
2606
+ * Read plain text from the system clipboard.
2607
+ *
2608
+ * Returns `Ok(None)` when the clipboard holds no text, so callers can tell
2609
+ * "empty" from "unreadable" without spawning a shell bridge.
2610
+ *
2611
+ * # Errors
2612
+ * Returns an error if clipboard access fails.
2613
+ */
2614
+ export declare function readTextFromClipboard(): Promise<string | undefined | null>
2615
+
2591
2616
  /**
2592
2617
  * Render Mermaid diagram text (flowchart, state, sequence, class, ER, or
2593
2618
  * 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.10",
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.10",
118
+ "@oh-my-pi/pi-natives-linux-arm64": "18.4.10",
119
+ "@oh-my-pi/pi-natives-darwin-x64": "18.4.10",
120
+ "@oh-my-pi/pi-natives-darwin-arm64": "18.4.10",
121
+ "@oh-my-pi/pi-natives-win32-x64": "18.4.10",
122
+ "@oh-my-pi/pi-natives-win32-arm64": "18.4.10"
123
123
  }
124
124
  }