@yuzhouu/canvas-kit 0.1.14 → 0.1.16
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/_vendor/canvas-core/editor/editor.d.ts +1 -1
- package/_vendor/canvas-core/editor/queries/shapeTransforms.d.ts +1 -0
- package/_vendor/canvas-core/editor/shapes/shapeGeometry.d.ts +1 -0
- package/_vendor/canvas-core/editor/shapes/shapeSignalManager.d.ts +0 -2
- package/_vendor/canvas-core/shapes/shapeUtil.d.ts +1 -0
- package/_vendor/canvas-react/components/shape-layer/ShapeDecorations.d.ts +0 -1
- package/_vendor/canvas-react/host/ShapeHeadingControl.d.ts +35 -0
- package/_vendor/canvas-react/host/index.d.ts +2 -0
- package/host-BUc0SJe2.mjs +48 -0
- package/index.d.ts +1 -1
- package/index.mjs +6 -46
- package/package.json +6 -1
- package/plugin-runtime.d.ts +2 -0
- package/plugin-runtime.mjs +1 -0
- package/runtime/canvasKitContracts.d.ts +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuzhouu/canvas-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Extensible Land canvas runtime, React product primitives, and typed API surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.mjs",
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
"import": "./index.mjs",
|
|
16
16
|
"default": "./index.mjs"
|
|
17
17
|
},
|
|
18
|
+
"./plugin-runtime": {
|
|
19
|
+
"types": "./plugin-runtime.d.ts",
|
|
20
|
+
"import": "./plugin-runtime.mjs",
|
|
21
|
+
"default": "./plugin-runtime.mjs"
|
|
22
|
+
},
|
|
18
23
|
"./style.css": "./index.css",
|
|
19
24
|
"./package.json": "./package.json"
|
|
20
25
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as s,S as a,_ as o,a as m,b as r,c as t,d as p,f,g as h,h as i,i as x,l as b,m as c,n as d,o as e,p as g,r as j,s as l,t as n,u,v,w,x as y,y as C}from"./host-BUc0SJe2.mjs";export{x as CANVAS_SURFACE_DATA_UI,m as CANVAS_SURFACE_SELECTOR,j as Canvas,o as CanvasRenderBindingsContext,g as DefaultGrid,s as EditorContext,a as PageSpace,c as SHAPE_HOVER_STROKE,i as SHAPE_HOVER_STROKE_WIDTH,n as ShapeHeadingControl,y as createCanvasRenderBindings,d as createShapeHeadingDomEventGuard,e as forwardWheelEventToCanvasSurface,l as getCanvasSurfaceElement,t as getCanvasSurfaceElementForNode,b as getCanvasSurfacePagePoint,u as getCanvasSurfaceScreenPoint,p as getEditableEventTarget,f as isEditableEventTarget,v as useCanvasOverlays,C as useCanvasRenderBindings,r as useCanvasRenderers,w as useEditor,h as useValue};
|
|
@@ -119,10 +119,26 @@ export interface CanvasToolsApi {
|
|
|
119
119
|
setLocked(isLocked: boolean): void;
|
|
120
120
|
toggleLocked(): void;
|
|
121
121
|
}
|
|
122
|
+
export type CanvasShapeExportBoundsSpace = {
|
|
123
|
+
readonly type: "shape-local";
|
|
124
|
+
readonly shapeId: ShapeId;
|
|
125
|
+
} | {
|
|
126
|
+
readonly type: "page";
|
|
127
|
+
};
|
|
128
|
+
export interface CanvasShapeExportBoundsOptions {
|
|
129
|
+
readonly space: CanvasShapeExportBoundsSpace;
|
|
130
|
+
}
|
|
131
|
+
export interface CanvasShapeExportBounds {
|
|
132
|
+
readonly x: number;
|
|
133
|
+
readonly y: number;
|
|
134
|
+
readonly width: number;
|
|
135
|
+
readonly height: number;
|
|
136
|
+
}
|
|
122
137
|
export interface CanvasShapesApi {
|
|
123
138
|
get(id: ShapeId): CanvasProductShapeData | null;
|
|
124
139
|
getMany(ids: readonly ShapeId[]): readonly CanvasProductShapeData[];
|
|
125
140
|
getAll(): readonly CanvasProductShapeData[];
|
|
141
|
+
getExportBounds(id: ShapeId, options: CanvasShapeExportBoundsOptions): CanvasShapeExportBounds | null;
|
|
126
142
|
update(updates: readonly CanvasProductShapeUpdate[]): readonly ShapeId[];
|
|
127
143
|
updateMeta(id: ShapeId, patch: Readonly<Record<string, unknown>>): ShapeId | null;
|
|
128
144
|
delete(ids: readonly ShapeId[]): void;
|