@leancodepl/api-binary-blob 9.7.3 → 10.0.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,27 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [10.0.0](https://github.com/leancodepl/js_corelibrary/compare/v9.7.4...v10.0.0) (2026-02-11)
7
+
8
+ ### Bug Fixes
9
+
10
+ - exclude external packages from build output
11
+ ([4c2be7a](https://github.com/leancodepl/js_corelibrary/commit/4c2be7ac64eb6ed5603ba61b9aeef75a454dffb3))
12
+
13
+ # Change Log
14
+
15
+ All notable changes to this project will be documented in this file. See
16
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
17
+
18
+ ## [9.7.4](https://github.com/leancodepl/js_corelibrary/compare/v9.7.3...v9.7.4) (2026-02-10)
19
+
20
+ **Note:** Version bump only for package @leancodepl/api-binary-blob
21
+
22
+ # Change Log
23
+
24
+ All notable changes to this project will be documented in this file. See
25
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
26
+
6
27
  ## [9.7.3](https://github.com/leancodepl/js_corelibrary/compare/v9.7.2...v9.7.3) (2026-02-10)
7
28
 
8
29
  **Note:** Version bump only for package @leancodepl/api-binary-blob
package/dist/index.js CHANGED
@@ -1,43 +1,37 @@
1
- function i(r) {
2
- return r;
3
- }
4
- function b(r) {
5
- return r;
6
- }
7
- function d(r) {
8
- return r ? new Promise((n, o) => {
1
+ import { fromRaw as a, toRaw as c } from "@leancodepl/api-binary";
2
+ export * from "@leancodepl/api-binary";
3
+ function w(e) {
4
+ return e ? new Promise((t, n) => {
9
5
  try {
10
- const e = new FileReader();
11
- e.onloadend = () => {
12
- const t = e.result;
13
- if (typeof t == "string") {
14
- n(t.slice(Math.max(0, 1 + t.indexOf(",", t.indexOf(";")))));
6
+ const r = new FileReader();
7
+ r.onloadend = () => {
8
+ const o = r.result;
9
+ if (typeof o == "string") {
10
+ t(a(o.slice(Math.max(0, 1 + o.indexOf(",", o.indexOf(";"))))));
15
11
  return;
16
12
  }
17
13
  throw new Error("Unknown blob result received for ApiBinary creation");
18
- }, e.onerror = o, e.readAsDataURL(r);
19
- } catch (e) {
20
- o(e);
14
+ }, r.onerror = n, r.readAsDataURL(e);
15
+ } catch (r) {
16
+ n(r);
21
17
  }
22
18
  }) : Promise.resolve(void 0);
23
19
  }
24
- function a(r, n, o = 512) {
25
- const e = atob(r), t = [];
26
- for (let s = 0; s < e.length; s += o) {
27
- const f = e.slice(s, s + o), u = new Array(f.length);
20
+ function u(e, t, n = 512) {
21
+ const r = atob(e), o = [];
22
+ for (let s = 0; s < r.length; s += n) {
23
+ const f = r.slice(s, s + n), i = new Array(f.length);
28
24
  for (let l = 0; l < f.length; l++)
29
- u[l] = f.charCodeAt(l);
30
- t.push(new Uint8Array(u).buffer);
25
+ i[l] = f.charCodeAt(l);
26
+ o.push(new Uint8Array(i).buffer);
31
27
  }
32
- return new Blob(t, { type: n });
28
+ return new Blob(o, { type: t });
33
29
  }
34
- function w(r, n) {
35
- if (r != null)
36
- return a(r, n);
30
+ function h(e, t) {
31
+ if (e != null)
32
+ return u(c(e), t);
37
33
  }
38
34
  export {
39
- d as fromBlob,
40
- b as fromRaw,
41
- w as toBlob,
42
- i as toRaw
35
+ w as fromBlob,
36
+ h as toBlob
43
37
  };
@@ -1 +1 @@
1
- (function(n,r){typeof exports=="object"&&typeof module<"u"?r(exports):typeof define=="function"&&define.amd?define(["exports"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n["@leancodepl/api-binary-blob"]={}))})(this,(function(n){"use strict";function r(e){return e}function b(e){return e}function d(e){return e?new Promise((i,f)=>{try{const t=new FileReader;t.onloadend=()=>{const o=t.result;if(typeof o=="string"){i(o.slice(Math.max(0,1+o.indexOf(",",o.indexOf(";")))));return}throw new Error("Unknown blob result received for ApiBinary creation")},t.onerror=f,t.readAsDataURL(e)}catch(t){f(t)}}):Promise.resolve(void 0)}function a(e,i,f=512){const t=atob(e),o=[];for(let l=0;l<t.length;l+=f){const s=t.slice(l,l+f),c=new Array(s.length);for(let u=0;u<s.length;u++)c[u]=s.charCodeAt(u);o.push(new Uint8Array(c).buffer)}return new Blob(o,{type:i})}function y(e,i){if(e!=null)return a(e,i)}n.fromBlob=d,n.fromRaw=b,n.toBlob=y,n.toRaw=r,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(t,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("@leancodepl/api-binary")):typeof define=="function"&&define.amd?define(["exports","@leancodepl/api-binary"],r):(t=typeof globalThis<"u"?globalThis:t||self,r(t["@leancodepl/api-binary-blob"]={},t.apiBinary))})(this,(function(t,r){"use strict";function b(e){return e?new Promise((l,i)=>{try{const o=new FileReader;o.onloadend=()=>{const n=o.result;if(typeof n=="string"){l(r.fromRaw(n.slice(Math.max(0,1+n.indexOf(",",n.indexOf(";"))))));return}throw new Error("Unknown blob result received for ApiBinary creation")},o.onerror=i,o.readAsDataURL(e)}catch(o){i(o)}}):Promise.resolve(void 0)}function a(e,l,i=512){const o=atob(e),n=[];for(let f=0;f<o.length;f+=i){const c=o.slice(f,f+i),u=new Array(c.length);for(let s=0;s<c.length;s++)u[s]=c.charCodeAt(s);n.push(new Uint8Array(u).buffer)}return new Blob(n,{type:l})}function d(e,l){if(e!=null)return a(r.toRaw(e),l)}t.fromBlob=b,t.toBlob=d,Object.keys(r).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:()=>r[e]})}),Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leancodepl/api-binary-blob",
3
- "version": "9.7.3",
3
+ "version": "10.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,7 +15,7 @@
15
15
  }
16
16
  },
17
17
  "dependencies": {
18
- "@leancodepl/api-binary": "9.7.3"
18
+ "@leancodepl/api-binary": "10.0.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "blob-polyfill": "^9.0.0"