unlayer-types 1.329.0 → 1.331.0
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/embed.d.ts +191 -0
- package/package.json +1 -1
package/embed.d.ts
CHANGED
|
@@ -83,6 +83,12 @@ declare module "editor/components/editors/types" {
|
|
|
83
83
|
Record<string, any>,
|
|
84
84
|
Record<string, any>,
|
|
85
85
|
{
|
|
86
|
+
rowIndex: number | undefined;
|
|
87
|
+
rowCells: number[] | undefined;
|
|
88
|
+
rowValues: Record<string, any> | undefined;
|
|
89
|
+
columnIndex: number | undefined;
|
|
90
|
+
columnValues: Record<string, any> | undefined;
|
|
91
|
+
bodyValues: Record<string, any> | undefined;
|
|
86
92
|
displayMode: DisplayMode;
|
|
87
93
|
embeddedValues: Record<string, any>;
|
|
88
94
|
isViewer: boolean;
|
|
@@ -1717,6 +1723,84 @@ declare module "state/types/types" {
|
|
|
1717
1723
|
}[];
|
|
1718
1724
|
}[];
|
|
1719
1725
|
};
|
|
1726
|
+
export type ExporterName = DisplayMode | 'ampWeb' | 'ampEmail' | 'classic';
|
|
1727
|
+
export type BodyContainerExporter = (innerHTML: string, bodyValues: Record<string, any>, // @deprecated use last param instead
|
|
1728
|
+
meta: {
|
|
1729
|
+
bodyValues: RootState['design']['bodies'][string]['values'];
|
|
1730
|
+
type: string;
|
|
1731
|
+
variant: Variant;
|
|
1732
|
+
}) => string;
|
|
1733
|
+
export type BodyContainerExporters = Partial<Record<ExporterName, BodyContainerExporter>>;
|
|
1734
|
+
export type RowContainerExporter = (innerHTML: string, rowValues: RootState['design']['rows'][string]['values'], // @deprecated use last param instead
|
|
1735
|
+
bodyValues: RootState['design']['bodies'][string]['values'], // @deprecated use last param instead
|
|
1736
|
+
meta: {
|
|
1737
|
+
rowIndex: number;
|
|
1738
|
+
rowCells: number[];
|
|
1739
|
+
rowValues: RootState['design']['rows'][string]['values'];
|
|
1740
|
+
bodyValues: RootState['design']['bodies'][string]['values'];
|
|
1741
|
+
variant: Variant | undefined;
|
|
1742
|
+
language: string | undefined;
|
|
1743
|
+
collection: Collection;
|
|
1744
|
+
}) => string;
|
|
1745
|
+
export type RowContainerExporters = Partial<Record<ExporterName, RowContainerExporter>>;
|
|
1746
|
+
export type ColumnContainerExporter = (innerHTML: string, columnValues: Record<string, any>, // @deprecated use last param instead
|
|
1747
|
+
columnIndex: number, // @deprecated use last param instead
|
|
1748
|
+
rowCells: number[], // @deprecated use last param instead
|
|
1749
|
+
bodyValues: RootState['design']['bodies'][string]['values'], // @deprecated use last param instead
|
|
1750
|
+
rowValues: RootState['design']['rows'][string]['values'], // @deprecated use last param instead
|
|
1751
|
+
meta: {
|
|
1752
|
+
columnIndex: number;
|
|
1753
|
+
columnValues: RootState['design']['columns'][string]['values'];
|
|
1754
|
+
rowIndex: number;
|
|
1755
|
+
rowCells: number[];
|
|
1756
|
+
rowValues: RootState['design']['rows'][string]['values'];
|
|
1757
|
+
bodyValues: RootState['design']['bodies'][string]['values'];
|
|
1758
|
+
variant: Variant;
|
|
1759
|
+
language: string;
|
|
1760
|
+
}) => string;
|
|
1761
|
+
export type ColumnContainerExporters = Partial<Record<ExporterName, ColumnContainerExporter>>;
|
|
1762
|
+
export type ContentContainerExporter = (innerHTML: string, contentValues: Record<string, any>, // @deprecated use last param instead
|
|
1763
|
+
bodyValues: RootState['design']['bodies'][string]['values'], // @deprecated use last param instead
|
|
1764
|
+
meta: {
|
|
1765
|
+
index: number;
|
|
1766
|
+
columnIndex: number;
|
|
1767
|
+
columnValues: RootState['design']['columns'][string]['values'];
|
|
1768
|
+
rowIndex: number;
|
|
1769
|
+
rowCells: number[];
|
|
1770
|
+
rowValues: RootState['design']['rows'][string]['values'];
|
|
1771
|
+
bodyValues: RootState['design']['bodies'][string]['values'];
|
|
1772
|
+
variant: Variant | undefined;
|
|
1773
|
+
language: string | undefined;
|
|
1774
|
+
embeddedValues: Record<string, unknown>;
|
|
1775
|
+
mergeTagState: {
|
|
1776
|
+
mergeTagGroup: string;
|
|
1777
|
+
mergeTagRule: string;
|
|
1778
|
+
mergeTags: MergeTagsValues;
|
|
1779
|
+
};
|
|
1780
|
+
}) => string;
|
|
1781
|
+
export type ContentContainerExporters = Partial<Record<ExporterName, ContentContainerExporter>>;
|
|
1782
|
+
export type ItemExporter = (renderValues: Record<string, unknown>, index: number, // @deprecated use last param instead
|
|
1783
|
+
columnIndex: number, // @deprecated use last param instead
|
|
1784
|
+
rowCells: number[], // @deprecated use last param instead
|
|
1785
|
+
bodyValues: RootState['design']['bodies'][string]['values'], // @deprecated use last param instead
|
|
1786
|
+
rowValues: RootState['design']['rows'][string]['values'], // @deprecated use last param instead
|
|
1787
|
+
embeddedValues: Record<string, unknown>, // @deprecated use last param instead
|
|
1788
|
+
meta: {
|
|
1789
|
+
index: number;
|
|
1790
|
+
columnIndex: number;
|
|
1791
|
+
columnValues: RootState['design']['columns'][string]['values'];
|
|
1792
|
+
rowIndex: number;
|
|
1793
|
+
rowCells: number[];
|
|
1794
|
+
rowValues: RootState['design']['rows'][string]['values'];
|
|
1795
|
+
bodyValues: RootState['design']['bodies'][string]['values'];
|
|
1796
|
+
embeddedValues: Record<string, unknown>;
|
|
1797
|
+
mergeTagState: {
|
|
1798
|
+
mergeTagGroup: string;
|
|
1799
|
+
mergeTagRule: string;
|
|
1800
|
+
mergeTags: MergeTagsValues;
|
|
1801
|
+
};
|
|
1802
|
+
}) => string;
|
|
1803
|
+
export type ItemExporters = Partial<Record<ExporterName, ItemExporter>>;
|
|
1720
1804
|
}
|
|
1721
1805
|
declare module "engine/utils/pruneObj" {
|
|
1722
1806
|
export function pruneObj<T extends Record<string, any>>(obj: T, options?: {
|
|
@@ -1764,6 +1848,7 @@ declare module "engine/config/features" {
|
|
|
1764
1848
|
collaboration?: boolean;
|
|
1765
1849
|
preview?: boolean | {
|
|
1766
1850
|
enabled?: boolean;
|
|
1851
|
+
cleanup?: boolean;
|
|
1767
1852
|
deviceResolutions?: {
|
|
1768
1853
|
showDefaultResolutions?: boolean;
|
|
1769
1854
|
customResolutions?: {
|
|
@@ -2360,6 +2445,7 @@ declare module "editor/design-system/components/Dropdown" {
|
|
|
2360
2445
|
icon?: IconDefinition;
|
|
2361
2446
|
label: string;
|
|
2362
2447
|
value: any;
|
|
2448
|
+
key?: string;
|
|
2363
2449
|
tooltip?: string;
|
|
2364
2450
|
tooltipPlacement?: TooltipProps['placement'];
|
|
2365
2451
|
meta?: Record<string, unknown>;
|
|
@@ -2875,6 +2961,111 @@ declare module "editor/helpers/placeholders" {
|
|
|
2875
2961
|
type ToolType = 'image' | 'carousel';
|
|
2876
2962
|
export function getPlaceholderUrl(type: ToolType): string;
|
|
2877
2963
|
}
|
|
2964
|
+
declare module "engine/utils/explodeBorder" {
|
|
2965
|
+
export function explodeBorder(value: number | string | {
|
|
2966
|
+
borderTopWidth?: string;
|
|
2967
|
+
borderTopStyle?: string;
|
|
2968
|
+
borderTopColor?: string;
|
|
2969
|
+
borderLeftWidth?: string;
|
|
2970
|
+
borderLeftStyle?: string;
|
|
2971
|
+
borderLeftColor?: string;
|
|
2972
|
+
borderRightWidth?: string;
|
|
2973
|
+
borderRightStyle?: string;
|
|
2974
|
+
borderRightColor?: string;
|
|
2975
|
+
borderBottomWidth?: string;
|
|
2976
|
+
borderBottomStyle?: string;
|
|
2977
|
+
borderBottomColor?: string;
|
|
2978
|
+
} | undefined): {
|
|
2979
|
+
top: number | undefined;
|
|
2980
|
+
right: number | undefined;
|
|
2981
|
+
bottom: number | undefined;
|
|
2982
|
+
left: number | undefined;
|
|
2983
|
+
};
|
|
2984
|
+
}
|
|
2985
|
+
declare module "engine/utils/imageRendering" {
|
|
2986
|
+
import { explodePaddingsOrMargins } from "engine/utils/explodePaddingsOrMargins";
|
|
2987
|
+
import { explodeBorder } from "engine/utils/explodeBorder";
|
|
2988
|
+
export function isFixedContentWidth(bodyValues?: {
|
|
2989
|
+
contentWidth: number | string;
|
|
2990
|
+
}): boolean;
|
|
2991
|
+
export function getBodyAvailableWidth({ body, fallbackBodyContentWidth, }: {
|
|
2992
|
+
body: {
|
|
2993
|
+
values: {
|
|
2994
|
+
contentWidth: number | string;
|
|
2995
|
+
padding?: Parameters<typeof explodePaddingsOrMargins>[0];
|
|
2996
|
+
border?: Parameters<typeof explodeBorder>[0];
|
|
2997
|
+
};
|
|
2998
|
+
};
|
|
2999
|
+
fallbackBodyContentWidth?: number;
|
|
3000
|
+
}): number;
|
|
3001
|
+
export function getRowAvailableWidth({ body, row, }: {
|
|
3002
|
+
body: Parameters<typeof getBodyAvailableWidth>[0]['body'];
|
|
3003
|
+
row: {
|
|
3004
|
+
values: {
|
|
3005
|
+
padding: Parameters<typeof explodePaddingsOrMargins>[0];
|
|
3006
|
+
border?: Parameters<typeof explodeBorder>[0];
|
|
3007
|
+
};
|
|
3008
|
+
};
|
|
3009
|
+
}): number;
|
|
3010
|
+
export function getColumnAvailableWidth({ body, row, column, }: {
|
|
3011
|
+
body: Parameters<typeof getRowAvailableWidth>[0]['body'];
|
|
3012
|
+
row: Parameters<typeof getRowAvailableWidth>[0]['row'] & {
|
|
3013
|
+
cells: number[];
|
|
3014
|
+
};
|
|
3015
|
+
column: {
|
|
3016
|
+
index: number;
|
|
3017
|
+
values: {
|
|
3018
|
+
padding: Parameters<typeof explodePaddingsOrMargins>[0];
|
|
3019
|
+
border: Parameters<typeof explodeBorder>[0];
|
|
3020
|
+
};
|
|
3021
|
+
};
|
|
3022
|
+
}): number;
|
|
3023
|
+
export function getContentAvailableWidth({ body, row, column, item, }: {
|
|
3024
|
+
body: Parameters<typeof getColumnAvailableWidth>[0]['body'];
|
|
3025
|
+
row: Parameters<typeof getColumnAvailableWidth>[0]['row'];
|
|
3026
|
+
column: Parameters<typeof getColumnAvailableWidth>[0]['column'];
|
|
3027
|
+
item: {
|
|
3028
|
+
values: {
|
|
3029
|
+
containerPadding?: Parameters<typeof explodePaddingsOrMargins>[0];
|
|
3030
|
+
border?: Parameters<typeof explodeBorder>[0];
|
|
3031
|
+
};
|
|
3032
|
+
};
|
|
3033
|
+
}): number;
|
|
3034
|
+
export function getAvailableWidth({ values, columnIndex, columnValues, rowCells, rowValues, bodyValues, }: {
|
|
3035
|
+
values: Parameters<typeof getContentAvailableWidth>[0]['item']['values'];
|
|
3036
|
+
columnIndex: Parameters<typeof getContentAvailableWidth>[0]['column']['index'];
|
|
3037
|
+
columnValues: Parameters<typeof getContentAvailableWidth>[0]['column']['values'];
|
|
3038
|
+
rowCells: Parameters<typeof getContentAvailableWidth>[0]['row']['cells'];
|
|
3039
|
+
rowValues: Parameters<typeof getContentAvailableWidth>[0]['row']['values'];
|
|
3040
|
+
bodyValues: Parameters<typeof getContentAvailableWidth>[0]['body']['values'];
|
|
3041
|
+
}): number;
|
|
3042
|
+
export function getImageWidthAndMaxWidth(widthValue: {
|
|
3043
|
+
autoWidth?: boolean;
|
|
3044
|
+
maxWidth?: number | string;
|
|
3045
|
+
width?: number;
|
|
3046
|
+
}, availableWidth?: number): {
|
|
3047
|
+
width: string;
|
|
3048
|
+
maxWidth: string;
|
|
3049
|
+
};
|
|
3050
|
+
export function getImageProperties(widthValue: {
|
|
3051
|
+
autoWidth?: boolean;
|
|
3052
|
+
maxWidth?: number | string;
|
|
3053
|
+
width?: number;
|
|
3054
|
+
}, availableWidth?: number, optionName?: string): {
|
|
3055
|
+
imageCSSClassName: string;
|
|
3056
|
+
imageStyleObj: {
|
|
3057
|
+
width: string;
|
|
3058
|
+
maxWidth: string;
|
|
3059
|
+
};
|
|
3060
|
+
imageCSSStyle: string;
|
|
3061
|
+
};
|
|
3062
|
+
export function getDynamicImageUrl(src: string | undefined, params: {
|
|
3063
|
+
allowUpscale?: boolean;
|
|
3064
|
+
dynamic?: boolean;
|
|
3065
|
+
resizeWidth: number | string | undefined;
|
|
3066
|
+
originalWidth: number | string | undefined;
|
|
3067
|
+
}): string;
|
|
3068
|
+
}
|
|
2878
3069
|
declare module "editor/components/editors/pixie/pixie.umd" {
|
|
2879
3070
|
const _exports: {
|
|
2880
3071
|
new (t: any): {
|
package/package.json
CHANGED