Socket
Socket
Sign inDemoInstall

@microsoft/sp-image-helper

Package Overview
Dependencies
74
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.14.0-beta.5 to 1.14.0-rc.2

54

dist/index-internal.d.ts

@@ -13,55 +13,5 @@ /**

/**
* @file IImageHelperRequest.ts
* @copyright Microsoft Corporation. All rights reserved.
*/
/**
* Interface for constructing a request to create an optimized image url from a file on SharePoint.
*
* @beta
*/
export declare interface IImageHelperRequest {
/**
* The url to the item to be retrieved as an image. This can be an absolute url or a relative url.
*/
sourceUrl: string;
/**
* Width of the image requested.
*
* @remarks
* When the height is unspecified, the width is mapped to nearest larger resolution breakpoint with a maximum size.
*/
width: number;
/**
* Optional height of the image requested
*
* @remarks
* By default, the image height would be based on the width while maintaining the aspect ratio for the image. (This provides the image with the quickest response.)
* When the height is specified, the width is not adjusted to the nearest larger resolution breakpoint.
*/
height?: number;
}
/* Excluded from this release type: IImageHelperRequest */
/**
* ImageHelper exposes the ability to convert a SharePoint url to an optimized thumbnail url.
* @beta
*/
export declare class ImageHelper {
/**
* Convert a url to a file or page on SharePoint into an optimized image url.
*
* @param request - IImageHelperRequest for the bundled parameters.
*
* @remarks
* - If width and height are provided, then the resulting image will be scaled to the minimum of the width or height.
* - The url will be most performant if only a width is provided. If a height is provided, the image will take longer to download due to the scaling.
* - Only use this url at rendering time. It may contain an expiration token. Continue to use the original file's url for serialization.
*
* @returns A full url string for the image of the file. If no optimized url can be created (i.e. an external url or an unsupported file type),
* the original sourceUrl is returned.
*
* @beta
*/
static convertToImageUrl(request: IImageHelperRequest): string;
}
/* Excluded from this release type: ImageHelper */

@@ -68,0 +18,0 @@ /* Excluded from this release type: _IPreloadedData */

16

package.json
{
"name": "@microsoft/sp-image-helper",
"version": "1.14.0-beta.5",
"version": "1.14.0-rc.2",
"description": "Image helper APIs for the Sharepoint Framework.",

@@ -14,11 +14,11 @@ "license": "SEE LICENSE IN \"EULA\" FOLDER",

"dependencies": {
"@microsoft/office-ui-fabric-react-bundle": "1.14.0-beta.5",
"@microsoft/sp-core-library": "1.14.0-beta.5",
"@microsoft/sp-diagnostics": "1.14.0-beta.5",
"@microsoft/sp-http": "1.14.0-beta.5",
"@microsoft/sp-loader": "1.14.0-beta.5",
"@microsoft/sp-lodash-subset": "1.14.0-beta.5",
"@microsoft/sp-page-context": "1.14.0-beta.5",
"@microsoft/office-ui-fabric-react-bundle": "1.14.0-rc.2",
"@microsoft/sp-core-library": "1.14.0-rc.2",
"@microsoft/sp-diagnostics": "1.14.0-rc.2",
"@microsoft/sp-http": "1.14.0-rc.2",
"@microsoft/sp-loader": "1.14.0-rc.2",
"@microsoft/sp-lodash-subset": "1.14.0-rc.2",
"@microsoft/sp-page-context": "1.14.0-rc.2",
"tslib": "~1.10.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc