@nativescript-community/ui-image 4.3.34 → 4.3.35

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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.3.35](https://github.com/nativescript-community/ui-image/compare/v4.3.34...v4.3.35) (2024-03-22)
7
+
8
+ **Note:** Version bump only for package @nativescript-community/ui-image
9
+
6
10
  ## [4.3.34](https://github.com/nativescript-community/ui-image/compare/v4.3.33...v4.3.34) (2024-02-27)
7
11
 
8
12
  **Note:** Version bump only for package @nativescript-community/ui-image
package/index.ios.d.ts CHANGED
@@ -37,6 +37,7 @@ export declare class Img extends ImageBase {
37
37
  nativeImageViewProtected: SDAnimatedImageView | UIImageView;
38
38
  isLoading: boolean;
39
39
  mCacheKey: string;
40
+ contextOptions: any;
40
41
  get cacheKey(): string;
41
42
  protected mImageSourceAffectsLayout: boolean;
42
43
  protected mCIFilter: CIFilter;
package/index.ios.js CHANGED
@@ -186,6 +186,7 @@ export class Img extends ImageBase {
186
186
  constructor() {
187
187
  super(...arguments);
188
188
  this.isLoading = false;
189
+ this.contextOptions = null;
189
190
  this.mImageSourceAffectsLayout = true;
190
191
  this.handleImageLoaded = (image, error, cacheType) => {
191
192
  this.isLoading = false;
@@ -289,10 +290,10 @@ export class Img extends ImageBase {
289
290
  await imagePipeLine.evictFromCache(cachekKey);
290
291
  // }
291
292
  }
292
- this.src = null;
293
+ // this.src = null;
293
294
  // ensure we clear the image as
294
295
  this._setNativeImage(null, false);
295
- this.src = src;
296
+ this.initImage();
296
297
  }
297
298
  _setNativeImage(nativeImage, animated = true) {
298
299
  if (animated && this.fadeDuration) {
@@ -431,6 +432,13 @@ export class Img extends ImageBase {
431
432
  options |= 512 /* SDWebImageOptions.TransformAnimatedImage */;
432
433
  }
433
434
  context.setValueForKey(SDImagePipelineTransformer.transformerWithTransformers(transformers), SDWebImageContextImageTransformer);
435
+ // context.setValueForKey(SDImageCacheType.Memory, SDWebImageContextOriginalStoreCacheType);
436
+ }
437
+ if (this.contextOptions && typeof this.contextOptions === 'object') {
438
+ Object.keys(this.contextOptions).forEach(k => {
439
+ let value = this.contextOptions[k];
440
+ context.setValueForKey(value, k);
441
+ });
434
442
  }
435
443
  this.mCacheKey = SDWebImageManager.sharedManager.cacheKeyForURLContext(uri, context);
436
444
  this.nativeImageViewProtected.sd_setImageWithURLPlaceholderImageOptionsContextProgressCompleted(uri, this.placeholderImage, options, context, this.onLoadProgress, this.handleImageLoaded);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript-community/ui-image",
3
- "version": "4.3.34",
3
+ "version": "4.3.35",
4
4
  "description": "Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.",
5
5
  "main": "./index",
6
6
  "sideEffects": false,
@@ -36,5 +36,5 @@
36
36
  },
37
37
  "license": "Apache-2.0",
38
38
  "readmeFilename": "README.md",
39
- "gitHead": "778132d7f03c8e61248a5be6bdcc7362808de0a3"
39
+ "gitHead": "c64c5f445ed493e2ba34f16324766aabaec6e04e"
40
40
  }
Binary file
package/vue/index.mjs ADDED
@@ -0,0 +1,8 @@
1
+ import { Img } from '../image';
2
+ const ImagePlugin = {
3
+ install(Vue) {
4
+ Vue.registerElement('NSImg', () => Img);
5
+ }
6
+ };
7
+ export default ImagePlugin;
8
+ //# sourceMappingURL=index.mjs.map