UNPKG

react-native-leader-line

Version:

React Native port of leader-line library for drawing arrow lines and connectors

101 lines 2.74 kB
/** * @namespace LeaderLineTypes * @description All types exported as a namespace for convenience * * @example * ```tsx * import { LeaderLineTypes } from 'react-native-leader-line'; * * const point: LeaderLineTypes.Point = { x: 100, y: 200 }; * const socket: LeaderLineTypes.SocketPosition = "top_right"; * ``` */ export * as LeaderLineTypes from "./index"; /** * @description JSON Schema for LeaderLineProps validation * This schema can be used by LLMs to understand and validate the component props */ export const LeaderLinePropsSchema = { type: "object", required: ["start", "end"], properties: { start: { type: "object", properties: { element: { type: "object" }, point: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, }, }, }, }, end: { type: "object", properties: { element: { type: "object" }, point: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, }, }, }, }, color: { type: "string", pattern: "^#[0-9A-Fa-f]{6}$|^rgba?\\(" }, strokeWidth: { type: "number", minimum: 1 }, startSocket: { type: "string", enum: [ "auto", "center", "top", "right", "bottom", "left", "top_left", "top_right", "bottom_left", "bottom_right", ], }, endSocket: { type: "string", enum: [ "auto", "center", "top", "right", "bottom", "left", "top_left", "top_right", "bottom_left", "bottom_right", ], }, path: { type: "string", enum: ["straight", "arc", "fluid", "magnet", "grid"], }, endPlug: { type: "string", enum: [ "none", "behind", "disc", "square", "arrow1", "arrow2", "arrow3", "hand", "crosshair", "diamond", ], }, }, }; //# sourceMappingURL=index.js.map