@pi-archimedes/image-paste 2.1.0 → 2.3.0

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.
Files changed (2) hide show
  1. package/package.json +3 -1
  2. package/src/preview.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-archimedes/image-paste",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -15,6 +15,8 @@
15
15
  "@earendil-works/pi-tui": ">=0.1.0"
16
16
  },
17
17
  "devDependencies": {
18
+ "@earendil-works/pi-coding-agent": "^0.84.2",
19
+ "@earendil-works/pi-tui": "^0.84.2",
18
20
  "typescript": "^6.0.0"
19
21
  },
20
22
  "pi": {
package/src/preview.ts CHANGED
@@ -13,7 +13,7 @@ export function registerImagePreview(pi: ExtensionAPI): void {
13
13
  pi.registerMessageRenderer<PreviewDetails>(CUSTOM_TYPE, (message, _options, theme) => {
14
14
  try {
15
15
  // Theme.fg is runtime-available but not exposed in the Theme type definition
16
- const fg = (theme as any).fg as ((color: string, text: string) => string) | undefined;
16
+ const fg = (theme as any).fg?.bind(theme) as ((color: string, text: string) => string) | undefined;
17
17
  if (!fg) return undefined;
18
18
 
19
19
  // Extract image data from content array