@oh-my-pi/pi-natives 16.2.5 → 16.2.7

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 CHANGED
@@ -162,7 +162,7 @@ export declare function __ompInstallTokioRuntime(): void
162
162
  * `packages/natives/native/index.js` (which derives the name from
163
163
  * `package.json#version`).
164
164
  */
165
- export declare function __piNativesV16_2_5(): void
165
+ export declare function __piNativesV16_2_7(): void
166
166
 
167
167
  /**
168
168
  * Apply conservative pre-execution rewrites to a bash command.
@@ -1315,13 +1315,15 @@ export declare function readImageFromClipboard(): Promise<ClipboardImage | undef
1315
1315
  * The bitmap height hugs the rows the text actually occupies
1316
1316
  * (`usedRows * lineRepeat * cellHeight`), so a partially filled frame never
1317
1317
  * pays for blank padding rows. The glyph grid holds `floor(size/cellWidth) *
1318
- * floor(size/cellHeight/lineRepeat)` characters; input beyond that is ignored
1319
- * (the caller chunks text to capacity). Native-cell shapes encode as 4-bit
1320
- * indexed PNG; stretched shapes (target cell != font cell) encode as RGB.
1321
- * `stretch: false` pins the indexed path, printing natural-size glyphs on the
1322
- * requested cell box; `columns: 2` flows pre-wrapped newline-separated lines
1323
- * down two newspaper columns. `U+000E`/`U+000F` in `text` toggle dim-gray ink
1324
- * spans without occupying a cell.
1318
+ * floor(size/cellHeight/lineRepeat)` characters; input beyond that is ignored.
1319
+ * Native-cell bitmap-font shapes encode as indexed PNG; stretched bitmap-font
1320
+ * shapes (target cell != font cell) encode as RGB. TrueType shapes encode RGB
1321
+ * directly from grayscale coverage.
1322
+ * `stretch: false` pins bitmap fonts to the indexed path, printing
1323
+ * natural-size glyphs on the requested cell box; `columns: 2` flows
1324
+ * pre-wrapped newline-separated lines down two newspaper columns.
1325
+ * `U+000E`/`U+000F` in `text` toggle dim-gray ink spans without occupying a
1326
+ * cell.
1325
1327
  * Returns a promise for the PNG encoded as base64, created as a one-byte
1326
1328
  * (Latin-1) JS string straight from native code — no `Uint8Array` hop or
1327
1329
  * JS-side re-encode.
@@ -1468,8 +1470,8 @@ export interface SnapcompactRenderOptions {
1468
1470
  */
1469
1471
  size: number
1470
1472
  /**
1471
- * Bundled font: `"5x8"`, `"6x12"`, `"8x13"` (X.org BDF) or `"8x8"`
1472
- * (unscii-8). Default `"5x8"`.
1473
+ * Bundled font: `"5x8"`, `"6x12"`, `"8x13"` (X.org BDF), `"8x8"`
1474
+ * (unscii-8), or `"silver"` (embedded TrueType). Default `"5x8"`.
1473
1475
  */
1474
1476
  font?: string
1475
1477
  /**
@@ -1504,6 +1506,15 @@ export interface SnapcompactRenderOptions {
1504
1506
  columns?: number
1505
1507
  }
1506
1508
 
1509
+ /**
1510
+ * Return the subset of `chars` that the named snapcompact font can render.
1511
+ *
1512
+ * The TypeScript normalizer uses this to keep Unicode text intact only when
1513
+ * the selected native font has a glyph for it; renderer control codes are
1514
+ * considered renderable because they are interpreted outside font lookup.
1515
+ */
1516
+ export declare function snapcompactSupportedChars(font: string, chars: string): string
1517
+
1507
1518
  export declare function summarizeCode(options: SummaryOptions): SummaryResult
1508
1519
 
1509
1520
  export interface SummaryOptions {
package/native/index.js CHANGED
@@ -24,7 +24,7 @@ export const Shell = nativeBindings.Shell;
24
24
 
25
25
  // functions
26
26
  export const __ompInstallTokioRuntime = nativeBindings.__ompInstallTokioRuntime;
27
- export const __piNativesV16_2_5 = nativeBindings.__piNativesV16_2_5;
27
+ export const __piNativesV16_2_7 = nativeBindings.__piNativesV16_2_7;
28
28
  export const applyBashFixups = nativeBindings.applyBashFixups;
29
29
  export const astEdit = nativeBindings.astEdit;
30
30
  export const astGrep = nativeBindings.astGrep;
@@ -64,6 +64,7 @@ export const renderSnapcompactPng = nativeBindings.renderSnapcompactPng;
64
64
  export const search = nativeBindings.search;
65
65
  export const setHangulCompatJamoWidthOverride = nativeBindings.setHangulCompatJamoWidthOverride;
66
66
  export const sliceWithWidth = nativeBindings.sliceWithWidth;
67
+ export const snapcompactSupportedChars = nativeBindings.snapcompactSupportedChars;
67
68
  export const summarizeCode = nativeBindings.summarizeCode;
68
69
  export const supportsLanguage = nativeBindings.supportsLanguage;
69
70
  export const truncateToWidth = nativeBindings.truncateToWidth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-natives",
3
- "version": "16.2.5",
3
+ "version": "16.2.7",
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",
@@ -67,10 +67,10 @@
67
67
  }
68
68
  },
69
69
  "optionalDependencies": {
70
- "@oh-my-pi/pi-natives-linux-x64": "16.2.5",
71
- "@oh-my-pi/pi-natives-linux-arm64": "16.2.5",
72
- "@oh-my-pi/pi-natives-darwin-x64": "16.2.5",
73
- "@oh-my-pi/pi-natives-darwin-arm64": "16.2.5",
74
- "@oh-my-pi/pi-natives-win32-x64": "16.2.5"
70
+ "@oh-my-pi/pi-natives-linux-x64": "16.2.7",
71
+ "@oh-my-pi/pi-natives-linux-arm64": "16.2.7",
72
+ "@oh-my-pi/pi-natives-darwin-x64": "16.2.7",
73
+ "@oh-my-pi/pi-natives-darwin-arm64": "16.2.7",
74
+ "@oh-my-pi/pi-natives-win32-x64": "16.2.7"
75
75
  }
76
76
  }