@fulate/core 1.0.19 → 3.0.2

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/event.d.ts CHANGED
@@ -18,12 +18,15 @@ export declare const EVENT_OPTION_KEYS: {
18
18
  readonly scroll: "onScroll";
19
19
  readonly scrollend: "onScrollEnd";
20
20
  };
21
- /** Element options 使用的事件 handler key。 */
22
- export type EventOptionKey = (typeof EVENT_OPTION_KEYS)[EventName];
21
+ /** Element options 使用的普通与捕获事件 handler key。 */
22
+ export type EventOptionKey = (typeof EVENT_OPTION_KEYS)[EventName] | `${(typeof EVENT_OPTION_KEYS)[EventName]}Capture`;
23
23
  /** @internal 实际公开事件 option keys。 */
24
24
  export declare const EVENT_OPTION_KEY_SET: ReadonlySet<string>;
25
- /** @internal 把公开 option key 映射到唯一内部事件名。 */
26
- export declare function getEventNameForOptionKey(key: EventOptionKey): EventName;
25
+ /** @internal Element 与 Vue 共用的 on* 事件名和阶段解析。 */
26
+ export declare function parseEventOptionKey(key: string): {
27
+ eventName: string;
28
+ capture: boolean;
29
+ };
27
30
  /** 返回字符串派发时该事件是否默认冒泡。 */
28
31
  export declare function eventBubblesByDefault(eventName: string): boolean;
29
32
  /** 可通过 module augmentation 扩展的强类型事件表。 */
@@ -59,6 +62,17 @@ export interface CustomEventInit<T = any> {
59
62
  /** 是否沿 EventEmitter parent 链冒泡。 */
60
63
  bubbles?: boolean;
61
64
  }
65
+ /** 事件传播阶段;目标捕获与目标普通监听器均为 AT_TARGET。 */
66
+ export declare enum EventPhase {
67
+ /** 当前没有正在执行的派发阶段。 */
68
+ NONE = 0,
69
+ /** 实际派发起点之外的祖先捕获组。 */
70
+ CAPTURING_PHASE = 1,
71
+ /** 实际派发起点的捕获组或普通组。 */
72
+ AT_TARGET = 2,
73
+ /** 祖先普通监听器组。 */
74
+ BUBBLING_PHASE = 3
75
+ }
62
76
  /** Fulate 的同步事件对象。 */
