@yuzhouu/canvas-standard 0.1.10 → 0.1.11

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.
Files changed (181) hide show
  1. package/_vendor/plugin-draw/api.d.ts +1 -2
  2. package/_vendor/plugin-eraser/_vendor/signals/atom.d.ts +1 -1
  3. package/_vendor/plugin-eraser/_vendor/signals/computed.d.ts +1 -1
  4. package/_vendor/plugin-eraser/_vendor/signals/core.d.ts +3 -3
  5. package/_vendor/plugin-eraser/_vendor/signals/effect.d.ts +1 -1
  6. package/_vendor/plugin-eraser/_vendor/signals/types.d.ts +5 -3
  7. package/_vendor/plugin-eraser/eraserRuntime.d.ts +4 -4
  8. package/_vendor/plugin-flow/_vendor/plugin-image/image/api.d.ts +1 -2
  9. package/_vendor/plugin-flow/_vendor/plugin-image/image/mediaPresentation.d.ts +1 -2
  10. package/_vendor/plugin-flow/_vendor/plugin-text/api.d.ts +1 -2
  11. package/_vendor/plugin-flow/_vendor/plugin-text/geoLabelApi.d.ts +1 -2
  12. package/_vendor/plugin-flow/_vendor/plugin-text/host/textShapeRendererRuntime.d.ts +1 -1
  13. package/_vendor/plugin-flow/_vendor/plugin-text/host/useTextLabelLayout.d.ts +1 -1
  14. package/_vendor/plugin-flow/_vendor/plugin-text/textShapeHelpers.d.ts +1 -1
  15. package/_vendor/plugin-flow/_vendor/plugin-text/textShapeUtil.d.ts +2 -3
  16. package/_vendor/plugin-flow/api.d.ts +1 -2
  17. package/_vendor/plugin-flow/flowEdgeRuntime.d.ts +2 -2
  18. package/_vendor/plugin-flow/flowEdgeShapeUtil.d.ts +3 -7
  19. package/_vendor/plugin-flow/types.d.ts +1 -2
  20. package/_vendor/plugin-frame/api.d.ts +1 -2
  21. package/_vendor/plugin-frame/frameCreationRuntime.d.ts +1 -1
  22. package/_vendor/plugin-geo/_vendor/plugin-text/api.d.ts +1 -2
  23. package/_vendor/plugin-geo/_vendor/plugin-text/geoLabelApi.d.ts +1 -2
  24. package/_vendor/plugin-geo/_vendor/plugin-text/host/textShapeRendererRuntime.d.ts +1 -1
  25. package/_vendor/plugin-geo/_vendor/plugin-text/host/useTextLabelLayout.d.ts +1 -1
  26. package/_vendor/plugin-geo/_vendor/plugin-text/textShapeHelpers.d.ts +1 -1
  27. package/_vendor/plugin-geo/_vendor/plugin-text/textShapeUtil.d.ts +2 -3
  28. package/_vendor/plugin-geo/api.d.ts +1 -2
  29. package/_vendor/plugin-geo/geoCreationRuntime.d.ts +1 -1
  30. package/_vendor/plugin-html/api.d.ts +1 -2
  31. package/_vendor/plugin-image/image/api.d.ts +1 -2
  32. package/_vendor/plugin-image/image/mediaPresentation.d.ts +1 -2
  33. package/_vendor/plugin-laser/_vendor/signals/atom.d.ts +1 -1
  34. package/_vendor/plugin-laser/_vendor/signals/computed.d.ts +1 -1
  35. package/_vendor/plugin-laser/_vendor/signals/core.d.ts +3 -3
  36. package/_vendor/plugin-laser/_vendor/signals/effect.d.ts +1 -1
  37. package/_vendor/plugin-laser/_vendor/signals/types.d.ts +5 -3
  38. package/_vendor/plugin-laser/laserRuntime.d.ts +2 -2
  39. package/_vendor/plugin-path/api.d.ts +1 -2
  40. package/_vendor/plugin-path/pathShapeUtil.d.ts +2 -3
  41. package/_vendor/plugin-text/api.d.ts +1 -2
  42. package/_vendor/plugin-text/geoLabelApi.d.ts +1 -2
  43. package/_vendor/plugin-text/host/textShapeRendererRuntime.d.ts +1 -1
  44. package/_vendor/plugin-text/host/useTextLabelLayout.d.ts +1 -1
  45. package/_vendor/plugin-text/textShapeHelpers.d.ts +1 -1
  46. package/_vendor/plugin-text/textShapeUtil.d.ts +2 -3
  47. package/_vendor/plugin-video/video/api.d.ts +1 -2
  48. package/_vendor/plugin-video/video/mediaPresentation.d.ts +1 -2
  49. package/index.mjs +67 -67
  50. package/package.json +3 -3
  51. package/_vendor/canvas-export/_vendor/signals/atom.d.ts +0 -11
  52. package/_vendor/canvas-export/_vendor/signals/computed.d.ts +0 -13
  53. package/_vendor/canvas-export/_vendor/signals/core.d.ts +0 -35
  54. package/_vendor/canvas-export/_vendor/signals/effect.d.ts +0 -5
  55. package/_vendor/canvas-export/_vendor/signals/index.d.ts +0 -8
  56. package/_vendor/canvas-export/_vendor/signals/types.d.ts +0 -22
  57. package/_vendor/canvas-export/_vendor/store/diff.d.ts +0 -9
  58. package/_vendor/canvas-export/_vendor/store/history.d.ts +0 -22
  59. package/_vendor/canvas-export/_vendor/store/index.d.ts +0 -5
  60. package/_vendor/canvas-export/_vendor/store/store.d.ts +0 -40
  61. package/_vendor/canvas-export/_vendor/store/types.d.ts +0 -27
  62. package/_vendor/plugin-draw/_vendor/signals/atom.d.ts +0 -11
  63. package/_vendor/plugin-draw/_vendor/signals/computed.d.ts +0 -13
  64. package/_vendor/plugin-draw/_vendor/signals/core.d.ts +0 -35
  65. package/_vendor/plugin-draw/_vendor/signals/effect.d.ts +0 -5
  66. package/_vendor/plugin-draw/_vendor/signals/index.d.ts +0 -8
  67. package/_vendor/plugin-draw/_vendor/signals/types.d.ts +0 -22
  68. package/_vendor/plugin-draw/_vendor/store/diff.d.ts +0 -9
  69. package/_vendor/plugin-draw/_vendor/store/history.d.ts +0 -22
  70. package/_vendor/plugin-draw/_vendor/store/index.d.ts +0 -5
  71. package/_vendor/plugin-draw/_vendor/store/store.d.ts +0 -40
  72. package/_vendor/plugin-draw/_vendor/store/types.d.ts +0 -27
  73. package/_vendor/plugin-eraser/_vendor/store/diff.d.ts +0 -9
  74. package/_vendor/plugin-eraser/_vendor/store/history.d.ts +0 -22
  75. package/_vendor/plugin-eraser/_vendor/store/index.d.ts +0 -5
  76. package/_vendor/plugin-eraser/_vendor/store/store.d.ts +0 -40
  77. package/_vendor/plugin-eraser/_vendor/store/types.d.ts +0 -27
  78. package/_vendor/plugin-flow/_vendor/signals/atom.d.ts +0 -11
  79. package/_vendor/plugin-flow/_vendor/signals/computed.d.ts +0 -13
  80. package/_vendor/plugin-flow/_vendor/signals/core.d.ts +0 -35
  81. package/_vendor/plugin-flow/_vendor/signals/effect.d.ts +0 -5
  82. package/_vendor/plugin-flow/_vendor/signals/index.d.ts +0 -8
  83. package/_vendor/plugin-flow/_vendor/signals/types.d.ts +0 -22
  84. package/_vendor/plugin-flow/_vendor/store/diff.d.ts +0 -9
  85. package/_vendor/plugin-flow/_vendor/store/history.d.ts +0 -22
  86. package/_vendor/plugin-flow/_vendor/store/index.d.ts +0 -5
  87. package/_vendor/plugin-flow/_vendor/store/store.d.ts +0 -40
  88. package/_vendor/plugin-flow/_vendor/store/types.d.ts +0 -27
  89. package/_vendor/plugin-frame/_vendor/signals/atom.d.ts +0 -11
  90. package/_vendor/plugin-frame/_vendor/signals/computed.d.ts +0 -13
  91. package/_vendor/plugin-frame/_vendor/signals/core.d.ts +0 -35
  92. package/_vendor/plugin-frame/_vendor/signals/effect.d.ts +0 -5
  93. package/_vendor/plugin-frame/_vendor/signals/index.d.ts +0 -8
  94. package/_vendor/plugin-frame/_vendor/signals/types.d.ts +0 -22
  95. package/_vendor/plugin-frame/_vendor/store/diff.d.ts +0 -9
  96. package/_vendor/plugin-frame/_vendor/store/history.d.ts +0 -22
  97. package/_vendor/plugin-frame/_vendor/store/index.d.ts +0 -5
  98. package/_vendor/plugin-frame/_vendor/store/store.d.ts +0 -40
  99. package/_vendor/plugin-frame/_vendor/store/types.d.ts +0 -27
  100. package/_vendor/plugin-geo/_vendor/signals/atom.d.ts +0 -11
  101. package/_vendor/plugin-geo/_vendor/signals/computed.d.ts +0 -13
  102. package/_vendor/plugin-geo/_vendor/signals/core.d.ts +0 -35
  103. package/_vendor/plugin-geo/_vendor/signals/effect.d.ts +0 -5
  104. package/_vendor/plugin-geo/_vendor/signals/index.d.ts +0 -8
  105. package/_vendor/plugin-geo/_vendor/signals/types.d.ts +0 -22
  106. package/_vendor/plugin-geo/_vendor/store/diff.d.ts +0 -9
  107. package/_vendor/plugin-geo/_vendor/store/history.d.ts +0 -22
  108. package/_vendor/plugin-geo/_vendor/store/index.d.ts +0 -5
  109. package/_vendor/plugin-geo/_vendor/store/store.d.ts +0 -40
  110. package/_vendor/plugin-geo/_vendor/store/types.d.ts +0 -27
  111. package/_vendor/plugin-group/_vendor/signals/atom.d.ts +0 -11
  112. package/_vendor/plugin-group/_vendor/signals/computed.d.ts +0 -13
  113. package/_vendor/plugin-group/_vendor/signals/core.d.ts +0 -35
  114. package/_vendor/plugin-group/_vendor/signals/effect.d.ts +0 -5
  115. package/_vendor/plugin-group/_vendor/signals/index.d.ts +0 -8
  116. package/_vendor/plugin-group/_vendor/signals/types.d.ts +0 -22
  117. package/_vendor/plugin-group/_vendor/store/diff.d.ts +0 -9
  118. package/_vendor/plugin-group/_vendor/store/history.d.ts +0 -22
  119. package/_vendor/plugin-group/_vendor/store/index.d.ts +0 -5
  120. package/_vendor/plugin-group/_vendor/store/store.d.ts +0 -40
  121. package/_vendor/plugin-group/_vendor/store/types.d.ts +0 -27
  122. package/_vendor/plugin-html/_vendor/signals/atom.d.ts +0 -11
  123. package/_vendor/plugin-html/_vendor/signals/computed.d.ts +0 -13
  124. package/_vendor/plugin-html/_vendor/signals/core.d.ts +0 -35
  125. package/_vendor/plugin-html/_vendor/signals/effect.d.ts +0 -5
  126. package/_vendor/plugin-html/_vendor/signals/index.d.ts +0 -8
  127. package/_vendor/plugin-html/_vendor/signals/types.d.ts +0 -22
  128. package/_vendor/plugin-html/_vendor/store/diff.d.ts +0 -9
  129. package/_vendor/plugin-html/_vendor/store/history.d.ts +0 -22
  130. package/_vendor/plugin-html/_vendor/store/index.d.ts +0 -5
  131. package/_vendor/plugin-html/_vendor/store/store.d.ts +0 -40
  132. package/_vendor/plugin-html/_vendor/store/types.d.ts +0 -27
  133. package/_vendor/plugin-image/_vendor/signals/atom.d.ts +0 -11
  134. package/_vendor/plugin-image/_vendor/signals/computed.d.ts +0 -13
  135. package/_vendor/plugin-image/_vendor/signals/core.d.ts +0 -35
  136. package/_vendor/plugin-image/_vendor/signals/effect.d.ts +0 -5
  137. package/_vendor/plugin-image/_vendor/signals/index.d.ts +0 -8
  138. package/_vendor/plugin-image/_vendor/signals/types.d.ts +0 -22
  139. package/_vendor/plugin-image/_vendor/store/diff.d.ts +0 -9
  140. package/_vendor/plugin-image/_vendor/store/history.d.ts +0 -22
  141. package/_vendor/plugin-image/_vendor/store/index.d.ts +0 -5
  142. package/_vendor/plugin-image/_vendor/store/store.d.ts +0 -40
  143. package/_vendor/plugin-image/_vendor/store/types.d.ts +0 -27
  144. package/_vendor/plugin-laser/_vendor/store/diff.d.ts +0 -9
  145. package/_vendor/plugin-laser/_vendor/store/history.d.ts +0 -22
  146. package/_vendor/plugin-laser/_vendor/store/index.d.ts +0 -5
  147. package/_vendor/plugin-laser/_vendor/store/store.d.ts +0 -40
  148. package/_vendor/plugin-laser/_vendor/store/types.d.ts +0 -27
  149. package/_vendor/plugin-path/_vendor/signals/atom.d.ts +0 -11
  150. package/_vendor/plugin-path/_vendor/signals/computed.d.ts +0 -13
  151. package/_vendor/plugin-path/_vendor/signals/core.d.ts +0 -35
  152. package/_vendor/plugin-path/_vendor/signals/effect.d.ts +0 -5
  153. package/_vendor/plugin-path/_vendor/signals/index.d.ts +0 -8
  154. package/_vendor/plugin-path/_vendor/signals/types.d.ts +0 -22
  155. package/_vendor/plugin-path/_vendor/store/diff.d.ts +0 -9
  156. package/_vendor/plugin-path/_vendor/store/history.d.ts +0 -22
  157. package/_vendor/plugin-path/_vendor/store/index.d.ts +0 -5
  158. package/_vendor/plugin-path/_vendor/store/store.d.ts +0 -40
  159. package/_vendor/plugin-path/_vendor/store/types.d.ts +0 -27
  160. package/_vendor/plugin-text/_vendor/signals/atom.d.ts +0 -11
  161. package/_vendor/plugin-text/_vendor/signals/computed.d.ts +0 -13
  162. package/_vendor/plugin-text/_vendor/signals/core.d.ts +0 -35
  163. package/_vendor/plugin-text/_vendor/signals/effect.d.ts +0 -5
  164. package/_vendor/plugin-text/_vendor/signals/index.d.ts +0 -8
  165. package/_vendor/plugin-text/_vendor/signals/types.d.ts +0 -22
  166. package/_vendor/plugin-text/_vendor/store/diff.d.ts +0 -9
  167. package/_vendor/plugin-text/_vendor/store/history.d.ts +0 -22
  168. package/_vendor/plugin-text/_vendor/store/index.d.ts +0 -5
  169. package/_vendor/plugin-text/_vendor/store/store.d.ts +0 -40
  170. package/_vendor/plugin-text/_vendor/store/types.d.ts +0 -27
  171. package/_vendor/plugin-video/_vendor/signals/atom.d.ts +0 -11
  172. package/_vendor/plugin-video/_vendor/signals/computed.d.ts +0 -13
  173. package/_vendor/plugin-video/_vendor/signals/core.d.ts +0 -35
  174. package/_vendor/plugin-video/_vendor/signals/effect.d.ts +0 -5
  175. package/_vendor/plugin-video/_vendor/signals/index.d.ts +0 -8
  176. package/_vendor/plugin-video/_vendor/signals/types.d.ts +0 -22
  177. package/_vendor/plugin-video/_vendor/store/diff.d.ts +0 -9
  178. package/_vendor/plugin-video/_vendor/store/history.d.ts +0 -22
  179. package/_vendor/plugin-video/_vendor/store/index.d.ts +0 -5
  180. package/_vendor/plugin-video/_vendor/store/store.d.ts +0 -40
  181. package/_vendor/plugin-video/_vendor/store/types.d.ts +0 -27
