unlayer-types 1.111.0 → 1.126.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 +29 -27
- package/package.json +1 -1
package/embed.d.ts
CHANGED
@@ -1,7 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
/// <reference types="dompurify" />
|
3
|
-
/// <reference types="lodash" />
|
4
|
-
/// <reference types="react-modal" />
|
5
1
|
declare module "engine/config/editorSettings" {
|
6
2
|
export interface EditorSettings {
|
7
3
|
minHeaders?: number;
|
@@ -1591,7 +1587,7 @@ declare module "engine/config/safeHtml" {
|
|
1591
1587
|
allowOnClick?: boolean;
|
1592
1588
|
force?: boolean;
|
1593
1589
|
domPurifyOptions?: SafeHtmlOptions['domPurifyOptions'];
|
1594
|
-
}):
|
1590
|
+
}): TrustedHTML;
|
1595
1591
|
export const toSafeHtml: typeof _toSafeHtml & import("lodash").MemoizedFunction;
|
1596
1592
|
}
|
1597
1593
|
declare module "engine/translations/types" {
|
@@ -1808,7 +1804,7 @@ declare module "editor/components/common/Modal" {
|
|
1808
1804
|
innerContentStyle?: React.CSSProperties;
|
1809
1805
|
overlayStyle?: React.CSSProperties;
|
1810
1806
|
}
|
1811
|
-
export function Modal(props: ModalProps): JSX.Element;
|
1807
|
+
export function Modal(props: ModalProps): React.JSX.Element;
|
1812
1808
|
}
|
1813
1809
|
declare module "editor/components/common/ConditionalWrap" {
|
1814
1810
|
import React from 'react';
|
@@ -1832,11 +1828,11 @@ declare module "editor/components/common/Loader" {
|
|
1832
1828
|
loadingClassName?: string;
|
1833
1829
|
size?: 'small' | 'normal';
|
1834
1830
|
}
|
1835
|
-
export function Loader(props: LoaderProps): JSX.Element;
|
1831
|
+
export function Loader(props: LoaderProps): React.JSX.Element;
|
1836
1832
|
}
|
1837
1833
|
declare module "engine/utils/withHook" {
|
1838
1834
|
import React from 'react';
|
1839
|
-
export function withHook<P extends object, C extends React.ComponentType<P>, HookName extends string, HookFn extends (props: P) => any>(Component: C, hookName: HookName, useHook: HookFn): React.MemoExoticComponent<React.ForwardRefExoticComponent<React.
|
1835
|
+
export function withHook<P extends object, C extends React.ComponentType<P>, HookName extends string, HookFn extends (props: P) => any>(Component: C, hookName: HookName, useHook: HookFn): React.MemoExoticComponent<React.ForwardRefExoticComponent<React.RefAttributes<unknown>>>;
|
1840
1836
|
}
|
1841
1837
|
declare module "editor/hooks/useForceRerender" {
|
1842
1838
|
export function useForceRerender({ debounce, throttle, }?: {
|
@@ -1847,7 +1843,7 @@ declare module "editor/hooks/useForceRerender" {
|
|
1847
1843
|
declare module "editor/hooks/useConfig" {
|
1848
1844
|
import React from 'react';
|
1849
1845
|
export function useConfig(): any;
|
1850
|
-
export function withConfig<C extends React.ComponentType>(Component: C): React.MemoExoticComponent<React.ForwardRefExoticComponent<
|
1846
|
+
export function withConfig<C extends React.ComponentType>(Component: C): React.MemoExoticComponent<React.ForwardRefExoticComponent<React.RefAttributes<unknown>>>;
|
1851
1847
|
}
|
1852
1848
|
declare module "engine/utils/position" {
|
1853
1849
|
import { DisplayMode } from "state/types/types";
|
@@ -1872,14 +1868,14 @@ declare module "editor/components/editors/PositionEditor" {
|
|
1872
1868
|
export type PositionEditorProps = EditorProps<PositionEditorValue, {
|
1873
1869
|
positions?: Position[];
|
1874
1870
|
}>;
|
1875
|
-
export function PositionEditor(props: PositionEditorProps): JSX.Element;
|
1871
|
+
export function PositionEditor(props: PositionEditorProps): React.JSX.Element;
|
1876
1872
|
export function PositionEditorBase(props: Pick<PositionEditorProps, 'updateValue' | 'value' | 'widgetParams'> & {
|
1877
1873
|
className?: string;
|
1878
1874
|
itemSize?: number;
|
1879
1875
|
spacing?: number;
|
1880
1876
|
style?: React.CSSProperties;
|
1881
1877
|
valueLabelPosition?: 'left' | 'right' | 'none';
|
1882
|
-
}): JSX.Element;
|
1878
|
+
}): React.JSX.Element;
|
1883
1879
|
}
|
1884
1880
|
declare module "editor/hooks/useDynamicRef" {
|
1885
1881
|
export function useDynamicRef<T>(value: T): import("react").MutableRefObject<T>;
|
@@ -1903,7 +1899,7 @@ declare module "editor/design-system/components/Input" {
|
|
1903
1899
|
validationStatus?: 'error' | 'warn' | 'success';
|
1904
1900
|
value: string | number;
|
1905
1901
|
}
|
1906
|
-
export const Input: React.ForwardRefExoticComponent<
|
1902
|
+
export const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
1907
1903
|
export const S: {
|
1908
1904
|
Form: import("styled-components").StyledComponent<any, any, any, any>;
|
1909
1905
|
FormInputGroup: import("styled-components").StyledComponent<any, any, any, any>;
|
@@ -1946,7 +1942,7 @@ declare module "editor/design-system/components/Tooltip" {
|
|
1946
1942
|
tooltip: Ariakit.TooltipProps['children'];
|
1947
1943
|
tooltipWrapper?: Ariakit.TooltipAnchorProps['render'];
|
1948
1944
|
}
|
1949
|
-
export function Tooltip(props: TooltipProps): JSX.Element;
|
1945
|
+
export function Tooltip(props: TooltipProps): React.JSX.Element;
|
1950
1946
|
}
|
1951
1947
|
declare module "editor/helpers/intl" {
|
1952
1948
|
import { IntlShape } from 'react-intl';
|
@@ -2016,7 +2012,7 @@ declare module "editor/design-system/components/Dropdown" {
|
|
2016
2012
|
groupedOptions?: never;
|
2017
2013
|
renderOptionGroupHeader?: never;
|
2018
2014
|
});
|
2019
|
-
export function Dropdown(props: DropdownProps): JSX.Element;
|
2015
|
+
export function Dropdown(props: DropdownProps): React.JSX.Element;
|
2020
2016
|
}
|
2021
2017
|
declare module "editor/design-system/components/CounterInput" {
|
2022
2018
|
import React from 'react';
|
@@ -2040,14 +2036,15 @@ declare module "editor/design-system/components/CounterInput" {
|
|
2040
2036
|
validationDOMTarget?: InputProps['validationDOMTarget'];
|
2041
2037
|
value: number | string;
|
2042
2038
|
}
|
2043
|
-
export default function CounterInput(props: CounterInputProps): JSX.Element;
|
2039
|
+
export default function CounterInput(props: CounterInputProps): React.JSX.Element;
|
2044
2040
|
}
|
2045
2041
|
declare module "editor/components/editors/common/Counter" {
|
2042
|
+
import React from 'react';
|
2046
2043
|
import { CounterInputProps } from "editor/design-system/components/CounterInput";
|
2047
2044
|
export interface CounterProps extends Omit<CounterInputProps, 'displayMode'> {
|
2048
2045
|
right?: boolean;
|
2049
2046
|
}
|
2050
|
-
export default function Counter(props: CounterProps): JSX.Element;
|
2047
|
+
export default function Counter(props: CounterProps): React.JSX.Element;
|
2051
2048
|
}
|
2052
2049
|
declare module "engine/utils/sizeUtils" {
|
2053
2050
|
import { DisplayMode } from "state/types/types";
|
@@ -2163,7 +2160,7 @@ declare module "editor/design-system/components/SegmentedControl" {
|
|
2163
2160
|
items: SegmentedControlItem[];
|
2164
2161
|
renderLabel?: (item: SegmentedControlItem) => React.ReactNode;
|
2165
2162
|
}
|
2166
|
-
export function SegmentedControl(props: SegmentedControlProps): JSX.Element;
|
2163
|
+
export function SegmentedControl(props: SegmentedControlProps): React.JSX.Element;
|
2167
2164
|
}
|
2168
2165
|
declare module "state/types/RootState" {
|
2169
2166
|
import { StateType } from 'typesafe-actions';
|
@@ -2333,6 +2330,7 @@ declare module "editor/components/common/ImageUploadButton" {
|
|
2333
2330
|
export const ImageUploadButton: React.ForwardRefExoticComponent<ImageUploadButtonProps & React.RefAttributes<ImageUploadButtonInstance>>;
|
2334
2331
|
}
|
2335
2332
|
declare module "editor/design-system/components/Progress" {
|
2333
|
+
import React from 'react';
|
2336
2334
|
export interface ProgressBarProps {
|
2337
2335
|
progress: number;
|
2338
2336
|
className?: string;
|
@@ -2341,7 +2339,7 @@ declare module "editor/design-system/components/Progress" {
|
|
2341
2339
|
height?: string;
|
2342
2340
|
animationDuration?: number;
|
2343
2341
|
}
|
2344
|
-
export function Progress(props: ProgressBarProps): JSX.Element;
|
2342
|
+
export function Progress(props: ProgressBarProps): React.JSX.Element;
|
2345
2343
|
}
|
2346
2344
|
declare module "engine/utils/explodePaddingsOrMargins" {
|
2347
2345
|
export function explodePaddingsOrMargins(value: number | string | undefined): {
|
@@ -2370,7 +2368,7 @@ declare module "editor/components/editors/common/WidgetLabel" {
|
|
2370
2368
|
deviceName: Device | undefined;
|
2371
2369
|
}) => void;
|
2372
2370
|
};
|
2373
|
-
export function WidgetLabel(props: WidgetLabelProps): JSX.Element;
|
2371
|
+
export function WidgetLabel(props: WidgetLabelProps): React.JSX.Element;
|
2374
2372
|
export function getOptionModificationInfo({ defaultValue, deviceName, getValue, optionName, }: {
|
2375
2373
|
defaultValue: any;
|
2376
2374
|
deviceName: Device | null | undefined;
|
@@ -2400,6 +2398,7 @@ declare module "editor/design-system/components/ToggleSwitch" {
|
|
2400
2398
|
export const ToggleSwitch: React.ForwardRefExoticComponent<ToggleSwitchProps & React.RefAttributes<HTMLLabelElement>>;
|
2401
2399
|
}
|
2402
2400
|
declare module "editor/components/editors/AutoWidthEditor" {
|
2401
|
+
import * as React from 'react';
|
2403
2402
|
import { EditorProps } from "editor/components/editors/types";
|
2404
2403
|
import { WidgetLabelProps } from "editor/components/editors/common/WidgetLabel";
|
2405
2404
|
import { Device } from "state/types/types";
|
@@ -2425,7 +2424,7 @@ declare module "editor/components/editors/AutoWidthEditor" {
|
|
2425
2424
|
onReset: NonNullable<WidgetLabelProps['onReset']>;
|
2426
2425
|
};
|
2427
2426
|
}
|
2428
|
-
export const AutoWidthEditorBase: (props: AutoWidthEditorBaseProps) => JSX.Element;
|
2427
|
+
export const AutoWidthEditorBase: (props: AutoWidthEditorBaseProps) => React.JSX.Element;
|
2429
2428
|
}
|
2430
2429
|
declare module "engine/tools/content/carousel" {
|
2431
2430
|
export const DEFAULT_CAROUSEL_PLACEHOLDER = "https://cdn.tools.unlayer.com/carousel/placeholder.png";
|
@@ -2635,9 +2634,10 @@ declare module "editor/design-system/components/Bar" {
|
|
2635
2634
|
tooltipPlacement?: TooltipProps['placement'];
|
2636
2635
|
popoverPlacement?: PopoverProps['placement'];
|
2637
2636
|
}
|
2638
|
-
export function Bar(props: BarProps): JSX.Element;
|
2637
|
+
export function Bar(props: BarProps): React.JSX.Element;
|
2639
2638
|
}
|
2640
2639
|
declare module "editor/components/editors/pixie/PixieImageEditor" {
|
2640
|
+
import React from 'react';
|
2641
2641
|
type ImageBlob = {
|
2642
2642
|
lastModifiedDate?: Date;
|
2643
2643
|
name?: string;
|
@@ -2647,7 +2647,7 @@ declare module "editor/components/editors/pixie/PixieImageEditor" {
|
|
2647
2647
|
toggleModal: () => void;
|
2648
2648
|
onComplete: (blob: ImageBlob) => void;
|
2649
2649
|
}
|
2650
|
-
const PixieImageEditor: (props: PixieImageEditorProps) => JSX.Element;
|
2650
|
+
const PixieImageEditor: (props: PixieImageEditorProps) => React.JSX.Element;
|
2651
2651
|
export default PixieImageEditor;
|
2652
2652
|
}
|
2653
2653
|
declare module "editor/components/editors/ImageEditor" {
|
@@ -2705,9 +2705,10 @@ declare module "editor/components/common/Dropzone" {
|
|
2705
2705
|
imageInfo?: boolean;
|
2706
2706
|
};
|
2707
2707
|
}
|
2708
|
-
export function Dropzone(props: DropzoneProps): JSX.Element;
|
2708
|
+
export function Dropzone(props: DropzoneProps): React.JSX.Element;
|
2709
2709
|
}
|
2710
2710
|
declare module "editor/components/common/ImageUploadErrorMessage" {
|
2711
|
+
import React from 'react';
|
2711
2712
|
import { IntlShape } from 'react-intl';
|
2712
2713
|
export interface ImageUploadErrorMessageProps {
|
2713
2714
|
error: Error | boolean | null | undefined;
|
@@ -2718,10 +2719,10 @@ declare module "editor/components/common/ImageUploadErrorMessage" {
|
|
2718
2719
|
maxSize: number;
|
2719
2720
|
intl: IntlShape;
|
2720
2721
|
}): any;
|
2721
|
-
export function ImageUploadErrorMessage(props: ImageUploadErrorMessageProps): JSX.Element;
|
2722
|
+
export function ImageUploadErrorMessage(props: ImageUploadErrorMessageProps): React.JSX.Element;
|
2722
2723
|
}
|
2723
2724
|
declare module "editor/components/editors/ImageUploader" {
|
2724
|
-
import { RefObject } from 'react';
|
2725
|
+
import React, { RefObject } from 'react';
|
2725
2726
|
import { DropEvent, FileRejection } from 'react-dropzone';
|
2726
2727
|
import { ImageUploadButtonInstance, ImageUploadButtonProps } from "editor/components/common/ImageUploadButton";
|
2727
2728
|
import { Location } from "state/types/types";
|
@@ -2762,7 +2763,7 @@ declare module "editor/components/editors/ImageUploader" {
|
|
2762
2763
|
imageUploadButtonRef: RefObject<ImageUploadButtonInstance>;
|
2763
2764
|
showError?: boolean;
|
2764
2765
|
}
|
2765
|
-
export const ImageUploader: ({ disabled, shouldRender: _shouldRender, label, optionName, location, maxSize, intl, onDropAccepted, onDropRejected, isUploading, uploadProgress, imageUrl, imageWidth, imageHeight, imageSize, togglePixieModal, imageExists, error, onImageSelect, onImageUpload, onUploadProgressChange, onUploadStatusChange, onErrorChange, imageUploadButtonRef, showError, ...restProps }: ImageUploaderProps) => JSX.Element;
|
2766
|
+
export const ImageUploader: ({ disabled, shouldRender: _shouldRender, label, optionName, location, maxSize, intl, onDropAccepted, onDropRejected, isUploading, uploadProgress, imageUrl, imageWidth, imageHeight, imageSize, togglePixieModal, imageExists, error, onImageSelect, onImageUpload, onUploadProgressChange, onUploadStatusChange, onErrorChange, imageUploadButtonRef, showError, ...restProps }: ImageUploaderProps) => React.JSX.Element;
|
2766
2767
|
}
|
2767
2768
|
declare module "editor/components/editors/BackgroundImageEditor" {
|
2768
2769
|
import { EditorProps } from "editor/components/editors/types";
|
@@ -2851,13 +2852,14 @@ declare module "embed/Editor" {
|
|
2851
2852
|
export const LATEST_VERSION: string;
|
2852
2853
|
export const STABLE_VERSION: string;
|
2853
2854
|
export const ENV_VERSION: string;
|
2855
|
+
export const DEFAULT_VERSION: string;
|
2854
2856
|
export class Editor {
|
2855
2857
|
frame: Frame | null;
|
2856
2858
|
constructor(config?: Config);
|
2857
2859
|
init(config?: Config): void;
|
2858
2860
|
destroy(): void;
|
2859
2861
|
versions: {
|
2860
|
-
current: string;
|
2862
|
+
current: string | undefined;
|
2861
2863
|
latest: string;
|
2862
2864
|
stable: string;
|
2863
2865
|
};
|
package/package.json
CHANGED