@inditextech/weave-sdk 0.75.0 → 0.76.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 +18363 -17530
- package/dist/sdk.d.cts +10 -1
- package/dist/sdk.d.cts.map +1 -1
- package/dist/sdk.d.ts +10 -1
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +1085 -3190
- package/dist/sdk.js.map +1 -1
- package/dist/{worker.js → stage-minimap.worker.cjs} +6 -5
- package/dist/stage-minimap.worker.d.ts +1 -0
- package/dist/stage-minimap.worker.js +17 -0
- package/dist/stage-minimap.worker.js.map +1 -0
- package/package.json +4 -2
- package/dist/worker.js.map +0 -1
- /package/dist/{worker.d.ts → stage-minimap.worker.d.cts} +0 -0
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
//#region src/plugins/stage-minimap/stage-minimap.worker.ts
|
|
4
|
+
globalThis.onmessage = async (e) => {
|
|
3
5
|
const { bitmap } = e.data;
|
|
4
6
|
const canvas = new OffscreenCanvas(bitmap.width, bitmap.height);
|
|
5
7
|
const ctx = canvas.getContext("2d");
|
|
6
8
|
ctx.drawImage(bitmap, 0, 0);
|
|
7
9
|
const blob = await canvas.convertToBlob({ type: "image/png" });
|
|
8
10
|
const buffer = await blob.arrayBuffer();
|
|
9
|
-
|
|
11
|
+
globalThis.postMessage({
|
|
10
12
|
buffer,
|
|
11
13
|
width: bitmap.width,
|
|
12
14
|
height: bitmap.height
|
|
13
15
|
}, [buffer]);
|
|
14
16
|
};
|
|
15
17
|
|
|
16
|
-
//#endregion
|
|
17
|
-
//# sourceMappingURL=worker.js.map
|
|
18
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/plugins/stage-minimap/stage-minimap.worker.ts
|
|
2
|
+
globalThis.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
|
+
globalThis.postMessage({
|
|
10
|
+
buffer,
|
|
11
|
+
width: bitmap.width,
|
|
12
|
+
height: bitmap.height
|
|
13
|
+
}, [buffer]);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
//# sourceMappingURL=stage-minimap.worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage-minimap.worker.js","names":["e: MessageEvent"],"sources":["../src/plugins/stage-minimap/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\nglobalThis.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 (globalThis as any).postMessage(\n { buffer, width: bitmap.width, height: bitmap.height },\n [buffer]\n );\n};\n"],"mappings":";AAIA,WAAW,YAAY,OAAOA,MAAoB;CAChD,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;AAEtC,YAAmB,YAClB;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.76.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Jesus Manuel Piñeiro Cid <jesusmpc@inditex.com>",
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
"email": "jesusmpc@inditex.com"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
|
+
"main": "./dist/sdk.cjs",
|
|
16
|
+
"module": "./dist/sdk.js",
|
|
15
17
|
"exports": {
|
|
16
18
|
"import": "./dist/sdk.js",
|
|
17
19
|
"require": "./dist/sdk.cjs"
|
|
@@ -43,7 +45,7 @@
|
|
|
43
45
|
"version:release": "npm version $RELEASE_VERSION -m \"[npm-scripts] prepare release $RELEASE_VERSION\" --tag-version-prefix \"\""
|
|
44
46
|
},
|
|
45
47
|
"dependencies": {
|
|
46
|
-
"@inditextech/weave-types": "0.
|
|
48
|
+
"@inditextech/weave-types": "0.76.0",
|
|
47
49
|
"@syncedstore/core": "0.6.0",
|
|
48
50
|
"canvas": "3.1.0",
|
|
49
51
|
"konva": "9.3.20",
|
package/dist/worker.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
File without changes
|