@@ -1,5 +1,4 @@
1
- import { type Editor, type ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import { type CanvasReadable } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor, type ShapeId, type CanvasReadable } from "@yuzhouu/canvas-kit/plugin";
3
2
  import { type DrawShapeProps, type DrawBrush } from "./types";
4
3
  type DrawBrushStyle = Pick<DrawShapeProps, "brush" | "fill" | "stroke" | "strokeWidth" | "isClosed">;
5
4
  export type DrawStylePatch = Partial<DrawBrushStyle>;
@@ -7,5 +7,5 @@ export interface Atom<T> extends Signal<T> {
7
7
  set(value: T): T;
8
8
  update(updater: (value: T) => T): T;
9
9
  }
10
- export declare function createAtom<T>(graph: SignalGraph, name: string, initialValue: T, options?: AtomOptions<T>): Atom<T>;
10
+ export declare function createAtom<T>(signalGraph: SignalGraph, name: string, initialValue: T, options?: AtomOptions<T>): Atom<T>;
11
11
  export declare function isAtom(value: unknown): value is Atom<unknown>;
@@ -9,5 +9,5 @@ export interface ComputedOptions<T> {
9
9
  export interface Computed<T> extends Signal<T> {
10
10
  readonly isComputed: true;
11
11
  }
12
- export declare function createComputed<T>(graph: SignalGraph, name: string, derive: (previous: T | UNINITIALIZED) => T, options?: ComputedOptions<T>): Computed<T>;
12
+ export declare function createComputed<T>(signalGraph: SignalGraph, name: string, derive: (previous: T | UNINITIALIZED) => T, options?: ComputedOptions<T>): Computed<T>;
13
13
  export declare function isComputed(value: unknown): value is Computed<unknown>;
@@ -19,15 +19,15 @@ export declare class SignalGraph {
19
19
  /** @internal */
20
20
  advanceEpoch(): number;
21
21
  /** @internal */
22
- noteInitialValue<T>(atom: InternalAtom<T>, previousValue: T, previousLastChangedEpoch: number): void;
22
+ noteInitialValue<T>($_atom: InternalAtom<T>, previousValue: T, previousLastChangedEpoch: number): void;
23
23
  /** @internal */
24
24
  startCapture(consumer: ReactiveConsumer): void;
25
25
  /** @internal */
26
26
  stopCapture(): Set<InternalSignal<any>>;
27
27
  /** @internal */
28
- trackDependency(dependency: InternalSignal<any>): void;
28
+ trackDependency($_dependency: InternalSignal<any>): void;
29
29
  /** @internal */
30
- atomDidChange(atom: InternalAtom<any>): void;
30
+ atomDidChange($_atom: InternalAtom<any>): void;
31
31
  private restoreInitialAtomSnapshots;
32
32
  private flushChanges;
33
33
  }
@@ -2,4 +2,4 @@ import type { SignalGraph } from "./core";
2
2
  export interface EffectSchedulerOptions {
3
3
  scheduleEffect?: (execute: () => void) => void;
4
4
  }
5
- export declare function createEffect(graph: SignalGraph, name: string, fn: () => void, options?: EffectSchedulerOptions): () => void;
5
+ export declare function createEffect(signalGraph: SignalGraph, name: string, fn: () => void, options?: EffectSchedulerOptions): () => void;
@@ -1,10 +1,12 @@
1
1
  import type { SignalGraph } from "./core";
2
2
  /** A readable node owned by one reactive graph. */
3
3
  export interface Signal<T> {
4
- readonly graph: SignalGraph;
4
+ readonly signalGraph: SignalGraph;
5
5
  readonly name: string;
6
+ /** Read the current value and track it in the active reactive context. */
6
7
  get(): T;
7
- peek(): T;
8
+ /** Read the current value without tracking it in the calling context. */
9
+ getUntracked(): T;
8
10
  }
9
11
  /** @internal */
10
12
  export interface InternalSignal<T> extends Signal<T> {
@@ -13,7 +15,7 @@ export interface InternalSignal<T> extends Signal<T> {
13
15
  }
14
16
  export type ReactiveConsumer = {
15
17
  type: "computed";
16
- signal: InternalSignal<any>;
18
+ $_signal: InternalSignal<any>;
17
19
  } | {
18
20
  type: "effect";
19
21
  notify(): void;
@@ -1,10 +1,10 @@
1
1
  import { type Editor, type ShapeId, type Vec } from "@yuzhouu/canvas-kit/plugin";
2
2
  import type { Signal } from "./_vendor/signals/index";
3
3
  export interface EraserRuntime {
4
- readonly erasingShapeIdsSignal: Signal<readonly ShapeId[]>;
5
- readonly erasingShapeIdSetSignal: Signal<ReadonlySet<ShapeId>>;
6
- readonly trailSignal: Signal<readonly Vec[]>;
7
- readonly trailActiveSignal: Signal<boolean>;
4
+ readonly $_erasingShapeIds: Signal<readonly ShapeId[]>;
5
+ readonly $_erasingShapeIdSet: Signal<ReadonlySet<ShapeId>>;
6
+ readonly $_trail: Signal<readonly Vec[]>;
7
+ readonly $_trailActive: Signal<boolean>;
8
8
  setPreview(shapeIds: readonly ShapeId[], trail: readonly Vec[]): void;
9
9
  clear(): void;
10
10
  }
@@ -1,5 +1,4 @@
1
- import type { Editor, ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import type { CanvasMediaPresenter } from "@yuzhouu/canvas-kit/plugin";
1
+ import type { Editor, ShapeId, CanvasMediaPresenter } from "@yuzhouu/canvas-kit/plugin";
3
2
  import { type ImageCropAspectRatioPresetValue } from "./crop/model";
4
3
  import { type ImageSmudgeBrush, type ImageSmudgeSessionSnapshot } from "./smudge/session";
5
4
  import { type ImageShapeCrop } from "./types";
@@ -1,4 +1,3 @@
1
- import type { Editor } from "@yuzhouu/canvas-kit/plugin";
2
- import type { CanvasMediaPresenter } from "@yuzhouu/canvas-kit/plugin";
1
+ import type { Editor, CanvasMediaPresenter } from "@yuzhouu/canvas-kit/plugin";
3
2
  export declare function getImageMediaPresenter(editor: Editor): CanvasMediaPresenter | null;
4
3
  export declare function setImageMediaPresenter(editor: Editor, presenter: CanvasMediaPresenter | null): void;
@@ -1,5 +1,4 @@
1
- import { type Editor, type ShapeColor, type ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import { type CanvasReadable, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor, type ShapeColor, type ShapeId, type CanvasReadable, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
3
2
  import type { TextBlockType, TextFormattingSnapshot, TextFormattingValue, TextInlineFormat } from "./textFormatting";
4
3
  import type { RichTextDocument, GeoLabelInput, GeoLabelLayout, TextShapeAlign, TextShapeFont, TextShapeLineHeight, TextShapeProps, TextShapeSize } from "./textTypes";
5
4
  import type { TextFontCatalog } from "./textFonts";
@@ -1,5 +1,4 @@
1
- import { type Editor, type ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import type { CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor, type ShapeId, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
3
2
  import type { TextFontCatalog } from "./textFonts";
4
3
  import type { GeoLabelInput, GeoLabelLayout } from "./textTypes";
5
4
  export declare function createGeoLabel(editor: Editor, fontCatalog: TextFontCatalog, ownerShapeId: ShapeId, input: GeoLabelInput): CanvasShapeRef<"text"> | null;
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from "react";
2
- import type { Editor } from "@yuzhouu/canvas-kit/plugin";
2
+ import { type Editor } from "@yuzhouu/canvas-kit/plugin";
3
3
  import type { TextShapeRecord } from "../textTypes";
4
4
  import type { TextFontCatalog } from "../textFonts";
5
5
  import type { TextTiptapEditorChangeHandler } from "../textFormatting";
@@ -1,3 +1,3 @@
1
- import type { Editor } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor } from "@yuzhouu/canvas-kit/plugin";
2
2
  import type { TextShapeRecord } from "../textTypes";
3
3
  export declare function useTextLabelLayout(editor: Editor, shape: TextShapeRecord): import("../textLabelHelpers").TextLabelLayoutConstraints | null;
@@ -1,4 +1,4 @@
1
- import type { BaseRecord, ChangeSource, Editor, ShapeId, ShapeParentId } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type BaseRecord, type ChangeSource, type Editor, type ShapeId, type ShapeParentId } from "@yuzhouu/canvas-kit/plugin";
2
2
  import type { RichTextDocument, TextShapeProps, TextShapeRecord } from "./textTypes";
3
3
  export interface CreateTextShapeInput {
4
4
  x: number;
@@ -1,4 +1,4 @@
1
- import { Box, ShapeUtil, type ShapeId, type ShapeEditEndResult, type ShapeGeometryInput, type ShapeHoverTargetInput, type ShapeSelectionFrameInput, type ShapeSelectionResizeInput, type ShapeSelectionResizeModesInput, type ShapeSelectionTranslateInput, type ShapeUpdate } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type ShapeSelectionHandleInput, Box, ShapeUtil, type ShapeId, type ShapeEditEndResult, type ShapeGeometryInput, type ShapeHoverTargetInput, type ShapeSelectionFrameInput, type ShapeSelectionResizeInput, type ShapeSelectionResizeModesInput, type ShapeSelectionTranslateInput, type ShapeUpdate } from "@yuzhouu/canvas-kit/plugin";
2
2
  import { type TextShapeProps, type TextShapeRecord } from "./textTypes";
3
3
  export declare class TextShapeUtil extends ShapeUtil<TextShapeRecord> {
4
4
  readonly type: "text";
@@ -12,8 +12,7 @@ export declare class TextShapeUtil extends ShapeUtil<TextShapeRecord> {
12
12
  canReceiveTerminalBinding(shape: TextShapeRecord, input?: ShapeGeometryInput): boolean;
13
13
  canEdit(_shape: TextShapeRecord): boolean;
14
14
  contributesToSelectionFrame(shape: TextShapeRecord, input: ShapeSelectionFrameInput): boolean;
15
- canUseSelectionResizeHandles(shape: TextShapeRecord, input: ShapeSelectionFrameInput): boolean;
16
- canUseSelectionRotateHandle(shape: TextShapeRecord, input: ShapeSelectionFrameInput): boolean;
15
+ canUseSelectionHandle(shape: TextShapeRecord, input: ShapeSelectionHandleInput): boolean;
17
16
  getSelectionTargetId(shape: TextShapeRecord, input: ShapeSelectionFrameInput): ShapeId;
18
17
  getHoverTargetId(shape: TextShapeRecord, input: ShapeHoverTargetInput): ShapeId;
19
18
  getHoverDecorationTargetId(shape: TextShapeRecord, input: ShapeHoverTargetInput): ShapeId;
@@ -1,5 +1,4 @@
1
- import { type Editor, type ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import { type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor, type ShapeId, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
3
2
  import { type FlowEdgeCreationInvalidReason } from "./flowEdgeModel";
4
3
  import { type FlowNodeKind } from "./types";
5
4
  export interface FlowNodeRef extends CanvasShapeRef<FlowNodeKind> {
@@ -28,10 +28,10 @@ export interface FlowEdgePointerSession {
28
28
  }
29
29
  export interface FlowEdgeRuntime {
30
30
  readonly allowCycles: boolean;
31
- readonly nodeCreationRequest: ReadonlyValue<FlowNodeCreationRequest | null> & {
31
+ readonly $_nodeCreationRequest: ReadonlyValue<FlowNodeCreationRequest | null> & {
32
32
  set(value: FlowNodeCreationRequest | null): void;
33
33
  };
34
- readonly preview: ReadonlyValue<FlowEdgeCreationPreview | null> & {
34
+ readonly $_preview: ReadonlyValue<FlowEdgeCreationPreview | null> & {
35
35
  set(value: FlowEdgeCreationPreview | null): void;
36
36
  };
37
37
  readonly pointerSession: FlowEdgePointerSession | null;
@@ -1,4 +1,4 @@
1
- import { Box, ShapeUtil, Vec, type Editor, type ShapeBrushWrapInput, type ShapeLineSegmentHitTestInput, type ShapePointHitTestInput, type ShapeSelectionFrameInput, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type ShapeSelectionOverlayInfo, type ShapeSelectionOverlayInfoInput, type ShapeSelectionTransformCapabilityInput } from "@yuzhouu/canvas-kit/plugin";
1
+ import { Box, ShapeUtil, Vec, type Editor, type ShapeBrushWrapInput, type ShapeLineSegmentHitTestInput, type ShapePointHitTestInput, type ShapeSelectionFrameInput, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type ShapeSelectionOverlayInfo, type ShapeSelectionOverlayInfoInput } from "@yuzhouu/canvas-kit/plugin";
2
2
  import type { FlowEdgeShapeProps, FlowEdgeShapeRecord } from "./types";
3
3
  export declare class FlowEdgeShapeUtil extends ShapeUtil<FlowEdgeShapeRecord> {
4
4
  readonly type: "flow-edge";
@@ -6,12 +6,8 @@ export declare class FlowEdgeShapeUtil extends ShapeUtil<FlowEdgeShapeRecord> {
6
6
  validateProps(props: unknown): FlowEdgeShapeProps;
7
7
  getLocalBounds(shape: FlowEdgeShapeRecord): Box;
8
8
  canSnap(): boolean;
9
- canParticipateInSelectionResize(_shape: FlowEdgeShapeRecord, _input: ShapeSelectionTransformCapabilityInput): boolean;
10
- canParticipateInSelectionFlip(): boolean;
11
- canParticipateInSelectionRotation(): boolean;
12
- canParticipateInSelectionTranslation(): boolean;
13
- canUseSelectionResizeHandles(): boolean;
14
- canUseSelectionRotateHandle(): boolean;
9
+ canTransformSelection(): boolean;
10
+ canUseSelectionHandle(): boolean;
15
11
  canStartTranslateFromSelectionBounds(): boolean;
16
12
  contributesToSelectionFrame(_shape: FlowEdgeShapeRecord, _input: ShapeSelectionFrameInput): boolean;
17
13
  getSelectionHandleAnchors(shape: FlowEdgeShapeRecord, input: ShapeSelectionHandleAnchorInput): ShapeSelectionHandleAnchors;
@@ -1,5 +1,4 @@
1
- import { type BaseRecord, type BindingEndpointBase, type BindingRecordBase, type ShapeColor, type ShapeRecordBase, type TerminalBindingPortId } from "@yuzhouu/canvas-kit/plugin";
2
- import type { CanvasPlugin } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type BaseRecord, type BindingEndpointBase, type BindingRecordBase, type ShapeColor, type ShapeRecordBase, type TerminalBindingPortId, type CanvasPlugin } from "@yuzhouu/canvas-kit/plugin";
3
2
  import type { ImageApi, ImageShapeRecord } from "./_vendor/plugin-image/index";
4
3
  import type { TextApi, TextShapeRecord } from "./_vendor/plugin-text/index";
5
4
  export interface FlowEdgePoint {
@@ -1,5 +1,4 @@
1
- import type { Editor, LayerOrderDirection, ShapeColor, ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import { type CanvasReadable, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor, type LayerOrderDirection, type ShapeColor, type ShapeId, type CanvasReadable, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
3
2
  import type { FrameShapeProps } from "./frameShapeUtil";
4
3
  export declare const FRAME_EDIT_OPERATION_KIND = "frame.edit";
5
4
  export interface FrameInput {
@@ -10,7 +10,7 @@ interface FrameCreationPreview {
10
10
  props: FrameShapeProps;
11
11
  }
12
12
  interface FrameCreationRuntime {
13
- readonly preview: ReadonlyValue<FrameCreationPreview | null>;
13
+ readonly $_preview: ReadonlyValue<FrameCreationPreview | null>;
14
14
  getConfig(): FrameCreationConfig;
15
15
  setConfig(config: FrameCreationConfig): FrameCreationConfig;
16
16
  setHover(sample: FrameHoverSample): void;
@@ -1,5 +1,4 @@
1
- import { type Editor, type ShapeColor, type ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import { type CanvasReadable, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor, type ShapeColor, type ShapeId, type CanvasReadable, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
3
2
  import type { TextBlockType, TextFormattingSnapshot, TextFormattingValue, TextInlineFormat } from "./textFormatting";
4
3
  import type { RichTextDocument, GeoLabelInput, GeoLabelLayout, TextShapeAlign, TextShapeFont, TextShapeLineHeight, TextShapeProps, TextShapeSize } from "./textTypes";
5
4
  import type { TextFontCatalog } from "./textFonts";
@@ -1,5 +1,4 @@
1
- import { type Editor, type ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import type { CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor, type ShapeId, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
3
2
  import type { TextFontCatalog } from "./textFonts";
4
3
  import type { GeoLabelInput, GeoLabelLayout } from "./textTypes";
5
4
  export declare function createGeoLabel(editor: Editor, fontCatalog: TextFontCatalog, ownerShapeId: ShapeId, input: GeoLabelInput): CanvasShapeRef<"text"> | null;
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from "react";
2
- import type { Editor } from "@yuzhouu/canvas-kit/plugin";
2
+ import { type Editor } from "@yuzhouu/canvas-kit/plugin";
3
3
  import type { TextShapeRecord } from "../textTypes";
4
4
  import type { TextFontCatalog } from "../textFonts";
5
5
  import type { TextTiptapEditorChangeHandler } from "../textFormatting";
@@ -1,3 +1,3 @@
1
- import type { Editor } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor } from "@yuzhouu/canvas-kit/plugin";
2
2
  import type { TextShapeRecord } from "../textTypes";
3
3
  export declare function useTextLabelLayout(editor: Editor, shape: TextShapeRecord): import("../textLabelHelpers").TextLabelLayoutConstraints | null;
@@ -1,4 +1,4 @@
1
- import type { BaseRecord, ChangeSource, Editor, ShapeId, ShapeParentId } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type BaseRecord, type ChangeSource, type Editor, type ShapeId, type ShapeParentId } from "@yuzhouu/canvas-kit/plugin";
2
2
  import type { RichTextDocument, TextShapeProps, TextShapeRecord } from "./textTypes";
3
3
  export interface CreateTextShapeInput {
4
4
  x: number;
@@ -1,4 +1,4 @@
1
- import { Box, ShapeUtil, type ShapeId, type ShapeEditEndResult, type ShapeGeometryInput, type ShapeHoverTargetInput, type ShapeSelectionFrameInput, type ShapeSelectionResizeInput, type ShapeSelectionResizeModesInput, type ShapeSelectionTranslateInput, type ShapeUpdate } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type ShapeSelectionHandleInput, Box, ShapeUtil, type ShapeId, type ShapeEditEndResult, type ShapeGeometryInput, type ShapeHoverTargetInput, type ShapeSelectionFrameInput, type ShapeSelectionResizeInput, type ShapeSelectionResizeModesInput, type ShapeSelectionTranslateInput, type ShapeUpdate } from "@yuzhouu/canvas-kit/plugin";
2
2
  import { type TextShapeProps, type TextShapeRecord } from "./textTypes";
3
3
  export declare class TextShapeUtil extends ShapeUtil<TextShapeRecord> {
4
4
  readonly type: "text";
@@ -12,8 +12,7 @@ export declare class TextShapeUtil extends ShapeUtil<TextShapeRecord> {
12
12
  canReceiveTerminalBinding(shape: TextShapeRecord, input?: ShapeGeometryInput): boolean;
13
13
  canEdit(_shape: TextShapeRecord): boolean;
14
14
  contributesToSelectionFrame(shape: TextShapeRecord, input: ShapeSelectionFrameInput): boolean;
15
- canUseSelectionResizeHandles(shape: TextShapeRecord, input: ShapeSelectionFrameInput): boolean;
16
- canUseSelectionRotateHandle(shape: TextShapeRecord, input: ShapeSelectionFrameInput): boolean;
15
+ canUseSelectionHandle(shape: TextShapeRecord, input: ShapeSelectionHandleInput): boolean;
17
16
  getSelectionTargetId(shape: TextShapeRecord, input: ShapeSelectionFrameInput): ShapeId;
18
17
  getHoverTargetId(shape: TextShapeRecord, input: ShapeHoverTargetInput): ShapeId;
19
18
  getHoverDecorationTargetId(shape: TextShapeRecord, input: ShapeHoverTargetInput): ShapeId;
@@ -1,5 +1,4 @@
1
- import { type Editor, type ShapeColor, type ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import { type CanvasReadable, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor, type ShapeColor, type ShapeId, type CanvasReadable, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
3
2
  import type { GeoLabelInput, GeoLabelLayout, TextApi } from "./_vendor/plugin-text/index";
4
3
  import { type GeoShapeKind, type GeoShapeProps, type GeoGradientStop } from "./types";
5
4
  export interface GeoCreateInput {
@@ -9,7 +9,7 @@ export interface GeoCreationPreview {
9
9
  props: GeoShapeProps;
10
10
  }
11
11
  export interface GeoCreationRuntime {
12
- readonly preview: ReadonlyValue<GeoCreationPreview | null>;
12
+ readonly $_preview: ReadonlyValue<GeoCreationPreview | null>;
13
13
  setHover(sample: GeoHoverSample): void;
14
14
  clearHover(): void;
15
15
  }
@@ -1,5 +1,4 @@
1
- import type { Editor, ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import { type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
1
+ import type { Editor, ShapeId, CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
3
2
  import type { HtmlShapeProps } from "./types";
4
3
  export interface HtmlCreateInput {
5
4
  x: number;
@@ -1,5 +1,4 @@
1
- import type { Editor, ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import type { CanvasMediaPresenter } from "@yuzhouu/canvas-kit/plugin";
1
+ import type { Editor, ShapeId, CanvasMediaPresenter } from "@yuzhouu/canvas-kit/plugin";
3
2
  import { type ImageCropAspectRatioPresetValue } from "./crop/model";
4
3
  import { type ImageSmudgeBrush, type ImageSmudgeSessionSnapshot } from "./smudge/session";
5
4
  import { type ImageShapeCrop } from "./types";
@@ -1,4 +1,3 @@
1
- import type { Editor } from "@yuzhouu/canvas-kit/plugin";
2
- import type { CanvasMediaPresenter } from "@yuzhouu/canvas-kit/plugin";
1
+ import type { Editor, CanvasMediaPresenter } from "@yuzhouu/canvas-kit/plugin";
3
2
  export declare function getImageMediaPresenter(editor: Editor): CanvasMediaPresenter | null;
4
3
  export declare function setImageMediaPresenter(editor: Editor, presenter: CanvasMediaPresenter | null): void;
@@ -7,5 +7,5 @@ export interface Atom<T> extends Signal<T> {
7
7
  set(value: T): T;
8
8
  update(updater: (value: T) => T): T;
9
9
  }
10
- export declare function createAtom<T>(graph: SignalGraph, name: string, initialValue: T, options?: AtomOptions<T>): Atom<T>;
10
+ export declare function createAtom<T>(signalGraph: SignalGraph, name: string, initialValue: T, options?: AtomOptions<T>): Atom<T>;
11
11
  export declare function isAtom(value: unknown): value is Atom<unknown>;
@@ -9,5 +9,5 @@ export interface ComputedOptions<T> {
9
9
  export interface Computed<T> extends Signal<T> {
10
10
  readonly isComputed: true;
11
11
  }
12
- export declare function createComputed<T>(graph: SignalGraph, name: string, derive: (previous: T | UNINITIALIZED) => T, options?: ComputedOptions<T>): Computed<T>;
12
+ export declare function createComputed<T>(signalGraph: SignalGraph, name: string, derive: (previous: T | UNINITIALIZED) => T, options?: ComputedOptions<T>): Computed<T>;
13
13
  export declare function isComputed(value: unknown): value is Computed<unknown>;
@@ -19,15 +19,15 @@ export declare class SignalGraph {
19
19
  /** @internal */
20
20
  advanceEpoch(): number;
21
21
  /** @internal */
22
- noteInitialValue<T>(atom: InternalAtom<T>, previousValue: T, previousLastChangedEpoch: number): void;
22
+ noteInitialValue<T>($_atom: InternalAtom<T>, previousValue: T, previousLastChangedEpoch: number): void;
23
23
  /** @internal */
24
24
  startCapture(consumer: ReactiveConsumer): void;
25
25
  /** @internal */
26
26
  stopCapture(): Set<InternalSignal<any>>;
27
27
  /** @internal */
28
- trackDependency(dependency: InternalSignal<any>): void;
28
+ trackDependency($_dependency: InternalSignal<any>): void;
29
29
  /** @internal */
30
- atomDidChange(atom: InternalAtom<any>): void;
30
+ atomDidChange($_atom: InternalAtom<any>): void;
31
31
  private restoreInitialAtomSnapshots;
32
32
  private flushChanges;
33
33
  }
@@ -2,4 +2,4 @@ import type { SignalGraph } from "./core";
2
2
  export interface EffectSchedulerOptions {
3
3
  scheduleEffect?: (execute: () => void) => void;
4
4
  }
5
- export declare function createEffect(graph: SignalGraph, name: string, fn: () => void, options?: EffectSchedulerOptions): () => void;
5
+ export declare function createEffect(signalGraph: SignalGraph, name: string, fn: () => void, options?: EffectSchedulerOptions): () => void;
@@ -1,10 +1,12 @@
1
1
  import type { SignalGraph } from "./core";
2
2
  /** A readable node owned by one reactive graph. */
3
3
  export interface Signal<T> {
4
- readonly graph: SignalGraph;
4
+ readonly signalGraph: SignalGraph;
5
5
  readonly name: string;
6
+ /** Read the current value and track it in the active reactive context. */
6
7
  get(): T;
7
- peek(): T;
8
+ /** Read the current value without tracking it in the calling context. */
9
+ getUntracked(): T;
8
10
  }
9
11
  /** @internal */
10
12
  export interface InternalSignal<T> extends Signal<T> {
@@ -13,7 +15,7 @@ export interface InternalSignal<T> extends Signal<T> {
13
15
  }
14
16
  export type ReactiveConsumer = {
15
17
  type: "computed";
16
- signal: InternalSignal<any>;
18
+ $_signal: InternalSignal<any>;
17
19
  } | {
18
20
  type: "effect";
19
21
  notify(): void;
@@ -6,8 +6,8 @@ export interface LaserTrailState {
6
6
  points: readonly Vec[];
7
7
  }
8
8
  export interface LaserRuntime {
9
- readonly trailSignal: Signal<LaserTrailState | null>;
10
- readonly activeSignal: Signal<boolean>;
9
+ readonly $_trail: Signal<LaserTrailState | null>;
10
+ readonly $_active: Signal<boolean>;
11
11
  start(): number;
12
12
  set(sessionId: number, points: readonly Vec[]): void;
13
13
  finish(sessionId: number): void;
@@ -1,5 +1,4 @@
1
- import { type Editor, type ShapeColor, type ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import { type CanvasReadable } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor, type ShapeColor, type ShapeId, type CanvasReadable } from "@yuzhouu/canvas-kit/plugin";
3
2
  import { type PathNodeOperation } from "./pathGeometry";
4
3
  import { type PathBooleanOperation } from "./pathBoolean";
5
4
  import { type PathShapeProps } from "./types";
@@ -1,4 +1,4 @@
1
- import { Box, ShapeUtil, Vec, type ShapeBrushSelectInput, type ShapeBrushWrapInput, type ShapeBindingPointInput, type ShapeHandleSnapGeometry, type ShapeLineSegmentHitTestInput, type ShapePointHitTestInput, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type ShapeSelectionFrameInput, type ShapeSelectionOverlayInfo, type ShapeSelectionOverlayInfoInput, type ShapeSelectionResizeInput, type ShapeTerminalBindingOutline, type ShapeUpdate } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type ShapeSelectionHandleInput, Box, ShapeUtil, Vec, type ShapeBrushSelectInput, type ShapeBrushWrapInput, type ShapeBindingPointInput, type ShapeHandleSnapGeometry, type ShapeLineSegmentHitTestInput, type ShapePointHitTestInput, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type ShapeSelectionOverlayInfo, type ShapeSelectionOverlayInfoInput, type ShapeSelectionResizeInput, type ShapeTerminalBindingOutline, type ShapeUpdate } from "@yuzhouu/canvas-kit/plugin";
2
2
  import { type PathShapeProps, type PathShapeRecord } from "./types";
3
3
  export declare class PathShapeUtil extends ShapeUtil<PathShapeRecord> {
4
4
  readonly type: "path";
@@ -16,8 +16,7 @@ export declare class PathShapeUtil extends ShapeUtil<PathShapeRecord> {
16
16
  getHandleSnapGeometry(shape: PathShapeRecord): ShapeHandleSnapGeometry;
17
17
  canReceiveTerminalBinding(_shape: PathShapeRecord): boolean;
18
18
  canEdit(_shape: PathShapeRecord): boolean;
19
- canUseSelectionResizeHandles(shape: PathShapeRecord, input: ShapeSelectionFrameInput): boolean;
20
- canUseSelectionRotateHandle(shape: PathShapeRecord, input: ShapeSelectionFrameInput): boolean;
19
+ canUseSelectionHandle(shape: PathShapeRecord, input: ShapeSelectionHandleInput): boolean;
21
20
  getSelectionHandleAnchors(shape: PathShapeRecord, input: ShapeSelectionHandleAnchorInput): ShapeSelectionHandleAnchors;
22
21
  getSelectionOverlayInfo(shape: PathShapeRecord, input: ShapeSelectionOverlayInfoInput): ShapeSelectionOverlayInfo;
23
22
  hitTest(shape: PathShapeRecord, positionedPoint: Vec, _input?: ShapePointHitTestInput): boolean;
@@ -1,5 +1,4 @@
1
- import { type Editor, type ShapeColor, type ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import { type CanvasReadable, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor, type ShapeColor, type ShapeId, type CanvasReadable, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
3
2
  import type { TextBlockType, TextFormattingSnapshot, TextFormattingValue, TextInlineFormat } from "./textFormatting";
4
3
  import type { RichTextDocument, GeoLabelInput, GeoLabelLayout, TextShapeAlign, TextShapeFont, TextShapeLineHeight, TextShapeProps, TextShapeSize } from "./textTypes";
5
4
  import type { TextFontCatalog } from "./textFonts";
@@ -1,5 +1,4 @@
1
- import { type Editor, type ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import type { CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor, type ShapeId, type CanvasShapeRef } from "@yuzhouu/canvas-kit/plugin";
3
2
  import type { TextFontCatalog } from "./textFonts";
4
3
  import type { GeoLabelInput, GeoLabelLayout } from "./textTypes";
5
4
  export declare function createGeoLabel(editor: Editor, fontCatalog: TextFontCatalog, ownerShapeId: ShapeId, input: GeoLabelInput): CanvasShapeRef<"text"> | null;
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from "react";
2
- import type { Editor } from "@yuzhouu/canvas-kit/plugin";
2
+ import { type Editor } from "@yuzhouu/canvas-kit/plugin";
3
3
  import type { TextShapeRecord } from "../textTypes";
4
4
  import type { TextFontCatalog } from "../textFonts";
5
5
  import type { TextTiptapEditorChangeHandler } from "../textFormatting";
@@ -1,3 +1,3 @@
1
- import type { Editor } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type Editor } from "@yuzhouu/canvas-kit/plugin";
2
2
  import type { TextShapeRecord } from "../textTypes";
3
3
  export declare function useTextLabelLayout(editor: Editor, shape: TextShapeRecord): import("../textLabelHelpers").TextLabelLayoutConstraints | null;
@@ -1,4 +1,4 @@
1
- import type { BaseRecord, ChangeSource, Editor, ShapeId, ShapeParentId } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type BaseRecord, type ChangeSource, type Editor, type ShapeId, type ShapeParentId } from "@yuzhouu/canvas-kit/plugin";
2
2
  import type { RichTextDocument, TextShapeProps, TextShapeRecord } from "./textTypes";
3
3
  export interface CreateTextShapeInput {
4
4
  x: number;
@@ -1,4 +1,4 @@
1
- import { Box, ShapeUtil, type ShapeId, type ShapeEditEndResult, type ShapeGeometryInput, type ShapeHoverTargetInput, type ShapeSelectionFrameInput, type ShapeSelectionResizeInput, type ShapeSelectionResizeModesInput, type ShapeSelectionTranslateInput, type ShapeUpdate } from "@yuzhouu/canvas-kit/plugin";
1
+ import { type ShapeSelectionHandleInput, Box, ShapeUtil, type ShapeId, type ShapeEditEndResult, type ShapeGeometryInput, type ShapeHoverTargetInput, type ShapeSelectionFrameInput, type ShapeSelectionResizeInput, type ShapeSelectionResizeModesInput, type ShapeSelectionTranslateInput, type ShapeUpdate } from "@yuzhouu/canvas-kit/plugin";
2
2
  import { type TextShapeProps, type TextShapeRecord } from "./textTypes";
3
3
  export declare class TextShapeUtil extends ShapeUtil<TextShapeRecord> {
4
4
  readonly type: "text";
@@ -12,8 +12,7 @@ export declare class TextShapeUtil extends ShapeUtil<TextShapeRecord> {
12
12
  canReceiveTerminalBinding(shape: TextShapeRecord, input?: ShapeGeometryInput): boolean;
13
13
  canEdit(_shape: TextShapeRecord): boolean;
14
14
  contributesToSelectionFrame(shape: TextShapeRecord, input: ShapeSelectionFrameInput): boolean;
15
- canUseSelectionResizeHandles(shape: TextShapeRecord, input: ShapeSelectionFrameInput): boolean;
16
- canUseSelectionRotateHandle(shape: TextShapeRecord, input: ShapeSelectionFrameInput): boolean;
15
+ canUseSelectionHandle(shape: TextShapeRecord, input: ShapeSelectionHandleInput): boolean;
17
16
  getSelectionTargetId(shape: TextShapeRecord, input: ShapeSelectionFrameInput): ShapeId;
18
17
  getHoverTargetId(shape: TextShapeRecord, input: ShapeHoverTargetInput): ShapeId;
19
18
  getHoverDecorationTargetId(shape: TextShapeRecord, input: ShapeHoverTargetInput): ShapeId;
@@ -1,5 +1,4 @@
1
- import type { Editor, ShapeId } from "@yuzhouu/canvas-kit/plugin";
2
- import type { CanvasMediaPresenter } from "@yuzhouu/canvas-kit/plugin";
1
+ import type { Editor, ShapeId, CanvasMediaPresenter } from "@yuzhouu/canvas-kit/plugin";
3
2
  export interface VideoSelectionState {
4
3
  readonly shapeId: ShapeId;
5
4
  readonly cornerRadius: number;
@@ -1,4 +1,3 @@
1
- import type { Editor } from "@yuzhouu/canvas-kit/plugin";
2
- import type { CanvasMediaPresenter } from "@yuzhouu/canvas-kit/plugin";
1
+ import type { Editor, CanvasMediaPresenter } from "@yuzhouu/canvas-kit/plugin";
3
2
  export declare function getVideoMediaPresenter(editor: Editor): CanvasMediaPresenter | null;
4
3
  export declare function setVideoMediaPresenter(editor: Editor, presenter: CanvasMediaPresenter | null): void;