@octane-xplat/canvas 0.11.0 → 0.12.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,7 +1,6 @@
|
|
|
1
1
|
import { __s, bag7, clone, queueRefAttach, queueRefDetach, setStyle, template } from "octane";
|
|
2
|
-
import {
|
|
2
|
+
import { replaceRef, setClassNameIfChanged, setPlainAttributeIfChanged } from "octane/internal/client";
|
|
3
3
|
//#region src/Canvas.web.tsrx
|
|
4
|
-
enableSignalBindings(1, true);
|
|
5
4
|
var _t$0 = /* @__PURE__ */ template("<canvas></canvas>");
|
|
6
5
|
var _rm$0 = [
|
|
7
6
|
"r",
|
|
@@ -11,18 +10,17 @@ var _rm$0 = [
|
|
|
11
10
|
var Canvas = /* @__PURE__ */ __s(function Canvas(props, __s, __extra) {
|
|
12
11
|
let _b = __s.slots[0];
|
|
13
12
|
if (_b === void 0) {
|
|
14
|
-
let
|
|
13
|
+
let _m6;
|
|
15
14
|
const _root = clone(_t$0);
|
|
16
|
-
_m1 = _root;
|
|
17
15
|
queueRefAttach(__s, _m6 = (el) => {
|
|
18
16
|
if (!el) return;
|
|
19
17
|
props.onReady?.({
|
|
20
18
|
canvas: el,
|
|
21
19
|
context: props.context ? el.getContext(props.context) : null
|
|
22
20
|
});
|
|
23
|
-
},
|
|
21
|
+
}, _root);
|
|
24
22
|
(__s.cleanups ??= []).push(() => _b && queueRefDetach(_b.g, _b.b));
|
|
25
|
-
_b = bag7(__s, _root, void 0,
|
|
23
|
+
_b = bag7(__s, _root, void 0, _root, void 0, void 0, void 0, void 0, _m6);
|
|
26
24
|
__s.refFields = _rm$0;
|
|
27
25
|
} else {
|
|
28
26
|
const _r = (el) => {
|
|
@@ -34,8 +32,8 @@ var Canvas = /* @__PURE__ */ __s(function Canvas(props, __s, __extra) {
|
|
|
34
32
|
};
|
|
35
33
|
if (_r !== _b.g) _b.g = replaceRef(__s, _b.g, _r, _b.b);
|
|
36
34
|
}
|
|
37
|
-
_b.a =
|
|
38
|
-
_b.c =
|
|
35
|
+
_b.a = setPlainAttributeIfChanged(props.id, _b.a, _b.b, "id");
|
|
36
|
+
_b.c = setClassNameIfChanged(props.className, _b.c, _b.b);
|
|
39
37
|
{
|
|
40
38
|
const _v = props.style;
|
|
41
39
|
if (_b.d !== _v) {
|
|
@@ -43,8 +41,8 @@ var Canvas = /* @__PURE__ */ __s(function Canvas(props, __s, __extra) {
|
|
|
43
41
|
_b.d = _v;
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
|
-
_b.e =
|
|
47
|
-
_b.f =
|
|
44
|
+
_b.e = setPlainAttributeIfChanged(typeof props.width === "number" ? props.width : void 0, _b.e, _b.b, "width");
|
|
45
|
+
_b.f = setPlainAttributeIfChanged(typeof props.height === "number" ? props.height : void 0, _b.f, _b.b, "height");
|
|
48
46
|
});
|
|
49
47
|
//#endregion
|
|
50
48
|
export { Canvas };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octane-xplat/canvas",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Canvas/GPU surface for Octane xplat — web <canvas> + @nativescript/canvas (2D, WebGL/WebGL2, WebGPU/WGSL)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"canvas",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@nativescript-community/octane": "0.2.4",
|
|
47
|
-
"@nativescript/core": "9.1.
|
|
47
|
+
"@nativescript/core": "9.1.3",
|
|
48
48
|
"@octanejs/vite-plugin": "0.1.61",
|
|
49
|
-
"octane": "0.
|
|
49
|
+
"octane": "0.10.2",
|
|
50
50
|
"tsrx-typegen": "0.2.2",
|
|
51
51
|
"typescript": "5.9.3",
|
|
52
52
|
"vite": "8.3.0"
|