openfig-cli 0.3.25 → 0.3.26
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/lib/core/fig-deck.mjs +5 -4
- package/manifest.json +1 -1
- package/package.json +1 -1
package/lib/core/fig-deck.mjs
CHANGED
|
@@ -424,12 +424,13 @@ export class FigDeck {
|
|
|
424
424
|
const copyImagePaint = (paint) => {
|
|
425
425
|
if (!paint) return;
|
|
426
426
|
if (paint.type === 'IMAGE' || paint.image) {
|
|
427
|
-
|
|
428
|
-
|
|
427
|
+
// Files on disk are named by SHA1 hex hash, not image.name (which is human-readable)
|
|
428
|
+
const hash = paint.image?.hash?.length ? hashToHex(paint.image.hash) : null;
|
|
429
|
+
if (hash) this._copyImageAsset(sourceDeck.imagesDir, hash);
|
|
429
430
|
}
|
|
430
431
|
if (paint.imageThumbnail) {
|
|
431
|
-
const
|
|
432
|
-
if (
|
|
432
|
+
const tHash = paint.imageThumbnail.hash?.length ? hashToHex(paint.imageThumbnail.hash) : null;
|
|
433
|
+
if (tHash) this._copyImageAsset(sourceDeck.imagesDir, tHash);
|
|
433
434
|
}
|
|
434
435
|
};
|
|
435
436
|
|
package/manifest.json
CHANGED