@yuzhouu/canvas-kit 0.1.11 → 0.1.13

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 (229) hide show
  1. package/README.md +47 -13
  2. package/_vendor/canvas-core/bindings/bindingUtil.d.ts +1 -0
  3. package/_vendor/canvas-core/editor/clipboard.d.ts +1 -1
  4. package/_vendor/canvas-core/editor/commands.d.ts +0 -2
  5. package/_vendor/canvas-core/editor/managers/bindingManager.d.ts +4 -0
  6. package/_vendor/canvas-core/editor/queries/shapeTransforms.d.ts +3 -4
  7. package/_vendor/canvas-core/editor/resizeGeometry.d.ts +20 -0
  8. package/_vendor/canvas-core/editor/selectionResizeCapabilities.d.ts +2 -0
  9. package/_vendor/canvas-core/geometry/mat.d.ts +2 -3
  10. package/_vendor/canvas-core/index.d.ts +4 -2
  11. package/_vendor/canvas-core/schema/records.d.ts +0 -1
  12. package/_vendor/canvas-core/schema/snapshots.d.ts +2 -2
  13. package/_vendor/canvas-core/shapes/childTransformPolicy.d.ts +16 -0
  14. package/_vendor/canvas-core/shapes/shapeUtil.d.ts +3 -3
  15. package/_vendor/canvas-plugin-sdk/capability.d.ts +0 -6
  16. package/_vendor/canvas-plugin-sdk/index.d.ts +1 -16
  17. package/_vendor/canvas-plugin-sdk/plugin.d.ts +5 -52
  18. package/_vendor/canvas-plugin-sdk/setupExtension.d.ts +5 -0
  19. package/_vendor/canvas-product-contracts/actionRegistry.d.ts +4 -0
  20. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/actions.d.ts +10 -16
  21. package/_vendor/canvas-product-contracts/capability.d.ts +8 -0
  22. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/chrome.d.ts +1 -0
  23. package/_vendor/canvas-product-contracts/chromeRegistry.d.ts +9 -0
  24. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/contextMenu.d.ts +4 -0
  25. package/_vendor/canvas-product-contracts/contextMenuRegistry.d.ts +4 -0
  26. package/_vendor/canvas-product-contracts/exportRegistry.d.ts +6 -0
  27. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/exports.d.ts +1 -0
  28. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/importRegistry.d.ts +1 -4
  29. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/imports.d.ts +1 -0
  30. package/_vendor/canvas-product-contracts/index.d.ts +15 -0
  31. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/productApi.d.ts +6 -5
  32. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/services.d.ts +2 -1
  33. package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/toolbar.d.ts +3 -6
  34. package/_vendor/canvas-product-contracts/toolbarRegistry.d.ts +9 -0
  35. package/_vendor/plugin-arrow/api.d.ts +2 -2
  36. package/_vendor/plugin-frame/api.d.ts +2 -2
  37. package/_vendor/plugin-geo/api.d.ts +2 -2
  38. package/_vendor/plugin-group/groupContributions.d.ts +1 -1
  39. package/_vendor/plugin-group/productRuntime.d.ts +1 -1
  40. package/_vendor/plugin-image/cropRuntime.d.ts +1 -1
  41. package/_vendor/plugin-image/imageHostActionContract.d.ts +1 -1
  42. package/_vendor/plugin-image/productRuntime.d.ts +1 -1
  43. package/_vendor/plugin-image/runtimeShared.d.ts +1 -1
  44. package/_vendor/plugin-image/smudgeRuntime.d.ts +1 -1
  45. package/_vendor/plugin-image/styleRuntime.d.ts +1 -1
  46. package/_vendor/plugin-image/toolbarRuntime.d.ts +1 -1
  47. package/_vendor/plugin-runtime-clipboard/capability.d.ts +1 -0
  48. package/_vendor/{plugin-builtin-clipboard/clipboardContribution.d.ts → plugin-runtime-clipboard/clipboardActions.d.ts} +1 -6
  49. package/_vendor/{plugin-builtin-clipboard → plugin-runtime-clipboard}/clipboardService.d.ts +2 -2
  50. package/_vendor/plugin-runtime-clipboard/index.d.ts +4 -0
  51. package/_vendor/plugin-runtime-clipboard/plugin.d.ts +1 -0
  52. package/_vendor/{plugin-builtin-export → plugin-runtime-export}/canvasExportApi.d.ts +2 -2
  53. package/_vendor/{plugin-builtin-export → plugin-runtime-export}/index.d.ts +1 -1
  54. package/_vendor/{plugin-builtin-export → plugin-runtime-export}/plugin.d.ts +1 -1
  55. package/_vendor/plugin-text/api.d.ts +2 -2
  56. package/_vendor/plugin-text/feature.d.ts +1 -1
  57. package/_vendor/plugin-text/textShapeHelpers.d.ts +0 -1
  58. package/browser/persistence.d.ts +1 -1
  59. package/canvasKitTools.d.ts +3 -0
  60. package/chrome/contextMenuRuntime.d.ts +7 -0
  61. package/chrome/toolbar/FloatingSelectionToolbarPageSpace.d.ts +1 -1
  62. package/chrome/toolbar/mergeToolbarGroups.d.ts +8 -0
  63. package/chrome/toolbar/toolbarLabels.d.ts +1 -1
  64. package/chrome/toolbar/useToolbarSurfaces.d.ts +1 -1
  65. package/chrome/types.d.ts +7 -8
  66. package/chrome/useCanvasKitChromeContext.d.ts +7 -7
  67. package/chrome/useCanvasKitLayerTree.d.ts +3 -2
  68. package/chrome/useChromeSurfaces.d.ts +1 -1
  69. package/chrome/useContextMenuSurface.d.ts +1 -1
  70. package/chrome/useHistoryControls.d.ts +3 -3
  71. package/chrome/usePageControls.d.ts +8 -8
  72. package/chrome/useZoomControls.d.ts +5 -1
  73. package/commands/command.d.ts +11 -0
  74. package/commands/commandTokens.d.ts +61 -0
  75. package/commands/documentCommands.d.ts +2 -0
  76. package/commands/historyCommands.d.ts +3 -0
  77. package/commands/index.d.ts +11 -0
  78. package/commands/layerCommands.d.ts +20 -0
  79. package/commands/pageCommands.d.ts +12 -0
  80. package/commands/selectionCommands.d.ts +12 -0
  81. package/commands/shapeCommands.d.ts +8 -0
  82. package/commands/toolCommands.d.ts +2 -0
  83. package/commands/viewCommands.d.ts +10 -0
  84. package/contracts/canvasProductControllerContracts.d.ts +32 -0
  85. package/{core/product-controller → controller}/canvasProductController.d.ts +27 -55
  86. package/controller/index.d.ts +3 -0
  87. package/{core/product-controller/productLayerTree.d.ts → controller/layerTree.d.ts} +1 -1
  88. package/index.d.ts +31 -27
  89. package/index.mjs +88 -111
  90. package/package.json +2 -2
  91. package/plugins/host/image/api/imageHostApi.d.ts +11 -0
  92. package/plugins/host/image/api/imageHostApiContract.d.ts +60 -0
  93. package/{features → plugins/host}/image/asset/imageAssetService.d.ts +3 -2
  94. package/{features → plugins/host}/image/asset/imageBlobStore.d.ts +2 -2
  95. package/{features → plugins/host}/image/asset/imageFileHelpers.d.ts +1 -1
  96. package/{features → plugins/host}/image/asset/svgImageAssetInliner.d.ts +1 -1
  97. package/{features → plugins/host}/image/import/ImageImportController.d.ts +2 -2
  98. package/{features → plugins/host}/image/index.d.ts +4 -4
  99. package/plugins/host/image/plugin.d.ts +1 -0
  100. package/{features → plugins/host}/image/smudge/imageSmudgeHostActions.d.ts +3 -3
  101. package/{features → plugins/host}/image/toolbar/imageHostActions.d.ts +8 -24
  102. package/{features → plugins/host}/image/toolbar/imageToolbarHostBridge.d.ts +2 -2
  103. package/{features → plugins/host}/text/link/TextLinkHoverPopover.d.ts +1 -1
  104. package/plugins/host/text/textHostPlugin.d.ts +5 -0
  105. package/plugins/host/text/textSvgAssetInliner.d.ts +3 -0
  106. package/plugins/host/text/textSvgAssetPlugin.d.ts +2 -0
  107. package/{_vendor/plugin-builtin-import-host → plugins/runtime/import-host}/CanvasImportHost.d.ts +2 -1
  108. package/plugins/runtime/import-host/capability.d.ts +1 -0
  109. package/plugins/runtime/import-host/plugin.d.ts +1 -0
  110. package/plugins/runtime/keyboard-shortcuts/index.d.ts +1 -0
  111. package/plugins/runtime/keyboard-shortcuts/plugin.d.ts +1 -0
  112. package/plugins/runtime/keyboard-shortcuts/useCanvasKeyboardShortcuts.d.ts +6 -0
  113. package/plugins/runtime/tool-actions/capability.d.ts +1 -0
  114. package/{_vendor/plugin-builtin-tool-actions → plugins/runtime/tool-actions}/index.d.ts +1 -1
  115. package/plugins/runtime/tool-actions/plugin.d.ts +1 -0
  116. package/plugins/runtime/tool-actions/toolActions.d.ts +2 -0
  117. package/plugins/standard/clipboard/chrome.d.ts +2 -0
  118. package/plugins/standard/clipboard/contextMenu.d.ts +2 -0
  119. package/plugins/standard/clipboard/plugin.d.ts +1 -0
  120. package/plugins/standard/clipboard/shortcuts.d.ts +5 -0
  121. package/plugins/{standardCanvasKitPlugins.d.ts → standard/createStandardCanvasKitPlugins.d.ts} +2 -3
  122. package/plugins/standard/selection/actions.d.ts +21 -0
  123. package/plugins/standard/selection/chrome.d.ts +2 -0
  124. package/plugins/standard/selection/contextMenu.d.ts +2 -0
  125. package/plugins/standard/selection/plugin.d.ts +1 -0
  126. package/plugins/standard/selection/toolbar.d.ts +2 -0
  127. package/plugins/standard/tool-ui/contextMenu.d.ts +2 -0
  128. package/plugins/standard/tool-ui/plugin.d.ts +1 -0
  129. package/plugins/standard/tool-ui/toolbar.d.ts +2 -0
  130. package/plugins/standard/view/actions.d.ts +5 -0
  131. package/plugins/standard/view/chrome.d.ts +2 -0
  132. package/plugins/standard/view/contextMenu.d.ts +2 -0
  133. package/plugins/standard/view/plugin.d.ts +1 -0
  134. package/react/CanvasKitRoot.d.ts +3 -2
  135. package/react/useCanvasProductControllerLifecycle.d.ts +9 -0
  136. package/runtime/canvasKitActionContext.d.ts +17 -0
  137. package/runtime/canvasKitActionExecutor.d.ts +12 -0
  138. package/runtime/canvasKitCommandExecutor.d.ts +12 -3
  139. package/runtime/canvasKitPluginContracts.d.ts +13 -19
  140. package/{_vendor/canvas-plugin-sdk/lifecycle.d.ts → runtime/canvasKitPluginLifecycle.d.ts} +6 -5
  141. package/runtime/canvasKitPluginSetup.d.ts +9 -6
  142. package/{_vendor/canvas-plugin-sdk/pluginUi.d.ts → runtime/canvasKitPluginUi.d.ts} +5 -5
  143. package/runtime/canvasKitRuntime.d.ts +14 -5
  144. package/runtime/canvasKitRuntimeContracts.d.ts +8 -7
  145. package/runtime/canvasPluginGraph.d.ts +15 -0
  146. package/runtime/createCanvasKitCommandAction.d.ts +10 -0
  147. package/runtime/createCanvasKitEditor.d.ts +7 -0
  148. package/{core/runtime/runtimeContracts.d.ts → runtime/persistenceContracts.d.ts} +1 -6
  149. package/runtime/persistenceCoordinator.d.ts +1 -1
  150. package/{core/runtime/productAssets.d.ts → runtime/productAssetResolvers.d.ts} +11 -2
  151. package/runtime/productServiceRegistry.d.ts +8 -0
  152. package/runtime/registries/actionRegistry.d.ts +5 -0
  153. package/runtime/registries/chromeRegistry.d.ts +2 -0
  154. package/runtime/registries/contextMenuRegistry.d.ts +5 -0
  155. package/runtime/registries/exportRegistry.d.ts +2 -0
  156. package/runtime/registries/importRegistry.d.ts +2 -0
  157. package/runtime/registries/index.d.ts +7 -0
  158. package/runtime/registries/productApiRegistry.d.ts +5 -0
  159. package/runtime/registries/toolbarRegistry.d.ts +5 -0
  160. package/_vendor/canvas-plugin-sdk/actionRegistry.d.ts +0 -7
  161. package/_vendor/canvas-plugin-sdk/chromeRegistry.d.ts +0 -15
  162. package/_vendor/canvas-plugin-sdk/contextMenuRegistry.d.ts +0 -11
  163. package/_vendor/canvas-plugin-sdk/exportRegistry.d.ts +0 -9
  164. package/_vendor/canvas-plugin-sdk/toolbarRegistry.d.ts +0 -18
  165. package/_vendor/plugin-builtin-clipboard/clipboardChromeContributions.d.ts +0 -2
  166. package/_vendor/plugin-builtin-clipboard/clipboardContextMenuContributions.d.ts +0 -2
  167. package/_vendor/plugin-builtin-clipboard/index.d.ts +0 -3
  168. package/_vendor/plugin-builtin-clipboard/plugin.d.ts +0 -1
  169. package/_vendor/plugin-builtin-import-host/capability.d.ts +0 -1
  170. package/_vendor/plugin-builtin-import-host/plugin.d.ts +0 -1
  171. package/_vendor/plugin-builtin-tool-actions/capability.d.ts +0 -1
  172. package/_vendor/plugin-builtin-tool-actions/plugin.d.ts +0 -1
  173. package/_vendor/plugin-builtin-tool-actions/toolActions.d.ts +0 -2
  174. package/_vendor/plugin-connector/canvasRender.d.ts +0 -2
  175. package/_vendor/plugin-connector/connectorBindingUtil.d.ts +0 -28
  176. package/_vendor/plugin-connector/connectorBindings.d.ts +0 -8
  177. package/_vendor/plugin-connector/connectorGeometry.d.ts +0 -70
  178. package/_vendor/plugin-connector/connectorHandles.d.ts +0 -12
  179. package/_vendor/plugin-connector/connectorInteractions.d.ts +0 -3
  180. package/_vendor/plugin-connector/connectorMarker.d.ts +0 -7
  181. package/_vendor/plugin-connector/connectorModel.d.ts +0 -43
  182. package/_vendor/plugin-connector/connectorPortInteraction.d.ts +0 -13
  183. package/_vendor/plugin-connector/connectorPorts.d.ts +0 -23
  184. package/_vendor/plugin-connector/connectorRuntime.d.ts +0 -62
  185. package/_vendor/plugin-connector/connectorShapeUtil.d.ts +0 -29
  186. package/_vendor/plugin-connector/connectorTool.d.ts +0 -4
  187. package/_vendor/plugin-connector/constants.d.ts +0 -17
  188. package/_vendor/plugin-connector/editorRuntime.d.ts +0 -7
  189. package/_vendor/plugin-connector/feature.d.ts +0 -4
  190. package/_vendor/plugin-connector/index.d.ts +0 -18
  191. package/_vendor/plugin-connector/orthogonalRoute.d.ts +0 -9
  192. package/_vendor/plugin-connector/productRuntime.d.ts +0 -2
  193. package/_vendor/plugin-connector/quickConnect.d.ts +0 -28
  194. package/_vendor/plugin-connector/types.d.ts +0 -51
  195. package/_vendor/plugin-packaging/api.d.ts +0 -74
  196. package/_vendor/plugin-packaging/canvasRender.d.ts +0 -2
  197. package/_vendor/plugin-packaging/editorRuntime.d.ts +0 -2
  198. package/_vendor/plugin-packaging/feature.d.ts +0 -2
  199. package/_vendor/plugin-packaging/index.d.ts +0 -19
  200. package/_vendor/plugin-packaging/packagingArtwork.d.ts +0 -5
  201. package/_vendor/plugin-packaging/packagingDxf.d.ts +0 -9
  202. package/_vendor/plugin-packaging/packagingGeometry.d.ts +0 -74
  203. package/_vendor/plugin-packaging/packagingInteractions.d.ts +0 -2
  204. package/_vendor/plugin-packaging/packagingPdfExporter.d.ts +0 -25
  205. package/_vendor/plugin-packaging/packagingRuntime.d.ts +0 -11
  206. package/_vendor/plugin-packaging/packagingShapeUtil.d.ts +0 -34
  207. package/_vendor/plugin-packaging/packagingStyle.d.ts +0 -10
  208. package/_vendor/plugin-packaging/packagingSvgExporter.d.ts +0 -7
  209. package/_vendor/plugin-packaging/productRuntime.d.ts +0 -2
  210. package/_vendor/plugin-packaging/types.d.ts +0 -168
  211. package/_vendor/plugin-packaging/validation.d.ts +0 -3
  212. package/controller/canvasKitController.d.ts +0 -28
  213. package/core/index.d.ts +0 -7
  214. package/core/product-controller/index.d.ts +0 -2
  215. package/core/runtime/productEditor.d.ts +0 -3
  216. package/core/runtime/productServices.d.ts +0 -20
  217. package/es-DocrZgUh.mjs +0 -2
  218. package/features/context-menu/contextMenuRuntime.d.ts +0 -13
  219. package/features/image/controller/imageProductController.d.ts +0 -27
  220. package/features/image/imageHostPlugin.d.ts +0 -1
  221. package/features/image/smudge/imageSmudgeTypes.d.ts +0 -25
  222. package/features/text/textHostPlugin.d.ts +0 -5
  223. package/features/text/textSvgAssetInliner.d.ts +0 -3
  224. package/features/text/textSvgAssetPlugin.d.ts +0 -2
  225. package/react/useCanvasKitControllerLifecycle.d.ts +0 -8
  226. /package/_vendor/{plugin-builtin-export → plugin-runtime-export}/blobDataUrl.d.ts +0 -0
  227. /package/_vendor/{plugin-builtin-export → plugin-runtime-export}/pngExport.d.ts +0 -0
  228. /package/_vendor/{plugin-builtin-export → plugin-runtime-export}/svgExport.d.ts +0 -0
  229. /package/{_vendor/plugin-builtin-import-host → plugins/runtime/import-host}/index.d.ts +0 -0
