@yft-design/engine 0.0.20 → 0.0.22

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  yft-design 的 WebGL2 画布引擎。接受 fabric toObject 格式的 JSON(`objects` 数组),输出 GL 画布 / 位图(任意倍率 FBO 读回)/ SVG(纯数据序列化器)。
4
4
 
5
- > **当前状态**:独立仓(GitHub `more-strive/yft-design-engine`,私有),npm 发布走 `@yft-design/engine`(public)——推 `v*` tag 触发 [publish.yml](.github/workflows/publish.yml):tag/版本一致性校验 → typecheck → 全量测试 → build → 闭包预检 → publish。主仓自批次 350 起撤出 workspace,从 registry 消费(`^0.0.20`),不再吃本地源码。包内单测自持:`pnpm install && pnpm test`。
5
+ > **当前状态**:独立仓(GitHub `more-strive/yft-design-engine`,私有),npm 发布走 `@yft-design/engine`(public)——推 `v*` tag 触发 [publish.yml](.github/workflows/publish.yml):tag/版本一致性校验 → typecheck → 全量测试 → build → 闭包预检 → publish。主仓自批次 350 起撤出 workspace,从 registry 消费(`^0.0.21`),不再吃本地源码。包内单测自持:`pnpm install && pnpm test`。
6
6
 
7
7
  ## 构建产物(批次418 bundle 化)
8
8
 
@@ -38,7 +38,7 @@ yft-design 的 WebGL2 画布引擎。接受 fabric toObject 格式的 JSON(`ob
38
38
 
39
39
  ```jsonc
40
40
  // yft-design-pro/package.json
41
- "@yft-design/engine": "^0.0.20"
41
+ "@yft-design/engine": "^0.0.21"
42
42
  ```
43
43
 
44
44
  ```ts
@@ -25,6 +25,7 @@ import { QuadBatch } from './render/QuadBatch';
25
25
  import { type PageRect } from './render/multiPage';
26
26
  import { SceneRenderer, type SceneRendererHost } from './render/SceneRenderer';
27
27
  import { type SourceHost } from './render/SourceManager';
28
+ import { type PageTransferReplayItem, type PageTransferReplayResult } from './interact/pageTransfer';
28
29
  import { type SceneExportHost } from './export/SceneExporter';
29
30
  import type { ExportPixels, ExportRawPixels, ExportRegion } from './export/glExport';
30
31
  import { type HandleId } from './render/selectionOverlay';
@@ -57,6 +58,7 @@ export declare class EngineCanvas implements PointerHost, TextEditingHost, Sourc
57
58
  private readonly workspaceBackdrop;
58
59
  private readonly bus;
59
60
  private readonly multiPage;
61
+ documentFlowEnabled: boolean;
60
62
  readonly dpr: number;
61
63
  readonly mobileControls: boolean;
62
64
  readonly interactive: boolean;
@@ -198,6 +200,7 @@ export declare class EngineCanvas implements PointerHost, TextEditingHost, Sourc
198
200
  } | null;
199
201
  activateRoutedDocument(doc: EngineDocument): void;
200
202
  transferDraggedNodes(nodes: SceneNode[], before: Map<SceneNode, SerializedNode> | undefined, cssX: number, cssY: number): boolean;
203
+ replayPageTransfer(sourceIndex: number, targetIndex: number, items: ReadonlyArray<PageTransferReplayItem>, isRedo: boolean): PageTransferReplayResult | null;
201
204
  insertPage(index: number, objects?: SerializedNode[]): Promise<number>;
202
205
  removePage(index: number): boolean;
203
206
  loadPageObjects(index: number, objects: SerializedNode[]): Promise<void>;
package/dist/index.d.ts CHANGED
@@ -14,13 +14,14 @@ export { CompatObject, wrapCompatObject, findParentGroupOf, type CompatObjectCon
14
14
  export { createEngineWarpvasFacade, type EngineWarpvasFacade } from './interact/warpFacade';
15
15
  export { ScaleLimit } from './interact/wheelScroll';
16
16
  export { attachDocumentEventBridge, CompatHistoryActions, COMPAT_PROTOCOL_VERSION, type CompatBridgeDeps, type CompatCanvasEvents, type CompatObjectEvent, type CompatObjectModifiedEvent, type CompatPathAnchorEvent, type CompatPointerEvent, type CompatSelectionEvent, type CompatTextCommittedEvent } from './model/compatEvents';
17
- export { pathBackgroundSpecOf, syncPathBackgroundNode, ensurePathBackgroundNode, synthesizePathBackgroundNodes, syncAfterPropWrite, repositionPathBackgroundNode, attachPathBackgroundController } from './model/pathBackground';
17
+ export { pathBackgroundSpecOf, syncPathBackgroundNode, ensurePathBackgroundNode, synthesizePathBackgroundNodes, syncAfterPropWrite, repositionPathBackgroundNode, detachPathBackgroundOf, attachPathBackgroundBelowHost, attachPathBackgroundController } from './model/pathBackground';
18
18
  export { isCanvasPerfEnabled, markCanvasPerfCounter, recordCanvasPerfDuration } from './core/canvasPerf';
19
19
  export { rectCornerRadii } from './core/roundedRect';
20
20
  export { parsePsdEffects } from './core/psdEffects';
21
21
  export { EngineDocument, type EngineDocumentEvents, type IndexedItem, type SelectionFrame } from './model/document';
22
22
  export { PAGE_GAP_CSS_PX, type PageRect, type PageLayoutRow } from './render/multiPage';
23
23
  export type { PageTransfer, PageTransferItem } from './interact/pageTransfer';
24
+ export { replayPageTransferLive, type PageTransferReplayItem, type PageTransferReplayResult } from './interact/pageTransfer';
24
25
  export { ElementTypes, typeKeyOf, TEXT_TYPES, SHAPE_TYPES, LINE_TYPES, PUZZLE_TYPES, GIF_TYPES, VIDEO_TYPES, type ElementTypeKey } from './model/elementTypes';
25
26
  export { TextAlignValues, TEXT_ALIGN_VALUES, isJustifyFamilyAlign, isJustifyVariantAlign, isStretchAlign, type TextAlignValue } from './model/textAlign';
26
27
  export { buildScene, loadImageElement, IMAGE_LIKE_TYPES, SOLID_TYPES, MASK_TYPES, createNode, isTextBitmapState, textBitmapFillAlpha, SceneNode, TextNode, ShapeNode, PathNode, LineNode, GroupNode, MaskNode, PuzzleNode, TableNode, AnimatedNode, type SerializedNode } from './model/scene';