@yuzhouu/canvas-kit 0.1.11 → 0.1.12
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 +20 -12
- package/_vendor/canvas-plugin-sdk/capability.d.ts +0 -6
- package/_vendor/canvas-plugin-sdk/index.d.ts +1 -16
- package/_vendor/canvas-plugin-sdk/plugin.d.ts +5 -52
- package/_vendor/canvas-plugin-sdk/setupExtension.d.ts +5 -0
- package/_vendor/canvas-product-contracts/actionRegistry.d.ts +4 -0
- package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/actions.d.ts +10 -16
- package/_vendor/canvas-product-contracts/capability.d.ts +8 -0
- package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/chrome.d.ts +1 -0
- package/_vendor/canvas-product-contracts/chromeRegistry.d.ts +9 -0
- package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/contextMenu.d.ts +4 -0
- package/_vendor/canvas-product-contracts/contextMenuRegistry.d.ts +4 -0
- package/_vendor/canvas-product-contracts/exportRegistry.d.ts +6 -0
- package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/exports.d.ts +1 -0
- package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/importRegistry.d.ts +1 -4
- package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/imports.d.ts +1 -0
- package/_vendor/canvas-product-contracts/index.d.ts +15 -0
- package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/productApi.d.ts +6 -5
- package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/services.d.ts +2 -1
- package/_vendor/{canvas-plugin-sdk → canvas-product-contracts}/toolbar.d.ts +3 -6
- package/_vendor/canvas-product-contracts/toolbarRegistry.d.ts +9 -0
- package/_vendor/plugin-arrow/api.d.ts +2 -2
- package/_vendor/plugin-frame/api.d.ts +2 -2
- package/_vendor/plugin-geo/api.d.ts +2 -2
- package/_vendor/plugin-group/groupContributions.d.ts +1 -1
- package/_vendor/plugin-group/productRuntime.d.ts +1 -1
- package/_vendor/plugin-image/cropRuntime.d.ts +1 -1
- package/_vendor/plugin-image/imageHostActionContract.d.ts +1 -1
- package/_vendor/plugin-image/productRuntime.d.ts +1 -1
- package/_vendor/plugin-image/runtimeShared.d.ts +1 -1
- package/_vendor/plugin-image/smudgeRuntime.d.ts +1 -1
- package/_vendor/plugin-image/styleRuntime.d.ts +1 -1
- package/_vendor/plugin-image/toolbarRuntime.d.ts +1 -1
- package/_vendor/plugin-runtime-clipboard/capability.d.ts +1 -0
- package/_vendor/{plugin-builtin-clipboard/clipboardContribution.d.ts → plugin-runtime-clipboard/clipboardActions.d.ts} +1 -6
- package/_vendor/{plugin-builtin-clipboard → plugin-runtime-clipboard}/clipboardService.d.ts +2 -2
- package/_vendor/plugin-runtime-clipboard/index.d.ts +4 -0
- package/_vendor/plugin-runtime-clipboard/plugin.d.ts +1 -0
- package/_vendor/{plugin-builtin-export → plugin-runtime-export}/canvasExportApi.d.ts +2 -2
- package/_vendor/{plugin-builtin-export → plugin-runtime-export}/index.d.ts +1 -1
- package/_vendor/{plugin-builtin-export → plugin-runtime-export}/plugin.d.ts +1 -1
- package/_vendor/plugin-text/api.d.ts +2 -2
- package/_vendor/plugin-text/feature.d.ts +1 -1
- package/chrome/toolbar/FloatingSelectionToolbarPageSpace.d.ts +1 -1
- package/chrome/toolbar/mergeToolbarGroups.d.ts +8 -0
- package/chrome/toolbar/toolbarLabels.d.ts +1 -1
- package/chrome/toolbar/useToolbarSurfaces.d.ts +1 -1
- package/chrome/types.d.ts +3 -3
- package/chrome/useCanvasKitChromeContext.d.ts +1 -1
- package/chrome/useChromeSurfaces.d.ts +1 -1
- package/chrome/useContextMenuSurface.d.ts +1 -1
- package/core/product-controller/canvasProductController.d.ts +1 -1
- package/core/runtime/productServices.d.ts +1 -1
- package/features/context-menu/contextMenuRuntime.d.ts +1 -1
- package/features/image/asset/imageAssetService.d.ts +1 -1
- package/features/image/asset/imageBlobStore.d.ts +1 -1
- package/features/image/asset/svgImageAssetInliner.d.ts +1 -1
- package/features/image/controller/imageProductController.d.ts +1 -1
- package/features/image/import/ImageImportController.d.ts +1 -1
- package/features/image/toolbar/imageHostActions.d.ts +1 -1
- package/features/image/toolbar/imageToolbarHostBridge.d.ts +1 -1
- package/features/text/textSvgAssetInliner.d.ts +1 -1
- package/index.d.ts +16 -14
- package/index.mjs +88 -111
- package/package.json +2 -2
- package/{_vendor/plugin-builtin-import-host → plugins/runtime/import-host}/CanvasImportHost.d.ts +2 -1
- package/plugins/runtime/import-host/capability.d.ts +1 -0
- package/plugins/runtime/import-host/plugin.d.ts +1 -0
- package/plugins/runtime/keyboard-shortcuts/index.d.ts +1 -0
- package/plugins/runtime/keyboard-shortcuts/plugin.d.ts +1 -0
- package/plugins/runtime/keyboard-shortcuts/useCanvasKeyboardShortcuts.d.ts +8 -0
- package/plugins/runtime/tool-actions/capability.d.ts +1 -0
- package/{_vendor/plugin-builtin-tool-actions → plugins/runtime/tool-actions}/index.d.ts +1 -1
- package/plugins/runtime/tool-actions/plugin.d.ts +1 -0
- package/plugins/runtime/tool-actions/toolActions.d.ts +2 -0
- package/plugins/standard/clipboard/chrome.d.ts +2 -0
- package/plugins/standard/clipboard/contextMenu.d.ts +2 -0
- package/plugins/standard/clipboard/plugin.d.ts +1 -0
- package/plugins/standard/clipboard/shortcuts.d.ts +5 -0
- package/plugins/{standardCanvasKitPlugins.d.ts → standard/createStandardCanvasKitPlugins.d.ts} +2 -3
- package/plugins/standard/selection/actions.d.ts +21 -0
- package/plugins/standard/selection/chrome.d.ts +2 -0
- package/plugins/standard/selection/contextMenu.d.ts +2 -0
- package/plugins/standard/selection/plugin.d.ts +1 -0
- package/plugins/standard/selection/toolbar.d.ts +2 -0
- package/plugins/standard/tool-ui/contextMenu.d.ts +2 -0
- package/plugins/standard/tool-ui/plugin.d.ts +1 -0
- package/plugins/standard/tool-ui/toolbar.d.ts +2 -0
- package/plugins/standard/view/actions.d.ts +5 -0
- package/plugins/standard/view/chrome.d.ts +2 -0
- package/plugins/standard/view/contextMenu.d.ts +2 -0
- package/plugins/standard/view/plugin.d.ts +1 -0
- package/runtime/canvasKitActionContext.d.ts +17 -0
- package/runtime/canvasKitCommandExecutor.d.ts +1 -1
- package/runtime/canvasKitPluginContracts.d.ts +13 -15
- package/{_vendor/canvas-plugin-sdk/lifecycle.d.ts → runtime/canvasKitPluginLifecycle.d.ts} +4 -3
- package/runtime/canvasKitPluginSetup.d.ts +4 -2
- package/{_vendor/canvas-plugin-sdk/pluginUi.d.ts → runtime/canvasKitPluginUi.d.ts} +3 -5
- package/runtime/canvasKitRuntime.d.ts +1 -1
- package/runtime/canvasKitRuntimeContracts.d.ts +1 -1
- package/runtime/canvasPluginGraph.d.ts +15 -0
- package/runtime/registries/actionRegistry.d.ts +5 -0
- package/runtime/registries/chromeRegistry.d.ts +2 -0
- package/runtime/registries/contextMenuRegistry.d.ts +5 -0
- package/runtime/registries/exportRegistry.d.ts +2 -0
- package/runtime/registries/importRegistry.d.ts +2 -0
- package/runtime/registries/index.d.ts +7 -0
- package/runtime/registries/productApiRegistry.d.ts +5 -0
- package/runtime/registries/toolbarRegistry.d.ts +5 -0
- package/_vendor/canvas-plugin-sdk/actionRegistry.d.ts +0 -7
- package/_vendor/canvas-plugin-sdk/chromeRegistry.d.ts +0 -15
- package/_vendor/canvas-plugin-sdk/contextMenuRegistry.d.ts +0 -11
- package/_vendor/canvas-plugin-sdk/exportRegistry.d.ts +0 -9
- package/_vendor/canvas-plugin-sdk/toolbarRegistry.d.ts +0 -18
- package/_vendor/plugin-builtin-clipboard/clipboardChromeContributions.d.ts +0 -2
- package/_vendor/plugin-builtin-clipboard/clipboardContextMenuContributions.d.ts +0 -2
- package/_vendor/plugin-builtin-clipboard/index.d.ts +0 -3
- package/_vendor/plugin-builtin-clipboard/plugin.d.ts +0 -1
- package/_vendor/plugin-builtin-import-host/capability.d.ts +0 -1
- package/_vendor/plugin-builtin-import-host/plugin.d.ts +0 -1
- package/_vendor/plugin-builtin-tool-actions/capability.d.ts +0 -1
- package/_vendor/plugin-builtin-tool-actions/plugin.d.ts +0 -1
- package/_vendor/plugin-builtin-tool-actions/toolActions.d.ts +0 -2
- package/_vendor/plugin-connector/canvasRender.d.ts +0 -2
- package/_vendor/plugin-connector/connectorBindingUtil.d.ts +0 -28
- package/_vendor/plugin-connector/connectorBindings.d.ts +0 -8
- package/_vendor/plugin-connector/connectorGeometry.d.ts +0 -70
- package/_vendor/plugin-connector/connectorHandles.d.ts +0 -12
- package/_vendor/plugin-connector/connectorInteractions.d.ts +0 -3
- package/_vendor/plugin-connector/connectorMarker.d.ts +0 -7
- package/_vendor/plugin-connector/connectorModel.d.ts +0 -43
- package/_vendor/plugin-connector/connectorPortInteraction.d.ts +0 -13
- package/_vendor/plugin-connector/connectorPorts.d.ts +0 -23
- package/_vendor/plugin-connector/connectorRuntime.d.ts +0 -62
- package/_vendor/plugin-connector/connectorShapeUtil.d.ts +0 -29
- package/_vendor/plugin-connector/connectorTool.d.ts +0 -4
- package/_vendor/plugin-connector/constants.d.ts +0 -17
- package/_vendor/plugin-connector/editorRuntime.d.ts +0 -7
- package/_vendor/plugin-connector/feature.d.ts +0 -4
- package/_vendor/plugin-connector/index.d.ts +0 -18
- package/_vendor/plugin-connector/orthogonalRoute.d.ts +0 -9
- package/_vendor/plugin-connector/productRuntime.d.ts +0 -2
- package/_vendor/plugin-connector/quickConnect.d.ts +0 -28
- package/_vendor/plugin-connector/types.d.ts +0 -51
- package/_vendor/plugin-packaging/api.d.ts +0 -74
- package/_vendor/plugin-packaging/canvasRender.d.ts +0 -2
- package/_vendor/plugin-packaging/editorRuntime.d.ts +0 -2
- package/_vendor/plugin-packaging/feature.d.ts +0 -2
- package/_vendor/plugin-packaging/index.d.ts +0 -19
- package/_vendor/plugin-packaging/packagingArtwork.d.ts +0 -5
- package/_vendor/plugin-packaging/packagingDxf.d.ts +0 -9
- package/_vendor/plugin-packaging/packagingGeometry.d.ts +0 -74
- package/_vendor/plugin-packaging/packagingInteractions.d.ts +0 -2
- package/_vendor/plugin-packaging/packagingPdfExporter.d.ts +0 -25
- package/_vendor/plugin-packaging/packagingRuntime.d.ts +0 -11
- package/_vendor/plugin-packaging/packagingShapeUtil.d.ts +0 -34
- package/_vendor/plugin-packaging/packagingStyle.d.ts +0 -10
- package/_vendor/plugin-packaging/packagingSvgExporter.d.ts +0 -7
- package/_vendor/plugin-packaging/productRuntime.d.ts +0 -2
- package/_vendor/plugin-packaging/types.d.ts +0 -168
- package/_vendor/plugin-packaging/validation.d.ts +0 -3
- package/es-DocrZgUh.mjs +0 -2
- /package/_vendor/{plugin-builtin-export → plugin-runtime-export}/blobDataUrl.d.ts +0 -0
- /package/_vendor/{plugin-builtin-export → plugin-runtime-export}/pngExport.d.ts +0 -0
- /package/_vendor/{plugin-builtin-export → plugin-runtime-export}/svgExport.d.ts +0 -0
- /package/{_vendor/plugin-builtin-import-host → plugins/runtime/import-host}/index.d.ts +0 -0
|
@@ -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,168 +0,0 @@
|
|
|
1
|
-
import type { ShapeColor, ShapeRecordBase } from "../canvas-core/index";
|
|
2
|
-
export type Affine2d = readonly [
|
|
3
|
-
a: number,
|
|
4
|
-
b: number,
|
|
5
|
-
c: number,
|
|
6
|
-
d: number,
|
|
7
|
-
e: number,
|
|
8
|
-
f: number
|
|
9
|
-
];
|
|
10
|
-
export type PackagingUnit = "mm" | "cm" | "m" | "in" | "pt" | "px" | "unitless";
|
|
11
|
-
export type PackagingCoordinateSystem = "top-left-y-down";
|
|
12
|
-
export type PackagingSurfaceSide = "outside" | "inside";
|
|
13
|
-
export interface PackagingDocument {
|
|
14
|
-
schemaVersion: 1;
|
|
15
|
-
id: string;
|
|
16
|
-
revision: string;
|
|
17
|
-
name: string;
|
|
18
|
-
unit: PackagingUnit;
|
|
19
|
-
coordinateSystem: PackagingCoordinateSystem;
|
|
20
|
-
sheetBounds?: {
|
|
21
|
-
x: number;
|
|
22
|
-
y: number;
|
|
23
|
-
w: number;
|
|
24
|
-
h: number;
|
|
25
|
-
};
|
|
26
|
-
points: PackagingPoint[];
|
|
27
|
-
edges: PackagingEdge[];
|
|
28
|
-
faces: PackagingFace[];
|
|
29
|
-
surfaces: PackagingSurfaces;
|
|
30
|
-
source?: {
|
|
31
|
-
provider?: string;
|
|
32
|
-
externalId?: string;
|
|
33
|
-
revision?: string;
|
|
34
|
-
};
|
|
35
|
-
meta?: Record<string, unknown>;
|
|
36
|
-
}
|
|
37
|
-
export interface PackagingPoint {
|
|
38
|
-
id: string;
|
|
39
|
-
x: number;
|
|
40
|
-
y: number;
|
|
41
|
-
}
|
|
42
|
-
export interface PackagingCoordinate {
|
|
43
|
-
x: number;
|
|
44
|
-
y: number;
|
|
45
|
-
}
|
|
46
|
-
export type PackagingEdgeOperation = "cut" | "crease" | "perforation" | "score" | "half-cut" | "kiss-cut" | "annotation" | "construction" | "custom";
|
|
47
|
-
export type PackagingEdgeGeometry = {
|
|
48
|
-
type: "line";
|
|
49
|
-
} | {
|
|
50
|
-
type: "quadratic";
|
|
51
|
-
control: {
|
|
52
|
-
x: number;
|
|
53
|
-
y: number;
|
|
54
|
-
};
|
|
55
|
-
} | {
|
|
56
|
-
type: "cubic";
|
|
57
|
-
control1: {
|
|
58
|
-
x: number;
|
|
59
|
-
y: number;
|
|
60
|
-
};
|
|
61
|
-
control2: {
|
|
62
|
-
x: number;
|
|
63
|
-
y: number;
|
|
64
|
-
};
|
|
65
|
-
} | {
|
|
66
|
-
type: "arc";
|
|
67
|
-
radiusX: number;
|
|
68
|
-
radiusY: number;
|
|
69
|
-
rotation: number;
|
|
70
|
-
largeArc: boolean;
|
|
71
|
-
sweep: boolean;
|
|
72
|
-
};
|
|
73
|
-
export interface PackagingEdge {
|
|
74
|
-
id: string;
|
|
75
|
-
fromPointId: string;
|
|
76
|
-
toPointId: string;
|
|
77
|
-
geometry: PackagingEdgeGeometry;
|
|
78
|
-
operation: PackagingEdgeOperation;
|
|
79
|
-
visible?: boolean;
|
|
80
|
-
meta?: Record<string, unknown>;
|
|
81
|
-
}
|
|
82
|
-
export interface PackagingDirectedEdgeRef {
|
|
83
|
-
edgeId: string;
|
|
84
|
-
direction: "forward" | "reverse";
|
|
85
|
-
}
|
|
86
|
-
export interface PackagingLoop {
|
|
87
|
-
edges: PackagingDirectedEdgeRef[];
|
|
88
|
-
}
|
|
89
|
-
export interface PackagingFace {
|
|
90
|
-
id: string;
|
|
91
|
-
name?: string;
|
|
92
|
-
role?: string;
|
|
93
|
-
outer: PackagingLoop;
|
|
94
|
-
holes?: PackagingLoop[];
|
|
95
|
-
artworkFrame?: {
|
|
96
|
-
uvToDocument: Affine2d;
|
|
97
|
-
};
|
|
98
|
-
meta?: Record<string, unknown>;
|
|
99
|
-
}
|
|
100
|
-
export interface PackagingPrepress {
|
|
101
|
-
bleedContours: PackagingBleedContour[];
|
|
102
|
-
safeZones: PackagingSafeZone[];
|
|
103
|
-
}
|
|
104
|
-
export interface PackagingSurface {
|
|
105
|
-
prepress?: PackagingPrepress;
|
|
106
|
-
meta?: Record<string, unknown>;
|
|
107
|
-
}
|
|
108
|
-
export interface PackagingSurfaces {
|
|
109
|
-
outside: PackagingSurface;
|
|
110
|
-
inside: PackagingSurface;
|
|
111
|
-
}
|
|
112
|
-
export interface PackagingBleedContour {
|
|
113
|
-
id: string;
|
|
114
|
-
name?: string;
|
|
115
|
-
cutEdgeIds: string[];
|
|
116
|
-
minimumBleed: number;
|
|
117
|
-
contour: PackagingClosedContour;
|
|
118
|
-
meta?: Record<string, unknown>;
|
|
119
|
-
}
|
|
120
|
-
export interface PackagingSafeZone {
|
|
121
|
-
id: string;
|
|
122
|
-
name?: string;
|
|
123
|
-
faceId: string;
|
|
124
|
-
minimumClearance: number;
|
|
125
|
-
contour: PackagingClosedContour;
|
|
126
|
-
meta?: Record<string, unknown>;
|
|
127
|
-
}
|
|
128
|
-
export interface PackagingClosedContour {
|
|
129
|
-
start: PackagingCoordinate;
|
|
130
|
-
segments: PackagingContourSegment[];
|
|
131
|
-
}
|
|
132
|
-
export type PackagingContourSegment = {
|
|
133
|
-
type: "line";
|
|
134
|
-
to: PackagingCoordinate;
|
|
135
|
-
} | {
|
|
136
|
-
type: "quadratic";
|
|
137
|
-
control: PackagingCoordinate;
|
|
138
|
-
to: PackagingCoordinate;
|
|
139
|
-
} | {
|
|
140
|
-
type: "cubic";
|
|
141
|
-
control1: PackagingCoordinate;
|
|
142
|
-
control2: PackagingCoordinate;
|
|
143
|
-
to: PackagingCoordinate;
|
|
144
|
-
} | {
|
|
145
|
-
type: "arc";
|
|
146
|
-
radiusX: number;
|
|
147
|
-
radiusY: number;
|
|
148
|
-
rotation: number;
|
|
149
|
-
largeArc: boolean;
|
|
150
|
-
sweep: boolean;
|
|
151
|
-
to: PackagingCoordinate;
|
|
152
|
-
};
|
|
153
|
-
export interface PackagingShapeProps {
|
|
154
|
-
document: PackagingDocument;
|
|
155
|
-
viewSide: PackagingSurfaceSide;
|
|
156
|
-
faceFill: ShapeColor;
|
|
157
|
-
faceFillOverrides: Record<string, ShapeColor>;
|
|
158
|
-
showBleed: boolean;
|
|
159
|
-
clipToBleed: boolean;
|
|
160
|
-
dielineOnTop: boolean;
|
|
161
|
-
showSafeZones: boolean;
|
|
162
|
-
showCanvasBoundsMarks: boolean;
|
|
163
|
-
}
|
|
164
|
-
export type PackagingShapeRecord = ShapeRecordBase<"packaging", PackagingShapeProps>;
|
|
165
|
-
export interface PackagingHoverState {
|
|
166
|
-
packagingShapeId: PackagingShapeRecord["id"];
|
|
167
|
-
faceId: string;
|
|
168
|
-
}
|