@fulate/core 1.0.14 → 1.0.19

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.
@@ -72,9 +72,10 @@ export interface GeometryQuery {
72
72
  /**
73
73
  * 返回所有 subpath line/cubic 的精确 local AABB;无顶点时为 `null`。
74
74
  *
75
- * 返回值是 query-owned 的 borrowed view:同一 query 在其 snapshot
75
+ * 返回值是只读 borrowed view:同一 query 在其 snapshot
76
76
  * 生命周期内重复返回同一引用,不会 clone 或 freeze。需要独立修改的
77
77
  * 调用者必须在消费边界自行复制。
78
+ * snapshot 省略 reference bounds 时直接复用其精确结果,不建立 segment index。
78
79
  */
79
80
  getBounds(): Readonly<Rect> | null;
80
81
  /** 判断 local 点是否位于闭合 subpath 的指定填充内或边界上。 */
@@ -107,6 +108,8 @@ export interface PathSegmentSplit {
107
108
  }
108
109
  /** Split one canonical line/cubic segment at `t` without a second curve owner. */
109
110
  export declare function splitPathSegment(start: PointView, shape: ResolvedSegmentShape, end: PointView, t: number): PathSegmentSplit;
111
+ /** 直接读取 authored anchors 的精确 line/cubic bounds,不创建 resolved 投影。 */
112
+ export declare function getAuthoredPathLayoutBounds(subpaths: readonly AuthoredSubpath[]): Readonly<Rect>;
110
113
  /**
111
114
  * 直接采用输入对象及其 subpath、point、control、标量 authored ID 和 bounds 引用。
112
115
  * 省略 bounds 时在同一输入对象上安装一次派生结果;不创建 GeometryQuery index。
@@ -115,7 +118,7 @@ export declare function createGeometrySnapshot(input: GeometrySnapshotInput): Ge
115
118
  /** @internal 通用 line/cubic canonical query。 */
116
119
  export declare class SnapshotGeometryQuery implements GeometryQuery {
117
120
  readonly snapshot: GeometrySnapshot;
118
- /** 第一次真实 query 前保持 `null`。 */
121
+ /** 第一次需要 segment 的 query 前保持 `null`。 */
119
122
  private index;
120
123
  private debugStats;
121
124
  constructor(snapshot: GeometrySnapshot);
@@ -1,10 +1,13 @@
1
+ import type { Rect } from "@fulate/share";
1
2
  import { type GeometryQuery, type GeometrySnapshot } from "./common";
2
3
  export { createAuthoredLineSubpath, createPathLocalId } from "./authored";
3
- export { createGeometrySnapshot, createLineSubpath, evaluatePathSegmentPoint, resolveAuthoredSubpath, splitPathSegment } from "./common";
4
+ export { createGeometrySnapshot, createLineSubpath, evaluatePathSegmentPoint, getAuthoredPathLayoutBounds, resolveAuthoredSubpath, splitPathSegment } from "./common";
4
5
  export type { GeometryNearestPoint, GeometryPathPoint, GeometryPathPosition, GeometryQuery, GeometrySnapshot, GeometrySnapshotInput, PathSegmentSplit, ResolvedSegmentShape, ResolvedSubpath, ResolvedVertex } from "./common";
5
6
  export type { AnchorId, AuthoredCubicAnchor, AuthoredLineAnchor, AuthoredPathAnchor, AuthoredSubpath, AuthoredTerminalAnchor, SegmentId, StablePathTargetRef, SubpathId } from "./authored";
6
7
  export { createRectangleGeometrySnapshot, rectangleSubpathsMaterializedForTest } from "./rectangle";
7
8
  /** @internal 读取 canonical snapshot 的非空元数据而不强制惰性矩形 subpaths。 */
8
9
  export declare function geometrySnapshotHasGeometry(snapshot: GeometrySnapshot): boolean;
10
+ /** @internal 普通矩形 canonical snapshot 返回其矩形;其他几何返回 `null`,不强制惰性 subpaths。 */
11
+ export declare function geometrySnapshotRectangle(snapshot: GeometrySnapshot): Readonly<Rect> | null;
9
12
  /** 创建尚未建立内部 index 的唯一 canonical snapshot query。 */
10
13
  export declare function createGeometryQuery(snapshot: GeometrySnapshot): GeometryQuery;
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ export type { ShapeOption, ShapeOptionPatch, BorderPosition, ShadowOption, Outse
17
17
  export { Skin, SKIN_DEFAULTS } from "./skin";
18
18
  export type { SkinChange, SkinOptions, TextStyleConfig } from "./skin";
19
19
  export { Root } from "./root/index";
20
- export type { QueryAreaBounds, QueryAreaOptions, QueryAreaOrder, IteratePointOptions, PaintOrderKey } from "./root/index";
20
+ export type { QueryAreaBounds, QueryAreaOptions, QueryAreaOrder, IteratePointOptions } from "./root/index";
21
21
  export { Viewport } from "./root/viewport";
22
22
  export type { ViewportInsets, ViewportSnapshot } from "./root/viewport";
23
23
  export { RootInputController, isFormControlTarget } from "./root/input-controller";
@@ -27,7 +27,9 @@ export { SceneRegistry } from "./root/scene-registry";
27
27
  export type { NodeKeyObserver, NodeRegistrationObserver, SceneChangeObserver } from "./root/scene-registry";
28
28
  export { mergeOwnerPropertyChanges } from "./mutation/change-batch";
29
29
  export type { ChangeHistorySink, OwnerPropertyChange, StructureChange } from "./mutation/change-batch";
30
+ export { diffChildren } from "./mutation/structure-change";
31
+ export type { ChildPlacementChange, ChildrenDiff } from "./mutation/structure-change";
30
32
  export { Layer, LayerProperties, LayerTransform } from "./layer/index";
31
33
  export type { LayerFrameWork, LayerOption, LayerOptionPatch } from "./layer/index";
32
- export { createAuthoredLineSubpath, createPathLocalId, createGeometryQuery, createGeometrySnapshot, createLineSubpath, evaluatePathSegmentPoint, resolveAuthoredSubpath, splitPathSegment } from "./geometry";
34
+ export { createAuthoredLineSubpath, createPathLocalId, createGeometryQuery, createGeometrySnapshot, createLineSubpath, evaluatePathSegmentPoint, getAuthoredPathLayoutBounds, resolveAuthoredSubpath, splitPathSegment } from "./geometry";
33
35
  export type { AnchorId, AuthoredCubicAnchor, AuthoredLineAnchor, AuthoredPathAnchor, AuthoredSubpath, AuthoredTerminalAnchor, SegmentId, StablePathTargetRef, SubpathId, ResolvedVertex, ResolvedSegmentShape, ResolvedSubpath, GeometrySnapshot, GeometrySnapshotInput, GeometryPathPosition, GeometryPathPoint, GeometryNearestPoint, GeometryQuery, PathSegmentSplit } from "./geometry";