@flighthq/node 0.5.1-next.4389.185df52 → 0.5.1-next.5076.44cab46
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/README.md +2 -2
- package/dist/.tsbuildinfo.contract +1 -0
- package/dist/.tsbuildinfo.runtime +1 -0
- package/dist/boundsRectangle.d.ts +2 -1
- package/dist/boundsRectangle.d.ts.map +1 -1
- package/dist/boundsRectangle.js.map +1 -1
- package/dist/contract.d.ts +1 -0
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +1 -0
- package/dist/contract.js.map +1 -1
- package/dist/contract.node-types.d.ts +22 -0
- package/dist/contract.node-types.d.ts.map +1 -0
- package/dist/contract.node-types.js +3 -0
- package/dist/contract.node-types.js.map +1 -0
- package/dist/enableNodeGuards.js +1 -1
- package/dist/enableNodeGuards.js.map +1 -1
- package/dist/hasAppearance.d.ts +1 -1
- package/dist/hasBlendMode.d.ts +1 -1
- package/dist/hasBoundsRectangle.d.ts +2 -1
- package/dist/hasBoundsRectangle.d.ts.map +1 -1
- package/dist/hasBoundsRectangle.js.map +1 -1
- package/dist/hasClip.d.ts +1 -1
- package/dist/hasClip.d.ts.map +1 -1
- package/dist/hasMaterial.d.ts +1 -1
- package/dist/hasTransform2d.d.ts +1 -1
- package/dist/hasTransform3d.d.ts +1 -1
- package/dist/hasTransform3d.d.ts.map +1 -1
- package/dist/hasTransform3d.js.map +1 -1
- package/dist/hierarchy.d.ts +1 -1
- package/dist/hierarchy.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +2 -1
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +1 -1
- package/dist/node.js.map +1 -1
- package/dist/nodeColorAdjustment.d.ts +2 -1
- package/dist/nodeColorAdjustment.d.ts.map +1 -1
- package/dist/nodeColorAdjustment.js.map +1 -1
- package/dist/nodeOrderList.d.ts +2 -1
- package/dist/nodeOrderList.d.ts.map +1 -1
- package/dist/nodeOrderList.js.map +1 -1
- package/dist/nodeTransform2d.d.ts +2 -1
- package/dist/nodeTransform2d.d.ts.map +1 -1
- package/dist/nodeTransform2d.js.map +1 -1
- package/dist/nodeTransform3d.d.ts +2 -1
- package/dist/nodeTransform3d.d.ts.map +1 -1
- package/dist/nodeTransform3d.js.map +1 -1
- package/dist/revision.d.ts +1 -1
- package/dist/revision.d.ts.map +1 -1
- package/dist/revision.js.map +1 -1
- package/dist/stageFit.d.ts +3 -1
- package/dist/stageFit.d.ts.map +1 -1
- package/dist/stageFit.js.map +1 -1
- package/dist/traversal.d.ts +1 -1
- package/dist/traversal.d.ts.map +1 -1
- package/dist/traversal.js.map +1 -1
- package/dist/types/AppearanceFlags.d.ts +22 -0
- package/dist/types/AppearanceFlags.d.ts.map +1 -0
- package/dist/types/AppearanceFlags.js +38 -0
- package/dist/types/AppearanceFlags.js.map +1 -0
- package/dist/types/HasAppearance.d.ts +14 -0
- package/dist/types/HasAppearance.d.ts.map +1 -0
- package/dist/types/HasAppearance.js +2 -0
- package/dist/types/HasAppearance.js.map +1 -0
- package/dist/types/HasBlendMode.d.ts +7 -0
- package/dist/types/HasBlendMode.d.ts.map +1 -0
- package/dist/types/HasBlendMode.js +2 -0
- package/dist/types/HasBlendMode.js.map +1 -0
- package/dist/types/HasBoundsRectangle.d.ts +17 -0
- package/dist/types/HasBoundsRectangle.d.ts.map +1 -0
- package/dist/types/HasBoundsRectangle.js +2 -0
- package/dist/types/HasBoundsRectangle.js.map +1 -0
- package/dist/types/HasClip.d.ts +14 -0
- package/dist/types/HasClip.d.ts.map +1 -0
- package/dist/types/HasClip.js +2 -0
- package/dist/types/HasClip.js.map +1 -0
- package/dist/types/HasColorScaleBias.d.ts +7 -0
- package/dist/types/HasColorScaleBias.d.ts.map +1 -0
- package/dist/types/HasColorScaleBias.js +2 -0
- package/dist/types/HasColorScaleBias.js.map +1 -0
- package/dist/types/HasMaterial.d.ts +8 -0
- package/dist/types/HasMaterial.d.ts.map +1 -0
- package/dist/types/HasMaterial.js +2 -0
- package/dist/types/HasMaterial.js.map +1 -0
- package/dist/types/HasTransform2D.d.ts +29 -0
- package/dist/types/HasTransform2D.d.ts.map +1 -0
- package/dist/types/HasTransform2D.js +2 -0
- package/dist/types/HasTransform2D.js.map +1 -0
- package/dist/types/HasTransform3D.d.ts +17 -0
- package/dist/types/HasTransform3D.d.ts.map +1 -0
- package/dist/types/HasTransform3D.js +2 -0
- package/dist/types/HasTransform3D.js.map +1 -0
- package/dist/types/HierarchyNode.d.ts +4 -0
- package/dist/types/HierarchyNode.d.ts.map +1 -0
- package/dist/types/HierarchyNode.js +2 -0
- package/dist/types/HierarchyNode.js.map +1 -0
- package/dist/types/MethodsOf.d.ts +4 -0
- package/dist/types/MethodsOf.d.ts.map +1 -0
- package/dist/types/MethodsOf.js +2 -0
- package/dist/types/MethodsOf.js.map +1 -0
- package/dist/types/Node.d.ts +52 -0
- package/dist/types/Node.d.ts.map +1 -0
- package/dist/types/Node.js +3 -0
- package/dist/types/Node.js.map +1 -0
- package/dist/types/NodeDescendantVisitor.d.ts +3 -0
- package/dist/types/NodeDescendantVisitor.d.ts.map +1 -0
- package/dist/types/NodeDescendantVisitor.js +2 -0
- package/dist/types/NodeDescendantVisitor.js.map +1 -0
- package/dist/types/NodeOrderList.d.ts +10 -0
- package/dist/types/NodeOrderList.d.ts.map +1 -0
- package/dist/types/NodeOrderList.js +2 -0
- package/dist/types/NodeOrderList.js.map +1 -0
- package/dist/types/NodeSignals.d.ts +12 -0
- package/dist/types/NodeSignals.d.ts.map +1 -0
- package/dist/types/NodeSignals.js +2 -0
- package/dist/types/NodeSignals.js.map +1 -0
- package/dist/types/PartialNode.d.ts +6 -0
- package/dist/types/PartialNode.d.ts.map +1 -0
- package/dist/types/PartialNode.js +2 -0
- package/dist/types/PartialNode.js.map +1 -0
- package/dist/types/RendererData.d.ts +5 -0
- package/dist/types/RendererData.d.ts.map +1 -0
- package/dist/types/RendererData.js +2 -0
- package/dist/types/RendererData.js.map +1 -0
- package/dist/types/Scene2DFitContext.d.ts +9 -0
- package/dist/types/Scene2DFitContext.d.ts.map +1 -0
- package/dist/types/Scene2DFitContext.js +2 -0
- package/dist/types/Scene2DFitContext.js.map +1 -0
- package/dist/types/Viewport.d.ts +11 -0
- package/dist/types/Viewport.d.ts.map +1 -0
- package/dist/types/Viewport.js +2 -0
- package/dist/types/Viewport.js.map +1 -0
- package/dist/types/ViewportScaleMode.d.ts +2 -0
- package/dist/types/ViewportScaleMode.d.ts.map +1 -0
- package/dist/types/ViewportScaleMode.js +2 -0
- package/dist/types/ViewportScaleMode.js.map +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/viewport.d.ts +2 -1
- package/dist/viewport.d.ts.map +1 -1
- package/dist/viewport.js.map +1 -1
- package/package.json +12 -9
- package/src/boundsRectangle.test.ts +9 -9
- package/src/enableNodeGuards.test.ts +2 -1
- package/src/hasAppearance.test.ts +1 -2
- package/src/hasBlendMode.test.ts +2 -2
- package/src/hasBoundsRectangle.test.ts +1 -1
- package/src/hasClip.test.ts +2 -1
- package/src/hasMaterial.test.ts +1 -2
- package/src/hasTransform2d.test.ts +1 -2
- package/src/hasTransform3d.test.ts +1 -1
- package/src/hierarchy.test.ts +3 -3
- package/src/node.test.ts +3 -3
- package/src/nodeColorAdjustment.test.ts +1 -1
- package/src/nodeOrderList.test.ts +2 -2
- package/src/nodeTransform2d.test.ts +2 -1
- package/src/nodeTransform3d.test.ts +2 -7
- package/src/revision.test.ts +1 -1
- package/src/stageFit.test.ts +2 -7
- package/src/traversal.test.ts +2 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { EntityRaw, EntityRuntime, EntityRuntimeKey } from '@flighthq/entity/contract';
|
|
2
|
+
import type { Matrix } from '@flighthq/geometry/contract';
|
|
3
|
+
import type { NodeOf, NodeFields } from './Node.ts';
|
|
4
|
+
export interface HasTransform2D extends EntityRaw {
|
|
5
|
+
[EntityRuntimeKey]: EntityRuntime | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Local pivot point that rotation and scale turn around and that aligns to (`x`, `y`). In local
|
|
8
|
+
* units, the same space as children. Defaults to 0,0 (top-left), which reproduces a pivot-free
|
|
9
|
+
* transform. A sprite built from a spritesheet frame sets this to the frame's registration point.
|
|
10
|
+
*/
|
|
11
|
+
pivotX: number;
|
|
12
|
+
pivotY: number;
|
|
13
|
+
rotation: number;
|
|
14
|
+
scaleX: number;
|
|
15
|
+
scaleY: number;
|
|
16
|
+
skewX: number;
|
|
17
|
+
skewY: number;
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}
|
|
21
|
+
export interface HasTransform2DRuntime extends EntityRuntime {
|
|
22
|
+
localMatrix: Matrix | null;
|
|
23
|
+
rotationAngle: number;
|
|
24
|
+
rotationCosine: number;
|
|
25
|
+
rotationSine: number;
|
|
26
|
+
worldMatrix: Matrix | null;
|
|
27
|
+
}
|
|
28
|
+
export type Transform2DNode<Fields extends object = NodeFields> = NodeOf<Fields> & HasTransform2D;
|
|
29
|
+
//# sourceMappingURL=HasTransform2D.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HasTransform2D.d.ts","sourceRoot":"","sources":["../../src/types/HasTransform2D.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEpD,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,CAAC,gBAAgB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC9C;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,MAAM,eAAe,CAAC,MAAM,SAAS,MAAM,GAAG,UAAU,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HasTransform2D.js","sourceRoot":"","sources":["../../src/types/HasTransform2D.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EntityRuntime } from '@flighthq/entity/contract';
|
|
2
|
+
import type { Matrix4 } from '@flighthq/geometry/contract';
|
|
3
|
+
import type { Quaternion } from '@flighthq/geometry/contract';
|
|
4
|
+
import type { Vector3 } from '@flighthq/geometry/contract';
|
|
5
|
+
import type { NodeOf, NodeFields } from './Node.ts';
|
|
6
|
+
export interface HasTransform3D {
|
|
7
|
+
position: Vector3;
|
|
8
|
+
rotation: Quaternion;
|
|
9
|
+
scale: Vector3;
|
|
10
|
+
}
|
|
11
|
+
export interface HasTransform3DRuntime extends EntityRuntime {
|
|
12
|
+
localMatrix4: Matrix4 | null;
|
|
13
|
+
localMatrix4Detached: boolean;
|
|
14
|
+
worldMatrix4: Matrix4 | null;
|
|
15
|
+
}
|
|
16
|
+
export type Transform3DNode<Fields extends object = NodeFields> = NodeOf<Fields> & HasTransform3D;
|
|
17
|
+
//# sourceMappingURL=HasTransform3D.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HasTransform3D.d.ts","sourceRoot":"","sources":["../../src/types/HasTransform3D.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAOpD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,UAAU,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAE1D,YAAY,EAAE,OAAO,GAAG,IAAI,CAAC;IAI7B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,YAAY,EAAE,OAAO,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,MAAM,eAAe,CAAC,MAAM,SAAS,MAAM,GAAG,UAAU,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HasTransform3D.js","sourceRoot":"","sources":["../../src/types/HasTransform3D.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchyNode.d.ts","sourceRoot":"","sources":["../../src/types/HierarchyNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE3D,MAAM,MAAM,aAAa,CAAC,MAAM,SAAS,MAAM,GAAG,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;AAC7E,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchyNode.js","sourceRoot":"","sources":["../../src/types/HierarchyNode.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MethodsOf.d.ts","sourceRoot":"","sources":["../../src/types/MethodsOf.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;KACxB,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;CACvE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MethodsOf.js","sourceRoot":"","sources":["../../src/types/MethodsOf.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ColorAdjustmentRuntime } from '@flighthq/adjustments/contract';
|
|
2
|
+
import type { EntityRaw, EntityRuntime, EntityRuntimeKey, Kind } from '@flighthq/entity/contract';
|
|
3
|
+
import type { NodeSignals } from './NodeSignals.ts';
|
|
4
|
+
declare const NodeFieldsKey: unique symbol;
|
|
5
|
+
export type NodeFieldsKey<T extends object> = symbol & {
|
|
6
|
+
readonly [NodeFieldsKey]?: T;
|
|
7
|
+
};
|
|
8
|
+
export interface NodeData extends EntityRaw {
|
|
9
|
+
[EntityRuntimeKey]: EntityRuntime | undefined;
|
|
10
|
+
}
|
|
11
|
+
export type NodeDataFactory<D extends NodeData> = () => D;
|
|
12
|
+
export type NodeRuntimeFactory<R extends EntityRuntime> = () => R;
|
|
13
|
+
export interface NodeFields {
|
|
14
|
+
readonly data: NodeData | null;
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
kind: Kind;
|
|
17
|
+
name: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface Node<Fields extends object = NodeFields> extends NodeFields, EntityRaw {
|
|
20
|
+
[EntityRuntimeKey]: NodeRuntime<Fields> | undefined;
|
|
21
|
+
}
|
|
22
|
+
export type NodeOf<Fields extends object> = Node<Fields> & NoInfer<Fields>;
|
|
23
|
+
export interface NodeRuntime<Fields extends object = NodeFields> extends EntityRuntime, ColorAdjustmentRuntime {
|
|
24
|
+
appearanceId: number;
|
|
25
|
+
boundsUsingLocalBoundsId: number;
|
|
26
|
+
boundsUsingLocalTransformId: number;
|
|
27
|
+
canAddChild: (target: Node<Fields>, child: Node<Fields>) => boolean;
|
|
28
|
+
children: NodeOf<Fields>[] | null;
|
|
29
|
+
childrenId: number;
|
|
30
|
+
fields?: NodeFieldsKey<Fields>;
|
|
31
|
+
interactionSignals: unknown;
|
|
32
|
+
localBoundsId: number;
|
|
33
|
+
localBoundsUsingLocalBoundsId: number;
|
|
34
|
+
localContentId: number;
|
|
35
|
+
localTransformId: number;
|
|
36
|
+
localTransformUsingLocalTransformId: number;
|
|
37
|
+
nodeSignals: NodeSignals | null;
|
|
38
|
+
interactionState: unknown;
|
|
39
|
+
parent: NodeOf<Fields> | null;
|
|
40
|
+
parentReferenceId: number;
|
|
41
|
+
worldBoundsUsingLocalBoundsId: number;
|
|
42
|
+
worldBoundsUsingWorldTransformId: number;
|
|
43
|
+
worldTransformId: number;
|
|
44
|
+
worldTransformRevisionCounter: number;
|
|
45
|
+
worldTransformUsingLocalTransformId: number;
|
|
46
|
+
worldTransformUsingParentTransformId: number;
|
|
47
|
+
}
|
|
48
|
+
export declare const NodeKind = "Node";
|
|
49
|
+
export declare const NullScene3D: unique symbol;
|
|
50
|
+
export type NodeAny = Node<any>;
|
|
51
|
+
export type { NodeSignals };
|
|
52
|
+
//# sourceMappingURL=Node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../src/types/Node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAElG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,CAAC,MAAM,aAAa,EAAE,OAAO,MAAM,CAAC;AAC3C,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,GAAG;IACrD,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC;CAC9B,CAAC;AACF,MAAM,WAAW,QAAS,SAAQ,SAAS;IACzC,CAAC,gBAAgB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CAC/C;AACD,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,QAAQ,IAAI,MAAM,CAAC,CAAC;AAC1D,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,aAAa,IAAI,MAAM,CAAC,CAAC;AAClE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AACD,MAAM,WAAW,IAAI,CAAC,MAAM,SAAS,MAAM,GAAG,UAAU,CAAE,SAAQ,UAAU,EAAE,SAAS;IACrF,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;CACrD;AACD,MAAM,MAAM,MAAM,CAAC,MAAM,SAAS,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC3E,MAAM,WAAW,WAAW,CAAC,MAAM,SAAS,MAAM,GAAG,UAAU,CAAE,SAAQ,aAAa,EAAE,sBAAsB;IAC5G,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,MAAM,CAAC;IACjC,2BAA2B,EAAE,MAAM,CAAC;IACpC,WAAW,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC;IACpE,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC;IAGlC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,6BAA6B,EAAE,MAAM,CAAC;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mCAAmC,EAAE,MAAM,CAAC;IAC5C,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAIhC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAI9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,6BAA6B,EAAE,MAAM,CAAC;IACtC,gCAAgC,EAAE,MAAM,CAAC;IACzC,gBAAgB,EAAE,MAAM,CAAC;IAIzB,6BAA6B,EAAE,MAAM,CAAC;IACtC,mCAAmC,EAAE,MAAM,CAAC;IAC5C,oCAAoC,EAAE,MAAM,CAAC;CAC9C;AACD,eAAO,MAAM,QAAQ,SAAS,CAAC;AAC/B,eAAO,MAAM,WAAW,eAAwB,CAAC;AAEjD,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AAChC,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Node.js","sourceRoot":"","sources":["../../src/types/Node.ts"],"names":[],"mappings":"AA2DA,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC;AAC/B,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeDescendantVisitor.d.ts","sourceRoot":"","sources":["../../src/types/NodeDescendantVisitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAKlD,MAAM,MAAM,qBAAqB,CAAC,MAAM,SAAS,MAAM,GAAG,UAAU,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeDescendantVisitor.js","sourceRoot":"","sources":["../../src/types/NodeDescendantVisitor.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EntityRaw, EntityRuntime, EntityRuntimeKey } from '@flighthq/entity/contract';
|
|
2
|
+
import type { Node, NodeFields } from './Node.ts';
|
|
3
|
+
export interface NodeOrderList<Fields extends object = NodeFields> extends EntityRaw {
|
|
4
|
+
[EntityRuntimeKey]: EntityRuntime | undefined;
|
|
5
|
+
entryCount: number;
|
|
6
|
+
nodes: Node<Fields>[];
|
|
7
|
+
sortKeys: number[];
|
|
8
|
+
}
|
|
9
|
+
export type NodeOrderListEntryVisitor<Fields extends object = NodeFields> = (node: Node<Fields>, sortKey: number, index: number) => boolean | void;
|
|
10
|
+
//# sourceMappingURL=NodeOrderList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeOrderList.d.ts","sourceRoot":"","sources":["../../src/types/NodeOrderList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE5F,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAClD,MAAM,WAAW,aAAa,CAAC,MAAM,SAAS,MAAM,GAAG,UAAU,CAAE,SAAQ,SAAS;IAClF,CAAC,gBAAgB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AACD,MAAM,MAAM,yBAAyB,CAAC,MAAM,SAAS,MAAM,GAAG,UAAU,IAAI,CAC1E,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,EAClB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,KACV,OAAO,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeOrderList.js","sourceRoot":"","sources":["../../src/types/NodeOrderList.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EntityRaw, EntityRuntime, EntityRuntimeKey } from '@flighthq/entity/contract';
|
|
2
|
+
import type { Signal } from '@flighthq/signals/contract';
|
|
3
|
+
import type { NodeAny } from './Node.ts';
|
|
4
|
+
export interface NodeSignals extends EntityRaw {
|
|
5
|
+
[EntityRuntimeKey]: EntityRuntime | undefined;
|
|
6
|
+
onChildAdded: Signal<NodeAny>;
|
|
7
|
+
onChildRemoved: Signal<NodeAny>;
|
|
8
|
+
onChildrenChanged: Signal<void>;
|
|
9
|
+
onChildrenOrderChanged: Signal<void>;
|
|
10
|
+
onParentChanged: Signal<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=NodeSignals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeSignals.d.ts","sourceRoot":"","sources":["../../src/types/NodeSignals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,CAAC,gBAAgB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC9C,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,sBAAsB,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IACrC,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeSignals.js","sourceRoot":"","sources":["../../src/types/NodeSignals.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PartialNode.d.ts","sourceRoot":"","sources":["../../src/types/PartialNode.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;CACzD,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PartialNode.js","sourceRoot":"","sources":["../../src/types/PartialNode.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RendererData.d.ts","sourceRoot":"","sources":["../../src/types/RendererData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE5F,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,CAAC,gBAAgB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CAC/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RendererData.js","sourceRoot":"","sources":["../../src/types/RendererData.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ViewportAlign } from '@flighthq/layout/contract';
|
|
2
|
+
import type { Node, NodeFields } from './Node.ts';
|
|
3
|
+
import type { ViewportScaleMode } from './ViewportScaleMode.ts';
|
|
4
|
+
export interface Scene2DFitContext<Fields extends object = NodeFields> {
|
|
5
|
+
align: ViewportAlign;
|
|
6
|
+
root: Node<Fields> | null;
|
|
7
|
+
scaleMode: ViewportScaleMode;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=Scene2DFitContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scene2DFitContext.d.ts","sourceRoot":"","sources":["../../src/types/Scene2DFitContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,WAAW,iBAAiB,CAAC,MAAM,SAAS,MAAM,GAAG,UAAU;IACnE,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,iBAAiB,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scene2DFitContext.js","sourceRoot":"","sources":["../../src/types/Scene2DFitContext.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EntityRaw, EntityRuntime, EntityRuntimeKey } from '@flighthq/entity/contract';
|
|
2
|
+
export interface Viewport extends EntityRaw {
|
|
3
|
+
[EntityRuntimeKey]: EntityRuntime | undefined;
|
|
4
|
+
devicePixelRatio: number;
|
|
5
|
+
height: number;
|
|
6
|
+
width: number;
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
}
|
|
10
|
+
export type ViewportLike = Partial<Viewport>;
|
|
11
|
+
//# sourceMappingURL=Viewport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Viewport.d.ts","sourceRoot":"","sources":["../../src/types/Viewport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAQ5F,MAAM,WAAW,QAAS,SAAQ,SAAS;IACzC,CAAC,gBAAgB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC9C,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Viewport.js","sourceRoot":"","sources":["../../src/types/Viewport.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewportScaleMode.d.ts","sourceRoot":"","sources":["../../src/types/ViewportScaleMode.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewportScaleMode.js","sourceRoot":"","sources":["../../src/types/ViewportScaleMode.ts"],"names":[],"mappings":""}
|
package/dist/types.d.ts
CHANGED
package/dist/viewport.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EntityConstruction } from '@flighthq/entity/contract';
|
|
2
|
+
import type { Viewport, ViewportLike } from './contract.node-types.ts';
|
|
2
3
|
export declare function createViewport(obj?: Readonly<ViewportLike>): Viewport;
|
|
3
4
|
export declare function getViewportAspect(viewport: Readonly<Viewport>): number;
|
|
4
5
|
export declare function initializeViewport(out: EntityConstruction<Viewport>, obj?: Readonly<ViewportLike>): void;
|
package/dist/viewport.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewport.d.ts","sourceRoot":"","sources":["../src/viewport.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"viewport.d.ts","sourceRoot":"","sources":["../src/viewport.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEvE,wBAAgB,cAAc,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,QAAQ,CAIrE;AAID,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,MAAM,CAEtE;AAKD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,kBAAkB,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,IAAI,CAMxG"}
|
package/dist/viewport.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewport.js","sourceRoot":"","sources":["../src/viewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"viewport.js","sourceRoot":"","sources":["../src/viewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAKzE,MAAM,UAAU,cAAc,CAAC,GAA4B;IACzD,MAAM,GAAG,GAAG,cAAc,EAAY,CAAC;IACvC,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC7B,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC;AAED,uGAAuG;AACvG,2GAA2G;AAC3G,MAAM,UAAU,iBAAiB,CAAC,QAA4B;IAC5D,OAAO,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,wGAAwG;AACxG,0GAA0G;AAC1G,4EAA4E;AAC5E,MAAM,UAAU,kBAAkB,CAAC,GAAiC,EAAE,GAA4B;IAChG,GAAG,CAAC,gBAAgB,GAAG,GAAG,EAAE,gBAAgB,IAAI,CAAC,CAAC;IAClD,GAAG,CAAC,MAAM,GAAG,GAAG,EAAE,MAAM,IAAI,CAAC,CAAC;IAC9B,GAAG,CAAC,KAAK,GAAG,GAAG,EAAE,KAAK,IAAI,CAAC,CAAC;IAC5B,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACpB,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/node",
|
|
3
|
-
"version": "0.5.1-next.
|
|
3
|
+
"version": "0.5.1-next.5076.44cab46",
|
|
4
4
|
"author": "Joshua Granick and other contributors",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,20 +32,23 @@
|
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "tsc -b",
|
|
34
34
|
"clean": "tsc -b --clean",
|
|
35
|
+
"generate": "tsx ../../scripts/generate-rust-package.ts --crate flight-node --package node",
|
|
36
|
+
"generate:check": "tsx ../../scripts/generate-rust-package.ts --crate flight-node --package node --check",
|
|
35
37
|
"test": "vitest run --config vitest.config.ts",
|
|
36
38
|
"test:watch": "vitest --watch --config vitest.config.ts",
|
|
37
39
|
"prepack": "npm run clean && npm run clean:dist && npm run build",
|
|
38
40
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
39
41
|
},
|
|
40
42
|
"dependencies": {
|
|
41
|
-
"@flighthq/adjustments": "0.5.1-next.
|
|
42
|
-
"@flighthq/
|
|
43
|
-
"@flighthq/
|
|
44
|
-
"@flighthq/
|
|
45
|
-
"@flighthq/
|
|
46
|
-
"@flighthq/
|
|
47
|
-
"@flighthq/
|
|
48
|
-
"@flighthq/
|
|
43
|
+
"@flighthq/adjustments": "0.5.1-next.5076.44cab46",
|
|
44
|
+
"@flighthq/clip": "0.5.1-next.5076.44cab46",
|
|
45
|
+
"@flighthq/entity": "0.5.1-next.5076.44cab46",
|
|
46
|
+
"@flighthq/geometry": "0.5.1-next.5076.44cab46",
|
|
47
|
+
"@flighthq/layout": "0.5.1-next.5076.44cab46",
|
|
48
|
+
"@flighthq/log": "0.5.1-next.5076.44cab46",
|
|
49
|
+
"@flighthq/materials": "0.5.1-next.5076.44cab46",
|
|
50
|
+
"@flighthq/math": "0.5.1-next.5076.44cab46",
|
|
51
|
+
"@flighthq/signals": "0.5.1-next.5076.44cab46"
|
|
49
52
|
},
|
|
50
53
|
"devDependencies": {
|
|
51
54
|
"typescript": "^7.0.2"
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
setEmptyRectangle as setEmpty,
|
|
7
7
|
setRectangle,
|
|
8
8
|
} from '@flighthq/geometry/contract';
|
|
9
|
+
import type { Rectangle } from '@flighthq/geometry/contract';
|
|
9
10
|
import {
|
|
10
11
|
addNodeChild,
|
|
11
12
|
createNode,
|
|
@@ -17,15 +18,6 @@ import {
|
|
|
17
18
|
removeNodeChild,
|
|
18
19
|
setNodeEnabled,
|
|
19
20
|
} from '@flighthq/node/contract';
|
|
20
|
-
import type {
|
|
21
|
-
HasBoundsRectangle,
|
|
22
|
-
HasBoundsRectangleRuntime,
|
|
23
|
-
HasTransform2D,
|
|
24
|
-
HasTransform2DRuntime,
|
|
25
|
-
Node,
|
|
26
|
-
NodeRuntime,
|
|
27
|
-
Rectangle,
|
|
28
|
-
} from '@flighthq/types/contract';
|
|
29
21
|
|
|
30
22
|
import {
|
|
31
23
|
computeNodeBoundsRectangle,
|
|
@@ -41,6 +33,14 @@ import {
|
|
|
41
33
|
setNodeHeight,
|
|
42
34
|
setNodeWidth,
|
|
43
35
|
} from './boundsRectangle.ts';
|
|
36
|
+
import type {
|
|
37
|
+
HasBoundsRectangle,
|
|
38
|
+
HasBoundsRectangleRuntime,
|
|
39
|
+
HasTransform2D,
|
|
40
|
+
HasTransform2DRuntime,
|
|
41
|
+
Node,
|
|
42
|
+
NodeRuntime,
|
|
43
|
+
} from './contract.node-types.ts';
|
|
44
44
|
import { initBoundsRectangleRuntimeTrait, initBoundsRectangleTrait } from './hasBoundsRectangle.ts';
|
|
45
45
|
|
|
46
46
|
function getEntityRuntime(
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { getEntityRuntime as getRawEntityRuntime } from '@flighthq/entity/contract';
|
|
2
2
|
import { createLogState, setLogSink } from '@flighthq/log/contract';
|
|
3
3
|
import type { LogState } from '@flighthq/log/contract';
|
|
4
|
-
import type {
|
|
4
|
+
import type { LogEntry } from '@flighthq/log/contract';
|
|
5
5
|
import { afterEach, beforeEach, describe, expect, test } from 'vitest';
|
|
6
6
|
|
|
7
|
+
import type { HasTransform2D, HasTransform2DRuntime, Node } from './contract.node-types.ts';
|
|
7
8
|
import { areNodeGuardsEnabled, disableNodeGuards, enableNodeGuards } from './enableNodeGuards.ts';
|
|
8
9
|
import { initTransform2DRuntimeTrait, initTransform2DTrait } from './hasTransform2d.ts';
|
|
9
10
|
import { reparentNode } from './hierarchy.ts';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { HasAppearance, HasAppearanceRuntime, NodeRuntime } from '
|
|
2
|
-
|
|
1
|
+
import type { HasAppearance, HasAppearanceRuntime, NodeRuntime } from './contract.node-types.ts';
|
|
3
2
|
import { initAppearanceRuntimeTrait, initAppearanceTrait } from './hasAppearance.ts';
|
|
4
3
|
import { createNode, createNodeRuntime } from './node.ts';
|
|
5
4
|
|
package/src/hasBlendMode.test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BlendMode } from '@flighthq/types/contract';
|
|
1
|
+
import { BlendMode } from '@flighthq/materials/contract';
|
|
3
2
|
|
|
3
|
+
import type { HasBlendMode } from './contract.node-types.ts';
|
|
4
4
|
import { initBlendModeTrait } from './hasBlendMode.ts';
|
|
5
5
|
import { createNode } from './node.ts';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRectangle } from '@flighthq/geometry/contract';
|
|
2
|
-
import type { HasBoundsRectangle, HasBoundsRectangleRuntime, Node, NodeRuntime } from '@flighthq/types/contract';
|
|
3
2
|
|
|
3
|
+
import type { HasBoundsRectangle, HasBoundsRectangleRuntime, Node, NodeRuntime } from './contract.node-types.ts';
|
|
4
4
|
import {
|
|
5
5
|
defaultComputeLocalBoundsRectangle,
|
|
6
6
|
initBoundsRectangleRuntimeTrait,
|
package/src/hasClip.test.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { ClipRegion
|
|
1
|
+
import type { ClipRegion } from '@flighthq/clip/contract';
|
|
2
2
|
|
|
3
3
|
import { initClipTrait } from './hasClip.ts';
|
|
4
4
|
import { createNode } from './node.ts';
|
|
5
|
+
import type { HasClip } from './types/HasClip.ts';
|
|
5
6
|
|
|
6
7
|
const TestKind = 'Test';
|
|
7
8
|
|
package/src/hasMaterial.test.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { HasTransform2D, HasTransform2DRuntime, Node, NodeRuntime } from '
|
|
2
|
-
|
|
1
|
+
import type { HasTransform2D, HasTransform2DRuntime, Node, NodeRuntime } from './contract.node-types.ts';
|
|
3
2
|
import { initTransform2DRuntimeTrait, initTransform2DTrait } from './hasTransform2d.ts';
|
|
4
3
|
import { createNode, createNodeRuntime } from './node.ts';
|
|
5
4
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createQuaternion, createVector3 } from '@flighthq/geometry/contract';
|
|
2
|
-
import type { HasTransform3D, HasTransform3DRuntime, Node, NodeRuntime } from '@flighthq/types/contract';
|
|
3
2
|
|
|
3
|
+
import type { HasTransform3D, HasTransform3DRuntime, Node, NodeRuntime } from './contract.node-types.ts';
|
|
4
4
|
import { initTransform3DRuntimeTrait, initTransform3DTrait } from './hasTransform3d.ts';
|
|
5
5
|
import { createNode, createNodeRuntime } from './node.ts';
|
|
6
6
|
|
package/src/hierarchy.test.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { getEntityRuntime as getRawEntityRuntime } from '@flighthq/entity/contra
|
|
|
2
2
|
import { cloneMatrix } from '@flighthq/geometry/contract';
|
|
3
3
|
import { connectSignal, disconnectSignal } from '@flighthq/signals/contract';
|
|
4
4
|
import type { Signal, SlotId } from '@flighthq/signals/contract';
|
|
5
|
+
|
|
5
6
|
import type {
|
|
6
7
|
HasTransform2D,
|
|
7
8
|
HasTransform2DRuntime,
|
|
@@ -9,9 +10,8 @@ import type {
|
|
|
9
10
|
NodeAny,
|
|
10
11
|
NodeRuntime,
|
|
11
12
|
NodeFields,
|
|
12
|
-
} from '
|
|
13
|
-
import { NodeKind } from '
|
|
14
|
-
|
|
13
|
+
} from './contract.node-types.ts';
|
|
14
|
+
import { NodeKind } from './contract.node-types.ts';
|
|
15
15
|
import { initTransform2DRuntimeTrait, initTransform2DTrait } from './hasTransform2d.ts';
|
|
16
16
|
import {
|
|
17
17
|
addNodeChild,
|
package/src/node.test.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { allocateEntity, attachEntityBinding, finishEntity, getEntityBinding } from '@flighthq/entity/contract';
|
|
2
2
|
import { connectSignal } from '@flighthq/signals/contract';
|
|
3
|
-
import type { InteractionSignals, Node, NodeData, NodeRuntime } from '@flighthq/types/contract';
|
|
4
|
-
import { NodeKind } from '@flighthq/types/contract';
|
|
5
3
|
|
|
4
|
+
import type { Node, NodeData, NodeRuntime } from './contract.node-types.ts';
|
|
5
|
+
import { NodeKind } from './contract.node-types.ts';
|
|
6
6
|
import { addNodeChild, getNodeChildCount, getNodeParent } from './hierarchy.ts';
|
|
7
7
|
import {
|
|
8
8
|
createNode,
|
|
@@ -176,7 +176,7 @@ describe('disposeNode', () => {
|
|
|
176
176
|
it('releases the interaction signal registry after disposal', () => {
|
|
177
177
|
const node = createNode(NodeKind);
|
|
178
178
|
const runtime = getNodeRuntime(node) as NodeRuntime;
|
|
179
|
-
runtime.interactionSignals = {}
|
|
179
|
+
runtime.interactionSignals = {};
|
|
180
180
|
|
|
181
181
|
disposeNode(node);
|
|
182
182
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createColorMatrixAdjustment, createTintAdjustment } from '@flighthq/adjustments/contract';
|
|
2
|
-
import { NodeKind } from '@flighthq/types/contract';
|
|
3
2
|
|
|
3
|
+
import { NodeKind } from './contract.node-types.ts';
|
|
4
4
|
import { createNode, getNodeRuntime } from './node.ts';
|
|
5
5
|
import {
|
|
6
6
|
addNodeColorAdjustment,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { connectSignal } from '@flighthq/signals/contract';
|
|
2
|
-
import type { Node, NodeFields } from '@flighthq/types/contract';
|
|
3
|
-
import { NodeKind } from '@flighthq/types/contract';
|
|
4
2
|
|
|
3
|
+
import type { Node, NodeFields } from './contract.node-types.ts';
|
|
4
|
+
import { NodeKind } from './contract.node-types.ts';
|
|
5
5
|
import { addNodeChild, removeNodeChild } from './hierarchy.ts';
|
|
6
6
|
import { createNode, enableNodeSignals, getNodeRuntime } from './node.ts';
|
|
7
7
|
import {
|
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
multiplyMatrix,
|
|
9
9
|
setMatrix,
|
|
10
10
|
} from '@flighthq/geometry/contract';
|
|
11
|
+
import type { Matrix } from '@flighthq/geometry/contract';
|
|
11
12
|
import { addNodeChild, createNode } from '@flighthq/node/contract';
|
|
12
|
-
import type { HasTransform2D, HasTransform2DRuntime, Matrix, Node, NodeRuntime } from '@flighthq/types/contract';
|
|
13
13
|
|
|
14
|
+
import type { HasTransform2D, HasTransform2DRuntime, Node, NodeRuntime } from './contract.node-types.ts';
|
|
14
15
|
import { initTransform2DRuntimeTrait, initTransform2DTrait } from './hasTransform2d.ts';
|
|
15
16
|
import {
|
|
16
17
|
convertNodeVector2GlobalToLocal,
|