63
77
  export declare class CustomEvent<T = any> {
64
78
  /** 事件名称。 */
@@ -69,7 +83,9 @@ export declare class CustomEvent<T = any> {
69
83
  readonly bubbles: boolean;
70
84
  /** 当前正在执行监听器的 EventEmitter。 */
71
85
  currentTarget: EventEmitter | null;
72
- /** 是否已经停止后续 parent 传播。 */
86
+ /** 当前传播阶段;由派发器维护,派发结束恢复 NONE。 */
87
+ eventPhase: EventPhase;
88
+ /** 是否已经停止后续监听器组和节点传播。 */
73
89
  private propagationStopped;
74
90
  /** 是否停止当前节点剩余监听器。 @internal */
75
91
  immediatePropagationStopped: boolean;
@@ -80,11 +96,11 @@ export declare class CustomEvent<T = any> {
80
96
  /** detail 中的逻辑目标。 */
81
97
  target: infer U;
82
98
  } ? U : undefined;
83
- /** 是否已经停止后续冒泡;写入 `false` 不会恢复传播。 */
99
+ /** 本轮是否已经停止后续监听器组和节点;写入 `false` 不会恢复传播。 */
84
100
  get cancelBubble(): boolean;
85
101
  /** 写入 `true` 等同于 `stopPropagation()`。 */
86
102
  set cancelBubble(value: boolean);
87
- /** 停止向后续 parent 传播。 */
103
+ /** 停止后续监听器组和节点,当前组继续执行。 */
88
104
  stopPropagation(): void;
89
105
  /** 同时停止当前节点剩余监听器和后续传播。 */
90
106
  stopImmediatePropagation(): void;
@@ -92,6 +108,8 @@ export declare class CustomEvent<T = any> {
92
108
  get defaultPrevented(): boolean;
93
109
  /** 标记默认行为已取消;不会自动调用原始 DOM 事件。 */
94
110
  preventDefault(): void;
111
+ /** @internal 结束本轮派发,保留 defaultPrevented 供 producer 判断默认行为。 */
112
+ finishDispatch(): void;
95
113
  /**
96
114
  * 创建指定类型、detail 和冒泡策略的事件。
97
115
  * @param type 监听和派发使用的事件名。
@@ -103,54 +121,61 @@ export declare class CustomEvent<T = any> {
103
121
  export type FulateEvent<T = any> = CustomEvent<FulateEventDetail<T>>;
104
122
  /** 事件监听回调。 */
105
123
  export type EventCallback<T = any> = (data: T) => void;
124
+ /** 监听器所属的传播组。 */
125
+ export interface EventListenerOptions {
126
+ /** 为 true 时在捕获组执行;注册和按回调移除时默认为 false。 */
127
+ capture?: boolean;
128
+ }
106
129
  /** 事件监听选项。 */
107
- export interface AddEventListenerOptions {
108
- /** 首次调用后自动移除。 */
130
+ export interface AddEventListenerOptions extends EventListenerOptions {
131
+ /** 在首次调用前自动移除。 */
109
132
  once?: boolean;
110
133
  }
111
- /** 支持 parent 冒泡链的同步事件发布器。 */
134
+ /** 沿固定 parent 路径捕获、目标处理和冒泡的同步事件发布器。 */
112
135
  export declare class EventEmitter {
113
- /** 冒泡使用的 parent,由场景树维护。 */
136
+ /** 传播使用的 parent,由场景树维护。 */
114
137
  parent?: EventEmitter;
115
- /** 首次注册监听器时才创建的事件映射。 */
138
+ /** 两阶段各自在首次实际注册时创建。 */
116
139
  private events?;
117
- /** 当前是否注册了任意监听器。 */
140
+ private captureEvents?;
141
+ /** 本节点是否存在任意有效监听器。 */
118
142
  get isSubscribed(): boolean;
119
- /** 判断指定事件是否有监听器。 */
120
- hasEventListener(eventName: string): boolean;
143
+ /** 查询本节点的订阅;省略阶段时包含捕获与普通监听器,不查询祖先。 */
144
+ hasEventListener(eventName: string, options?: Required<EventListenerOptions>): boolean;
121
145
  /**
122
- * 注册监听器并返回取消函数;相同事件和回调不会重复添加。
146
+ * 注册监听器并返回取消函数;相同 type、callback 引用和 capture 不会重复添加,
147
+ * 重复注册也不改变原有 once。
123
148
  *
124
- * 监听器在 `dispatchEvent()` 的当前调用栈中同步执行。监听器修改当前生命周期或
125
- * 结构操作涉及的对象会重入该操作;需要等当前调用结束时由监听器自行使用
126
- * `queueMicrotask()`,需要读取帧提交后的派生状态时等待对应 Root 的 `nextTick()`。
149
+ * 监听器在派发调用栈中同步执行,权限由具体 producer 和运行阶段决定。
127
150
  * 返回的 Promise 不会被派发器等待,异步错误也不会由派发器处理。
128
- *
129
- * @param eventName 要监听的事件名。
130
- * @param callback 同步监听器;`this` 和 `currentTarget` 均为当前 emitter。
131
- * @param options `once: true` 表示首次调用后自动移除。
151
+ * @param eventName 事件名。
152
+ * @param callback 同步监听器;this 和 currentTarget 均为当前 emitter。
153
+ * @param options capture 默认 false;once 在首次调用前移除记录。
132
154
  */
133
155
  addEventListener<K extends keyof FulateEventMap>(eventName: K, callback: EventCallback<FulateEventMap[K]>, options?: AddEventListenerOptions): () => void;
134
156
  addEventListener<T = FulateEvent>(eventName: string, callback: EventCallback<T>, options?: AddEventListenerOptions): () => void;
157
+ /** 清除指定事件在本节点的捕获和普通监听器。 */
158
+ removeEventListener(eventName: string): void;
159
+ /** 按 callback 与 capture 移除;capture 默认 false。 */
160
+ removeEventListener(eventName: string, callback: EventCallback, options?: EventListenerOptions): void;
161
+ private removeListeners;
135
162
  /**
136
- * 移除指定回调;省略回调时移除该事件的全部监听器。
137
- * @param eventName 要移除的事件名。
138
- * @param callback 注册时使用的函数;省略时移除该事件的全部监听器。
163
+ * 同步派发已有事件对象,detail 按原引用使用。上一轮结束后可复用事件;
164
+ * 回调中的嵌套派发使用另一事件对象。同步异常原样传播。
139
165
  */
140
- removeEventListener(eventName: string, callback?: EventCallback): void;
166
+ dispatchEvent(event: CustomEvent): void;
167
+ /** 按名称派发输入事件;除 enter/leave 外默认冒泡,逻辑目标默认为本 emitter。 */
168
+ dispatchEvent(eventName: string, detail?: Partial<FulateEventDetail>): void;
141
169
  /**
142
- * 同步派发已有事件对象;监听器异常以原始 identity 直接传播。
143
- * @param event 要派发的 `CustomEvent`。
170
+ * 收集一次固定路径并派发。省略事件对象时,为生命周期等内部通知按需创建
171
+ * 非冒泡事件,detail.target 为本 emitter;无有效订阅时不创建事件对象。
144
172
  */
145
- dispatchEvent(event: CustomEvent): void;
173
+ protected dispatchThroughPath(type: string, event?: CustomEvent): void;
146
174
  /**
147
- * 按名称创建并同步派发 Fulate 事件。
148
- * @param eventName 事件名;除 enter/leave 外默认冒泡。
149
- * @param detail world 坐标、目标和原始 DOM 输入;缺省字段使用默认值。
175
+ * 执行本节点的一组监听器。capture 区分目标上的两组,不能由 eventPhase 推断。
176
+ * 普通阶段的内置默认行为可在 super 返回后处理,空订阅不省略该扩展入口。
150
177
  */
151
- dispatchEvent(eventName: string, detail?: Partial<FulateEventDetail>): void;
152
- /** 派发当前节点的监听器,供自定义事件桥接覆盖。 */
153
- protected fireCallbacks(event: CustomEvent): void;
154
- /** 移除当前对象的全部监听器。 */
178
+ protected fireCallbacks(event: CustomEvent, capture: boolean): void;
179
+ /** 移除本节点两个阶段的全部监听器,立即使正在遍历的旧记录失效。 */
155
180
  clearEventListener(): void;
156
181
  }
@@ -0,0 +1,22 @@
1
+ import type { Rect } from "@fulate/share";
2
+ import type { AnyElement } from "./node/element";
3
+ /** PNG 导出选项;倍率与留白均独立于屏幕 Viewport。 */
4
+ export interface PNGExportOptions {
5
+ /** 每个 world 单位的输出像素数,默认 1。 */
6
+ pixelRatio?: number;
7
+ /** world 单位的四周留白,默认 0;不解除祖先裁剪。 */
8
+ padding?: number;
9
+ /** 取消尚未完成的导出。 */
10
+ signal?: AbortSignal;
11
+ }
12
+ /** 一张独立 PNG 及其完整 world 覆盖区域(包括 padding)。 */
13
+ export interface PNGExportResult {
14
+ /** 被请求的子树根 key。 */
15
+ readonly elementKey: string;
16
+ /** 透明背景的 image/png。 */
17
+ readonly blob: Blob;
18
+ /** 不受倍率取整、Viewport 或屏幕 DPR 影响的逻辑区域。 */
19
+ readonly bounds: Readonly<Rect>;
20
+ }
21
+ /** @internal Element 的唯一 PNG 路径;Root 批量入口通过 Element 调用。 */
22
+ export declare function exportElementPNG(element: AnyElement, { pixelRatio, padding, signal }: PNGExportOptions): Promise<PNGExportResult | undefined>;
@@ -53,10 +53,12 @@ export type StablePathTargetRef = {
53
53
  readonly kind: "segment";
54
54
  readonly segmentId: SegmentId;
55
55
  };
56
- /** @internal framework 创建新 authored 对象时使用的唯一 local-ID primitive。 */
56
+ /** 创建新的 authored local identity,推进唯一模块序列;不注册 Node key 或安装场景。 */
57
57
  export declare function createPathLocalId(kind: "subpath"): SubpathId;
58
58
  export declare function createPathLocalId(kind: "anchor"): AnchorId;
59
59
  export declare function createPathLocalId(kind: "segment"): SegmentId;
60
60
  /** @internal 从普通 point intent 创建紧凑 line-only canonical subpath。 */
61
- export declare function createAuthoredLineSubpath(points: readonly PointView[], closed: boolean): AuthoredSubpath;
61
+ export declare function createAuthoredLineSubpath<Closed extends boolean>(points: readonly PointView[], closed: Closed): AuthoredSubpath<AuthoredLineAnchor | AuthoredTerminalAnchor> & {
62
+ readonly closed: Closed;
63
+ };
62
64
  export {};
@@ -1,4 +1,4 @@
1
- import type { PointView, Rect } from "@fulate/share";
1
+ import { type PointView, type ReadonlyMatrix2D, type Rect } from "@fulate/share";
2
2
  import type { AnchorId, AuthoredSubpath, SegmentId, SubpathId } from "./authored";
3
3
  /** 当前 resolved subpath 中的 local 顶点。 */
4
4
  export interface ResolvedVertex {
@@ -53,7 +53,7 @@ export interface GeometryPathPosition {
53
53
  readonly segmentIndex: number;
54
54
  readonly t: number;
55
55
  }
56
- /** line/cubic 在一个 path position 的精确 local 求值。 */
56
+ /** line/cubic 在一个 path position 的精确求值;坐标系由查询入口声明。 */
57
57
  export interface GeometryPathPoint {
58
58
  readonly position: GeometryPathPosition;
59
59
  readonly point: PointView;
@@ -66,7 +66,10 @@ export interface GeometryPathPoint {
66
66
  export interface GeometryNearestPoint extends GeometryPathPoint {
67
67
  readonly distance: number;
68
68
  }
69
- /** 针对一个 immutable snapshot 的统一 exact query。 */
69
+ /**
70
+ * 针对一个 immutable snapshot 的 exact query,只填自身 lazy index/bounds 缓存。
71
+ * 不提交或准备场景。旧 query 与借用结果保持属于旧 snapshot,不随场景的新提交改写。
72
+ */
70
73
  export interface GeometryQuery {
71
74
  readonly snapshot: GeometrySnapshot;
72
75
  /**
@@ -82,8 +85,13 @@ export interface GeometryQuery {
82
85
  contains(point: PointView, fillRule?: CanvasFillRule): boolean;
83
86
  /** 判断 local 点是否命中填充或距任一 segment 不超过 tolerance。 */
84
87
  hit(point: PointView, tolerance?: number, fillRule?: CanvasFillRule): boolean;
85
- /** 返回距 local 点最近的 line/cubic path position;无 segment 时为 `null`。 */
86
- nearest(point: PointView): GeometryNearestPoint | null;
88
+ /**
89
+ * 返回距 point 最近的 line/cubic path position;无 segment 时为 `null`。
90
+ * 省略矩阵时使用 local 坐标;传入 localToQuery 时,输入 point 与返回的
91
+ * point/distance/tangent/normal 均使用该仿射坐标系,position 仍属于当前 snapshot。
92
+ * 非均匀缩放与错切按变换后的真实距离求值;不推进场景或创建第二份 snapshot。
93
+ */
94
+ nearest(point: PointView, localToQuery?: ReadonlyMatrix2D): GeometryNearestPoint | null;
87
95
  /** 求值 snapshot-local path position;地址或 `t` 越界时返回 `undefined`。 */
88
96
  getPathPoint(position: GeometryPathPosition): GeometryPathPoint | undefined;
89
97
  }
@@ -113,6 +121,7 @@ export declare function getAuthoredPathLayoutBounds(subpaths: readonly AuthoredS
113
121
  /**
114
122
  * 直接采用输入对象及其 subpath、point、control、标量 authored ID 和 bounds 引用。
115
123
  * 省略 bounds 时在同一输入对象上安装一次派生结果;不创建 GeometryQuery index。
124
+ * 输入移交后不再原地修改;此工厂不安装 Element 状态或产生 dirty。
116
125
  */
117
126
  export declare function createGeometrySnapshot(input: GeometrySnapshotInput): GeometrySnapshot;
118
127
  /** @internal 通用 line/cubic canonical query。 */
@@ -135,7 +144,7 @@ export declare class SnapshotGeometryQuery implements GeometryQuery {
135
144
  };
136
145
  getBounds(): Readonly<Rect> | null;
137
146
  getPathPoint(position: GeometryPathPosition): GeometryPathPoint | undefined;
138
- nearest(point: PointView): GeometryNearestPoint | null;
147
+ nearest(point: PointView, localToQuery?: ReadonlyMatrix2D): GeometryNearestPoint | null;
139
148
  private queryFillAndStroke;
140
149
  contains(point: PointView, fillRule?: CanvasFillRule): boolean;
141
150
  hit(point: PointView, tolerance?: number, fillRule?: CanvasFillRule): boolean;
@@ -1,3 +1,5 @@
1
+ export { createVectorPathGeometry, appendAuthoredLineAnchor, insertAuthoredPathAnchor, removeAuthoredAnchor, replaceAuthoredAnchorPoint, replaceAuthoredCubicHandle, transformAuthoredSubpath, getAuthoredAnchorBounds } from "./path";
2
+ export type { VectorPathCommand, VectorPathGeometry } from "./path";
1
3
  import type { Rect } from "@fulate/share";
2
4
  import { type GeometryQuery, type GeometrySnapshot } from "./common";
3
5
  export { createAuthoredLineSubpath, createPathLocalId } from "./authored";
@@ -9,5 +11,8 @@ export { createRectangleGeometrySnapshot, rectangleSubpathsMaterializedForTest }
9
11
  export declare function geometrySnapshotHasGeometry(snapshot: GeometrySnapshot): boolean;
10
12
  /** @internal 普通矩形 canonical snapshot 返回其矩形;其他几何返回 `null`,不强制惰性 subpaths。 */
11
13
  export declare function geometrySnapshotRectangle(snapshot: GeometrySnapshot): Readonly<Rect> | null;
12
- /** 创建尚未建立内部 index 的唯一 canonical snapshot query。 */
14
+ /**
15
+ * 为给定 snapshot 创建尚未建立内部 index 的 query。
16
+ * 每次调用创建实例;ElementTransform 负责缓存和复用自己的 query。
17
+ */
13
18
  export declare function createGeometryQuery(snapshot: GeometrySnapshot): GeometryQuery;
@@ -0,0 +1,41 @@
1
+ import { type PointView, type ReadonlyMatrix2D, type Rect } from "@fulate/share";
2
+ import { type AnchorId, type AuthoredPathAnchor, type AuthoredSubpath } from "./authored";
3
+ /** Sketch/SVG-style creation intent; commands never enter live Properties. */
4
+ export type VectorPathCommand = Readonly<{
5
+ type: "M" | "L";
6
+ point: PointView;
7
+ }> | Readonly<{
8
+ type: "C";
9
+ control1: PointView;
10
+ control2: PointView;
11
+ point: PointView;
12
+ }> | Readonly<{
13
+ type: "Z";
14
+ }>;
15
+ /** Ordered authored subpaths, shared by Core paths and UI path specializations. */
16
+ export interface VectorPathGeometry {
17
+ /** The only ordered topology source for this path. */
18
+ readonly subpaths: readonly AuthoredSubpath[];
19
+ }
20
+ /** 在唯一格式边界解释 M/L/C/Z,并直接生成 canonical subpaths。 */
21
+ export declare function createVectorPathGeometry(commands: readonly VectorPathCommand[]): VectorPathGeometry;
22
+ /** Replace one authored anchor point while retaining its record and all IDs. */
23
+ export declare function replaceAuthoredAnchorPoint<Path extends AuthoredSubpath>(subpath: Path, index: number, point: PointView): Path;
24
+ /** Append one anchor to an open line subpath. */
25
+ export declare function appendAuthoredLineAnchor<Path extends AuthoredSubpath>(subpath: Path, point: PointView): {
26
+ readonly subpath: Path;
27
+ readonly anchorId: AnchorId;
28
+ };
29
+ /** Split one authored line/cubic segment, retaining the leading segment ID. */
30
+ export declare function insertAuthoredPathAnchor<Path extends AuthoredSubpath>(subpath: Path, index: number, t: number, point: PointView): {
31
+ readonly subpath: Path;
32
+ readonly anchorId: AnchorId;
33
+ };
34
+ /** Replace one cubic segment handle without changing other authored records. */
35
+ export declare function replaceAuthoredCubicHandle(subpath: AuthoredSubpath, index: number, role: "cubic-control-1" | "cubic-control-2", point: PointView): AuthoredSubpath;
36
+ /** Delete one anchor and merge its predecessor directly to its successor. */
37
+ export declare function removeAuthoredAnchor<Path extends AuthoredSubpath>(subpath: Path, index: number, minimumAnchorCount?: number): Path;
38
+ /** Transform coordinates while retaining every subpath, anchor, segment, and record ID. */
39
+ export declare function transformAuthoredSubpath<Path extends AuthoredSubpath>(subpath: Path, matrix: ReadonlyMatrix2D): Path;
40
+ /** Read bounds directly from authored anchor coordinates. */
41
+ export declare function getAuthoredAnchorBounds(anchors: readonly AuthoredPathAnchor[]): Readonly<Rect> | null;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { EVENT_NAMES, CustomEvent, EventEmitter } from "./event";
2
- export type { EventName, EventCallback, FulateEvent, FulateEventDetail, CustomEventInit, AddEventListenerOptions, FulateEventMap } from "./event";
1
+ export { EVENT_NAMES, CustomEvent, EventPhase, parseEventOptionKey, EventEmitter } from "./event";
2
+ export type { EventName, EventCallback, FulateEvent, FulateEventDetail, CustomEventInit, AddEventListenerOptions, EventListenerOptions, FulateEventMap } from "./event";
3
3
  export { Node, NodeLifecycleEvent } from "./node/node";
4
4
  export type { NodeCreationOptions } from "./node/node";
5
5
  export { ElementTransform } from "./node/element-transform";
@@ -7,11 +7,11 @@ export type { ElementTransformClass, GeometryBoundsView } from "./node/element-t
7
7
  export { ChangeImpact, NodeProperties, resolveOrigin, TransformProperties } from "./node/properties";
8
8
  export type { OriginX, OriginY, PropertyChanges, PropertyUpdates, TransformableOptions } from "./node/properties";
9
9
  export { Element, ElementProperties } from "./node/element";
10
- export type { AnyElement, BaseElementOption, ElementJSON, ElementOptionPatch, AnimateOptions, AnimateTarget } from "./node/element";
11
- export { isReparentTransformIntent, resolveAuthoredGeometryFramePatch, resolveReferenceBoundsTranslation, resolveReferenceTransform, resolveReferenceTransformTarget } from "./node/reference-transform";
10
+ export type { AnyElement, BaseElementOption, ElementPayload, ElementOptionPatch, AnimateOptions, AnimateTarget } from "./node/element";
11
+ export { captureElementTransformReference, isReparentTransformIntent, resolveAuthoredGeometryFramePatch, resolveReferenceBoundsTranslation, resolveReferenceTransform, resolveReferenceTransformTarget } from "./node/reference-transform";
12
12
  export type { ElementTransformBaseline, ReferenceTransformBaseline, ReferenceTransformFrame, ReferenceTransformResolution, ReferenceTransformTarget, ReparentTransformIntent, TransformIntent } from "./node/reference-transform";
13
- export { DEFAULT_CONNECTION_PORT_SCHEMA, getElementConnectionPort, getElementConnectionPortPoint, getElementConnectionPortPoints, projectConnectionPortPoint } from "./utils/connection-port";
14
- export type { ConnectionPortId, ConnectionPortConfiguration, ConnectionPortDefinition, ConnectionPortLabelStyle, ConnectionPortDirection, ConnectionPortLimit, ConnectionPortLimits, ConnectionPortRef, DerivedConnectionPort, EdgeConnectionPortPosition, ResolvedConnectionPort, ResolvedConnectionPortSlot } from "./utils/connection-port";
13
+ export { getElementConnectionPort, getElementConnectionPortPoint, getElementConnectionPortPoints, projectConnectionPortPoint } from "./utils/connection-port";
14
+ export type { ConnectionPortId, ConnectionPortConfiguration, ConnectionPortDefinition, ConnectionPortLabelStyle, ConnectionPortDirection, ConnectionPortLimit, ConnectionPortLimits, ConnectionPortRef, EdgeConnectionPortPosition, ResolvedConnectionPort, ResolvedConnectionPortSlot } from "./utils/connection-port";
15
15
  export { Shape, ShapeProperties, ShapeTransform } from "./node/shape";
16
16
  export type { ShapeOption, ShapeOptionPatch, BorderPosition, ShadowOption, Outset } from "./node/shape";
17
17
  export { Skin, SKIN_DEFAULTS } from "./skin";
@@ -19,7 +19,7 @@ export type { SkinChange, SkinOptions, TextStyleConfig } from "./skin";
19
19
  export { Root } from "./root/index";
20
20
  export type { QueryAreaBounds, QueryAreaOptions, QueryAreaOrder, IteratePointOptions } from "./root/index";
21
21
  export { Viewport } from "./root/viewport";
22
- export type { ViewportInsets, ViewportSnapshot } from "./root/viewport";
22
+ export type { ViewportChange, ViewportInsets, ViewportSnapshot } from "./root/viewport";
23
23
  export { RootInputController, isFormControlTarget } from "./root/input-controller";
24
24
  export { FrameStabilizationError, RootFrameRuntime } from "./root/frame-runtime";
25
25
  export type { RootFrameCompletionWork, RootFrameLayoutOwner, RootFrameParticipant } from "./root/frame-runtime";
@@ -29,7 +29,16 @@ export { mergeOwnerPropertyChanges } from "./mutation/change-batch";
29
29
  export type { ChangeHistorySink, OwnerPropertyChange, StructureChange } from "./mutation/change-batch";
30
30
  export { diffChildren } from "./mutation/structure-change";
31
31
  export type { ChildPlacementChange, ChildrenDiff } from "./mutation/structure-change";
32
- export { Layer, LayerProperties, LayerTransform } from "./layer/index";
33
- export type { LayerFrameWork, LayerOption, LayerOptionPatch } from "./layer/index";
32
+ export { Layer, LayerProperties } from "./layer/index";
33
+ export type { LayerFrameWork, LayerPaintWork, LayerOption, LayerOptionPatch } from "./layer/index";
34
34
  export { createAuthoredLineSubpath, createPathLocalId, createGeometryQuery, createGeometrySnapshot, createLineSubpath, evaluatePathSegmentPoint, getAuthoredPathLayoutBounds, resolveAuthoredSubpath, splitPathSegment } from "./geometry";
35
35
  export type { AnchorId, AuthoredCubicAnchor, AuthoredLineAnchor, AuthoredPathAnchor, AuthoredSubpath, AuthoredTerminalAnchor, SegmentId, StablePathTargetRef, SubpathId, ResolvedVertex, ResolvedSegmentShape, ResolvedSubpath, GeometrySnapshot, GeometrySnapshotInput, GeometryPathPosition, GeometryPathPoint, GeometryNearestPoint, GeometryQuery, PathSegmentSplit } from "./geometry";
36
+ export { generateNodeKey } from "./node/node";
37
+ export type { PNGExportOptions, PNGExportResult } from "./export-png";
38
+ export { PaintContext } from "./paint-context";
39
+ export { VectorPath, VectorPathProperties, VectorPathTransform } from "./node/vector-path";
40
+ export type { VectorPathOption } from "./node/vector-path";
41
+ export { createVectorPathGeometry, appendAuthoredLineAnchor, insertAuthoredPathAnchor, removeAuthoredAnchor, replaceAuthoredAnchorPoint, replaceAuthoredCubicHandle, transformAuthoredSubpath, getAuthoredAnchorBounds } from "./geometry/path";
42
+ export type { VectorPathCommand, VectorPathGeometry } from "./geometry/path";
43
+ export { coreElementV2Codecs, encodeElement, decodeElement, decodeCopiedElements } from "./serialization";
44
+ export type { ElementV2, EncodeContext, ElementV2Codec, ElementV2Codecs } from "./serialization";