@yft-design/engine 0.0.30 → 0.0.31
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/scene.d.ts
CHANGED
|
@@ -148,6 +148,7 @@ export declare class TextNode extends SceneNode {
|
|
|
148
148
|
};
|
|
149
149
|
get aCoords(): CornerPoints;
|
|
150
150
|
get inkACoords(): CornerPoints;
|
|
151
|
+
private get textInkACoords();
|
|
151
152
|
get contentTopY(): number;
|
|
152
153
|
cursorCoord(flatIndex: number): {
|
|
153
154
|
x: number;
|
|
@@ -247,6 +248,7 @@ export declare class GroupNode extends SceneNode {
|
|
|
247
248
|
y: number;
|
|
248
249
|
};
|
|
249
250
|
containsPoint(x: number, y: number, hitBand?: number): boolean;
|
|
251
|
+
get inkACoords(): CornerPoints;
|
|
250
252
|
childAtPoint(x: number, y: number, hitBand?: number): SceneNode | null;
|
|
251
253
|
containsDeep(node: SceneNode): boolean;
|
|
252
254
|
adoptChild(child: SceneNode, index?: number): void;
|
|
@@ -258,6 +260,7 @@ export declare class TableNode extends GroupNode {
|
|
|
258
260
|
private _layout;
|
|
259
261
|
private readonly _childFactory;
|
|
260
262
|
private _placedShift;
|
|
263
|
+
get inkACoords(): CornerPoints;
|
|
261
264
|
selectedCells: CellPosition[];
|
|
262
265
|
cellAnchor: CellPosition | null;
|
|
263
266
|
cellRange: CellSelectionRange | null;
|
|
@@ -358,6 +361,7 @@ export declare class MaskNode extends SceneNode {
|
|
|
358
361
|
}
|
|
359
362
|
export declare class PuzzleNode extends GroupNode {
|
|
360
363
|
constructor(raw: SerializedNode, childFactory: (raw: SerializedNode) => SceneNode | null);
|
|
364
|
+
get inkACoords(): CornerPoints;
|
|
361
365
|
private reconcileIncompleteLayout;
|
|
362
366
|
private reconcileOverlappingChildren;
|
|
363
367
|
get layoutParams(): {
|
|
@@ -29,6 +29,19 @@ export declare const verticalLineInkRun: (line: TextLineLayout, style: TextStyle
|
|
|
29
29
|
end: number;
|
|
30
30
|
};
|
|
31
31
|
export declare const GENERIC_FONTS: Set<string>;
|
|
32
|
+
export declare const aggregateLineInk: (layout: TextLayout, style: TextStyleProps, options?: {
|
|
33
|
+
vertical?: boolean;
|
|
34
|
+
inkMeasure?: InkMeasureFn;
|
|
35
|
+
align?: unknown;
|
|
36
|
+
}) => {
|
|
37
|
+
lo: number;
|
|
38
|
+
hi: number;
|
|
39
|
+
firstTop: number;
|
|
40
|
+
} | null;
|
|
41
|
+
export declare const anchorInkRange: (lo: number, hi: number, boxWidth: number, align: unknown) => {
|
|
42
|
+
lo: number;
|
|
43
|
+
hi: number;
|
|
44
|
+
};
|
|
32
45
|
export interface TextStyleProps {
|
|
33
46
|
fontFamily: string;
|
|
34
47
|
fontSize: number;
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
+
import type { TextLayout } from './textLayout';
|
|
1
2
|
export type TextTransformKind = 'arc' | 'circle' | 'waist' | 'flag' | 'arch' | 'scroll';
|
|
2
3
|
export declare const textTransformKindOf: (raw: {
|
|
3
4
|
textTransform?: unknown;
|
|
4
5
|
type?: unknown;
|
|
5
6
|
}) => TextTransformKind | null;
|
|
7
|
+
export type WarpTransformKind = 'arch' | 'waist' | 'flag';
|
|
8
|
+
export declare const warpTextKindOf: (raw: {
|
|
9
|
+
textTransform?: unknown;
|
|
10
|
+
type?: unknown;
|
|
11
|
+
warpStrength?: unknown;
|
|
12
|
+
}) => WarpTransformKind | null;
|
|
13
|
+
export interface WarpInkExtent {
|
|
14
|
+
left: number;
|
|
15
|
+
right: number;
|
|
16
|
+
top: number;
|
|
17
|
+
bottom: number;
|
|
18
|
+
}
|
|
19
|
+
export declare const computeWarpInkExtent: (kind: WarpTransformKind, layout: TextLayout, raw: Record<string, unknown>, ink: {
|
|
20
|
+
lo: number;
|
|
21
|
+
hi: number;
|
|
22
|
+
firstTop: number;
|
|
23
|
+
}, contentTopY: number) => WarpInkExtent | null;
|