@orderingstack/front-hooks 5.2.0 → 5.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.
@@ -1,4 +1,14 @@
1
1
  import { TMediaSize } from '@orderingstack/ordering-types';
2
+ export declare class MediaProxy {
3
+ private static instance;
4
+ private static proxyUrl;
5
+ private static status;
6
+ static getInstance(): MediaProxy;
7
+ getUrl: (url: string, size?: 1000 | 600 | 300 | 100 | 48 | 57 | 70 | 160 | 250 | 500 | 900 | 1920 | 1080 | undefined) => string;
8
+ static getMediaToolsUrl: (url: string, size?: TMediaSize) => string;
9
+ private static checkStatus;
10
+ setProxyUrl: (url: string) => Promise<boolean>;
11
+ }
2
12
  /**
3
13
  * @function getMediaUrl
4
14
  * Checks if given url is a supported image format from orderingstackmedia azure blob and returns resized image url OR original url. Defaults to 500px.
@@ -1 +1 @@
1
- {"version":3,"file":"useMediaUrl.d.ts","sourceRoot":"","sources":["useMediaUrl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,UAAgB,GAAG,MAAM,CA8BvE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,UAAgB,GAAG,MAAM,CAEvE"}
1
+ {"version":3,"file":"useMediaUrl.d.ts","sourceRoot":"","sources":["useMediaUrl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAK3D,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAa;IACpC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAS;IAChC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAS;WAEhB,WAAW;IAOlB,MAAM,QAAS,MAAM,qGAAsB,MAAM,CAMtD;IAEF,OAAc,gBAAgB,QACvB,MAAM,SACL,UAAU,KACf,MAAM,CA8BP;IAEF,OAAO,CAAC,MAAM,CAAC,WAAW,CASxB;IAGK,WAAW,QAAe,MAAM,KAAG,QAAQ,OAAO,CAAC,CAOxD;CACH;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,UAAgB,GAAG,MAAM,CAEvE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,UAAgB,GAAG,MAAM,CAEvE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderingstack/front-hooks",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -21,6 +21,7 @@
21
21
  },
22
22
  "peerDependencies": {
23
23
  "@orderingstack/ordering-core-react": "^1.0.0",
24
+ "axios": "^1.0.0",
24
25
  "react": ">=16.8.0",
25
26
  "react-i18next": "^12.1.1",
26
27
  "react-router-dom": ">=5.3.3"