11/**
22 * An asset URI which will always be passed as a `string` to the native platform SDKs.
33 * In React Native an `AssetURI` can be assigned with an asset reference which can be
4- * optained by, e.g., `require('./pathToStaticAssetResource.withExtension')` as `number`.
4+ * obtained by, e.g., `require('./pathToStaticAssetResource.withExtension')` as `number`.
55 * Every `AssetURI` as `number` contained in the `Configuration` will be resolved to a URI
66 * as `string` when passed to the SDK.
77 */
@@ -12,9 +12,9 @@ export type AssetURI = string | number
1212 */
1313export interface Configuration {
1414 /**
15- * When set to `true`, the user is forced to crop the asset to one of the allowed crop aspects in
15+ * When set to `true`, the user is forced to crop the asset to one of the allowed crop ratios in
1616 * `transform.items` before being able to use other features of the editor.
17- * The transform tool will only be presented if the image does not already fit one of those allowed
17+ * The transform tool will only be presented if the image does not already fit one of the allowed
1818 * aspect ratios. It will be presented automatically, if the user changes the orientation of the asset
1919 * and the result does not match an allowed aspect ratio.
2020 *
@@ -77,35 +77,35 @@ export interface Configuration {
7777 */
7878 snapToVerticalCenter ?: boolean ;
7979 /**
80- * The left side of a sprite's bounding box snaps to a vertical line which is shifted by this value
81- * from the left side of the edited image towards its center. This value is measured in normalized
80+ * The left side of a sprite's bounding box snaps to a vertical line which is shifted
81+ * from the left side of the edited image towards its center by this value. The value is measured in normalized
8282 * coordinates relative to the smaller side of the edited image.
8383 * If this value is explicitly set to `null` this snapping line is disabled.
8484 * @example // Defaults to:
8585 * 0.1
8686 */
8787 snapToLeft ?: number | null ;
8888 /**
89- * The right side of a sprite's bounding box snaps to a vertical line which is shifted by this value
90- * from the right side of the edited image towards its center. This value is measured in normalized
89+ * The right side of a sprite's bounding box snaps to a vertical line which is shifted
90+ * from the right side of the edited image towards its center by this value. The value is measured in normalized
9191 * coordinates relative to the smaller side of the edited image.
9292 * If this value is explicitly set to `null` this snapping line is disabled.
9393 * @example // Defaults to:
9494 * 0.1
9595 */
9696 snapToRight ?: number | null ;
9797 /**
98- * The top side of a sprite's bounding box snaps to a horizontal line which is shifted by this value
99- * from the top side of the edited image towards its center. This value is measured in normalized
98+ * The top side of a sprite's bounding box snaps to a horizontal line which is shifted
99+ * from the top side of the edited image towards its center by this value. The value is measured in normalized
100100 * coordinates relative to the smaller side of the edited image.
101101 * If this value is explicitly set to `null` this snapping line is disabled.
102102 * @example // Defaults to:
103103 * 0.1
104104 */
105105 snapToTop ?: number | null ;
106106 /**
107- * The bottom side of a sprite's bounding box snaps to a horizontal line which is shifted by this value
108- * from the bottom side of the edited image towards its center. This value is measured in normalized
107+ * The bottom side of a sprite's bounding box snaps to a horizontal line which is shifted
108+ * from the bottom side of the edited image towards its center by this value. The value is measured in normalized
109109 * coordinates relative to the smaller side of the edited image.
110110 * If this value is explicitly set to `null` this snapping line is disabled.
111111 * @example // Defaults to:
@@ -152,7 +152,7 @@ export interface Configuration {
152152 */
153153 transform ?: {
154154 /**
155- * Whether to show a reset button to reset the applied crop, rotation and straighten angle.
155+ * Whether to show a reset button to reset the applied crop, rotation and tilt angle.
156156 * @example // Defaults to:
157157 * true
158158 */
@@ -182,7 +182,7 @@ export interface Configuration {
182182 filter ?: {
183183 /**
184184 * Defines all available filters. Each filter must be assigned to a category.
185- * New items and categories can be mixed and matched with existing predefined ones.
185+ * New items and categories can be mixed and matched with existing ones.
186186 * `NONE` is always added.
187187 * @example // Defaults to:
188188 * [
@@ -319,7 +319,7 @@ export interface Configuration {
319319 sticker ?: {
320320 /**
321321 * Defines all available stickers. Each sticker must be assigned to a category.
322- * New items and categories can be mixed and matched with existing predefined ones.
322+ * New items and categories can be mixed and matched with existing ones.
323323 * @example // Defaults to:
324324 * [
325325 * { identifier: "imgly_sticker_category_emoticons", items: [
@@ -408,7 +408,7 @@ export interface Configuration {
408408 */
409409 categories ?: ( StickerCategory | ExistingStickerCategory ) [ ] ;
410410 /**
411- * Defines all available colors that can be applied to stickers with a `tintMode` other than `none `.
411+ * Defines all available colors that can be applied to stickers with a `tintMode` other than `TintMode.NONE `.
412412 * The color pipette is always added.
413413 * @example // Defaults to:
414414 * [
@@ -451,6 +451,21 @@ export interface Configuration {
451451 CanvasAction . ADD |
452452 CanvasAction . FLIP
453453 > ;
454+ /**
455+ * If enabled the user can create personal stickers from the device's photo library. A button is added as first item
456+ * in the menu in front of the sticker categories which modally presents an image selection dialog for personal sticker creation.
457+ * Personal stickers will be added to a personal sticker category with the identifier `"imgly_sticker_category_personal"` which
458+ * will be added between the button and the regular sticker categories if it does not exist.
459+ * @example // Defaults to:
460+ * false
461+ */
462+ personalStickers ?: boolean ;
463+ /**
464+ * The default tint mode for personal stickers.
465+ * @example // Defaults to:
466+ * TintMode.NONE
467+ */
468+ defaultPersonalStickerTintMode ?: TintMode ;
454469 }
455470
456471 /**
@@ -459,7 +474,7 @@ export interface Configuration {
459474 text ?: {
460475 /**
461476 * Defines all available fonts.
462- * New items can be mixed and matched with existing predefined ones.
477+ * New items can be mixed and matched with existing ones.
463478 * @example // Defaults to:
464479 * [
465480 * { identifier: "imgly_font_open_sans_bold" },
@@ -561,7 +576,7 @@ export interface Configuration {
561576 textdesign ?: {
562577 /**
563578 * Defines all available text designs.
564- * New items can be mixed and matched with existing predefined ones.
579+ * New items can be mixed and matched with existing ones.
565580 * @example // Defaults to:
566581 * [
567582 * { identifier: "imgly_text_design_blocks" },
@@ -626,7 +641,7 @@ export interface Configuration {
626641 overlay ?: {
627642 /**
628643 * Defines all available overlays.
629- * New items can be mixed and matched with existing predefined ones.
644+ * New items can be mixed and matched with existing ones.
630645 * `NONE` is always added.
631646 * @example // Defaults to:
632647 * [
@@ -653,7 +668,7 @@ export interface Configuration {
653668 frame ?: {
654669 /**
655670 * Defines all available frames.
656- * New items can be mixed and matched with existing predefined ones.
671+ * New items can be mixed and matched with existing ones.
657672 * `NONE` is always added.
658673 * @example // Defaults to:
659674 * [
@@ -724,21 +739,22 @@ export interface Configuration {
724739 */
725740 defaultColor ?: Color ;
726741 /**
727- * The minimum size that a brush can have. This value is measured relative to the
728- * smaller side of the image that the user is editing.
742+ * The minimum size that a brush can have. This value is measured in relation to the
743+ * smaller side of the image that the user is editing. If the value is `null` the
744+ * minimum brush size is set to the absolute size of a single pixel of the edited image.
729745 * @example // Defaults to:
730- * 0.001
746+ * null
731747 */
732748 minimumSize ?: number ;
733749 /**
734- * The maximum size that a brush can have. This value is measured relative to the
750+ * The maximum size that a brush can have. This value is measured in relation to the
735751 * smaller side of the image that the user is editing.
736752 * @example // Defaults to:
737753 * 0.125
738754 */
739755 maximumSize ?: number ;
740756 /**
741- * The default size of the brush. This value is measured relative to the
757+ * The default size of the brush. This value is measured in relation to the
742758 * smaller side of the image that the user is editing.
743759 * @example // Defaults to:
744760 * 0.05
@@ -881,8 +897,8 @@ export interface Configuration {
881897 */
882898 custom ?: {
883899 /**
884- * Theming options to change the user interafce appearance. This allows to alter predefined existing
885- * theme presents or to create new themes which can be enabled when their corresponding key (name)
900+ * Theming options to change the user interface appearance. This allows to alter predefined existing
901+ * theme presets or to create new themes which can be enabled when their corresponding key (name)
886902 * is set as the `Configuration.theme`.
887903 */
888904 themes ?: {
@@ -901,7 +917,7 @@ export enum Tool {
901917 FILTER = "filter" ,
902918 /** A tool to apply image adjustments. */
903919 ADJUSTMENT = "adjustment" ,
904- /** A tool to add defocus . */
920+ /** A tool to add blur . */
905921 FOCUS = "focus" ,
906922 /** A tool to add stickers. */
907923 STICKER = "sticker" ,
@@ -913,7 +929,7 @@ export enum Tool {
913929 OVERLAY = "overlay" ,
914930 /** A tool to add a frame. */
915931 FRAME = "frame" ,
916- /** A tool to add paintings . */
932+ /** A tool to add drawings . */
917933 BRUSH = "brush" ,
918934}
919935
@@ -969,7 +985,7 @@ export enum AdjustmentTool {
969985 SHARPNESS = "sharpness" ,
970986}
971987
972- /** A focus tool. */
988+ /** A blur tool. */
973989export enum FocusTool {
974990 NONE = "none" ,
975991 RADIAL = "radial" ,
@@ -1054,7 +1070,7 @@ export enum BrushAction {
10541070 HARDNESS = "hardness" ,
10551071}
10561072
1057- /** A predefined existing theme preset to define the user interface appearance. */
1073+ /** A predefined theme preset to define the user interface appearance. */
10581074export enum ExistingTheme {
10591075 /** A user interface style with dark appearance. */
10601076 DARK = "dark" ,
@@ -1079,7 +1095,7 @@ export type Color = number[] | number | string | null;
10791095export interface NamedColor {
10801096 /** The color. */
10811097 color : Color ;
1082- /** The name of the color which is also used for accessabliblity . */
1098+ /** The name of the color which is also used for accessibliblity . */
10831099 name : string ;
10841100}
10851101
@@ -1099,7 +1115,7 @@ export interface CropRatio {
10991115 */
11001116 toggleable ?: boolean ;
11011117 /**
1102- * A displayable name for the item which is also used for accessabliblity .
1118+ * A displayable name for the item which is also used for accessibliblity .
11031119 * If `null` the name is automatically generated from the `width` and `height` values and
11041120 * the name will always be overwritten by this auto-generated name if the user toggles the
11051121 * aspect when `toggleable` is enabled.
@@ -1120,7 +1136,7 @@ export interface ExistingItem extends UniqueItem {}
11201136
11211137/** A named and unique identifiable item. */
11221138export interface NamedItem extends UniqueItem {
1123- /** A displayable name for the item which is also used for accessabliblity . */
1139+ /** A displayable name for the item which is also used for accessibliblity . */
11241140 name : string ;
11251141}
11261142
@@ -1198,7 +1214,7 @@ export interface StickerCategory extends NamedItem {
11981214export interface Sticker extends NamedItem {
11991215 /**
12001216 * A URI for the thumbnail image of the sticker.
1201- * If `null` the thumbnail will be automatically generated form the `stickerURI`.
1217+ * If `null` the thumbnail will be automatically generated from the `stickerURI`.
12021218 * @example // Defaults to:
12031219 * null
12041220 */
@@ -1260,7 +1276,7 @@ export interface Frame extends NamedItem {
12601276 * FrameLayoutMode.HORIZONTAL_INSIDE
12611277 */
12621278 layoutMode ?: FrameLayoutMode ;
1263- /** The relative scale of the frame which is defined relative to the shorter side of the
1279+ /** The relative scale of the frame which is defined in relatation to the shorter side of the
12641280 * resulting output image. */
12651281 relativeScale : number ;
12661282 /** Images for the 12-patch layout of a dynamic frame that automatically adapts to
@@ -1329,36 +1345,36 @@ export interface FrameImageGroup {
13291345export interface Theme {
13301346 /**
13311347 * The tint color of highlighted user interface elements.
1332- * If `null` it defaults to the system tint color if available or the vaule of the theme that is modified.
1348+ * If `null` it defaults to the system tint color if available or the value of the theme that is modified.
13331349 * @example // Defaults to:
13341350 * null
13351351 */
13361352 tint ?: Color ;
13371353 /**
13381354 * The primary color which is mainly used for the text and the icons on the menu bar.
1339- * If `null` it defaults to the `ExistingTheme.DARK`'s value or the vaule of the theme that is modified.
1355+ * If `null` it defaults to the `ExistingTheme.DARK`'s value or the value of the theme that is modified.
13401356 * @example // Defaults to:
13411357 * null
13421358 */
13431359 primary ?: Color ;
13441360 /**
13451361 * The background color of the canvas.
1346- * If `null` it defaults to the `ExistingTheme.DARK`'s value or the vaule of the theme that is modified.
1362+ * If `null` it defaults to the `ExistingTheme.DARK`'s value or the value of the theme that is modified.
13471363 * @example // Defaults to:
13481364 * null
13491365 */
13501366 background ?: Color ;
13511367 /**
13521368 * The background color of the menu and accesory controls above the menu.
1353- * If `null` it defaults to the `ExistingTheme.DARK`'s value or the vaule of the theme that is modified.
1369+ * If `null` it defaults to the `ExistingTheme.DARK`'s value or the value of the theme that is modified.
13541370 * @example // Defaults to:
13551371 * null
13561372 */
13571373 menuBackground ?: Color ;
13581374 /**
13591375 * The background color of the toolbar that hosts the title of the active tool, the discard,
13601376 * and the apply button.
1361- * If `null` it defaults to the `ExistingTheme.DARK`'s value or the vaule of the theme that is modified.
1377+ * If `null` it defaults to the `ExistingTheme.DARK`'s value or the value of the theme that is modified.
13621378 * @example // Defaults to:
13631379 * null
13641380 */
@@ -1602,6 +1618,8 @@ export function createDefaultConfiguration(): Configuration {
16021618 ] ,
16031619 actions : [ StickerAction . REPLACE , StickerAction . OPACITY , StickerAction . COLOR ] ,
16041620 canvasActions : [ CanvasAction . ADD , CanvasAction . DELETE , CanvasAction . FLIP , CanvasAction . BRING_TO_FRONT , CanvasAction . UNDO , CanvasAction . REDO ] ,
1621+ personalStickers : false ,
1622+ defaultPersonalStickerTintMode : TintMode . NONE ,
16051623 } ,
16061624 text : {
16071625 fonts : [
0 commit comments