@yuzhouu/canvas-kit 0.1.21 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_vendor/canvas-react/components/shape-layer/ShapeRenderer.d.ts +8 -3
- package/_vendor/canvas-react/host/ShapeHoverRect.d.ts +9 -0
- package/_vendor/canvas-react/host/canvasRenderPlugin.d.ts +4 -3
- package/_vendor/canvas-react/host/index.d.ts +1 -0
- package/{host-C9sTNI4D.mjs → host-DL_DzXky.mjs} +46 -47
- package/index.mjs +5 -5
- package/package.json +1 -1
- package/plugin-runtime.mjs +1 -1
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Editor, type ShapeId, type ShapeRecord } from "../../../canvas-core/index";
|
|
2
2
|
import { type AnyRegisteredShapeRenderer, type ShapeRendererProps } from "../../host/canvasRenderPlugin";
|
|
3
|
+
import type { ShapeFrame } from "./shapeFrame";
|
|
3
4
|
interface MemoizedShapeRendererProps extends ShapeRendererProps {
|
|
4
5
|
Component: AnyRegisteredShapeRenderer["component"];
|
|
5
6
|
}
|
|
6
7
|
export declare const MemoizedShapeRenderer: import("react").NamedExoticComponent<MemoizedShapeRendererProps>;
|
|
7
|
-
export declare function ShapeHoverDecoration({ Component, editor, shape, }: {
|
|
8
|
+
export declare function ShapeHoverDecoration({ Component, editor, shape, frame, clipAncestorIds, opacity, stackingOrder, }: {
|
|
8
9
|
Component: NonNullable<AnyRegisteredShapeRenderer["hoverComponent"]>;
|
|
9
10
|
editor: Editor;
|
|
10
11
|
shape: ShapeRecord;
|
|
11
|
-
|
|
12
|
+
frame: ShapeFrame;
|
|
13
|
+
clipAncestorIds: readonly ShapeId[];
|
|
14
|
+
opacity: number;
|
|
15
|
+
stackingOrder: number;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
12
17
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function ShapeHoverRect({ dataUi, width, height, x, y, radius, strokeWidth, }: {
|
|
2
|
+
dataUi: string;
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
x?: number;
|
|
6
|
+
y?: number;
|
|
7
|
+
radius?: number;
|
|
8
|
+
strokeWidth: number;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,13 +7,14 @@ export interface ShapeRendererProps<S extends ShapeRecordBase = ShapeRecordBase>
|
|
|
7
7
|
shapeEditingSession: ShapeEditingSession | null;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Rendered inside
|
|
11
|
-
*
|
|
10
|
+
* Rendered inside an SVG hover host that handles shape and ancestor transforms.
|
|
11
|
+
* Return SVG content with non-scaling strokes. Nested SVG coordinates should
|
|
12
|
+
* match the shape util's `getRenderBounds()` coordinate space; use x/y for offsets.
|
|
12
13
|
*/
|
|
13
14
|
export interface ShapeHoverRendererProps<S extends ShapeRecordBase = ShapeRecordBase> {
|
|
14
15
|
shape: S;
|
|
15
16
|
editor: Editor;
|
|
16
|
-
/**
|
|
17
|
+
/** Zoom-adjusted SVG non-scaling stroke width, independent of shape scale. */
|
|
17
18
|
strokeWidth: number;
|
|
18
19
|
}
|
|
19
20
|
export declare const SHAPE_HOVER_STROKE = "var(--land-shape-hover, var(--land-selection, #2563eb))";
|
|
@@ -2,6 +2,7 @@ export { CanvasRenderBindingsContext, useCanvasOverlays, useCanvasRenderBindings
|
|
|
2
2
|
export type { CanvasDomEventGuards, CanvasOverlayLookup, CanvasRendererLookup, } from "./canvasRenderBindings";
|
|
3
3
|
export type { AnyRegisteredSelectionCustomHandleRenderer, AnyRegisteredShapeRenderer, CanvasOverlayContribution, CanvasDomEventGuard, CanvasDomEventGuardCursorInput, CanvasDomEventGuardDecision, CanvasDomEventGuardInput, CanvasDomEventGuardName, CanvasRenderPluginComponent, CanvasRenderPlugin, RegisteredSelectionCustomHandleRenderer, RegisteredShapeDecoration, RegisteredShapeRenderer, SelectionCustomHandleRendererProps, ShapeHoverRendererProps, ShapeRendererProps, ShapeOpacityModifier, } from "./canvasRenderPlugin";
|
|
4
4
|
export { SHAPE_HOVER_STROKE, SHAPE_HOVER_STROKE_WIDTH, } from "./canvasRenderPlugin";
|
|
5
|
+
export { ShapeHoverRect } from "./ShapeHoverRect";
|
|
5
6
|
export { ShapeHeadingControl, createShapeHeadingDomEventGuard, } from "./ShapeHeadingControl";
|
|
6
7
|
export type { ShapeHeadingControlProps, ShapeHeadingDataUi, } from "./ShapeHeadingControl";
|
|
7
8
|
export { createCanvasRenderBindings, type CanvasRenderBindings, } from "./canvasRenderBindings";
|