@@ -1,62 +0,0 @@
1
- import { type Box, type Editor, type Mat, type CancelEditorEvent, type ShapeColor, type ShapeId, type Vec } from "../canvas-core/index";
2
- import { type Signal } from "../signals/index";
3
- import type { ConnectorHead, ConnectorQuickCreateNodeFactory, ConnectorRouting, ConnectorStrokeStyle, ConnectorTerminal } from "./types";
4
- import type { ConnectorCreationInvalidReason, ConnectorDraftEndpoint } from "./connectorModel";
5
- export interface ConnectorPreviewGeometry {
6
- routing: ConnectorRouting;
7
- cornerRadius: number;
8
- headStart: ConnectorHead;
9
- headEnd: ConnectorHead;
10
- stroke: ShapeColor;
11
- strokeWidth: number;
12
- strokeStyle: ConnectorStrokeStyle;
13
- curveWaypoints: readonly Vec[];
14
- orthogonalBends: readonly Vec[];
15
- localToPageTransform: Mat;
16
- }
17
- export interface ConnectorPreviewEndpoint {
18
- draft: ConnectorDraftEndpoint;
19
- pagePoint: Vec;
20
- pageOutwardNormal: Vec;
21
- shapeId: ShapeId | null;
22
- portId: string | null;
23
- obstacleBounds?: Box;
24
- }
25
- interface ConnectorInteractionPreviewBase {
26
- start: ConnectorPreviewEndpoint;
27
- end: ConnectorPreviewEndpoint;
28
- isDragging: boolean;
29
- movingTerminal: ConnectorTerminal;
30
- geometry: ConnectorPreviewGeometry;
31
- }
32
- export interface ConnectorCreationPreview extends ConnectorInteractionPreviewBase {
33
- kind: "create";
34
- origin: "canvas" | "port";
35
- invalidReason: ConnectorCreationInvalidReason | null;
36
- }
37
- export interface ConnectorRebindPreview extends ConnectorInteractionPreviewBase {
38
- kind: "rebind";
39
- }
40
- export type ConnectorInteractionPreview = ConnectorCreationPreview | ConnectorRebindPreview;
41
- export interface ConnectorPointerSession {
42
- pointerId: number;
43
- originScreenPoint: Vec;
44
- readonly preview: ConnectorCreationPreview;
45
- update(screenPoint: Vec, pagePoint: Vec, accelKey: boolean): void;
46
- complete(screenPoint: Vec, pagePoint: Vec, accelKey: boolean): void;
47
- cancel(reason?: CancelEditorEvent["reason"]): void;
48
- }
49
- export interface ConnectorRuntime {
50
- readonly previewSignal: Signal<ConnectorInteractionPreview | null>;
51
- readonly quickCreateNodeFactory: ConnectorQuickCreateNodeFactory;
52
- readonly selectionHandlesHiddenSignal: Signal<boolean>;
53
- readonly pointerSession: ConnectorPointerSession | null;
54
- setPointerSession(session: ConnectorPointerSession | null): void;
55
- setPreview(preview: ConnectorInteractionPreview | null): void;
56
- setSelectionHandlesHidden(hidden: boolean): void;
57
- dispose(): void;
58
- }
59
- export declare const connectorRuntimeToken: import("../canvas-core/index").EditorRuntimeToken<ConnectorRuntime>;
60
- export declare function createConnectorRuntime(editor: Editor, quickCreateNodeFactory: ConnectorQuickCreateNodeFactory): ConnectorRuntime;
61
- export declare function getConnectorRuntime(editor: Editor): ConnectorRuntime;
62
- export {};
@@ -1,29 +0,0 @@
1
- import { Box, ShapeUtil, Vec, type ShapeBrushWrapInput, type ShapeGeometryInput, type ShapeLineSegmentHitTestInput, type ShapeLabelPathGeometry, type ShapePointHitTestInput, type ShapeSelectionFrameInput, type ShapeSelectionHandleAnchorInput, type ShapeSelectionHandleAnchors, type ShapeSelectionOverlayInfo, type ShapeSelectionOverlayInfoInput, type ShapeSelectionResizeInput, type ShapeSelectionTransformCapabilityInput, type ShapeUpdate } from "../canvas-core/index";
2
- import type { ConnectorShapeProps, ConnectorShapeRecord } from "./types";
3
- export declare class ConnectorShapeUtil extends ShapeUtil<ConnectorShapeRecord> {
4
- readonly type: "connector";
5
- getDefaultProps(): ConnectorShapeProps;
6
- validateProps(props: unknown): ConnectorShapeProps;
7
- getLocalBounds(shape: ConnectorShapeRecord): Box;
8
- getPointHitTestBounds(shape: ConnectorShapeRecord, input?: ShapeGeometryInput): Box;
9
- canSnap(): boolean;
10
- canParticipateInSelectionResize(_shape: ConnectorShapeRecord, input: ShapeSelectionTransformCapabilityInput): boolean;
11
- resizeSelectionBounds(shape: ConnectorShapeRecord, input: ShapeSelectionResizeInput): ShapeUpdate;
12
- canParticipateInSelectionFlip(): boolean;
13
- canParticipateInSelectionRotation(): boolean;
14
- canParticipateInSelectionTranslation(): boolean;
15
- contributesToSelectionFrame(_shape: ConnectorShapeRecord, _input: ShapeSelectionFrameInput): boolean;
16
- canUseSelectionResizeHandles(_shape: ConnectorShapeRecord, input: ShapeSelectionFrameInput): boolean;
17
- canUseSelectionRotateHandle(_shape: ConnectorShapeRecord, input: ShapeSelectionFrameInput): boolean;
18
- canStartTranslateFromSelectionBounds(_shape: ConnectorShapeRecord, input: ShapeSelectionFrameInput): boolean;
19
- getSelectionHandleAnchors(shape: ConnectorShapeRecord, input: ShapeSelectionHandleAnchorInput): ShapeSelectionHandleAnchors;
20
- getSelectionOverlayInfo(shape: ConnectorShapeRecord, input: ShapeSelectionOverlayInfoInput): ShapeSelectionOverlayInfo;
21
- getLabelPathGeometry(shape: ConnectorShapeRecord, input: ShapeSelectionOverlayInfoInput): ShapeLabelPathGeometry;
22
- canCopyToClipboard(shape: ConnectorShapeRecord, input: {
23
- editor: ShapeSelectionOverlayInfoInput["editor"];
24
- copiedShapeIds: ReadonlySet<ConnectorShapeRecord["id"]>;
25
- }): boolean;
26
- isWrappedByBrush(shape: ConnectorShapeRecord, input: ShapeBrushWrapInput): boolean;
27
- hitTest(shape: ConnectorShapeRecord, point: Vec, input?: ShapePointHitTestInput): boolean;
28
- hitTestLineSegment(shape: ConnectorShapeRecord, input: ShapeLineSegmentHitTestInput): boolean;
29
- }
@@ -1,4 +0,0 @@
1
- import { StateNode, type Editor } from "../canvas-core/index";
2
- export declare class ConnectorTool extends StateNode {
3
- constructor(editor: Editor);
4
- }
@@ -1,17 +0,0 @@
1
- export declare const CONNECTOR_ORTHOGONAL_STUB_PAGE = 36;
2
- export declare const CONNECTOR_ORTHOGONAL_OBSTACLE_CLEARANCE_PAGE = 36;
3
- export declare const CONNECTOR_PORT_VISUAL_RADIUS_SCREEN = 4;
4
- export declare const CONNECTOR_PORT_HOVER_RADIUS_SCREEN = 12;
5
- export declare const CONNECTOR_PORT_HOVER_GAP_SCREEN = 8;
6
- export declare const CONNECTOR_PORT_HOVER_ICON_SCREEN = 15;
7
- export declare const CONNECTOR_PORT_HIT_RADIUS_SCREEN = 12;
8
- export declare const CONNECTOR_PORT_VISUAL_OFFSET_SCREEN: number;
9
- export declare const CONNECTOR_LINE_HIT_RADIUS_SCREEN = 12;
10
- export declare const CONNECTOR_CLICK_DRAG_THRESHOLD_SCREEN = 4;
11
- export declare const CONNECTOR_ORTHOGONAL_TERMINAL_SNAP_SCREEN = 8;
12
- export declare const CONNECTOR_ORTHOGONAL_SEGMENT_SNAP_SCREEN = 8;
13
- export declare const CONNECTOR_QUICK_CONNECT_DISTANCE_PAGE = 320;
14
- export declare const CONNECTOR_QUICK_CONNECT_CROSS_AXIS_PAGE = 160;
15
- export declare const CONNECTOR_QUICK_CREATE_GAP_PAGE = 96;
16
- export declare const CONNECTOR_QUICK_CREATE_CROSS_GAP_PAGE = 48;
17
- export declare const CONNECTOR_DASH_ARRAY = "8 6";
@@ -1,7 +0,0 @@
1
- import { type EditorPlugin, type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
2
- import type { ConnectorQuickCreateNodeFactory, ConnectorShapeRecord } from "./types";
3
- export declare class ConnectorShapeSvgExporter implements ShapeSvgExporter<ConnectorShapeRecord> {
4
- readonly type: "connector";
5
- toSvg(shape: ConnectorShapeRecord, context: SvgExportContext): SvgNode;
6
- }
7
- export declare function createConnectorEditorPlugin(quickCreateNodeFactory: ConnectorQuickCreateNodeFactory): EditorPlugin;
@@ -1,4 +0,0 @@
1
- import { setupConnectorProduct } from "./productRuntime";
2
- import type { ConnectorPluginOptions } from "./types";
3
- export declare function createConnectorPlugin(options?: ConnectorPluginOptions): import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupConnectorProduct>;
4
- export declare const Connector: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupConnectorProduct>;
@@ -1,18 +0,0 @@
1
- export { Connector, createConnectorPlugin } from "./feature";
2
- export { ConnectorShapeUtil } from "./connectorShapeUtil";
3
- export { ConnectorBindingUtil } from "./connectorBindingUtil";
4
- export { ConnectorTool } from "./connectorTool";
5
- export { ConnectorShapeSvgExporter, createConnectorEditorPlugin, } from "./editorRuntime";
6
- export { setupConnectorProduct } from "./productRuntime";
7
- export { createConnectorCanvasRenderPlugin } from "./canvasRender";
8
- export { createConnectorTerminalOffsetMapper, getConnectorSegmentPoint, getConnectorInfo, getResolvedConnectorLocalInfo, getResolvedConnectorPageInfo, } from "./connectorGeometry";
9
- export * from "./connectorHandles";
10
- export type { ConnectorInfo, ConnectorSegment, ConnectorTerminalOffsetInput, ConnectorTerminalOffsetMapper, ConnectorTerminalGeometry, } from "./connectorGeometry";
11
- export { CONNECTOR_ARROW_TERMINAL_PADDING, getConnectorArrowGlyphLength, getConnectorArrowLength, getConnectorArrowMagnification, getConnectorMarkerPath, getConnectorMarkerRefX, } from "./connectorMarker";
12
- export { commitConnectorCreation, createConnectorBoundEndpoint, getConnectorCreationInvalidReason, getConnectorParentId, resolveConnectorDraftEndpoint, resolveConnectorDraftParentId, hasDirectedConnector, setConnectorTerminalPagePoint, } from "./connectorModel";
13
- export type { CommitConnectorCreationInput, ConnectorBoundEndpoint, ConnectorCreationInvalidReason, ConnectorDraftEndpoint, ResolvedConnectorDraftEndpoint, } from "./connectorModel";
14
- export { chooseFacingPort, createDefaultConnectorQuickCreateNodeFactory, findQuickConnectTargets, getConnectorVisualPortPoint, getNearestConnectorPortAtPoint, quickConnectFromPort, } from "./quickConnect";
15
- export { getConnectorPortInteractionState, getVisibleConnectorSourcePortAtPoint, } from "./connectorPortInteraction";
16
- export * from "./constants";
17
- export type { ConnectorBindingProps, ConnectorBindingRecord, ConnectorHead, ConnectorPluginOptions, ConnectorPoint, ConnectorQuickCreateNodeFactory, ConnectorRouting, ConnectorShapeProps, ConnectorShapeRecord, ConnectorStrokeStyle, ConnectorTerminal, } from "./types";
18
- export { isConnectorBindingRecord, isConnectorShapeRecord, } from "./types";
@@ -1,9 +0,0 @@
1
- import { Box, Vec } from "../canvas-core/index";
2
- interface RouteTerminal {
3
- point: Vec;
4
- direction: Vec;
5
- obstacleId?: string;
6
- obstacleBounds?: Box;
7
- }
8
- export declare function getOrthogonalRoutePoints(start: RouteTerminal, end: RouteTerminal): Vec[];
9
- export {};
@@ -1,2 +0,0 @@
1
- import { type CanvasPluginSetupContext } from "../canvas-plugin-sdk/index";
2
- export declare function setupConnectorProduct(context: CanvasPluginSetupContext): void;
@@ -1,28 +0,0 @@
1
- import { Vec, type CreateShapeInput, type Editor, type ResolvedShapeTerminalBindingPort, type ShapeId, type ShapeRecord } from "../canvas-core/index";
2
- import { type ConnectorQuickCreateNodeFactory, type ConnectorShapeProps } from "./types";
3
- export interface ConnectorPortTarget {
4
- shape: ShapeRecord;
5
- port: ResolvedShapeTerminalBindingPort;
6
- }
7
- export type ConnectorQuickConnectPlan = {
8
- kind: "connect";
9
- target: ConnectorPortTarget;
10
- } | {
11
- kind: "create";
12
- nodeInput: CreateShapeInput;
13
- previewShape: ShapeRecord;
14
- targetPort: ResolvedShapeTerminalBindingPort;
15
- };
16
- export declare function getConnectorVisualPortPoint(port: ResolvedShapeTerminalBindingPort, zoom: number): Vec;
17
- export declare function getConnectorPortHitDistance(port: ResolvedShapeTerminalBindingPort, pagePoint: Vec, zoom: number): number;
18
- export declare function getNearestConnectorPortAtPoint(editor: Editor, pagePoint: Vec, options?: {
19
- allowInteriorShapeId?: ShapeId;
20
- excludeShapeIds?: ReadonlySet<ShapeId>;
21
- mode?: "source" | "target";
22
- pageId?: ReturnType<Editor["getShapePageId"]>;
23
- }): ConnectorPortTarget | null;
24
- export declare function quickConnectFromPort(editor: Editor, source: ConnectorPortTarget, factory: ConnectorQuickCreateNodeFactory, props: ConnectorShapeProps): boolean;
25
- export declare function getConnectorQuickConnectPlan(editor: Editor, source: ConnectorPortTarget, factory: ConnectorQuickCreateNodeFactory): ConnectorQuickConnectPlan | null;
26
- export declare function findQuickConnectTargets(editor: Editor, source: ConnectorPortTarget): ConnectorPortTarget[];
27
- export declare function chooseFacingPort(editor: Editor, shape: ShapeRecord, sourcePagePoint: Vec): ResolvedShapeTerminalBindingPort | null;
28
- export declare function createDefaultConnectorQuickCreateNodeFactory(): ConnectorQuickCreateNodeFactory;
@@ -1,51 +0,0 @@
1
- import { type BaseRecord, type BindingRecordBase, type CreateShapeInput, type Editor, type ShapeColor, type ShapeParentId, type ShapeRecord, type ShapeRecordBase, type Vec } from "../canvas-core/index";
2
- export interface ConnectorPoint {
3
- x: number;
4
- y: number;
5
- }
6
- export type ConnectorTerminal = "start" | "end";
7
- export type ConnectorRouting = "straight" | "orthogonal" | "curved";
8
- export type ConnectorStrokeStyle = "solid" | "dashed";
9
- export type ConnectorHead = "none" | "arrow";
10
- export interface ConnectorShapeProps {
11
- w: number;
12
- h: number;
13
- start: ConnectorPoint;
14
- end: ConnectorPoint;
15
- routing: ConnectorRouting;
16
- stroke: ShapeColor;
17
- strokeWidth: number;
18
- strokeStyle: ConnectorStrokeStyle;
19
- headStart: ConnectorHead;
20
- headEnd: ConnectorHead;
21
- cornerRadius: number;
22
- curveWaypoints: ConnectorPoint[];
23
- orthogonalBends: ConnectorPoint[];
24
- }
25
- export interface ConnectorShapeRecord extends ShapeRecordBase<"connector", ConnectorShapeProps> {
26
- type: "connector";
27
- props: ConnectorShapeProps;
28
- }
29
- export interface ConnectorBindingProps {
30
- terminal: ConnectorTerminal;
31
- portId: string;
32
- normalizedAnchor?: ConnectorPoint;
33
- }
34
- export interface ConnectorBindingRecord extends BindingRecordBase<"connector", ConnectorBindingProps> {
35
- type: "connector";
36
- props: ConnectorBindingProps;
37
- }
38
- export interface ConnectorQuickCreateNodeFactory {
39
- createNode(input: {
40
- editor: Editor;
41
- sourceShape: ShapeRecord;
42
- sourcePortId: string;
43
- pageCenter: Vec;
44
- parentId: ShapeParentId;
45
- }): CreateShapeInput;
46
- }
47
- export interface ConnectorPluginOptions {
48
- quickCreateNodeFactory?: ConnectorQuickCreateNodeFactory;
49
- }
50
- export declare function isConnectorShapeRecord(record: BaseRecord | null | undefined): record is ConnectorShapeRecord;
51
- export declare function isConnectorBindingRecord(record: BaseRecord | null | undefined): record is ConnectorBindingRecord;
@@ -1,74 +0,0 @@
1
- import { type PageId, type ShapeColor, type ShapeId } from "../canvas-core/index";
2
- import { type CanvasPluginApi, type CanvasShapeRef } from "../canvas-plugin-sdk/index";
3
- import { type PackagingPdfExportOptions, type PackagingPdfExportResult } from "./packagingPdfExporter";
4
- import { type PackagingDxfImportOptions } from "./packagingDxf";
5
- import type { PackagingDocument, PackagingSurfaceSide } from "./types";
6
- export interface PackagingInput {
7
- x: number;
8
- y: number;
9
- document: PackagingDocument;
10
- viewSide?: PackagingSurfaceSide;
11
- faceFill?: ShapeColor;
12
- faceFillOverrides?: Record<string, ShapeColor>;
13
- showBleed?: boolean;
14
- clipToBleed?: boolean;
15
- dielineOnTop?: boolean;
16
- showSafeZones?: boolean;
17
- showCanvasBoundsMarks?: boolean;
18
- meta?: Record<string, unknown>;
19
- }
20
- export interface PackagingDxfImportInput {
21
- source: string;
22
- fileName?: string;
23
- pagePoint?: {
24
- x: number;
25
- y: number;
26
- };
27
- options?: Omit<PackagingDxfImportOptions, "fileName">;
28
- }
29
- export interface PackagingApi {
30
- create(input: PackagingInput): CanvasShapeRef<"packaging"> | null;
31
- importDxf(input: PackagingDxfImportInput): CanvasShapeRef<"packaging"> | null;
32
- updateDocument(input: {
33
- packagingId: ShapeId;
34
- document: PackagingDocument;
35
- expectedRevision?: string;
36
- }): CanvasShapeRef<"packaging"> | null;
37
- getDocument(packagingId: ShapeId): PackagingDocument | null;
38
- exportPdf(input: {
39
- packagingId: ShapeId;
40
- options?: PackagingPdfExportOptions;
41
- }): Promise<PackagingPdfExportResult | null>;
42
- attachShapes(input: {
43
- packagingId: ShapeId;
44
- shapeIds: ShapeId[];
45
- }): ShapeId[];
46
- detachShapes(input: {
47
- packagingId: ShapeId;
48
- shapeIds: ShapeId[];
49
- destinationPageId?: PageId;
50
- }): ShapeId[];
51
- hitTestFace(input: {
52
- packagingId: ShapeId;
53
- pagePoint: {
54
- x: number;
55
- y: number;
56
- };
57
- }): {
58
- faceId: string;
59
- localPoint: {
60
- x: number;
61
- y: number;
62
- };
63
- faceUv: {
64
- x: number;
65
- y: number;
66
- } | null;
67
- } | null;
68
- getCoveredFaces(input: {
69
- packagingId: ShapeId;
70
- shapeId: ShapeId;
71
- }): string[];
72
- }
73
- export declare const packagingApiToken: import("../canvas-plugin-sdk/index").ProductApiToken<PackagingApi>;
74
- export declare const packagingPluginApi: CanvasPluginApi<PackagingApi>;
@@ -1,2 +0,0 @@
1
- import type { CanvasRenderPlugin } from "../canvas-react/host/index";
2
- export declare function createPackagingCanvasRenderPlugin(): CanvasRenderPlugin;
@@ -1,2 +0,0 @@
1
- import type { EditorPlugin } from "../canvas-core/index";
2
- export declare function createPackagingEditorPlugin(): EditorPlugin;
@@ -1,2 +0,0 @@
1
- import { setupPackagingProduct } from "./productRuntime";
2
- export declare const Packaging: import("../canvas-plugin-sdk/index").CanvasPlugin<typeof setupPackagingProduct>;
@@ -1,19 +0,0 @@
1
- export { createPackagingCanvasRenderPlugin } from "./canvasRender";
2
- export { createPackagingEditorPlugin } from "./editorRuntime";
3
- export { Packaging } from "./feature";
4
- export { packagingApiToken } from "./api";
5
- export type { PackagingApi, PackagingDxfImportInput, PackagingInput, } from "./api";
6
- export { getPackagingArtworkPlacementMeta, getPackagingArtworkSide, PACKAGING_ARTWORK_SIDE_META_KEY, } from "./packagingArtwork";
7
- export { applyAffine2d, compilePackagingContour, compilePackagingGeometry, doesPackagingSegmentHitFace, getCompiledPackagingGeometry, getCoveredPackagingFaceIds, getPackagingFaceUv, getPackagingCanvasBoundsMarkPaths, getPackagingStrokeDasharray, hitTestPackagingFace, invertAffine2d, isPointInPackagingFace, } from "./packagingGeometry";
8
- export type { CompiledPackagingEdge, CompiledPackagingFace, CompiledPackagingContour, CompiledPackagingGeometry, PackagingMultiPolygon, PackagingPolygon, PackagingRing, PackagingSpatialIndex, } from "./packagingGeometry";
9
- export { getPackagingRuntime, packagingRuntimeToken } from "./packagingRuntime";
10
- export type { PackagingRuntime } from "./packagingRuntime";
11
- export { getPackagingFaceFill, getPackagingVisualBounds, PackagingShapeUtil, } from "./packagingShapeUtil";
12
- export { PackagingShapeSvgExporter } from "./packagingSvgExporter";
13
- export { parsePackagingDxf } from "./packagingDxf";
14
- export type { PackagingDxfImportOptions } from "./packagingDxf";
15
- export { exportPackagingPdf, getPackagingPointsPerUnit, } from "./packagingPdfExporter";
16
- export type { PackagingPdfExportOptions, PackagingPdfExportResult, } from "./packagingPdfExporter";
17
- export { setupPackagingProduct } from "./productRuntime";
18
- export { clonePackagingDocument, parsePackagingDocument, } from "./validation";
19
- export type { Affine2d, PackagingBleedContour, PackagingClosedContour, PackagingContourSegment, PackagingCoordinate, PackagingCoordinateSystem, PackagingDirectedEdgeRef, PackagingDocument, PackagingEdge, PackagingEdgeGeometry, PackagingEdgeOperation, PackagingFace, PackagingHoverState, PackagingLoop, PackagingPoint, PackagingPrepress, PackagingSafeZone, PackagingShapeProps, PackagingShapeRecord, PackagingSurface, PackagingSurfaceSide, PackagingSurfaces, PackagingUnit, } from "./types";
@@ -1,5 +0,0 @@
1
- import type { ShapeRecordBase } from "../canvas-core/index";
2
- import type { PackagingSurfaceSide } from "./types";
3
- export declare const PACKAGING_ARTWORK_SIDE_META_KEY = "land.packaging.artworkSide";
4
- export declare function getPackagingArtworkSide(shape: ShapeRecordBase): PackagingSurfaceSide | null;
5
- export declare function getPackagingArtworkPlacementMeta(shape: ShapeRecordBase, side: PackagingSurfaceSide): Record<string, unknown>;
@@ -1,9 +0,0 @@
1
- import type { PackagingDocument, PackagingEdgeOperation } from "./types";
2
- export interface PackagingDxfImportOptions {
3
- fileName?: string;
4
- documentId?: string;
5
- revision?: string;
6
- defaultOperation?: PackagingEdgeOperation;
7
- operationByLayer?: Readonly<Record<string, PackagingEdgeOperation>>;
8
- }
9
- export declare function parsePackagingDxf(source: string, options?: PackagingDxfImportOptions): PackagingDocument;
@@ -1,74 +0,0 @@
1
- import { Box, Vec, type ShapeSnapPoint } from "../canvas-core/index";
2
- import type { Affine2d, PackagingBleedContour, PackagingClosedContour, PackagingDocument, PackagingEdge, PackagingFace, PackagingLoop, PackagingSafeZone, PackagingSurfaceSide } from "./types";
3
- export type PackagingRing = readonly Vec[];
4
- export type PackagingPolygon = readonly PackagingRing[];
5
- export type PackagingMultiPolygon = readonly PackagingPolygon[];
6
- export interface CompiledPackagingEdge {
7
- edge: PackagingEdge;
8
- from: Vec;
9
- to: Vec;
10
- path: string;
11
- bounds: Box;
12
- midpoint: Vec;
13
- extrema: readonly Vec[];
14
- samples: readonly Vec[];
15
- pointAt(t: number): Vec;
16
- }
17
- export interface CompiledPackagingFace {
18
- face: PackagingFace;
19
- bounds: Box;
20
- center: Vec;
21
- outerPath: string;
22
- holePaths: readonly string[];
23
- outer: PackagingRing;
24
- holes: readonly PackagingRing[];
25
- outerEdges: readonly CompiledPackagingEdge[];
26
- holeEdges: readonly (readonly CompiledPackagingEdge[])[];
27
- }
28
- export interface CompiledPackagingContour<TSource = unknown> {
29
- source: TSource;
30
- path: string;
31
- samples: readonly Vec[];
32
- bounds: Box;
33
- }
34
- export interface PackagingSpatialIndex {
35
- searchPoint(point: Vec): string[];
36
- searchBounds(bounds: Box): string[];
37
- }
38
- export interface CompiledPackagingGeometry {
39
- bounds: Box;
40
- outerBounds: Box;
41
- dielineBounds: Box | null;
42
- pointsById: Map<string, Vec>;
43
- edgesById: Map<string, CompiledPackagingEdge>;
44
- facesById: Map<string, CompiledPackagingFace>;
45
- facePaths: Map<string, string>;
46
- facePolygons: Map<string, PackagingMultiPolygon>;
47
- holePaths: Map<string, string[]>;
48
- edgePaths: Map<string, string>;
49
- faceCenters: Map<string, Vec>;
50
- snapPoints: ShapeSnapPoint[];
51
- spatialIndex: PackagingSpatialIndex;
52
- holeEdgeIds: ReadonlySet<string>;
53
- bleedContoursById: Map<string, CompiledPackagingContour<PackagingBleedContour>>;
54
- safeZonesById: Map<string, CompiledPackagingContour<PackagingSafeZone>>;
55
- }
56
- export declare const PACKAGING_SAFE_ZONE_STROKE_DASHARRAY = "1 3";
57
- export declare function getCompiledPackagingGeometry(document: PackagingDocument, side: PackagingSurfaceSide): CompiledPackagingGeometry;
58
- export declare function compilePackagingGeometry(document: PackagingDocument, side: PackagingSurfaceSide): CompiledPackagingGeometry;
59
- export declare function compilePackagingContour(contour: PackagingClosedContour): CompiledPackagingContour<PackagingClosedContour>;
60
- export declare function compilePackagingContour<TSource>(contour: PackagingClosedContour, source: TSource): CompiledPackagingContour<TSource>;
61
- export declare function flattenPackagingLoop(loop: PackagingLoop, edgesById: ReadonlyMap<string, CompiledPackagingEdge>): Vec[];
62
- export declare function getPackagingLoopPath(loop: PackagingLoop, edgesById: ReadonlyMap<string, CompiledPackagingEdge>): string;
63
- export declare function hitTestPackagingFace(geometry: CompiledPackagingGeometry, localPoint: Vec): CompiledPackagingFace | null;
64
- export declare function isPointInPackagingFace(point: Vec, face: Pick<CompiledPackagingFace, "outer" | "holes">): boolean;
65
- export declare function getPackagingFaceUv(face: PackagingFace, localPoint: Vec): Vec | null;
66
- export declare function getCoveredPackagingFaceIds(geometry: CompiledPackagingGeometry, localOutline: readonly Vec[]): string[];
67
- export declare function doesPackagingSegmentHitFace(geometry: CompiledPackagingGeometry, localStart: Vec, localEnd: Vec, margin?: number): boolean;
68
- export declare function getPackagingCanvasBoundsMarkPaths(bounds: Box | null, layout: {
69
- horizontalLength: number;
70
- verticalLength: number;
71
- }): string[];
72
- export declare function getPackagingStrokeDasharray(operation: PackagingEdge["operation"], lineWidth: number): string;
73
- export declare function applyAffine2d(matrix: Affine2d, point: Vec): Vec;
74
- export declare function invertAffine2d(matrix: Affine2d): Affine2d | null;
@@ -1,2 +0,0 @@
1
- import { type LandInteractionHandler } from "../canvas-core/index";
2
- export declare function createPackagingInteractionHandler(): LandInteractionHandler;
@@ -1,25 +0,0 @@
1
- import type { PackagingDocument, PackagingSurfaceSide, PackagingUnit } from "./types";
2
- export interface PackagingPdfExportOptions {
3
- side?: PackagingSurfaceSide;
4
- includeBleed?: boolean;
5
- includeSafeZones?: boolean;
6
- includeAnnotations?: boolean;
7
- mirror?: boolean;
8
- marginInDocumentUnits?: number;
9
- lineWidthPoints?: number;
10
- unitlessPointsPerUnit?: number;
11
- }
12
- export interface PackagingPdfExportResult {
13
- bytes: Uint8Array;
14
- filename: string;
15
- side: PackagingSurfaceSide;
16
- page: {
17
- width: number;
18
- height: number;
19
- unit: PackagingUnit;
20
- widthPoints: number;
21
- heightPoints: number;
22
- };
23
- }
24
- export declare function exportPackagingPdf(input: PackagingDocument, options?: PackagingPdfExportOptions): Promise<PackagingPdfExportResult>;
25
- export declare function getPackagingPointsPerUnit(unit: PackagingUnit, unitlessPointsPerUnit?: number): number;
@@ -1,11 +0,0 @@
1
- import { type Editor } from "../canvas-core/index";
2
- import { type Signal } from "../signals/index";
3
- import type { PackagingHoverState } from "./types";
4
- export interface PackagingRuntime {
5
- readonly hoverSignal: Signal<PackagingHoverState | null>;
6
- setHover(hover: PackagingHoverState | null): void;
7
- clear(): void;
8
- }
9
- export declare const packagingRuntimeToken: import("../canvas-core/index").EditorRuntimeToken<PackagingRuntime>;
10
- export declare function createPackagingRuntime(): PackagingRuntime;
11
- export declare function getPackagingRuntime(editor: Editor): PackagingRuntime;
@@ -1,34 +0,0 @@
1
- import { Box, ShapeUtil, Vec, type ShapeBoundsSnapGeometry, type ShapeBrushSelectInput, type ShapeLineSegmentHitTestInput, type ShapePointHitTestInput, type ShapeRecordBase, type ShapeSelectionResizeInput, type ShapeSelectionResizeModesInput, type ShapeSelectionTransformCapabilityInput, type ShapeUpdate } from "../canvas-core/index";
2
- import { type CompiledPackagingGeometry } from "./packagingGeometry";
3
- import type { PackagingShapeProps, PackagingShapeRecord } from "./types";
4
- export declare class PackagingShapeUtil extends ShapeUtil<PackagingShapeRecord> {
5
- readonly type: "packaging";
6
- getDefaultProps(): PackagingShapeProps;
7
- validateProps(props: unknown): PackagingShapeProps;
8
- getLocalBounds(shape: PackagingShapeRecord): Box;
9
- getRenderBounds(shape: PackagingShapeRecord): Box;
10
- getExportBounds(shape: PackagingShapeRecord): Box;
11
- getChildClipLocalBounds(shape: PackagingShapeRecord): Box | null;
12
- getChildClipLocalPolygons(shape: PackagingShapeRecord): readonly (readonly Vec[])[] | null;
13
- getChildExportClipLocalPolygons(shape: PackagingShapeRecord): readonly (readonly Vec[])[] | null;
14
- getPositionedOutlineVertices(shape: PackagingShapeRecord): Vec[];
15
- getSelectionFramePositionedOutlineVertices(shape: PackagingShapeRecord): Vec[];
16
- getBoundsSnapGeometry(shape: PackagingShapeRecord): ShapeBoundsSnapGeometry;
17
- canReceiveChildren(_shape: PackagingShapeRecord): boolean;
18
- canReceiveChild(_shape: PackagingShapeRecord, child: ShapeRecordBase): boolean;
19
- isChildVisible(shape: PackagingShapeRecord, child: ShapeRecordBase): boolean;
20
- getChildPlacementMeta(shape: PackagingShapeRecord, child: ShapeRecordBase, input: {
21
- reason: "create" | "reparent";
22
- }): Record<string, unknown>;
23
- canSnapChildrenToSelf(_shape: PackagingShapeRecord): boolean;
24
- shouldRotateDescendants(_shape: PackagingShapeRecord): boolean;
25
- getAllowedSelectionResizeModes(_shape: PackagingShapeRecord, _input: ShapeSelectionResizeModesInput): readonly ["aspect_ratio_locked"];
26
- canParticipateInSelectionRotation(_shape: PackagingShapeRecord, _input: ShapeSelectionTransformCapabilityInput): boolean;
27
- resizeSelectionBounds(shape: PackagingShapeRecord, input: ShapeSelectionResizeInput): ShapeUpdate;
28
- canSelectByBrush(shape: PackagingShapeRecord, input: ShapeBrushSelectInput): boolean;
29
- hitTest(shape: PackagingShapeRecord, positionedPoint: Vec, _input?: ShapePointHitTestInput): boolean;
30
- hitTestLineSegment(shape: PackagingShapeRecord, input: ShapeLineSegmentHitTestInput): boolean;
31
- private doesBrushIntersectFace;
32
- }
33
- export declare function getPackagingVisualBounds(shape: PackagingShapeRecord, geometry?: CompiledPackagingGeometry): Box;
34
- export declare function getPackagingFaceFill(shape: PackagingShapeRecord, faceId: string): PackagingShapeProps["faceFill"];
@@ -1,10 +0,0 @@
1
- export declare const PACKAGING_RENDER_STYLE: {
2
- readonly lineWidth: 0.5;
3
- readonly holeFill: import("../canvas-core/index").CustomShapeColorRef;
4
- readonly cutStroke: import("../canvas-core/index").CustomShapeColorRef;
5
- readonly creaseStroke: import("../canvas-core/index").CustomShapeColorRef;
6
- readonly bleedStroke: import("../canvas-core/index").CustomShapeColorRef;
7
- readonly safeZoneStroke: import("../canvas-core/index").CustomShapeColorRef;
8
- readonly annotationStroke: import("../canvas-core/index").CustomShapeColorRef;
9
- readonly canvasBoundsMarkColor: import("../canvas-core/index").CustomShapeColorRef;
10
- };
@@ -1,7 +0,0 @@
1
- import { type ShapeSvgExporter, type SvgExportContext, type SvgNode } from "../canvas-core/index";
2
- import type { PackagingShapeRecord } from "./types";
3
- export declare class PackagingShapeSvgExporter implements ShapeSvgExporter<PackagingShapeRecord> {
4
- readonly type: "packaging";
5
- toSvg(shape: PackagingShapeRecord, context: SvgExportContext): SvgNode;
6
- toSvgForeground(shape: PackagingShapeRecord, context: SvgExportContext): SvgNode;
7
- }
@@ -1,2 +0,0 @@
1
- import { type CanvasPluginSetupContext } from "../canvas-plugin-sdk/index";
2
- export declare function setupPackagingProduct(context: CanvasPluginSetupContext): void;