Published type aliases
Exact declarations from @kittl/[email protected]. These are the types shipped by npm, including supporting declarations referenced by public APIs. A supporting declaration is not necessarily an exported runtime value.
API member inventory · Download the published declaration
APIOptions
export type APIOptions<T extends Record<string, unknown>> = {
batchClient?: BatchClient<T>;
} | {
origin?: Origin;
historyOrigin?: HistoryOrigins;
} | undefined;
AbsolutePosition
export type AbsolutePosition = {
absolute: LeftTopPosition;
};
ActiveTool
export type ActiveTool = {
type: "artboard";
} | {
type: "move";
} | {
type: "pen";
} | {
type: "pen-vector-editing";
} | {
type: "comment";
} | {
type: "shape";
shape: BasicShapeType;
};
AddIllustrationParams
export type AddIllustrationParams = {
src: string;
objectProperties?: IllustrationProperties;
} & CreateElementWithPositionAndSize;
AddImageParams
export type AddImageParams = ({
src: string;
} | {
width: number;
height: number;
src?: never;
}) & GeneratableObject & {
objectProperties?: ImageProperties;
} & CreateElementWithPositionAndSize;
AddIntoGroupParams
export type AddIntoGroupParams = {
groupId: string;
objectIds: string[];
};
AddMockupBoardParams
export type AddMockupBoardParams = {
inputBoardIds: string[];
mockupTemplateId: number;
shouldMockupColorMatchArtboard?: boolean;
initialDesigns?: AddMockupDesignObjectParams[];
} & {
position: AbsolutePosition | RelativePosition;
size: Dimensions;
};
AddMockupDesignObjectParams
export type AddMockupDesignObjectParams = {
mockupBoardId: string;
inputBoardId: string;
mockupTemplateId: number;
initialNormalizedUnwarpedRect: MockupDesignRect;
};
AddSmartboardParams
export type AddSmartboardParams = {
linkedBoardIds?: string[];
} & {
position: AbsolutePosition | RelativePosition;
size: Dimensions;
};
AddTextParams
export type AddTextParams = {
text: string;
id?: string;
textProperties?: TextProperties;
position: CreateElementWithPositionAndSize["position"];
size: Dimensions;
};
AddVideoParams
export type AddVideoParams = {
playlist: Omit<VideoPlaylistItem, "id">[];
videoSize?: {
width: number;
height: number;
};
} & CreateElementWithPositionAndSize;
AddVideoboardParams
export type AddVideoboardParams = {
linkedBoardIds?: string[];
video?: {
width?: number;
height?: number;
playlist: Omit<VideoPlaylistItem, "id">[];
};
} & {
position: AbsolutePosition | RelativePosition;
size: Dimensions;
};
AppState
export type AppState = {
selectedObjectsIds: string[];
selectedLayersIds: string[];
selectedArtboardIds: string[];
selectedArtboardsObjectIds: string[];
allSelectedObjectsIds: string[];
canvasMode: CanvasMode | string;
activeTool: ActiveTool | null;
viewport: Viewport;
highlightedObjectId: string | null;
};
ArtboardLikeType
export type ArtboardLikeType = ObjectType.Artboard | ObjectType.MockupBoard | ObjectType.Smartboard | ObjectType.Videoboard;
ArtboardOptions
export type ArtboardOptions = StandardArtboardOptions | SmartboardOptions | MockupBoardOptions | VideoboardOptions;
AvailableShadowOptions
export type AvailableShadowOptions = Partial<Pick<ShadowOptions, "blur">> & Omit<ShadowOptions, "blur">;
BaseFloatingBoard
export type BaseFloatingBoard = {
id: string;
floating: true;
};
BasicShapeConfigurableFields
export type BasicShapeConfigurableFields = {
angle?: BasicShapeSerializedObject["angle"];
flipX?: BasicShapeSerializedObject["flipX"];
flipY?: BasicShapeSerializedObject["flipY"];
hidden?: BasicShapeSerializedObject["hidden"];
opacity?: BasicShapeSerializedObject["opacity"];
skewX?: BasicShapeSerializedObject["skewX"];
skewY?: BasicShapeSerializedObject["skewY"];
cornerRadii?: BasicShapeSerializedObject["cornerRadii"];
name?: BasicShapeSerializedObject["name"];
shadowOptions?: BasicShapeSerializedObject["shadowOptions"];
shadowColor?: NonNullable<BasicShapeSerializedObject["shadowOptions"]>["color"];
fill?: BasicShapeSerializedObject["fill"];
fillColor?: NonNullable<BasicShapeSerializedObject["fill"]>[number]["value"];
stroke?: BasicShapeSerializedObject["stroke"];
strokeWidth?: BasicShapeSerializedObject["strokeWidth"];
};
BasicShapeSerializedObject
export type BasicShapeSerializedObject = typeof BASIC_SHAPE_DEFAULT_VALUES & {
nPoints?: number | undefined;
};
BasicShapeType
export type BasicShapeType = (typeof BasicShapeType)[keyof typeof BasicShapeType];
BridgedSdkResult
export type BridgedSdkResult<T> = T extends SdkResult<infer _R, infer _E> ? T : SdkResult<T, Error>;
Builtin
export type Builtin = Date | Function | Uint8Array | RegExp | Map<unknown, unknown> | Set<unknown>;
CanvasMode
export type CanvasMode = "erase" | "crop" | "reframe" | "inpaint" | null;
CloneArtboardParams
export type CloneArtboardParams = {
boardId: string;
position: CreateElementWithPositionAndSize["position"];
};
Color
export type Color = GradientObject | string | null | undefined;
ColorInfo
export type ColorInfo = StringColor | FullColor;
CombinedShapeSerializedObject
export type CombinedShapeSerializedObject = Omit<typeof DEFAULT_VALUES, "shapes"> & {
shapes: Shape[];
};
ConnectedArtboardOptions
export type ConnectedArtboardOptions<T extends ArtboardLikeType = ArtboardLikeType> = BaseStandardArtboardOptions<T> & {
inputBoardIds?: string[];
};
ConvertShapeToMaskInput
export type ConvertShapeToMaskInput = {
id: NormalizedBasicShapeObject["id"];
};
CreateBasicShapeInput
export type CreateBasicShapeInput = CreateElementWithPositionAndSize & {
objectName: string;
objectProperties?: ShapeProperties;
};
CreateBoardParams
export type CreateBoardParams = Omit<CreateElementWithPositionAndSize, "size" | "boardId"> & {
title?: string;
size: {
width: number;
height: number;
};
};
CreateElementWithPositionAndSize
export type CreateElementWithPositionAndSize = {
boardId?: string;
position: AbsolutePosition | RelativePosition;
size?: Dimensions & {
applyViewportScale?: boolean;
};
};
CreateGroupParams
export type CreateGroupParams = {
structureIds: string[];
};
CreateGuideInput
export type CreateGuideInput = {
boardId?: string;
} & OrientationConditional;
CreateShapeInput
export type CreateShapeInput = CreateElementWithPositionAndSize & {
shapeType: BasicShapeType;
objectProperties?: ShapeProperties;
};
DeepPartial
export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
};
DesignApiOptions
export type DesignApiOptions = APIOptions<NormalizedDesignState>;
DesignObjectId
export type DesignObjectId = string;
DesignStructureObject
export type DesignStructureObject = {
id?: StructureObjectId | null;
meta?: StructureObjectMeta;
parentId?: ID;
};
Dimensions
export type Dimensions = {
width: number;
height: number;
};
ElementLocation
export type ElementLocation = "origin" | "center";
Expand
export type Expand<T> = T extends infer O ? {
[K in keyof O]: O[K];
} : never;
FillMetaTarget
export type FillMetaTarget = "border" | "fill";
FullColor
export type FullColor = {
key: "fill" | (Exclude<string, StringColorKeysType> & {});
value: Color;
visible: boolean;
};
FunctionType
export type FunctionType = (...args: never) => unknown;
GuideSerializedObject
export type GuideSerializedObject = typeof GUIDE_DEFAULT_VALUES & OrientationDir;
ID
export type ID = string;
IllustrationImageSerializedObject
export type IllustrationImageSerializedObject = typeof DEFAULT_VALUES$1 & {
backgroundRemoved?: boolean | undefined;
realWidth?: number | undefined;
realHeight?: number | undefined;
erasePaths?: {
cacheKey: string;
objectName: string | null;
fallbackObjectName?: string;
} | undefined;
_eraseStrokeWidth?: number | undefined;
};
IllustrationProperties
export type IllustrationProperties = {
angle?: IllustrationSerializedObject["angle"];
flipX?: IllustrationSerializedObject["flipX"];
flipY?: IllustrationSerializedObject["flipY"];
hidden?: IllustrationSerializedObject["hidden"];
opacity?: IllustrationSerializedObject["opacity"];
shadowOptions?: IllustrationSerializedObject["shadowOptions"];
stroke?: IllustrationSerializedObject["stroke"];
strokeWidth?: IllustrationSerializedObject["strokeWidth"];
fill?: IllustrationSerializedObject["fill"];
gradients?: IllustrationSerializedObject["gradients"];
};
IllustrationSerializedObject
export type IllustrationSerializedObject = typeof ILLUSTRATION_DEFAULT_VALUES;
ImageProperties
export type ImageProperties = {
angle?: IllustrationImageSerializedObject["angle"];
flipX?: IllustrationImageSerializedObject["flipX"];
flipY?: IllustrationImageSerializedObject["flipY"];
hidden?: IllustrationImageSerializedObject["hidden"];
opacity?: IllustrationImageSerializedObject["opacity"];
shadowOptions?: IllustrationImageSerializedObject["shadowOptions"];
stroke?: IllustrationImageSerializedObject["stroke"];
strokeWidth?: IllustrationImageSerializedObject["strokeWidth"];
fill?: IllustrationImageSerializedObject["fill"];
};
InternalPatchArgs
export type InternalPatchArgs<T> = {
patch: PatchTree<T> | PatchTree<T>[];
origin: Origin;
historyOrigin?: HistoryOrigins;
};
LayerIconType
export type LayerIconType = "drawIcon";
LayerType
export type LayerType = Exclude<SerializableObjectType, ObjectType.Guide> | typeof structuralGroupType | typeof clippingMaskType | typeof backgroundType | typeof pathType;
LayersMovePosition
export type LayersMovePosition = "before" | "after" | "into";
LeftTopPosition
export type LeftTopPosition = {
left: number;
top: number;
};