@uploadcare/file-uploader 1.19.0 → 1.19.2

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 +1 @@
1
- {"version":3,"file":"side-effects.d.ts","sourceRoot":"","sources":["side-effects.js"],"names":[],"mappings":"AAwFO,+BAZ+C,CAAC,SAA1C,MAAO,OAAO,aAAa,EAAE,UAAW,+BAC1C;IACN,GAAG,EAAE,CAAC,CAAC;IACP,QAAQ,EAAE,CAAC,SAAS,SAAS,MAAM,OAAO,aAAa,EAAE,UAAU,EACjE,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,OAAO,aAAa,EAAE,UAAU,CAAC,SAAS,CAAC,KAC/C,IAAI,CAAC;IACV,QAAQ,EAAE,CAAC,SAAS,SAAS,MAAM,OAAO,aAAa,EAAE,UAAU,EACjE,GAAG,EAAE,SAAS,KACX,OAAO,aAAa,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;CAClD,QAqCH;wCAlHqD,IAAI,SAA7C,MAAO,OAAO,aAAa,EAAE,UAAW,EACkB,KAAK,SAA9D,OAAO,CAAC,MAAM,OAAO,aAAa,EAAE,UAAU,EAAE,IAAI,CAAC,EAAG;SAExD,IAAI;UACJ,KAAK;QACL,CACT,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,aAAa,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,GAC1D,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,GAC1D,KACE,OAAO,aAAa,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,OAAO,aAAa,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"side-effects.d.ts","sourceRoot":"","sources":["side-effects.js"],"names":[],"mappings":"AAyFO,+BAZ+C,CAAC,SAA1C,MAAO,OAAO,aAAa,EAAE,UAAW,+BAC1C;IACN,GAAG,EAAE,CAAC,CAAC;IACP,QAAQ,EAAE,CAAC,SAAS,SAAS,MAAM,OAAO,aAAa,EAAE,UAAU,EACjE,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,OAAO,aAAa,EAAE,UAAU,CAAC,SAAS,CAAC,KAC/C,IAAI,CAAC;IACV,QAAQ,EAAE,CAAC,SAAS,SAAS,MAAM,OAAO,aAAa,EAAE,UAAU,EACjE,GAAG,EAAE,SAAS,KACX,OAAO,aAAa,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;CAClD,QAqCH;wCAnHqD,IAAI,SAA7C,MAAO,OAAO,aAAa,EAAE,UAAW,EACkB,KAAK,SAA9D,OAAO,CAAC,MAAM,OAAO,aAAa,EAAE,UAAU,EAAE,IAAI,CAAC,EAAG;SAExD,IAAI;UACJ,KAAK;QACL,CACT,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,aAAa,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,GAC1D,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,GAC1D,KACE,OAAO,aAAa,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,OAAO,aAAa,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  // TODO: Here is troubles with tsd: it can't resolve types from `@uploadcare/cname-prefix/async` due to unsupported bundler moduleResolution.
4
4
  // @ts-ignore
5
- import { getPrefixedCdnBaseAsync } from '@uploadcare/cname-prefix/async';
5
+ import { getPrefixedCdnBaseAsync, isPrefixedCdnBase } from '@uploadcare/cname-prefix/async';
6
6
  import { deserializeCsv, serializeCsv } from '../utils/comma-separated.js';
7
7
  import { DEFAULT_CDN_CNAME } from './initialConfig.js';
8
8
 
@@ -65,10 +65,11 @@ const COMPUTED_PROPERTIES = [
65
65
  key: 'cdnCname',
66
66
  deps: ['pubkey', 'cdnCnamePrefixed'],
67
67
  fn: ({ pubkey, cdnCname, cdnCnamePrefixed }) => {
68
- if (cdnCname !== DEFAULT_CDN_CNAME) {
69
- return cdnCname;
68
+ if (pubkey && (cdnCname === DEFAULT_CDN_CNAME || isPrefixedCdnBase(cdnCname, cdnCnamePrefixed))) {
69
+ return getPrefixedCdnBaseAsync(pubkey, cdnCnamePrefixed);
70
70
  }
71
- return getPrefixedCdnBaseAsync(pubkey, cdnCnamePrefixed);
71
+
72
+ return cdnCname;
72
73
  },
73
74
  }),
74
75
  ];
