@uploadcare/file-uploader 1.3.0 → 1.4.1-alpha.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 +1 @@
1
- {"version":3,"file":"UploaderPublicApi.d.ts","sourceRoot":"","sources":["UploaderPublicApi.js"],"names":[],"mappings":"AAYA;IAOE,8DAA8D;IAC9D,iBADY,OAAO,oBAAoB,EAAE,aAAa,EAGrD;IATD;;;OAGG;IACH,aAAK;IAOL,eAAe;IACf,gCAEC;IAED,yCAEC;IAED;;iBAEC;IAED;;;;;;OAMG;IACH,sBAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,wBAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,4BAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAgBrD;IAEF;;;;OAIG;IACH,0BAJW,IAAI;;;;;sBAEF,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAcrD;IAEF,iCAAiC;IACjC,qCADY,MAAM,UAMhB;IAEF,uBAEC;IAED,sBAeE;IAEF,mDAAmD;IACnD,6BADY;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,UAgCrC;IAEF;;;;OAIG;IACH,8EAHW,MAAM,iDA6Cf;IAEF,oEAAoE;IACpE,oKAIE;IAEF,+BAA+B;IAC/B,gDAsCE;IAEF,qBAQE;IAEF;;;OAGG;IACH,mCAHW,OAAO,oBAAoB,EAAE,YAAY,yGAYlD;IAEF,8BAA8B;IAC9B,wBADY,OAAO,UAOjB;IAEF;;;OAGG;IACH,0BAOC;CACF"}
1
+ {"version":3,"file":"UploaderPublicApi.d.ts","sourceRoot":"","sources":["UploaderPublicApi.js"],"names":[],"mappings":"AAYA;IAOE,8DAA8D;IAC9D,iBADY,OAAO,oBAAoB,EAAE,aAAa,EAGrD;IATD;;;OAGG;IACH,aAAK;IAOL,eAAe;IACf,gCAEC;IAED,yCAEC;IAED;;iBAEC;IAED;;;;;;OAMG;IACH,sBAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,wBAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAUrD;IAEF;;;;OAIG;IACH,4BAJW,MAAM;;;;sBAEJ,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAgBrD;IAEF;;;;OAIG;IACH,0BAJW,IAAI;;;;;sBAEF,OAAO,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAcrD;IAEF,iCAAiC;IACjC,qCADY,MAAM,UAMhB;IAEF,uBAEC;IAED,sBAeE;IAEF,mDAAmD;IACnD,6BADY;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,UAsCrC;IAEF;;;;OAIG;IACH,8EAHW,MAAM,iDA6Cf;IAEF,oEAAoE;IACpE,oKAIE;IAEF,+BAA+B;IAC/B,gDAsCE;IAEF,qBAQE;IAEF;;;OAGG;IACH,mCAHW,OAAO,oBAAoB,EAAE,YAAY,yGAYlD;IAEF,8BAA8B;IAC9B,wBADY,OAAO,UAOjB;IAEF;;;OAGG;IACH,0BAOC;CACF"}
@@ -156,18 +156,24 @@ export class UploaderPublicApi {
156
156
  } else {
157
157
  fileInput.accept = accept;
158
158
  }
159
+ fileInput.addEventListener(
160
+ 'change',
161
+ () => {
162
+ // @ts-ignore TODO: fix this
163
+ [...fileInput['files']].forEach((file) =>
164
+ this.addFileFromObject(file, { source: options.captureCamera ? UploadSource.CAMERA : UploadSource.LOCAL }),
165
+ );
166
+ // To call uploadTrigger UploadList should draw file items first:
167
+ this._ctx.$['*currentActivity'] = ActivityBlock.activities.UPLOAD_LIST;
168
+ this._ctx.setOrAddState('*modalActive', true);
169
+ // @ts-ignore TODO: fix this
170
+ fileInput['value'] = '';
171
+ },
172
+ {
173
+ once: true,
174
+ },
175
+ );
159
176
  fileInput.dispatchEvent(new MouseEvent('click'));
160
- fileInput.onchange = () => {
161
- // @ts-ignore TODO: fix this
162
- [...fileInput['files']].forEach((file) =>
163
- this.addFileFromObject(file, { source: options.captureCamera ? UploadSource.CAMERA : UploadSource.LOCAL }),
164
- );
165
- // To call uploadTrigger UploadList should draw file items first:
166
- this._ctx.$['*currentActivity'] = ActivityBlock.activities.UPLOAD_LIST;
167
- this._ctx.setOrAddState('*modalActive', true);
168
- // @ts-ignore TODO: fix this
169
- fileInput['value'] = '';
170
- };
171
177
  };
172
178
 
173
179
  /**
@@ -230,3 +230,33 @@
230
230
  --uc-simple-btn-hover: var(--uc-simple-btn-hover-dark);
231
231
  --uc-simple-btn-foreground: var(--uc-simple-btn-foreground-dark);
232
232
  }
233
+
234
+ :where(.uc-purple) {
235
+ --uc-primary-oklch-light: 59% 0.22 300;
236
+ --uc-primary-oklch-dark: 69% 0.1768 300;
237
+ }
238
+
239
+ :where(.uc-red) {
240
+ --uc-primary-oklch-light: 59% 0.22 21;
241
+ --uc-primary-oklch-dark: 69% 0.1768 21;
242
+ }
243
+
244
+ :where(.uc-orange) {
245
+ --uc-primary-oklch-light: 59% 0.1724 51.88;
246
+ --uc-primary-oklch-dark: 69% 0.1768 51.88;
247
+ }
248
+
249
+ :where(.uc-green) {
250
+ --uc-primary-oklch-light: 59% 0.1724 130;
251
+ --uc-primary-oklch-dark: 69% 0.1768 130;
252
+ }
253
+
254
+ :where(.uc-turquoise) {
255
+ --uc-primary-oklch-light: 59% 0.1523 174;
256
+ --uc-primary-oklch-dark: 69% 0.1768 174;
257
+ }
258
+
259
+ :where(.uc-gray) {
260
+ --uc-primary-oklch-light: 10% 0 0;
261
+ --uc-primary-oklch-dark: 97% 0 0;
262
+ }
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.3.0";
3
+ export const PACKAGE_VERSION: "1.4.0";
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.3.0';
3
+ export const PACKAGE_VERSION = '1.4.0';
package/index.ssr.d.ts CHANGED
@@ -520,7 +520,7 @@ export const Modal: {
520
520
  bindAttributes: () => void;
521
521
  };
522
522
  export const PACKAGE_NAME: "blocks";
523
- export const PACKAGE_VERSION: "1.3.0";
523
+ export const PACKAGE_VERSION: "1.4.0";
524
524
  export const PresenceToggle: {
525
525
  new (): {};
526
526
  template: string;
package/index.ssr.js CHANGED
@@ -950,7 +950,7 @@ export const Modal = class {
950
950
  static bindAttributes = () => {};
951
951
  };
952
952
  export const PACKAGE_NAME = `blocks`;
953
- export const PACKAGE_VERSION = `1.3.0`;
953
+ export const PACKAGE_VERSION = `1.4.0`;
954
954
  export const PresenceToggle = class {
955
955
  static template = `<slot></slot> `;
956
956
  static reg = () => {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uploadcare/file-uploader",
3
- "version": "1.3.0",
3
+ "version": "1.4.1-alpha.0",
4
4
  "description": "Building blocks for Uploadcare products integration",
5
5
  "keywords": [
6
6
  "web components",