@twick/2d 0.15.8 → 0.15.10
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/chunk-XMWTT7ET.js +37 -0
- package/dist/chunk-XMWTT7ET.js.map +1 -0
- package/dist/index.d.cts +43 -2149
- package/dist/index.d.ts +43 -2149
- package/dist/index.js +5 -30
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime-EZGUDKMi.d.cts +2112 -0
- package/dist/jsx-dev-runtime-EZGUDKMi.d.ts +2112 -0
- package/dist/jsx-dev-runtime.cjs +52 -0
- package/dist/jsx-dev-runtime.cjs.map +1 -0
- package/dist/jsx-dev-runtime.d.cts +2 -0
- package/dist/jsx-dev-runtime.d.ts +2 -0
- package/dist/jsx-dev-runtime.js +9 -0
- package/dist/jsx-dev-runtime.js.map +1 -0
- package/package.json +14 -4
package/dist/index.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (decorator = decorators[i])
|
|
7
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
-
if (kind && result) __defProp(target, key, result);
|
|
9
|
-
return result;
|
|
10
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
Fragment,
|
|
3
|
+
__decorateClass,
|
|
4
|
+
jsx
|
|
5
|
+
} from "./chunk-XMWTT7ET.js";
|
|
11
6
|
|
|
12
7
|
// src/lib/code/CodeCursor.ts
|
|
13
8
|
import { clampRemap, Color, map, unwrap as unwrap2, Vector2 } from "@twick/core";
|
|
@@ -10609,26 +10604,6 @@ Video = __decorateClass([
|
|
|
10609
10604
|
nodeName("Video")
|
|
10610
10605
|
], Video);
|
|
10611
10606
|
|
|
10612
|
-
// src/lib/jsx-runtime.ts
|
|
10613
|
-
function isClassComponent(fn) {
|
|
10614
|
-
return !!fn.prototype?.isClass;
|
|
10615
|
-
}
|
|
10616
|
-
var Fragment = ({ children }) => children;
|
|
10617
|
-
function jsx(type, config, key) {
|
|
10618
|
-
const { ref, children, ...rest } = config;
|
|
10619
|
-
const flatChildren = Array.isArray(children) ? children.flat() : children;
|
|
10620
|
-
if (type === Fragment) {
|
|
10621
|
-
return flatChildren;
|
|
10622
|
-
}
|
|
10623
|
-
if (isClassComponent(type)) {
|
|
10624
|
-
const node = new type({ ...rest, children: flatChildren, key });
|
|
10625
|
-
ref?.(node);
|
|
10626
|
-
return node;
|
|
10627
|
-
} else {
|
|
10628
|
-
return type({ ...rest, ref, children: flatChildren, key });
|
|
10629
|
-
}
|
|
10630
|
-
}
|
|
10631
|
-
|
|
10632
10607
|
// src/lib/scenes/Scene2D.ts
|
|
10633
10608
|
import {
|
|
10634
10609
|
GeneratorScene,
|