@@ -2,9 +2,9 @@
2
2
  import { shrinkFile } from '@uploadcare/image-shrink';
3
3
  import { CancelError, UploadcareError, uploadFile } from '@uploadcare/upload-client';
4
4
  import { ActivityBlock } from '../../abstract/ActivityBlock.js';
5
- import { debounce } from '../utils/debounce.js';
6
5
  import { parseShrink } from '../../utils/parseShrink.js';
7
- import { UploadSource } from '../utils/UploadSource.js';
6
+ import { ExternalUploadSource } from '../utils/UploadSource.js';
7
+ import { debounce } from '../utils/debounce.js';
8
8
  import { throttle } from '../utils/throttle.js';
9
9
  import { FileItemConfig } from './FileItemConfig.js';
10
10
 
@@ -118,7 +118,7 @@ export class FileItem extends FileItemConfig {
118
118
  return;
119
119
  }
120
120
 
121
- if (externalUrl && source && source !== UploadSource.URL) {
121
+ if (externalUrl && source && Object.values(ExternalUploadSource).includes(source)) {
122
122
  const hint = this.l10n('waiting-for', { source: this.l10n(`src-type-${source}`) });
123
123
  this.$.hint = hint;
124
124
  return;
package/env.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /** Do not edit this file manually. It's generated during build process. */
2
2
  export const PACKAGE_NAME: "blocks";
3
- export const PACKAGE_VERSION: "1.19.0";
3
+ export const PACKAGE_VERSION: "1.19.2";
4
4
  //# sourceMappingURL=env.d.ts.map
package/env.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /** Do not edit this file manually. It's generated during build process. */
2
2
  export const PACKAGE_NAME = 'blocks';
3
- export const PACKAGE_VERSION = '1.19.0';
3
+ export const PACKAGE_VERSION = '1.19.2';
package/index.ssr.d.ts CHANGED
@@ -550,7 +550,7 @@ export namespace ModalEvents {
550
550
  let DESTROY: string;
551
551
  }
552
552
  export const PACKAGE_NAME: "blocks";
553
- export const PACKAGE_VERSION: "1.19.0";
553
+ export const PACKAGE_VERSION: "1.19.2";
554
554
  export const PresenceToggle: {
555
555
  new (): {};
556
556
  template: string;
package/index.ssr.js CHANGED
@@ -1070,7 +1070,7 @@ export const ModalEvents = {
1070
1070
  DESTROY: "modal:destroy",
1071
1071
  };
1072
1072
  export const PACKAGE_NAME = `blocks`;
1073
- export const PACKAGE_VERSION = `1.19.0`;
1073
+ export const PACKAGE_VERSION = `1.19.2`;
1074
1074
  export const PresenceToggle = class {
1075
1075
  static template = `<slot></slot> `;
1076
1076
  static reg = () => {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uploadcare/file-uploader",
3
- "version": "1.19.0",
3
+ "version": "1.19.2",
4
4
  "description": "Building blocks for Uploadcare products integration",
5
5
  "keywords": [
6
6
  "web components",
@@ -141,9 +141,9 @@
141
141
  "license": "MIT",
142
142
  "dependencies": {
143
143
  "@symbiotejs/symbiote": "^1.11.7",
144
- "@uploadcare/cname-prefix": "^6.16.1",
145
- "@uploadcare/image-shrink": "^6.16.1",
146
- "@uploadcare/upload-client": "^6.16.1",
144
+ "@uploadcare/cname-prefix": "^6.17.0",
145
+ "@uploadcare/image-shrink": "^6.17.0",
146
+ "@uploadcare/upload-client": "^6.17.0",
147
147
  "keyux": "^0.7.1"
148
148
  }
149
149
  }