@yft-design/engine 0.0.31 → 0.0.32
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/model/alphaHit.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SceneNode } from './scene';
|
|
2
|
+
import { GroupNode } from './scene';
|
|
2
3
|
export interface AlphaHitContext {
|
|
3
4
|
selection: readonly SceneNode[];
|
|
4
5
|
hasSelectableBelow: () => boolean;
|
|
@@ -6,3 +7,4 @@ export interface AlphaHitContext {
|
|
|
6
7
|
}
|
|
7
8
|
export declare const isHitTransparent: (node: SceneNode, x: number, y: number, ctx: AlphaHitContext) => boolean;
|
|
8
9
|
export declare const clearAlphaHitMask: (node: SceneNode) => void;
|
|
10
|
+
export declare const drillChildAtPoint: (group: GroupNode, x: number, y: number, selection: readonly SceneNode[]) => SceneNode | null;
|
package/dist/model/document.d.ts
CHANGED
|
@@ -122,6 +122,8 @@ export declare class EngineDocument {
|
|
|
122
122
|
objectsIntersectingRect(left: number, top: number, right: number, bottom: number): SceneNode[];
|
|
123
123
|
setSelection(targets: SceneNode[], reason?: 'create' | 'update'): void;
|
|
124
124
|
clearSelection(): void;
|
|
125
|
+
private _transformGestureAt;
|
|
126
|
+
get transformGestureAt(): number;
|
|
125
127
|
applyTransform(targets: SceneNode[], props: (target: SceneNode) => Partial<SerializedNode>, phase: 'moving' | 'scaling' | 'rotating' | 'cornerRadius' | 'modified', detail?: {
|
|
126
128
|
action?: string;
|
|
127
129
|
before?: Map<SceneNode, SerializedNode>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Mat } from '../core/mat2d';
|
|
2
2
|
import { TextNode, type SceneNode } from '../model/scene';
|
|
3
|
+
import type { EngineDocument } from '../model/document';
|
|
3
4
|
import type { GradientRampCache } from './gradientRamp';
|
|
4
5
|
import type { SourceManager } from './SourceManager';
|
|
5
6
|
import type { TextRenderer } from './TextRenderer';
|
|
@@ -28,6 +29,7 @@ export interface SceneRendererHost {
|
|
|
28
29
|
readonly isExporting: () => boolean;
|
|
29
30
|
readonly renderEpoch?: RenderEpoch;
|
|
30
31
|
readonly bakeKReuseFloor?: number;
|
|
32
|
+
readonly document?: Pick<EngineDocument, 'transformGestureAt'>;
|
|
31
33
|
requestRenderAll: () => void;
|
|
32
34
|
}
|
|
33
35
|
export interface FrameState {
|