@uploadcare/file-uploader 1.25.0-alpha.9 → 1.25.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.
Files changed (75) hide show
  1. package/dist/abstract/loadFileUploaderFrom.js +75 -4
  2. package/dist/env.js +33 -4
  3. package/dist/index.css +2660 -5
  4. package/dist/index.d.ts +976 -1316
  5. package/dist/index.js +12012 -6
  6. package/dist/index.layered.css +2716 -4
  7. package/dist/index.ssr.js +768 -549
  8. package/dist/locales/file-uploader/ar.js +165 -4
  9. package/dist/locales/file-uploader/az.js +157 -4
  10. package/dist/locales/file-uploader/ca.js +159 -4
  11. package/dist/locales/file-uploader/cs.js +161 -4
  12. package/dist/locales/file-uploader/da.js +157 -4
  13. package/dist/locales/file-uploader/de.js +157 -4
  14. package/dist/locales/file-uploader/el.js +157 -4
  15. package/dist/locales/file-uploader/en.js +157 -4
  16. package/dist/locales/file-uploader/es.js +159 -4
  17. package/dist/locales/file-uploader/et.js +157 -4
  18. package/dist/locales/file-uploader/fi.js +157 -4
  19. package/dist/locales/file-uploader/fr.js +159 -4
  20. package/dist/locales/file-uploader/he.js +159 -4
  21. package/dist/locales/file-uploader/hy.js +157 -4
  22. package/dist/locales/file-uploader/is.js +157 -4
  23. package/dist/locales/file-uploader/it.js +159 -4
  24. package/dist/locales/file-uploader/ja.js +157 -4
  25. package/dist/locales/file-uploader/ka.js +157 -4
  26. package/dist/locales/file-uploader/kk.js +157 -4
  27. package/dist/locales/file-uploader/ko.js +157 -4
  28. package/dist/locales/file-uploader/lv.js +159 -4
  29. package/dist/locales/file-uploader/nb.js +157 -4
  30. package/dist/locales/file-uploader/nl.js +157 -4
  31. package/dist/locales/file-uploader/pl.js +161 -4
  32. package/dist/locales/file-uploader/pt.js +159 -4
  33. package/dist/locales/file-uploader/ro.js +159 -4
  34. package/dist/locales/file-uploader/ru.js +161 -4
  35. package/dist/locales/file-uploader/sk.js +161 -4
  36. package/dist/locales/file-uploader/sr.js +159 -4
  37. package/dist/locales/file-uploader/sv.js +157 -4
  38. package/dist/locales/file-uploader/tr.js +157 -4
  39. package/dist/locales/file-uploader/uk.js +161 -4
  40. package/dist/locales/file-uploader/vi.js +157 -4
  41. package/dist/locales/file-uploader/zh-TW.js +157 -4
  42. package/dist/locales/file-uploader/zh.js +157 -4
  43. package/package.json +31 -36
  44. package/types/jsx.d.ts +48 -75
  45. package/web/file-uploader.iife.min.d.ts +987 -1327
  46. package/web/file-uploader.iife.min.js +27 -6
  47. package/web/file-uploader.min.d.ts +987 -1327
  48. package/web/file-uploader.min.js +26 -5
  49. package/web/uc-basic.layered.min.css +23 -4
  50. package/web/uc-basic.min.css +23 -4
  51. package/web/uc-cloud-image-editor.layered.min.css +23 -4
  52. package/web/uc-cloud-image-editor.min.css +23 -4
  53. package/web/uc-cloud-image-editor.min.d.ts +550 -756
  54. package/web/uc-cloud-image-editor.min.js +26 -5
  55. package/web/uc-file-uploader-inline.layered.min.css +23 -4
  56. package/web/uc-file-uploader-inline.min.css +23 -4
  57. package/web/uc-file-uploader-inline.min.d.ts +987 -1327
  58. package/web/uc-file-uploader-inline.min.js +26 -5
  59. package/web/uc-file-uploader-minimal.layered.min.css +23 -4
  60. package/web/uc-file-uploader-minimal.min.css +23 -4
  61. package/web/uc-file-uploader-minimal.min.d.ts +987 -1327
  62. package/web/uc-file-uploader-minimal.min.js +26 -5
  63. package/web/uc-file-uploader-regular.layered.min.css +23 -4
  64. package/web/uc-file-uploader-regular.min.css +23 -4
  65. package/web/uc-file-uploader-regular.min.d.ts +987 -1327
  66. package/web/uc-file-uploader-regular.min.js +26 -5
  67. package/web/uc-img.min.d.ts +100 -55
  68. package/web/uc-img.min.js +25 -5
  69. package/web/file-uploader.iife.min.js.LEGAL.txt +0 -71
  70. package/web/file-uploader.min.js.LEGAL.txt +0 -71
  71. package/web/uc-cloud-image-editor.min.js.LEGAL.txt +0 -70
  72. package/web/uc-file-uploader-inline.min.js.LEGAL.txt +0 -71
  73. package/web/uc-file-uploader-minimal.min.js.LEGAL.txt +0 -71
  74. package/web/uc-file-uploader-regular.min.js.LEGAL.txt +0 -71
  75. package/web/uc-img.min.js.LEGAL.txt +0 -24
