@inditextech/weave-sdk 0.74.2 → 0.75.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/dist/sdk.cjs +46 -39
- package/dist/sdk.d.cts +18 -2
- package/dist/sdk.d.cts.map +1 -1
- package/dist/sdk.d.ts +18 -2
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +45 -40
- package/dist/sdk.js.map +1 -1
- package/dist/worker.d.ts +1 -0
- package/dist/worker.js +17 -0
- package/dist/worker.js.map +1 -0
- package/package.json +2 -2
package/dist/worker.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/worker.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/plugins/stage-minimap/worker.ts
|
|
2
|
+
self.onmessage = async (e) => {
|
|
3
|
+
const { bitmap } = e.data;
|
|
4
|
+
const canvas = new OffscreenCanvas(bitmap.width, bitmap.height);
|
|
5
|
+
const ctx = canvas.getContext("2d");
|
|
6
|
+
ctx.drawImage(bitmap, 0, 0);
|
|
7
|
+
const blob = await canvas.convertToBlob({ type: "image/png" });
|
|
8
|
+
const buffer = await blob.arrayBuffer();
|
|
9
|
+
self.postMessage({
|
|
10
|
+
buffer,
|
|
11
|
+
width: bitmap.width,
|
|
12
|
+
height: bitmap.height
|
|
13
|
+
}, [buffer]);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
//# sourceMappingURL=worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.js","names":["e: MessageEvent"],"sources":["../src/plugins/stage-minimap/worker.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2025 2025 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)\n//\n// SPDX-License-Identifier: Apache-2.0\n// import Konva from 'konva';\n\n// Konva.Util.createCanvasElement = () => {\n// // eslint-disable-next-line @typescript-eslint/no-explicit-any\n// const canvas: any = new OffscreenCanvas(1, 1);\n// canvas.style = {};\n// return canvas;\n// };\n\nself.onmessage = async (e: MessageEvent) => {\n const { bitmap } = e.data;\n\n const canvas = new OffscreenCanvas(bitmap.width, bitmap.height);\n const ctx = canvas.getContext('2d')!;\n ctx.drawImage(bitmap, 0, 0);\n\n const blob = await canvas.convertToBlob({ type: 'image/png' });\n const buffer = await blob.arrayBuffer();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (self as any).postMessage(\n { buffer, width: bitmap.width, height: bitmap.height },\n [buffer]\n );\n};\n"],"mappings":";AAYA,KAAK,YAAY,OAAOA,MAAoB;CAC1C,MAAM,EAAE,QAAQ,GAAG,EAAE;CAErB,MAAM,SAAS,IAAI,gBAAgB,OAAO,OAAO,OAAO;CACxD,MAAM,MAAM,OAAO,WAAW,KAAK;AACnC,KAAI,UAAU,QAAQ,GAAG,EAAE;CAE3B,MAAM,OAAO,MAAM,OAAO,cAAc,EAAE,MAAM,YAAa,EAAC;CAC9D,MAAM,SAAS,MAAM,KAAK,aAAa;AAEvC,CAAC,KAAa,YACZ;EAAE;EAAQ,OAAO,OAAO;EAAO,QAAQ,OAAO;CAAQ,GACtD,CAAC,MAAO,EACT;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inditextech/weave-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Jesus Manuel Piñeiro Cid <jesusmpc@inditex.com>",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"version:release": "npm version $RELEASE_VERSION -m \"[npm-scripts] prepare release $RELEASE_VERSION\" --tag-version-prefix \"\""
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@inditextech/weave-types": "0.
|
|
46
|
+
"@inditextech/weave-types": "0.75.0",
|
|
47
47
|
"@syncedstore/core": "0.6.0",
|
|
48
48
|
"canvas": "3.1.0",
|
|
49
49
|
"konva": "9.3.20",
|