Supporting declarations
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
BatchClient
declare abstract class BatchClient<T extends Record<string, unknown>> {
abstract getPatches(): PatchTree<T>[];
abstract getOrigin(): Origin;
abstract getHistoryOrigin(): HistoryOrigins;
abstract getWorkingState(): KittlStateStore<T>;
abstract commit(): void;
}
KittlStateStore
declare abstract class KittlStateStore<T extends Record<string, unknown>> {
abstract getSnapshot(): T;
abstract subscribe<U>(selector: Selector<T, U>, callback: (selected: U, meta: {
patch: PatchTree<T>[];
senderOrigin: Origin;
}) => void, subscriberOrigin?: Origin): () => void;
abstract internalPatch(args: InternalPatchArgs<T>): void;
abstract resetWithState(state: T): void;
}
BASIC_SHAPE_DEFAULT_VALUES
declare const BASIC_SHAPE_DEFAULT_VALUES: {
defaultIcon: LayerIconType | undefined;
shadowOptions?: {
color?: string | undefined | null;
blur?: number | undefined;
offset?: number;
angle?: number;
};
presets?: LinkedPreset[] | undefined;
gradients?: StateGradientInfo | undefined;
clipPathMaskId?: string | undefined | null;
childrenInfo?: {
objectName?: string;
id: string;
fallbackObjectName: string | null;
objectNameLayout?: WithObjectLayout;
fallbackObjectNameLayout?: WithObjectLayout;
} | undefined;
hiddenColors?: Record<string, NonNullable<Color>> | undefined;
inLoadingStage?: boolean | undefined;
objectName: string;
skewX: number | undefined;
skewY: number | undefined;
width: number;
height: number;
scaleX: number;
scaleY: number;
angle: number;
top: number;
left: number;
flipX: boolean;
flipY: boolean;
name?: string | undefined;
defaultName: string | undefined;
locked?: boolean | undefined;
hidden?: boolean | undefined;
opacity?: number | undefined;
stroke?: string;
strokeWidth?: number;
fill?: ColorInfo[] | undefined;
scalingCorners?: boolean | undefined;
cornerRadii?: SerializableCornerRadii | undefined;
id: DesignObjectId;
version: string;
type: ObjectType.BasicShape;
};
BasicShapeType
declare const BasicShapeType: {
readonly RECTANGLE: "rectangle";
readonly CIRCLE: "ellipse";
readonly STAR: "star";
readonly TRIANGLE: "polygon";
};
DEFAULT_VALUES$1
declare const DEFAULT_VALUES$1: {
globalCompositeOperation: BlendMode;
stroke?: string;
strokeWidth?: number;
shadowOptions?: {
color?: string | undefined | null;
blur?: number | undefined;
offset?: number;
angle?: number;
};
presets?: LinkedPreset[] | undefined;
opacity?: number | undefined;
objectName: string;
width: number;
height: number;
scaleX: number;
scaleY: number;
angle: number;
top: number;
left: number;
flipX: boolean;
flipY: boolean;
name?: string | undefined;
defaultName: string | undefined;
locked?: boolean | undefined;
inLoadingStage?: boolean | undefined;
clipPathMaskId?: string | undefined | null;
hidden?: boolean | undefined;
filters: SerialisedPhotoFilter[] | undefined;
fill?: ColorInfo[] | undefined;
cropX?: number | undefined;
cropY?: number | undefined;
cropWidth?: number | undefined;
cropHeight?: number | undefined;
id: DesignObjectId;
version: string;
type: ObjectType.IllustrationImage;
isGeneratedByAi?: boolean;
aiArtId?: string;
generatedContentId?: string;
generation?: {
meta?: GenerationMeta;
generationId?: string;
generatorKey: string;
};
};
DEFAULT_VALUES$2
declare const DEFAULT_VALUES$2: {
cropX?: number | undefined;
cropY?: number | undefined;
cropWidth?: number | undefined;
cropHeight?: number | undefined;
shadowOptions?: {
color?: string | undefined | null;
blur?: number | undefined;
offset?: number;
angle?: number;
};
stroke?: string;
strokeWidth?: number;
opacity?: number | undefined;
width: number;
height: number;
scaleX: number;
scaleY: number;
angle: number;
top: number;
left: number;
flipX: boolean;
flipY: boolean;
name?: string | undefined;
defaultName: string | undefined;
locked?: boolean | undefined;
hidden?: boolean | undefined;
id: DesignObjectId;
version: string;
type: ObjectType.Video;
};
DEFAULT_VALUES
declare const DEFAULT_VALUES: {
shapes: never[];
operation: ShapeBooleanOperation;
clipPathMaskId?: string | undefined | null;
scalingCorners?: boolean | undefined;
cornerRadii?: SerializableCornerRadii | undefined;
childrenInfo?: {
objectName?: string;
id: string;
fallbackObjectName: string | null;
objectNameLayout?: WithObjectLayout;
fallbackObjectNameLayout?: WithObjectLayout;
} | undefined;
shadowOptions?: {
color?: string | undefined | null;
blur?: number | undefined;
offset?: number;
angle?: number;
};
gradients?: StateGradientInfo | undefined;
presets?: LinkedPreset[] | undefined;
opacity?: number | undefined;
hiddenColors?: Record<string, NonNullable<Color>> | undefined;
stroke?: string;
strokeWidth?: number;
fill?: ColorInfo[] | undefined;
locked?: boolean | undefined;
hidden?: boolean | undefined;
skewX: number | undefined;
skewY: number | undefined;
width: number;
height: number;
scaleX: number;
scaleY: number;
angle: number;
top: number;
left: number;
flipX: boolean;
flipY: boolean;
name?: string | undefined;
defaultName: string | undefined;
id: DesignObjectId;
version: string;
type: ObjectType.CombinedShape;
};
GUIDE_DEFAULT_VALUES
declare const GUIDE_DEFAULT_VALUES: {
id: DesignObjectId;
version: string;
type: ObjectType.Guide;
};
GenerationStatus
declare const GenerationStatus: {
readonly CREATED: "CREATED";
readonly STARTED: "STARTED";
readonly COMPLETE: "COMPLETE";
readonly FAILED: "FAILED";
};
ILLUSTRATION_DEFAULT_VALUES
declare const ILLUSTRATION_DEFAULT_VALUES: {
hiddenColors?: Record<string, NonNullable<Color>> | undefined;
clipPathMaskId?: string | undefined | null;
isGeneratedByAi?: boolean;
aiArtId?: string;
generatedContentId?: string;
generation?: {
meta?: GenerationMeta;
generationId?: string;
generatorKey: string;
};
childrenInfo?: {
objectName?: string;
id: string;
fallbackObjectName: string | null;
objectNameLayout?: WithObjectLayout;
fallbackObjectNameLayout?: WithObjectLayout;
} | undefined;
shadowOptions?: {
color?: string | undefined | null;
blur?: number | undefined;
offset?: number;
angle?: number;
};
gradients?: StateGradientInfo | undefined;
presets?: LinkedPreset[] | undefined;
opacity?: number | undefined;
stroke?: string;
strokeWidth?: number;
fill?: ColorInfo[] | undefined;
inLoadingStage?: boolean | undefined;
locked?: boolean | undefined;
hidden?: boolean | undefined;
objectName: string;
width: number;
height: number;
scaleX: number;
scaleY: number;
angle: number;
top: number;
left: number;
flipX: boolean;
flipY: boolean;
name?: string | undefined;
defaultName: string | undefined;
id: DesignObjectId;
version: string;
type: ObjectType.Illustration;
};
LOADING_CARD_DEFAULT_VALUES
declare const LOADING_CARD_DEFAULT_VALUES: {
locked?: boolean | undefined;
hidden?: boolean | undefined;
width: number;
height: number;
scaleX: number;
scaleY: number;
angle: number;
top: number;
left: number;
flipX: boolean;
flipY: boolean;
name?: string | undefined;
defaultName: string | undefined;
id: DesignObjectId;
version: string;
type: ObjectType.LoadingCard;
};
MASK_DEFAULT_VALUES
declare const MASK_DEFAULT_VALUES: {
inLoadingStage?: boolean | undefined;
opacity?: number | undefined;
locked?: boolean | undefined;
hidden?: boolean | undefined;
objectName: string;
width: number;
height: number;
scaleX: number;
scaleY: number;
angle: number;
top: number;
left: number;
flipX: boolean;
flipY: boolean;
name?: string | undefined;
defaultName: string | undefined;
id: DesignObjectId;
version: string;
type: ObjectType.Mask;
};
MOCKUP_DESIGN_DEFAULT_VALUES
declare const MOCKUP_DESIGN_DEFAULT_VALUES: {
hidden?: boolean | undefined;
locked?: boolean | undefined;
width: number;
height: number;
scaleX: number;
scaleY: number;
angle: number;
top: number;
left: number;
flipX: boolean;
flipY: boolean;
id: DesignObjectId;
version: string;
type: ObjectType.MockupDesign;
};
PATH_TEXT_DEFAULT_VALUES
declare const PATH_TEXT_DEFAULT_VALUES: {
fontSize: number;
lineHeight: number;
textAlignment: TextAlignment;
letterSpacing: number;
stroke: string;
useLigatures: boolean;
strokeWidth?: number;
fill?: Color | undefined;
presets?: LinkedPreset[] | undefined;
opacity?: number | undefined;
locked?: boolean | undefined;
hidden?: boolean | undefined;
width: number;
height: number;
scaleX: number;
scaleY: number;
angle: number;
top: number;
left: number;
flipX: boolean;
flipY: boolean;
name?: string | undefined;
defaultName: string | undefined;
id: DesignObjectId;
version: string;
type: ObjectType.PathText;
};
RICH_TEXT_DEFAULT_VALUES
declare const RICH_TEXT_DEFAULT_VALUES: {
activeTransformPlugin?: object | undefined;
presets?: LinkedPreset[] | undefined;
opacity?: number | undefined;
stroke?: string;
strokeWidth?: number;
fill?: Color | undefined;
locked?: boolean | undefined;
hidden?: boolean | undefined;
width: number;
height: number;
scaleX: number;
scaleY: number;
angle: number;
top: number;
left: number;
flipX: boolean;
flipY: boolean;
name?: string | undefined;
defaultName: string | undefined;
id: DesignObjectId;
version: string;
type: ObjectType.RichText;
};
ResultType
declare const ResultType: {
readonly VIDEO: "video";
readonly IMAGE: "image";
readonly ERROR: "error";
};
backgroundType
declare const backgroundType = "background";
clippingMaskType
declare const clippingMaskType = "clippingMask";
pathType
declare const pathType = "path";
stringColorKeys
declare const stringColorKeys: readonly [
"stroke",
"shadow",
"decoration"
];
structuralGroupType
declare const structuralGroupType = "structuralGroup";
Action
declare enum Action {
MERGE = "MERGE",
SET = "SET",
DELETE = "DELETE"
}
BlendMode
declare enum BlendMode {
Normal = "normal",
SourceOver = "source-over",
Multiply = "multiply",
Screen = "screen",
Overlay = "overlay",
SoftLight = "soft-light",
HardLight = "hard-light",
ColorDodge = "color-dodge",
ColorBurn = "color-burn",
Lighten = "lighten",
Darken = "darken",
Difference = "difference",
Exclusion = "exclusion",
Lighter = "lighter",
Hue = "hue",
Saturation = "saturation",
Color = "color",
Luminosity = "luminosity",
AlphaMask = "destination-out"
}
BoardLayout
declare enum BoardLayout {
Custom = "custom",
Standard = "standard",
TShirt = "tshirt",
BusinessCard = "businesscard",
A4 = "a4",
A5 = "a5",
Poster = "poster",
InstagramPost = "instagramPost",
InstagramPostPortrait = "instagramPostPortrait",
instagramPostSquare = "instagramPostSquare",
InstagramPostLandscape = "instagramPostLandscape",
InstagramStory = "instagramStory",
InstagramReel = "instagramReel",
FacebookPost = "facebookPost",
FacebookPostSquare = "facebookPostSquare",
FacebookPostLandscape = "facebookPostLandscape",
FacebookStory = "facebookStory",
YouTubeThumbnail = "youtubeThumbnail",
YouTubeProfileBanner = "youtubeProfileBanner",
YouTubeAdBanner = "youtubeAdBanner",
XPost = "xPost",
XHeader = "xHeader",
XCarouselAd = "xCarouselAd",
PinterestPin = "pinterestPin",
WebBannerAd = "webBannerAd",
Postcard = "postcard",
Letterhead = "letterhead",
Flyer = "flyer",
Brochure = "brochure",
Logo = "logo",
Presentation = "presentation",
AmazonTShirt = "amazonTShirt",
PrintfulTShirt = "printfulTShirt",
PrintfulAop = "printfulAop",
PrintfulHat = "printfulHat",
RedBubbleStandard = "redBubbleStandard",
RedBubbleSticker = "redBubbleSticker",
TeepublicStandard = "teepublicStandard",
DisplatePoster = "displatePoster",
PrintifyStandard = "printifyStandard",
PrintifyAop = "printifyAop",
PrintifyHoodie = "printifyHoodie",
PrintifyMug = "printifyMug",
PrintifyNotebook = "printifyNotebook",
PrintifySticker = "printifySticker",
AwkwardStylesTShirt = "awkwardStylesTShirt"
}
GradientType
declare enum GradientType {
Linear = "linear",
Radial = "radial"
}
HistoryOrigins
declare enum HistoryOrigins {
Tracked = "change:origin",
Untracked = "untracked:origin"
}
ImageFilterType
declare enum ImageFilterType {
"Saturation" = "Saturation",
"Contrast" = "Contrast",
"Brightness" = "Brightness",
"Vibrance" = "Vibrance",
"HueRotation" = "HueRotation",
"Noise" = "Noise",
"Blur" = "Blur",
"Convolute" = "Convolute",
"Pixelate" = "Pixelate",
"RemoveColor" = "RemoveColor"
}
LibraryPresetType
declare enum LibraryPresetType {
FILL = "FILL",
TRANSFORMATION = "TRANSFORMATION",
PHOTO_FILTER = "PHOTO_FILTER",
SHADOW = "SHADOW",
TEXT = "TEXT",
TEXT_EFFECT = "TEXT_EFFECT",
TEXT_DECORATION = "TEXT_DECORATION",
COLOR_PALETTE = "COLOR_PALETTE"
}
ObjectType
declare enum ObjectType {
Artboard = "artboard",
Smartboard = "smartboard",
Videoboard = "videoboard",
MockupBoard = "mockupBoard",
Illustration = "illustration",
IllustrationImage = "illustrationImage",
Video = "video",
BasicShape = "basicShape",
VectorPath = "vectorPath",
CombinedShape = "combinedShape",
PathText = "pathText",
Mask = "mask",
RichText = "RichText",
Guide = "guide",
LoadingCard = "loadingCard",
MockupDesign = "mockupDesign",
ActiveSelection = "activeSelection",
WarpedImage = "warpedImage",
ArtboardTitle = "artboardTitle",
ArtboardTitleIcon = "artboardTitleIcon",
OverlayTexture = "overlayTexture",
CustomTextbox = "CustomTextbox",
ClipPath = "clipPath",
Path = "path",
Ruler = "ruler",
WarpControlRootPoint = "warpControlRootPoint",
Group = "group",
Circle = "circle",
Rect = "rect",
EditablePolygon = "editablePolygon"
}
Orientation
declare enum Orientation {
HORIZONTAL = "horizontal",
VERTICAL = "vertical"
}
Origin
declare enum Origin {
CRDT = 1,
CANVAS = 2,
UI = 4,
VOLATILE = 8,
EVENTS_SYNC = 16
}
TextAlignment
declare enum TextAlignment {
right = "right",
left = "left",
center = "center",
justify = "justify",
justifyLegacy = "justify-legacy"
}
Unit
declare enum Unit {
px = "px",
in = "in",
mm = "mm"
}
kittl
export declare const kittl: KittlSDK;