@@ -1,7 +1,78 @@
1
1
  /**
2
2
  * @license
3
- * Package: @uploadcare/file-uploader@1.25.0-alpha.9 (MIT)
4
- * License: https://github.com/uploadcare/file-uploader/blob/main/LICENSE
5
- * Built: 2025-12-12T13:27:40.998Z
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2025 Uploadcare (hello@uploadcare.com). All rights reserved.
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
6
25
  */
7
- var l=["UploaderBlock","ActivityBlock","Block","SolutionBlock"];function c(t){for(let n in t){if(l.includes(n))continue;let e=[...n].reduce((i,o)=>(o.toUpperCase()===o&&(o=`-${o.toLowerCase()}`),i+=o,i),"");e.startsWith("-")&&(e=e.replace("-","")),e.startsWith("uc-")||(e=`uc-${e}`),t[n].reg&&t[n].reg(e);}}var r="UC";function a(t,n=false){return new Promise((e,i)=>{if(typeof document!="object"){e(null);return}if(typeof window=="object"&&window[r]){e(window[r]);return}let o=document.createElement("script");o.async=true,o.src=t,o.onerror=()=>{i();},o.onload=()=>{let d=window[r];n&&c(d),e(d);},document.head.appendChild(o);})}export{r as UC_WINDOW_KEY,a as loadFileUploaderFrom};
26
+
27
+ // src/abstract/defineComponents.ts
28
+ function defineComponents(blockExports) {
29
+ for (const blockName in blockExports) {
30
+ let tagName = [...blockName].reduce((name, char) => {
31
+ if (char.toUpperCase() === char) {
32
+ char = `-${char.toLowerCase()}`;
33
+ }
34
+ name += char;
35
+ return name;
36
+ }, "");
37
+ if (tagName.startsWith("-")) {
38
+ tagName = tagName.replace("-", "");
39
+ }
40
+ if (!tagName.startsWith("uc-")) {
41
+ tagName = `uc-${tagName}`;
42
+ }
43
+ if (blockExports[blockName].reg) {
44
+ blockExports[blockName].reg(tagName);
45
+ }
46
+ }
47
+ }
48
+
49
+ // src/abstract/loadFileUploaderFrom.ts
50
+ var UC_WINDOW_KEY = "UC";
51
+ function loadFileUploaderFrom(url, register = false) {
52
+ return new Promise((resolve, reject) => {
53
+ if (typeof document !== "object") {
54
+ resolve(null);
55
+ return;
56
+ }
57
+ if (typeof window === "object" && window[UC_WINDOW_KEY]) {
58
+ resolve(window[UC_WINDOW_KEY]);
59
+ return;
60
+ }
61
+ const script = document.createElement("script");
62
+ script.async = true;
63
+ script.src = url;
64
+ script.onerror = () => {
65
+ reject();
66
+ };
67
+ script.onload = () => {
68
+ const blocks = window[UC_WINDOW_KEY];
69
+ register && defineComponents(blocks);
70
+ resolve(blocks);
71
+ };
72
+ document.head.appendChild(script);
73
+ });
74
+ }
75
+ export {
76
+ UC_WINDOW_KEY,
77
+ loadFileUploaderFrom
78
+ };
package/dist/env.js CHANGED
@@ -1,7 +1,36 @@
1
1
  /**
2
2
  * @license
3
- * Package: @uploadcare/file-uploader@1.25.0-alpha.9 (MIT)
4
- * License: https://github.com/uploadcare/file-uploader/blob/main/LICENSE
5
- * Built: 2025-12-12T13:27:40.998Z
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2025 Uploadcare (hello@uploadcare.com). All rights reserved.
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ *
6
25
  */
7
- var s="1.25.0-alpha.9";var l="blocks",p=s;export{l as PACKAGE_NAME,p as PACKAGE_VERSION};
26
+
27
+ // package.json
28
+ var version = "1.25.0";
29
+
30
+ // src/env.ts
31
+ var PACKAGE_NAME = "blocks";
32
+ var PACKAGE_VERSION = version;
33
+ export {
34
+ PACKAGE_NAME,
35
+ PACKAGE_VERSION
36
+ };