unlayer-types 1.364.0 → 1.366.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.
Files changed (2) hide show
  1. package/embed.d.ts +69 -1286
  2. package/package.json +1 -1
package/embed.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare module "engine/config/editorSettings" {
1
+ declare module "packages/editor/src/engine/config/editorSettings" {
2
2
  export interface EditorSettings {
3
3
  minHeaders?: number;
4
4
  maxHeaders?: number;
@@ -15,9 +15,14 @@ declare module "engine/config/editorSettings" {
15
15
  export function overrideEditorSettings(editorSettingsOverrides: EditorSettings): void;
16
16
  export function getEditorSettings(): EditorSettings;
17
17
  }
18
- declare module "editor/components/editors/types" {
18
+ declare module "libs/utils/src/pruneObj" {
19
+ export function pruneObj<T extends Record<string, any>>(obj: T, options?: {
20
+ deep?: boolean;
21
+ }): Partial<T>;
22
+ }
23
+ declare module "packages/editor/src/editor/components/editors/types" {
19
24
  import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
20
- import { AppearanceConfig, Device, DisplayMode, Location, UndoRedoBehavior, Variant } from "state/types/types";
25
+ import { AppearanceConfig, Device, DisplayMode, Location, UndoRedoBehavior, Variant } from "packages/editor/src/state/types/types";
21
26
  export type LoadingState = 'not-loaded' | 'loading' | 'loaded' | 'error';
22
27
  export type UpdatingState = 'updating' | undefined;
23
28
  export type DeletionState = 'deleting' | 'failed' | undefined;
@@ -150,14 +155,14 @@ declare module "editor/components/editors/types" {
150
155
  _languages?: LanguageOverride;
151
156
  };
152
157
  }
153
- declare module "state/types/RootState" {
158
+ declare module "packages/editor/src/state/types/RootState" {
154
159
  import { StateType } from 'typesafe-actions';
155
160
  import reducer from '../reducer';
156
161
  export type RootState = StateType<typeof reducer>;
157
162
  }
158
- declare module "editor/themes/types" {
159
- import { AppearanceConfig } from "state/types/types";
160
- import { DeepPartial } from "editor/components/editors/types";
163
+ declare module "packages/editor/src/editor/themes/types" {
164
+ import { AppearanceConfig } from "packages/editor/src/state/types/types";
165
+ import { DeepPartial } from "packages/editor/src/editor/components/editors/types";
161
166
  export type ThemeName = 'classic_light' | 'classic_dark' | 'modern_light' | 'modern_dark';
162
167
  export type ThemeNamePlusLightDark = ThemeName | 'light' | 'dark';
163
168
  export type Theme = {
@@ -1320,49 +1325,31 @@ declare module "editor/themes/types" {
1320
1325
  };
1321
1326
  };
1322
1327
  }
1323
- declare module "engine/constants" {
1324
- export const displayModes: readonly ["email", "web", "popup", "document"];
1325
- export const collections: readonly ["bodies", "columns", "contents", "footers", "headers", "pages", "rows"];
1328
+ declare module "packages/editor/src/engine/constants" {
1329
+ import { collections, displayModes } from '@libs/schemas/constants/constants';
1330
+ export { collections, displayModes };
1326
1331
  export const HTMLInputTypeAttributes: readonly ["button", "checkbox", "color", "date", "datetime-local", "email", "file", "hidden", "image", "month", "number", "password", "radio", "range", "reset", "search", "submit", "tel", "text", "time", "url", "week"];
1332
+ export const IS_LOCAL_DEVELOPMENT: boolean;
1333
+ export const IS_DEVELOPMENT_ENVIRONMENT: boolean;
1327
1334
  export const IS_CYPRESS: boolean;
1328
1335
  export const BROWSER: {
1329
1336
  IS_IE: boolean;
1330
1337
  IS_SAFARI: boolean;
1331
1338
  };
1332
1339
  }
1333
- declare module "engine/utils/zod/schemas" {
1334
- import { z } from 'zod/v4';
1335
- /**
1336
- * zod/v4 workaround for z.function support
1337
- * Not supported by z.toJSONSchema
1338
- * @see https://zod.dev/v4/changelog?id=zfunction
1339
- * @see https://github.com/colinhacks/zod/issues/4143#issuecomment-2845134912
1340
- */
1341
- export const functionSchema: <T extends z.core.$ZodFunction>(schema: T) => any;
1342
- export const createAsyncFunctionSchema: <T extends z.core.$ZodFunction>(schema: T) => any;
1343
- export const locationSchema: any;
1344
- export const DisplayConditionZodSchema: any;
1345
- export const FontWeightZodSchema: any;
1346
- export const FontZodSchema: any;
1347
- export const HintZodSchema: any;
1348
- export const PercentageZodSchema: any;
1349
- export const SinglePxZodSchema: any;
1350
- export const DoublePxZodSchema: any;
1351
- export const TriplePxZodSchema: any;
1352
- export const QuadruplePxZodSchema: any;
1353
- export const MultiplePxZodSchema: any;
1354
- }
1355
- declare module "state/types/types" {
1340
+ declare module "packages/editor/src/state/types/types" {
1356
1341
  import * as Ariakit from '@ariakit/react';
1357
1342
  import { MutableRefObject, ReactInstance } from 'react';
1358
- import { z } from 'zod/v4';
1343
+ import { z } from 'zod';
1344
+ import type { AICopilotDataType } from '@libs/ai/types/types';
1345
+ import { DisplayConditionZodSchema } from '@libs/schemas/common/schemas';
1359
1346
  import { State as Design } from '../reducer/design';
1360
- import { CollaborationThread } from "editor/components/editors/types";
1361
- import { RootState } from "state/types/RootState";
1362
- import { ThemeExtension, ThemeNamePlusLightDark } from "editor/themes/types";
1363
- import { collections, displayModes } from "engine/constants";
1364
- import { DisplayConditionZodSchema } from "engine/utils/zod/schemas";
1347
+ import { CollaborationThread } from "packages/editor/src/editor/components/editors/types";
1348
+ import { RootState } from "packages/editor/src/state/types/RootState";
1349
+ import { ThemeExtension, ThemeNamePlusLightDark } from "packages/editor/src/editor/themes/types";
1350
+ import { collections, displayModes } from "packages/editor/src/engine/constants";
1365
1351
  import { AppDispatch } from '../store';
1352
+ export type { AICopilotDataType };
1366
1353
  export type DesignMode = 'live' | 'edit';
1367
1354
  export type Device = 'desktop' | 'mobile' | 'tablet';
1368
1355
  export type Resolution = {
@@ -1488,7 +1475,6 @@ declare module "state/types/types" {
1488
1475
  }
1489
1476
  export type Collection = ArrayItem<typeof collections>;
1490
1477
  export type Container = 'body' | 'row' | 'column' | 'content';
1491
- export type AICopilotDataType = 'template_block' | 'page_block' | 'body_block' | 'row_block' | 'header_block' | 'footer_block' | 'column_block' | 'content_block' | 'text';
1492
1478
  export interface Location {
1493
1479
  collection: Collection;
1494
1480
  id: number | string;
@@ -1621,7 +1607,7 @@ declare module "state/types/types" {
1621
1607
  [id: string]: unknown;
1622
1608
  html?: string;
1623
1609
  defaultErrors?: Audit[];
1624
- }) => Promise<Audit[]>;
1610
+ }) => Audit[] | Promise<Audit[]>;
1625
1611
  export type AuditApiResult = {
1626
1612
  status: 'FAIL' | 'PASS';
1627
1613
  errors: Audit[];
@@ -1807,13 +1793,8 @@ declare module "state/types/types" {
1807
1793
  }) => string;
1808
1794
  export type ItemExporters = Partial<Record<ExporterName, ItemExporter>>;
1809
1795
  }
1810
- declare module "engine/utils/pruneObj" {
1811
- export function pruneObj<T extends Record<string, any>>(obj: T, options?: {
1812
- deep?: boolean;
1813
- }): Partial<T>;
1814
- }
1815
- declare module "engine/config/features" {
1816
- import { Resolution, Language } from "state/types/types";
1796
+ declare module "packages/editor/src/engine/config/features" {
1797
+ import { Resolution, Language } from "packages/editor/src/state/types/types";
1817
1798
  export interface TextEditorCustomButton {
1818
1799
  name: string;
1819
1800
  icon: string;
@@ -1924,8 +1905,9 @@ declare module "engine/config/features" {
1924
1905
  sendTestEmail?: boolean;
1925
1906
  syncedBlocks?: boolean;
1926
1907
  }
1927
- export const betaFeatures: readonly ["ai.copilot"];
1908
+ export const betaFeaturesPaths: readonly ["ai.copilot"];
1928
1909
  export const betaEntitlements: readonly ["copilot"];
1910
+ export const getBetaFeatures: () => "copilot"[];
1929
1911
  export function setFeatures(newFeatures: Features): void;
1930
1912
  export function getFeatureOverrides(): Features;
1931
1913
  export function setOverrideFeatures(newOverrideFeatures: Features, options?: {
@@ -1937,11 +1919,11 @@ declare module "engine/config/features" {
1937
1919
  export function getFeatureAsObject<Path extends keyof Features | [keyof Features, ...string[]]>(path: Path): Partial<(Path extends keyof Features ? Features[Path] : any) & object>;
1938
1920
  export function hasFeature<Path extends keyof Features | [keyof Features, ...string[]]>(path: Path, checkEntitlement?: boolean | string): boolean;
1939
1921
  }
1940
- declare module "engine/config/offline" {
1922
+ declare module "packages/editor/src/engine/config/offline" {
1941
1923
  export function enableOffline(): void;
1942
1924
  export function isOffline(): boolean;
1943
1925
  }
1944
- declare module "engine/config/callbacks" {
1926
+ declare module "packages/editor/src/engine/config/callbacks" {
1945
1927
  import { Handler } from 'mitt';
1946
1928
  export type CallbackDoneFn = (result: any) => Promise<void> | void;
1947
1929
  export type CallbackFn = (data?: any, done?: CallbackDoneFn) => Promise<void> | void;
@@ -1971,9 +1953,9 @@ declare module "engine/config/callbacks" {
1971
1953
  remove: () => void;
1972
1954
  };
1973
1955
  }
1974
- declare module "engine/config/fonts" {
1975
- import { z } from 'zod/v4';
1976
- import { FontZodSchema } from "engine/utils/zod/schemas";
1956
+ declare module "packages/editor/src/engine/config/fonts" {
1957
+ import { z } from 'zod';
1958
+ import { FontZodSchema } from '@libs/schemas/common/schemas';
1977
1959
  export type Font = z.infer<typeof FontZodSchema>;
1978
1960
  export type FontList = Font[];
1979
1961
  export interface FontConfig {
@@ -1992,7 +1974,7 @@ declare module "engine/config/fonts" {
1992
1974
  export function getCustomFontsCount(): number;
1993
1975
  export const defaultFontWeights: number[];
1994
1976
  }
1995
- declare module "engine/config/safeHtml" {
1977
+ declare module "packages/editor/src/engine/config/safeHtml" {
1996
1978
  import { Config } from 'dompurify';
1997
1979
  export interface SafeHtmlOptions {
1998
1980
  domPurifyOptions?: Config;
@@ -2013,12 +1995,12 @@ declare module "engine/config/safeHtml" {
2013
1995
  }): TrustedHTML;
2014
1996
  export const toSafeHtml: typeof _toSafeHtml & import("lodash").MemoizedFunction;
2015
1997
  }
2016
- declare module "engine/translations/types" {
1998
+ declare module "packages/editor/src/engine/translations/types" {
2017
1999
  import stockTranslations from '.';
2018
2000
  export type StockLocale = keyof typeof stockTranslations;
2019
2001
  }
2020
- declare module "engine/config/intl" {
2021
- import { StockLocale } from "engine/translations/types";
2002
+ declare module "packages/editor/src/engine/config/intl" {
2003
+ import { StockLocale } from "packages/editor/src/engine/translations/types";
2022
2004
  export type Locale = StockLocale | 'en-US';
2023
2005
  export type TextDirection = 'ltr' | 'rtl';
2024
2006
  export const DEFAULT_LOCALE = "en-US";
@@ -2030,15 +2012,15 @@ declare module "engine/config/intl" {
2030
2012
  export function setTextDirection(textDirection: TextDirection | null): void;
2031
2013
  export function isRTL(locale: Locale): boolean;
2032
2014
  }
2033
- declare module "embed/Config" {
2015
+ declare module "packages/editor/src/embed/Config" {
2034
2016
  import { ValidationResult } from 'amphtml-validator';
2035
- import { EditorSettings } from "engine/config/editorSettings";
2036
- import { Features } from "engine/config/features";
2037
- import { FontList } from "engine/config/fonts";
2038
- import { SafeHtmlOptions } from "engine/config/safeHtml";
2039
- import { TextDirection } from "engine/config/intl";
2040
- import { AppearanceConfig, Audit, DesignTags, DesignTagsConfig, Device, DisplayConditions, DisplayMode, Fonts, JSONTemplate, LinkTypes, LinkTypesSharedConfig, MergeTags, MergeTagsConfig, MergeTagsValues, SpecialLinks, Tabs, ToolsConfig, User } from "state/types/types";
2041
- import { DeepPartial } from "editor/components/editors/types";
2017
+ import { EditorSettings } from "packages/editor/src/engine/config/editorSettings";
2018
+ import { Features } from "packages/editor/src/engine/config/features";
2019
+ import { FontList } from "packages/editor/src/engine/config/fonts";
2020
+ import { SafeHtmlOptions } from "packages/editor/src/engine/config/safeHtml";
2021
+ import { TextDirection } from "packages/editor/src/engine/config/intl";
2022
+ import { AppearanceConfig, Audit, DesignTags, DesignTagsConfig, Device, DisplayConditions, DisplayMode, Fonts, JSONTemplate, LinkTypes, LinkTypesSharedConfig, MergeTags, MergeTagsConfig, MergeTagsValues, SpecialLinks, Tabs, ToolsConfig, User } from "packages/editor/src/state/types/types";
2023
+ import { DeepPartial } from "packages/editor/src/editor/components/editors/types";
2042
2024
  export interface Config {
2043
2025
  id?: string;
2044
2026
  className?: string;
@@ -2169,13 +2151,13 @@ declare module "embed/Config" {
2169
2151
  export interface ExportZipFromApiOptions extends BaseExportFromApiOptions {
2170
2152
  }
2171
2153
  }
2172
- declare module "engine/utils/findDeep" {
2173
- export function findDeep<T = any>(item: Record<string, T> | Array<T> | T, eq: ((item: T) => boolean) | unknown, { _path, _visited }?: {
2154
+ declare module "libs/utils/src/findDeep" {
2155
+ export function findDeep<T = any>(item: Record<string, T> | Array<T> | T, eq: ((item: T, key: string | undefined) => boolean) | unknown, { _path, _visited }?: {
2174
2156
  _path?: string[];
2175
2157
  _visited?: WeakMap<WeakKey, any>;
2176
2158
  }): string[][];
2177
2159
  }
2178
- declare module "embed/Frame" {
2160
+ declare module "packages/editor/src/embed/Frame" {
2179
2161
  export type Message = object;
2180
2162
  export interface MessageData {
2181
2163
  action: string;
@@ -2217,1214 +2199,15 @@ declare module "embed/Frame" {
2217
2199
  }
2218
2200
  }
2219
2201
  }
2220
- declare module "editor/components/common/Modal" {
2221
- import React from 'react';
2222
- import { Props as ReactModalProps } from 'react-modal';
2223
- export interface ModalProps extends Omit<ReactModalProps, 'style'> {
2224
- children: React.ReactNode;
2225
- className?: string;
2226
- contentStyle?: React.CSSProperties;
2227
- innerContentStyle?: React.CSSProperties;
2228
- overlayStyle?: React.CSSProperties;
2229
- }
2230
- export function Modal(props: ModalProps): React.JSX.Element;
2231
- }
2232
- declare module "editor/components/common/ConditionalWrap" {
2233
- import React from 'react';
2234
- export interface ConditionalWrapProps {
2235
- children: any;
2236
- condition: boolean;
2237
- wrap: (children: React.ReactElement<any>) => React.ReactNode;
2238
- }
2239
- export function ConditionalWrap(props: ConditionalWrapProps): any;
2240
- }
2241
- declare module "editor/components/common/Loader" {
2242
- import React from 'react';
2243
- export interface LoaderProps {
2244
- children?: React.ReactNode;
2245
- color?: boolean | string | ((props: {
2246
- theme: any;
2247
- }) => string);
2248
- fadeIn?: boolean;
2249
- loaded?: boolean;
2250
- loadedClassName?: string;
2251
- loadingClassName?: string;
2252
- size?: 'small' | 'normal';
2253
- }
2254
- export function Loader(props: LoaderProps): React.JSX.Element;
2255
- }
2256
- declare module "engine/utils/withHook" {
2257
- import React from 'react';
2258
- 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>>>;
2259
- }
2260
- declare module "editor/hooks/useForceRerender" {
2261
- export function useForceRerender({ debounce, throttle, }?: {
2262
- debounce?: boolean | number;
2263
- throttle?: boolean | number;
2264
- }): () => void;
2265
- }
2266
- declare module "editor/hooks/useConfig" {
2267
- import React from 'react';
2268
- export function useConfig(): any;
2269
- export function withConfig<C extends React.ComponentType>(Component: C): React.MemoExoticComponent<React.ForwardRefExoticComponent<React.RefAttributes<unknown>>>;
2270
- }
2271
- declare module "engine/utils/position" {
2272
- import { ArrayItem, DisplayMode } from "state/types/types";
2273
- export const ENABLE_BACKGROUND_POSITION_FOR_EMAILS = true;
2274
- export const positions: readonly ["top-left", "top-center", "top-right", "center-left", "center", "center-right", "bottom-left", "bottom-center", "bottom-right"];
2275
- export type Position = ArrayItem<typeof positions>;
2276
- export function positionToMarginArray(position: Position | undefined): string[] | readonly [0, "auto", "auto", 0] | readonly [0, "auto", "auto", "auto"] | readonly [0, 0, "auto", "auto"] | readonly ["auto", "auto", "auto", 0] | readonly ["auto"] | readonly ["auto", 0, "auto", "auto"] | readonly ["auto", "auto", 0, 0] | readonly ["auto", "auto", 0, "auto"] | readonly ["auto", 0, 0, "auto"];
2277
- export function positionToBackgroundPosition(position: Position | undefined): 'top left' | 'top center' | 'top right' | 'center left' | 'center center' | 'center right' | 'bottom left' | 'bottom center' | 'bottom right' | 'auto auto';
2278
- export function valuesToBackgroundPositionCSS(values: {
2279
- position: Position | 'custom' | undefined;
2280
- customPosition: [string, string] | undefined;
2281
- }, { displayMode }: {
2282
- displayMode: DisplayMode;
2283
- }): string;
2284
- export function positionToPercentages(position: Position | 'custom' | undefined): [x: string, y: string] | undefined;
2285
- export function normalizePosition(position: 'top' | 'top-left' | 'top-center' | 'top-right' | 'center' | 'center-left' | 'center-center' | 'center-right' | 'center-top' | 'center-bottom' | 'bottom' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left' | 'left-top' | 'left-center' | 'left-bottom' | 'right' | 'right-top' | 'right-center' | 'right-bottom' | 'custom' | undefined): Position | undefined;
2286
- }
2287
- declare module "engine/utils/zod/zodSchemasToJsonSchemas" {
2288
- import { z } from 'zod/v4';
2289
- import { JSONSchema } from "state/types/types";
2290
- export function zodSchemasToJsonSchemas<K extends string>(zodSchemas: Partial<Record<K, z.ZodType | undefined>>): Record<K, JSONSchema>;
2291
- }
2292
- declare module "engine/utils/zod/propertyEditorSchemas" {
2293
- import { PropertyEditorZodSchemas } from '../../config';
2294
- export function propertyEditorZodSchemas<ValueSchema extends PropertyEditorZodSchemas['value']>(zodSchemas: Omit<PropertyEditorZodSchemas, 'value' | 'value__simple'> & {
2295
- value: ValueSchema;
2296
- value__simple: ((valueSchema: ValueSchema) => PropertyEditorZodSchemas['value__simple']) | PropertyEditorZodSchemas['value__simple'] | null | undefined;
2297
- }): {
2298
- zodSchemas: {
2299
- value__simple: any;
2300
- value: ValueSchema;
2301
- };
2302
- schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>;
2303
- };
2304
- }
2305
- declare module "engine/utils/zod/types" {
2306
- import { z } from 'zod/v4';
2307
- import { EditorProps } from "editor/components/editors/types";
2308
- import { PropertyEditorZodSchemas } from '../../config';
2309
- export type EditorPropsFromZodSchemas<T extends Partial<PropertyEditorZodSchemas>> = EditorProps<z.infer<T['value']>, z.infer<T['widgetParams']>>;
2310
- }
2311
- declare module "editor/components/editors/PositionEditor" {
2312
- import React from 'react';
2313
- import { EditorPropsFromZodSchemas } from "engine/utils/zod/types";
2314
- export const schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>, zodSchemas: {
2315
- value__simple: any;
2316
- value: any;
2317
- };
2318
- export type PositionEditorProps = EditorPropsFromZodSchemas<typeof zodSchemas>;
2319
- export function PositionEditor(props: PositionEditorProps): React.JSX.Element;
2320
- export function PositionEditorBase(props: Pick<PositionEditorProps, 'updateValue' | 'value' | 'widgetParams'> & {
2321
- className?: string;
2322
- itemSize?: number;
2323
- spacing?: number;
2324
- style?: React.CSSProperties;
2325
- valueLabelPosition?: 'left' | 'right' | 'none';
2326
- }): React.JSX.Element;
2327
- }
2328
- declare module "editor/hooks/useDynamicRef" {
2329
- export function useDynamicRef<T>(value: T): import("react").MutableRefObject<T>;
2330
- }
2331
- declare module "engine/utils/renderIcon" {
2332
- import React from 'react';
2333
- import * as config from '../../engine/config';
2334
- import { Icon } from "state/types/types";
2335
- import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
2336
- import { FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
2337
- export function renderIcon(icon: Icon | Parameters<typeof config.normalizeIcon>[0] | undefined, { fallbackIcon, shouldShowFallbackIcon, size, divProps, }?: {
2338
- shouldShowFallbackIcon?: boolean;
2339
- fallbackIcon?: IconDefinition;
2340
- size?: FontAwesomeIconProps['size'];
2341
- divProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
2342
- }): React.JSX.Element;
2343
- }
2344
- declare module "editor/design-system/components/Input" {
2345
- import React from 'react';
2346
- import * as Ariakit from '@ariakit/react';
2347
- import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
2348
- import { Icon } from "state/types/types";
2349
- export interface InputProps extends Omit<Ariakit.FormInputProps, 'as' | 'onSubmit' | 'onSubmitCapture'> {
2350
- containerStyle?: React.CSSProperties;
2351
- formStore?: Ariakit.FormStore<{
2352
- value: string;
2353
- }>;
2354
- icon?: Icon | IconDefinition;
2355
- inputFooter?: React.ReactNode;
2356
- inputHeader?: React.ReactNode;
2357
- inputStyle?: React.CSSProperties;
2358
- label?: React.ReactNode;
2359
- labelPosition?: 'top' | 'left' | 'right';
2360
- maxRows?: number;
2361
- minRows?: number;
2362
- name: string;
2363
- onClear?: () => void;
2364
- onSubmit: (value: string | number) => void;
2365
- placeholder?: string;
2366
- required?: boolean;
2367
- type?: Ariakit.FormInputProps['type'] | 'textarea';
2368
- validationDOMTarget?: HTMLDivElement | null;
2369
- validationMessage?: string;
2370
- validationStatus?: 'error' | 'warn' | 'success';
2371
- value: string | number;
2372
- }
2373
- export const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
2374
- export const CSS: {
2375
- label: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
2376
- };
2377
- export const S: {
2378
- Form: import("styled-components").StyledComponent<any, any, any, any>;
2379
- FormInputGroup: import("styled-components").StyledComponent<any, any, any, any>;
2380
- FormLabel: import("styled-components").StyledComponent<any, any, any, any>;
2381
- FormInputWrapper: import("styled-components").StyledComponent<"div", any, {
2382
- className: "input-wrapper";
2383
- }, "className">;
2384
- FormInput: import("styled-components").StyledComponent<any, any, any, any>;
2385
- Message: import("styled-components").StyledComponent<"div", any, {}, never>;
2386
- ClearButton: import("styled-components").StyledComponent<any, any, any, any>;
2387
- };
2388
- }
2389
- declare module "editor/helpers/extractStringsFromReactNode" {
2390
- import React from 'react';
2391
- export function extractStringsFromReactNode(node: React.ReactNode): string;
2392
- }
2393
- declare module "editor/design-system/components/Tooltip" {
2394
- import React from 'react';
2395
- import * as Ariakit from '@ariakit/react';
2396
- export interface TooltipProps {
2397
- arrow?: boolean;
2398
- children?: Ariakit.TooltipAnchorProps['children'];
2399
- className?: string;
2400
- disabled?: boolean;
2401
- disableIfNotTruncated?: boolean;
2402
- gutter?: Ariakit.TooltipProps['gutter'];
2403
- placement: Ariakit.TooltipStoreProps['placement'];
2404
- style?: React.CSSProperties;
2405
- timeout?: Ariakit.TooltipStoreProps['timeout'];
2406
- tooltip: Ariakit.TooltipProps['children'];
2407
- tooltipWrapper?: Ariakit.TooltipAnchorProps['render'];
2408
- }
2409
- export function Tooltip(props: TooltipProps): React.JSX.Element;
2410
- }
2411
- declare module "editor/design-system/components/Button" {
2412
- import React from 'react';
2413
- import * as Ariakit from '@ariakit/react';
2414
- import { IconProp } from '@fortawesome/fontawesome-svg-core';
2415
- import { Theme } from "editor/themes/types";
2416
- import { TooltipProps } from "editor/design-system/components/Tooltip";
2417
- export interface ButtonProps extends Ariakit.ButtonProps {
2418
- children?: React.ReactNode;
2419
- circle?: boolean;
2420
- className?: string;
2421
- contentAlign?: 'left' | 'center' | 'right';
2422
- danger?: boolean;
2423
- disabled?: boolean;
2424
- icon?: IconProp;
2425
- id?: string;
2426
- loading?: boolean;
2427
- onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
2428
- rounded?: boolean;
2429
- size?: number | 'auto';
2430
- style?: React.CSSProperties;
2431
- tooltip?: string;
2432
- tooltipPlacement?: TooltipProps['placement'];
2433
- truncate?: boolean;
2434
- type?: Ariakit.ButtonProps['type'];
2435
- variant?: keyof Theme['components']['buttons'];
2436
- }
2437
- export const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<unknown>>;
2438
- }
2439
- declare module "editor/helpers/intl" {
2440
- import _ from 'lodash';
2441
- import { IntlShape } from 'react-intl';
2442
- function _getIntlLabel<Label extends any>(intl: IntlShape, label: string | Label): string | Label;
2443
- export const getIntlLabel: typeof _getIntlLabel & _.MemoizedFunction;
2444
- }
2445
- declare module "editor/design-system/components/Dropdown" {
2446
- import React from 'react';
2447
- import * as Ariakit from '@ariakit/react';
2448
- import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
2449
- import { TooltipProps } from "editor/design-system/components/Tooltip";
2450
- export interface SelectOption {
2451
- icon?: IconDefinition;
2452
- label: string;
2453
- value: any;
2454
- key?: string;
2455
- tooltip?: string;
2456
- tooltipPlacement?: TooltipProps['placement'];
2457
- meta?: Record<string, unknown>;
2458
- onClick?: (e: React.MouseEvent, selected: boolean) => void;
2459
- selected: boolean;
2460
- disabled?: boolean;
2461
- toggle?: boolean;
2462
- attrs?: Record<string, string | number | boolean | undefined>;
2463
- }
2464
- export interface SelectOptionGroup {
2465
- name?: string;
2466
- label?: string;
2467
- icon?: IconDefinition;
2468
- options: SelectOption[];
2469
- meta?: object;
2470
- }
2471
- export type DropdownProps = {
2472
- ariaLabel?: string;
2473
- asLink?: boolean;
2474
- badge?: number | boolean;
2475
- className?: string;
2476
- icon?: IconDefinition;
2477
- caret?: boolean;
2478
- disabled?: boolean;
2479
- fallbackLabel?: string;
2480
- id?: string;
2481
- label?: React.ReactNode;
2482
- multi?: boolean;
2483
- triggerLabel?: string | React.ReactNode;
2484
- placement?: Ariakit.PopoverStoreState['placement'];
2485
- onChange?: (option: SelectOption) => void;
2486
- onClose?: () => void;
2487
- onOpen?: () => void;
2488
- renderButton?: Ariakit.SelectProps['render'];
2489
- renderFooter?: () => React.ReactNode;
2490
- renderHeader?: () => React.ReactNode;
2491
- style?: React.CSSProperties;
2492
- customPopoverStyles?: React.CSSProperties;
2493
- tooltip?: string;
2494
- title?: string;
2495
- tooltipPlacement?: TooltipProps['placement'];
2496
- } & ({
2497
- renderOption?: (option: SelectOption) => React.ReactNode;
2498
- renderOptionLabel?: never;
2499
- } | {
2500
- renderOption?: never;
2501
- renderOptionLabel?: (option: SelectOption) => React.ReactNode;
2502
- }) & ({
2503
- options?: never;
2504
- groupedOptions?: Array<SelectOptionGroup | undefined>;
2505
- renderOptionGroupHeader?: (optionGroup: SelectOptionGroup) => React.ReactNode;
2506
- } | {
2507
- options?: Array<SelectOption | undefined>;
2508
- groupedOptions?: never;
2509
- renderOptionGroupHeader?: never;
2510
- });
2511
- export function Dropdown(props: DropdownProps): React.JSX.Element;
2512
- }
2513
- declare module "editor/themes/helpers" {
2514
- import { Theme, ThemeExtension } from "editor/themes/types";
2515
- export function extendTheme<TE extends ThemeExtension, BT extends Theme>(themeExtension: TE, baseTheme: BT): BT;
2516
- export function postprocessTheme<T extends Theme>(theme: T): T;
2517
- export function parseThemeValues<T extends Theme>(theme: T): T;
2518
- }
2519
- declare module "editor/themes/modern/light" {
2520
- import { DeprecatedTheme, Theme } from "editor/themes/types";
2521
- export const unparsedTheme: Theme & DeprecatedTheme;
2522
- }
2523
- declare module "editor/themes/classic/light" {
2524
- export const unparsedTheme: import("editor/themes/types").Theme & import("editor/themes/types").DeprecatedTheme;
2525
- }
2526
- declare module "editor/themes/modern/dark" {
2527
- import { DeprecatedTheme, Theme } from "editor/themes/types";
2528
- export const unparsedTheme: Theme & DeprecatedTheme;
2529
- }
2530
- declare module "editor/themes/classic/dark" {
2531
- export const unparsedTheme: import("editor/themes/types").Theme & import("editor/themes/types").DeprecatedTheme;
2532
- }
2533
- declare module "editor/themes/index" {
2534
- const themes: {
2535
- classic_light: import("editor/themes/types").Theme & import("editor/themes/types").DeprecatedTheme;
2536
- classic_dark: import("editor/themes/types").Theme & import("editor/themes/types").DeprecatedTheme;
2537
- modern_light: import("editor/themes/types").Theme & import("editor/themes/types").DeprecatedTheme;
2538
- modern_dark: import("editor/themes/types").Theme & import("editor/themes/types").DeprecatedTheme;
2539
- };
2540
- export default themes;
2541
- }
2542
- declare module "editor/hooks/useTheme" {
2543
- import React from 'react';
2544
- import { DeprecatedTheme, Theme } from "editor/themes/types";
2545
- export function ThemeProvider(props: React.PropsWithChildren): React.JSX.Element;
2546
- export function ThemeConsumer(props: {
2547
- children: React.ReactNode | ((params: {
2548
- theme: any;
2549
- }) => React.ReactNode);
2550
- }): React.ReactNode;
2551
- export function useThemeInternal(): Theme & DeprecatedTheme;
2552
- export function useTheme(): Theme & DeprecatedTheme;
2553
- }
2554
- declare module "editor/design-system/components/CounterInput" {
2555
- import React from 'react';
2556
- import { DisplayMode } from "state/types/types";
2557
- import { InputProps } from "editor/design-system/components/Input";
2558
- export interface CounterInputProps {
2559
- absoluteBaseValue?: number;
2560
- containerStyle?: React.CSSProperties;
2561
- defaultUnit?: string;
2562
- disabled?: boolean;
2563
- displayMode: DisplayMode;
2564
- inputStyle?: InputProps['style'];
2565
- mainContainerStyle?: React.CSSProperties;
2566
- maxValue?: number | null;
2567
- minValue?: number | null;
2568
- onChange: (value: number | string) => void;
2569
- shouldRenderIncrementDecrementButtons?: boolean;
2570
- step?: number;
2571
- units?: string[];
2572
- unitSupportedDisplayModes?: string[];
2573
- validationDOMTarget?: InputProps['validationDOMTarget'];
2574
- value: number | string;
2575
- }
2576
- export default function CounterInput(props: CounterInputProps): React.JSX.Element;
2577
- }
2578
- declare module "editor/components/editors/common/Counter" {
2579
- import React from 'react';
2580
- import { CounterInputProps } from "editor/design-system/components/CounterInput";
2581
- export interface CounterProps extends Omit<CounterInputProps, 'displayMode'> {
2582
- right?: boolean;
2583
- }
2584
- export default function Counter(props: CounterProps): React.JSX.Element;
2585
- }
2586
- declare module "engine/utils/sizeUtils" {
2587
- import { DisplayMode } from "state/types/types";
2588
- export const ENABLE_BACKGROUND_SIZE_FOR_EMAILS = false;
2589
- export function normalizeFloat(n: number | string | undefined, decimalsPlace?: number): number;
2590
- export function normalizeSize(size: number | string | undefined, { decimalsPlace }?: {
2591
- decimalsPlace?: number;
2592
- }): string;
2593
- export function calculateExactSize(size: number | string, maxSize: number | undefined, options?: {
2594
- decimalsPlace?: number;
2595
- ifNumberConsiderAsPercentage?: boolean;
2596
- }): number | undefined;
2597
- export function valuesToBackgroundSizeCSS(values: {
2598
- size: 'contain' | 'cover' | 'custom' | undefined;
2599
- customSize: [string, string];
2600
- }, { displayMode }: {
2601
- displayMode: DisplayMode;
2602
- }): string;
2603
- }
2604
- declare module "engine/config/mergeTags" {
2605
- import { MergeTags } from "state/types/types";
2606
- export function getMergeTags(): MergeTags;
2607
- export function getMergeTagsVersion(): number;
2608
- export function setMergeTags(_mergeTags: MergeTags): void;
2609
- }
2610
- declare module "engine/utils/htmlEntities" {
2611
- export function encodeHtmlEntities(str: string | undefined, { modes }?: {
2612
- modes?: Array<keyof typeof replacers>;
2613
- }): string;
2614
- const replacers: {
2615
- accents: (str: string | undefined) => string;
2616
- all: (str: string | undefined) => string;
2617
- others: (str: string | undefined) => string;
2618
- tags: (str: string | undefined) => string;
2619
- };
2620
- }
2621
- declare module "engine/utils/encodeMergeTag" {
2622
- export function encodeMergeTag(str: string | undefined): string;
2623
- }
2624
- declare module "engine/utils/escapeHtml" {
2625
- export function escapeHtml(str: string | undefined, { escapeAndOperator, // This was causing issues by changing & in links to &amp;
2626
- escapeLT, escapeGT, escapeDoubleQuotes, escapeSingleQuotes, }?: {
2627
- escapeAndOperator?: boolean;
2628
- escapeLT?: boolean;
2629
- escapeGT?: boolean;
2630
- escapeDoubleQuotes?: boolean;
2631
- escapeSingleQuotes?: boolean;
2632
- }): string;
2633
- }
2634
- declare module "engine/utils/escapeRegexString" {
2635
- export function escapeRegexString(str: string): string;
2636
- }
2637
- declare module "engine/utils/getNumberOrString" {
2638
- export function getNumberOrString(str: string | number): string | number;
2639
- }
2640
- declare module "engine/utils/flattenMergeTags" {
2641
- import { MergeTag, MergeTags, MergeTagsConfig } from "state/types/types";
2642
- export type MergeTagWithMeta = MergeTag & {
2643
- _meta: {
2644
- key: string;
2645
- tree: Array<Omit<MergeTag, 'mergeTags'> & {
2646
- _meta?: Omit<MergeTagWithMeta['_meta'], 'tree'>;
2647
- }>;
2648
- };
2649
- };
2650
- function _flattenMergeTags(mergeTags: Array<MergeTag | MergeTagWithMeta> | MergeTags, mergeTagsConfig?: Pick<MergeTagsConfig, 'sort'>, _internal?: Pick<MergeTagWithMeta['_meta'], 'tree'>): Array<MergeTagWithMeta>;
2651
- export const flattenMergeTags: typeof _flattenMergeTags & import("lodash").MemoizedFunction;
2652
- export function getMergeTagLabel(mergeTag: MergeTagWithMeta['_meta']['tree'][0] | undefined): string;
2653
- export function getMergeTagFlatLabel(mergeTag: MergeTagWithMeta | undefined): string;
2654
- }
2655
- declare module "engine/utils/testBrowserFeatures" {
2656
- export function supportsRegexLookAheadLookBehind(): boolean;
2657
- export function replaceWithLookBehind(str: string, lookbBehindStr: string, regex: RegExp, replacement: string): string;
2658
- }
2659
- declare module "engine/utils/applyMergeTagsToHtml" {
2660
- import { MergeTags, MergeTagsValues } from "state/types/types";
2661
- export function applyMergeTagsToHtml(html: string | undefined, { mergeTagsSchema, mergeTagsValues: _mergeTagsValues, _skipTags, _useRawValue, }: {
2662
- mergeTagsSchema: MergeTags | undefined;
2663
- mergeTagsValues: MergeTagsValues | undefined;
2664
- _skipTags?: boolean;
2665
- _useRawValue?: boolean;
2666
- }): string;
2667
- }
2668
- declare module "engine/utils/generateMergeTagHtml" {
2669
- import { Icon, MergeTag } from "state/types/types";
2670
- export function generateMergeTagHtml(mergeTag: Pick<MergeTag, 'name' | 'value' | 'sample'> & {
2671
- icon?: Icon | string;
2672
- }, tool?: 'paragraph' | 'text'): string;
2673
- }
2674
- declare module "engine/utils/applyMergeTagPreviewHtmlToText" {
2675
- function _applyMergeTagPreviewHtmlToText(text: string | undefined, { type, tool, }?: {
2676
- type?: 'smart' | 'raw';
2677
- tool?: 'paragraph' | 'text';
2678
- }): string;
2679
- export const applyMergeTagPreviewHtmlToText: typeof _applyMergeTagPreviewHtmlToText & import("lodash").MemoizedFunction;
2680
- }
2681
- declare module "editor/design-system/components/SegmentedControl" {
2682
- import React from 'react';
2683
- import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
2684
- export interface SegmentedControlItem {
2685
- key?: string;
2686
- icon?: IconDefinition;
2687
- label?: string;
2688
- onClick?: (e: React.MouseEvent) => void;
2689
- selected?: boolean;
2690
- disabled?: boolean;
2691
- tooltip?: string;
2692
- meta?: object;
2693
- }
2694
- export interface SegmentedControlProps {
2695
- autoFocus?: boolean;
2696
- className?: string;
2697
- disabled?: boolean;
2698
- items: SegmentedControlItem[];
2699
- renderLabel?: (item: SegmentedControlItem) => React.ReactNode;
2700
- }
2701
- export function SegmentedControl(props: SegmentedControlProps): React.JSX.Element;
2702
- }
2703
- declare module "engine/config/env" {
2704
- export const env: {
2705
- API_V1_BASE_URL: string;
2706
- API_V2_BASE_URL: string;
2707
- API_V3_BASE_URL: string;
2708
- EVENTS_API_BASE_URL: string;
2709
- TOOLS_API_V1_BASE_URL: string;
2710
- TOOLS_CDN_BASE_URL: string;
2711
- CONSOLE_BASE_URL: string;
2712
- };
2713
- export function setIsTest(isTest: boolean): void;
2714
- export function isTest(): boolean;
2715
- global {
2716
- interface Window {
2717
- Cypress?: unknown;
2718
- }
2719
- }
2720
- }
2721
- declare module "editor/helpers/image" {
2722
- import _ from 'lodash';
2723
- export function fetchImage(imageURL: string, { proxyURL, retryWithoutProxy, }?: {
2724
- proxyURL?: string;
2725
- retryWithoutProxy?: boolean;
2726
- }): Promise<{
2727
- blob: Blob;
2728
- url: string;
2729
- }>;
2730
- export function tryFetchImageBlob(imageURL: string, requestOptions?: RequestInit | HeadersInit, { cache }?: {
2731
- cache?: boolean;
2732
- }): Promise<Blob>;
2733
- export function getImageUrlWithProxy(imageURL: string, { proxyURL }?: {
2734
- proxyURL?: string;
2735
- }): string;
2736
- export function fetchImageViaProxy(imageURL: string, { proxyURL, retryWithoutProxy, }?: {
2737
- proxyURL?: string;
2738
- retryWithoutProxy?: boolean;
2739
- }): Promise<{
2740
- blob: Blob;
2741
- url: string;
2742
- }>;
2743
- export const tryLoadImageFromStringOrBlob: ((imageSrcOrBlob: string | Blob) => Promise<{
2744
- image: {
2745
- width: number;
2746
- height: number;
2747
- src: string;
2748
- };
2749
- imgElement: HTMLImageElement;
2750
- }>) & _.MemoizedFunction;
2751
- export function loadImageDimensions(imageSrcOrBlob: string | Blob): Promise<{
2752
- width: number | undefined;
2753
- height: number | undefined;
2754
- error?: string;
2755
- }>;
2756
- export function imageHasTransparency(imageSrcOrBlob: string | Blob, { minimumPercentageOfAlphaPixels, }?: {
2757
- minimumPercentageOfAlphaPixels?: number;
2758
- }): Promise<boolean | null>;
2759
- }
2760
- declare module "editor/hooks/useImageUploader" {
2761
- import { useStore } from 'react-redux';
2762
- import { ImageSource } from "state/types/types";
2763
- type Store = Pick<ReturnType<typeof useStore>, 'dispatch' | 'getState'>;
2764
- export interface Params {
2765
- maxSize?: number | null;
2766
- onErrorChange?: (error: Error | null) => void;
2767
- onImageSelect?: (image?: {
2768
- id?: string | number;
2769
- url: string;
2770
- width?: number;
2771
- height?: number;
2772
- size?: number;
2773
- }) => void;
2774
- onImageUpload?: (image: {
2775
- id?: string | number;
2776
- url: string;
2777
- width?: number;
2778
- height?: number;
2779
- optimistic?: boolean;
2780
- }) => void;
2781
- onUploadProgressChange?: (progress: number) => void;
2782
- onUploadStatusChange?: (isUploading: boolean) => void;
2783
- shouldReloadUserUploadsAfterUpload?: boolean;
2784
- shouldTriggerReduxOptimisticUpdate?: boolean;
2785
- }
2786
- export function useImageUploader(params: Params): {
2787
- error: Error;
2788
- isUploading: boolean;
2789
- startUploadFlow: (images: FileList | Array<File | Blob | string> | null, source: ImageSource) => void;
2790
- setError: import("react").Dispatch<import("react").SetStateAction<Error>>;
2791
- triggerSelectImageCallback: () => void;
2792
- uploadProgress: number;
2793
- };
2794
- function triggerImageUploadCallback(images: FileList | Array<File | Blob | string>, source: ImageSource, { maxSize, onErrorOrNull, onImageUpload, project, setIsUploading, setUploadProgress, shouldReloadUserUploadsAfterUpload, shouldTriggerReduxOptimisticUpdate, store, userId, }: {
2795
- maxSize?: Params['maxSize'];
2796
- onErrorOrNull?: (error: Error | null) => void;
2797
- onImageUpload?: Params['onImageUpload'];
2798
- project: {
2799
- id?: number;
2800
- } | null;
2801
- setIsUploading?: Params['onUploadStatusChange'];
2802
- setUploadProgress?: Params['onUploadProgressChange'];
2803
- shouldReloadUserUploadsAfterUpload?: Params['shouldReloadUserUploadsAfterUpload'];
2804
- shouldTriggerReduxOptimisticUpdate?: Params['shouldTriggerReduxOptimisticUpdate'];
2805
- store: Store;
2806
- userId: string;
2807
- }): Promise<void>;
2808
- function uploadFiles(images: FileList | Array<File | Blob | string>, source: ImageSource, { maxSize, onErrorOrNull, onImageUpload, project, setIsUploading, setUploadProgress, shouldReloadUserUploadsAfterUpload, shouldTriggerReduxOptimisticUpdate, store, userId, }: {
2809
- maxSize?: Params['maxSize'];
2810
- onErrorOrNull?: (error: Error | null) => void;
2811
- onImageUpload?: Params['onImageUpload'];
2812
- project: {
2813
- id?: number;
2814
- storage?: boolean;
2815
- } | null;
2816
- setIsUploading?: Params['onUploadStatusChange'];
2817
- setUploadProgress?: Params['onUploadProgressChange'];
2818
- shouldReloadUserUploadsAfterUpload?: Params['shouldReloadUserUploadsAfterUpload'];
2819
- shouldTriggerReduxOptimisticUpdate?: Params['shouldTriggerReduxOptimisticUpdate'];
2820
- store: Store;
2821
- userId: string;
2822
- }): Promise<void>;
2823
- export function startUploadFlow(images: FileList | Array<File | Blob | string> | null, source: ImageSource, params: Parameters<typeof triggerImageUploadCallback>[2] & Parameters<typeof uploadFiles>[2]): Promise<void>;
2824
- export function convertImagesToFileOrBlob(images: FileList | Array<File | Blob | string | undefined | null> | undefined | null): Promise<Array<File | Blob>>;
2825
- export class ImageMaxSizeExceededError extends Error {
2826
- maxSize: number;
2827
- size: number;
2828
- constructor({ size, maxSize }: {
2829
- size: number;
2830
- maxSize: number;
2831
- }, message?: string, ...params: any[]);
2832
- }
2833
- }
2834
- declare module "editor/components/common/ImageUploadButton" {
2835
- import React from 'react';
2836
- import { ImageSource } from "state/types/types";
2837
- import { ButtonProps } from "editor/design-system/components/Button";
2838
- export interface ImageUploadButtonInstance {
2839
- clearError: () => void;
2840
- openPicker: () => void;
2841
- startUploadFlow: (images: FileList | Array<File | Blob | string> | null, source: ImageSource) => void;
2842
- }
2843
- export interface ImageUploadButtonProps {
2844
- buttonProps?: ButtonProps;
2845
- disableProgressIndicator?: boolean;
2846
- disabled?: boolean;
2847
- maxSize?: number;
2848
- onErrorChange?: (error: Error | null) => void;
2849
- onImageSelect?: (image?: {
2850
- id?: string | number;
2851
- url: string;
2852
- width?: number;
2853
- height?: number;
2854
- }) => void;
2855
- onImageUpload?: (image: {
2856
- id?: string | number;
2857
- url: string;
2858
- width?: number;
2859
- height?: number;
2860
- optimistic?: boolean;
2861
- }) => void;
2862
- onUploadProgressChange?: (progress: number) => void;
2863
- onUploadStatusChange?: (isUploading: boolean) => void;
2864
- shouldReloadUserUploadsAfterUpload?: boolean;
2865
- shouldTriggerReduxOptimisticUpdate?: boolean;
2866
- showError?: boolean;
2867
- }
2868
- export const ImageUploadButton: React.ForwardRefExoticComponent<ImageUploadButtonProps & React.RefAttributes<ImageUploadButtonInstance>>;
2869
- }
2870
- declare module "editor/design-system/components/Progress" {
2871
- import React from 'react';
2872
- export interface ProgressBarProps {
2873
- progress: number;
2874
- className?: string;
2875
- color?: string;
2876
- backgroundColor?: string;
2877
- height?: string;
2878
- animationDuration?: number;
2879
- }
2880
- export function Progress(props: ProgressBarProps): React.JSX.Element;
2881
- }
2882
- declare module "engine/utils/explodePaddingsOrMargins" {
2883
- export function explodePaddingsOrMargins(value: number | string | undefined): {
2884
- top: number | undefined;
2885
- right: number | undefined;
2886
- bottom: number | undefined;
2887
- left: number | undefined;
2888
- };
2889
- }
2890
- declare module "editor/components/editors/common/WidgetLabel" {
2891
- import React from 'react';
2892
- import { Device, Location } from "state/types/types";
2893
- export type WidgetLabelProps = {
2894
- children?: React.ReactNode;
2895
- className?: string;
2896
- defaultValue?: any;
2897
- deviceName?: Device;
2898
- disabled?: boolean;
2899
- getValue?: (deviceName?: Device | undefined) => any;
2900
- infoTooltip?: string;
2901
- isLocked?: boolean;
2902
- lockReason?: 'styleguide' | 'admin' | undefined;
2903
- location?: Location;
2904
- name?: string;
2905
- onReset?: (data: {
2906
- value: any;
2907
- deviceName: Device | undefined;
2908
- }) => void;
2909
- };
2910
- export function WidgetLabel(props: WidgetLabelProps): React.JSX.Element;
2911
- export function getOptionModificationInfo({ defaultValue, deviceName, getValue, optionName, }: {
2912
- defaultValue: any;
2913
- deviceName: Device | null | undefined;
2914
- getValue: NonNullable<WidgetLabelProps['getValue']>;
2915
- optionName: string;
2916
- }): {
2917
- hasValue: boolean;
2918
- isOverride: boolean;
2919
- isSameValue: boolean;
2920
- showResetButton: boolean;
2921
- };
2922
- }
2923
- declare module "editor/design-system/components/ToggleSwitch" {
2924
- import React from 'react';
2925
- export interface ToggleSwitchProps {
2926
- children?: React.ReactNode;
2927
- className?: string;
2928
- disabled?: boolean;
2929
- isChecked: boolean;
2930
- left?: React.ReactNode;
2931
- onChange: (isChecked: boolean) => void;
2932
- right?: React.ReactNode;
2933
- toggleLeft?: React.ReactNode;
2934
- size?: number;
2935
- style?: React.CSSProperties;
2936
- }
2937
- export const ToggleSwitch: React.ForwardRefExoticComponent<ToggleSwitchProps & React.RefAttributes<HTMLLabelElement>>;
2938
- }
2939
- declare module "editor/components/editors/AutoWidthEditor" {
2940
- import * as React from 'react';
2941
- import { WidgetLabelProps } from "editor/components/editors/common/WidgetLabel";
2942
- import { Device } from "state/types/types";
2943
- import { EditorPropsFromZodSchemas } from "engine/utils/zod/types";
2944
- export const schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>, zodSchemas: {
2945
- value__simple: any;
2946
- value: any;
2947
- };
2948
- export type AutoWidthEditorProps = EditorPropsFromZodSchemas<typeof zodSchemas>;
2949
- export interface AutoWidthEditorBaseProps extends Pick<AutoWidthEditorProps, 'value' | 'defaultValue' | 'disabled' | 'isLocked' | 'lockReason'> {
2950
- defaultWidthIsCalculated?: boolean;
2951
- deviceName?: Device;
2952
- widgetLabelProps: Omit<WidgetLabelProps, 'defaultValue' | 'onReset'>;
2953
- handlers: {
2954
- onToggleAutoWidth: (autoWidth: NonNullable<AutoWidthEditorProps['value']>['autoWidth']) => void;
2955
- onChangeWidth: (width: number) => void;
2956
- onReset: NonNullable<WidgetLabelProps['onReset']>;
2957
- };
2958
- }
2959
- export const AutoWidthEditorBase: (props: AutoWidthEditorBaseProps) => React.JSX.Element;
2960
- }
2961
- declare module "engine/utils/isUrl" {
2962
- export function isUrl(value: any): boolean;
2963
- }
2964
- declare module "editor/helpers/placeholders" {
2965
- export const DEFAULT_IMAGE_PLACEHOLDER = "https://cdn.tools.unlayer.com/image/placeholder.png";
2966
- export const DEFAULT_CAROUSEL_PLACEHOLDER = "https://cdn.tools.unlayer.com/carousel/placeholder.png";
2967
- type ToolType = 'image' | 'carousel';
2968
- export function getPlaceholderUrl(type: ToolType): string;
2969
- }
2970
- declare module "engine/utils/explodeBorder" {
2971
- export function explodeBorder(value: number | string | {
2972
- borderTopWidth?: string;
2973
- borderTopStyle?: string;
2974
- borderTopColor?: string;
2975
- borderLeftWidth?: string;
2976
- borderLeftStyle?: string;
2977
- borderLeftColor?: string;
2978
- borderRightWidth?: string;
2979
- borderRightStyle?: string;
2980
- borderRightColor?: string;
2981
- borderBottomWidth?: string;
2982
- borderBottomStyle?: string;
2983
- borderBottomColor?: string;
2984
- } | undefined): {
2985
- top: number | undefined;
2986
- right: number | undefined;
2987
- bottom: number | undefined;
2988
- left: number | undefined;
2989
- };
2990
- }
2991
- declare module "engine/utils/imageRendering" {
2992
- import { explodePaddingsOrMargins } from "engine/utils/explodePaddingsOrMargins";
2993
- import { explodeBorder } from "engine/utils/explodeBorder";
2994
- export function isFixedContentWidth(bodyValues?: {
2995
- contentWidth: number | string;
2996
- }): boolean;
2997
- export function getBodyAvailableWidth({ body, fallbackBodyContentWidth, }: {
2998
- body: {
2999
- values: {
3000
- contentWidth: number | string;
3001
- padding?: Parameters<typeof explodePaddingsOrMargins>[0];
3002
- border?: Parameters<typeof explodeBorder>[0];
3003
- };
3004
- };
3005
- fallbackBodyContentWidth?: number;
3006
- }): number;
3007
- export function getRowAvailableWidth({ body, row, }: {
3008
- body: Parameters<typeof getBodyAvailableWidth>[0]['body'];
3009
- row: {
3010
- values: {
3011
- padding: Parameters<typeof explodePaddingsOrMargins>[0];
3012
- border?: Parameters<typeof explodeBorder>[0];
3013
- };
3014
- };
3015
- }): number;
3016
- export function getColumnAvailableWidth({ body, row, column, }: {
3017
- body: Parameters<typeof getRowAvailableWidth>[0]['body'];
3018
- row: Parameters<typeof getRowAvailableWidth>[0]['row'] & {
3019
- cells: number[];
3020
- };
3021
- column: {
3022
- index: number;
3023
- values: {
3024
- padding: Parameters<typeof explodePaddingsOrMargins>[0];
3025
- border: Parameters<typeof explodeBorder>[0];
3026
- };
3027
- };
3028
- }): number;
3029
- export function getContentAvailableWidth({ body, row, column, item, }: {
3030
- body: Parameters<typeof getColumnAvailableWidth>[0]['body'];
3031
- row: Parameters<typeof getColumnAvailableWidth>[0]['row'];
3032
- column: Parameters<typeof getColumnAvailableWidth>[0]['column'];
3033
- item: {
3034
- values: {
3035
- containerPadding?: Parameters<typeof explodePaddingsOrMargins>[0];
3036
- border?: Parameters<typeof explodeBorder>[0];
3037
- };
3038
- };
3039
- }): number;
3040
- export function getAvailableWidth({ values, columnIndex, columnValues, rowCells, rowValues, bodyValues, }: {
3041
- values: Parameters<typeof getContentAvailableWidth>[0]['item']['values'];
3042
- columnIndex: Parameters<typeof getContentAvailableWidth>[0]['column']['index'];
3043
- columnValues: Parameters<typeof getContentAvailableWidth>[0]['column']['values'];
3044
- rowCells: Parameters<typeof getContentAvailableWidth>[0]['row']['cells'];
3045
- rowValues: Parameters<typeof getContentAvailableWidth>[0]['row']['values'];
3046
- bodyValues: Parameters<typeof getContentAvailableWidth>[0]['body']['values'];
3047
- }): number;
3048
- export function getImageWidthAndMaxWidth(widthValue: {
3049
- autoWidth?: boolean;
3050
- maxWidth?: number | string;
3051
- width?: number;
3052
- }, availableWidth?: number): {
3053
- width: string;
3054
- maxWidth: string;
3055
- };
3056
- export function getImageProperties(widthValue: {
3057
- autoWidth?: boolean;
3058
- maxWidth?: number | string;
3059
- width?: number;
3060
- }, availableWidth?: number, optionName?: string): {
3061
- imageCSSClassName: string;
3062
- imageStyleObj: {
3063
- width: string;
3064
- maxWidth: string;
3065
- };
3066
- imageCSSStyle: string;
3067
- };
3068
- export function getDynamicImageUrl(src: string | undefined, params: {
3069
- allowUpscale?: boolean;
3070
- dynamic?: boolean;
3071
- resizeWidth: number | string | undefined;
3072
- originalWidth: number | string | undefined;
3073
- }): string;
3074
- }
3075
- declare module "editor/components/editors/pixie/pixie.umd" {
3076
- const _exports: {
3077
- new (t: any): {
3078
- readonly state: any;
3079
- readonly defaultConfig: any;
3080
- open(t?: {}): Promise<any>;
3081
- close(): void;
3082
- setConfig(t: any): void;
3083
- uploadAndAddImage(): any;
3084
- uploadAndReplaceMainImage(): any;
3085
- uploadAndOpenStateFile(): any;
3086
- newCanvas(t: any, n: any, r: any): any;
3087
- getState(t: any): string;
3088
- setState(t: any): any;
3089
- setStateFromUrl(t: any): Promise<any>;
3090
- openTool(t: any): void;
3091
- applyChanges(): void;
3092
- cancelChanges(): void;
3093
- resetEditor(t: any): Promise<void>;
3094
- togglePanel(t: any, n: any): void;
3095
- on(t: any, n: any): void;
3096
- isDirty(): any;
3097
- get(t: any): any;
3098
- notify(t: any): void;
3099
- };
3100
- init(t: any): Promise<any>;
3101
- };
3102
- export = _exports;
3103
- }
3104
- declare module "editor/design-system/components/Popover" {
3105
- import React from 'react';
3106
- import * as Ariakit from '@ariakit/react';
3107
- export type PopoverProps = {
3108
- arrow?: boolean;
3109
- autoFocusOnHide?: boolean;
3110
- autoFocusOnShow?: boolean;
3111
- children: Ariakit.PopoverAnchorProps['children'];
3112
- className?: string;
3113
- content: Ariakit.PopoverProps['children'];
3114
- defaultOpen?: Ariakit.PopoverStoreProps['defaultOpen'];
3115
- destroyOnHide?: boolean;
3116
- disabled?: boolean;
3117
- forcedOpenState?: boolean;
3118
- gutter?: Ariakit.PopoverOptions['gutter'];
3119
- onHide?: () => void;
3120
- onShow?: () => void;
3121
- placement: Ariakit.PopoverStoreProps['placement'];
3122
- portal?: Ariakit.PopoverOptions['portal'];
3123
- portalParent?: 'body' | 'editor';
3124
- style?: React.CSSProperties;
3125
- wrapper?: Ariakit.PopoverAnchorProps['render'];
3126
- } & ({
3127
- showOnHover?: false;
3128
- hideTimeout?: never;
3129
- showTimeout?: never;
3130
- timeout?: never;
3131
- } | {
3132
- showOnHover?: true;
3133
- hideTimeout?: Ariakit.HovercardStoreProps['hideTimeout'];
3134
- showTimeout?: Ariakit.HovercardStoreProps['showTimeout'];
3135
- timeout?: Ariakit.HovercardStoreProps['timeout'];
3136
- });
3137
- export interface PopoverInstance {
3138
- isOpen: boolean;
3139
- show: () => void;
3140
- hide: () => void;
3141
- }
3142
- export const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<PopoverInstance>>;
3143
- export const CSS: {
3144
- popover: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
3145
- anchor: import("styled-components").FlattenSimpleInterpolation;
3146
- arrow: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
3147
- };
3148
- }
3149
- declare module "editor/design-system/components/Bar" {
3150
- import React, { ReactNode } from 'react';
3151
- import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
3152
- import { TooltipProps } from "editor/design-system/components/Tooltip";
3153
- import { DropdownProps } from "editor/design-system/components/Dropdown";
3154
- import { PopoverProps } from "editor/design-system/components/Popover";
3155
- export const BAR_HEIGHT = 40;
3156
- export const BAR_ITEM_WIDTH = 50;
3157
- export const BAR_ITEM_COMPACT_WIDTH = 30;
3158
- export interface SelectOption {
3159
- icon?: IconDefinition;
3160
- label: string;
3161
- value: any;
3162
- tooltip?: string;
3163
- tooltipPlacement?: TooltipProps['placement'];
3164
- meta?: object;
3165
- onClick?: (e: React.MouseEvent, selected: boolean) => void;
3166
- selected?: boolean;
3167
- toggle?: boolean;
3168
- }
3169
- export interface SelectOptionGroup {
3170
- name?: string;
3171
- label?: string;
3172
- icon?: IconDefinition;
3173
- options: SelectOption[];
3174
- meta?: object;
3175
- }
3176
- export interface BarTitleItem {
3177
- key: string;
3178
- type: 'title';
3179
- level?: 1 | 2 | 3 | 4 | 5 | 6;
3180
- ai?: boolean;
3181
- icon?: IconDefinition;
3182
- text: string | React.ReactElement;
3183
- tooltip?: string;
3184
- tooltipPlacement?: TooltipProps['placement'];
3185
- badge?: number | boolean;
3186
- loading?: boolean;
3187
- }
3188
- export interface BarButtonItem {
3189
- key: string;
3190
- type: 'button';
3191
- ai?: boolean;
3192
- id?: string;
3193
- className?: string;
3194
- icon: IconDefinition | null | undefined;
3195
- label?: string;
3196
- tooltip?: string;
3197
- tooltipPlacement?: TooltipProps['placement'];
3198
- badge?: number | boolean;
3199
- onClick?: (e: React.MouseEvent) => void;
3200
- destructive?: boolean;
3201
- disabled?: boolean;
3202
- loading?: boolean;
3203
- selected?: boolean;
3204
- highlighted?: boolean;
3205
- autoFocus?: boolean;
3206
- }
3207
- export interface BarToggleItem {
3208
- key: string;
3209
- type: 'toggle';
3210
- icon: IconDefinition;
3211
- tooltip?: string;
3212
- tooltipPlacement?: TooltipProps['placement'];
3213
- label?: string;
3214
- badge?: number | boolean;
3215
- onClick?: (e: React.MouseEvent) => void;
3216
- onChange: (enabled: boolean) => void;
3217
- disabled?: boolean;
3218
- checked?: boolean;
3219
- selected?: boolean;
3220
- highlighted?: boolean;
3221
- autoFocus?: boolean;
3222
- error: ReactNode;
3223
- }
3224
- type BarDropdownItem = {
3225
- key: string;
3226
- className?: string;
3227
- type: 'dropdown';
3228
- ariaLabel?: string;
3229
- icon?: IconDefinition;
3230
- multi?: boolean;
3231
- renderOption?: (option: SelectOption) => React.ReactNode;
3232
- renderOptionLabel?: (option: SelectOption) => React.ReactNode;
3233
- onChange?: (option: SelectOption) => void;
3234
- badge?: number | boolean;
3235
- disabled?: boolean;
3236
- tooltip?: string;
3237
- tooltipPlacement?: TooltipProps['placement'];
3238
- dropdownProps?: DropdownProps;
3239
- triggerLabel?: string | React.ReactNode;
3240
- caret?: boolean;
3241
- renderHeader?: () => React.ReactNode;
3242
- } & ({
3243
- options?: never;
3244
- groupedOptions?: SelectOptionGroup[];
3245
- renderOptionGroupHeader?: (optionGroup: SelectOptionGroup) => React.ReactNode;
3246
- } | {
3247
- options?: SelectOption[];
3248
- groupedOptions?: never;
3249
- renderOptionGroupHeader?: never;
3250
- });
3251
- export interface BarPopoverItem {
3252
- key: string;
3253
- type: 'popover';
3254
- icon?: IconDefinition;
3255
- ai?: boolean;
3256
- label?: string;
3257
- tooltip?: string;
3258
- tooltipPlacement?: TooltipProps['placement'];
3259
- badge?: number | boolean;
3260
- onClick?: (e: React.MouseEvent) => void;
3261
- className?: string;
3262
- disabled?: boolean;
3263
- open?: boolean;
3264
- destructive?: boolean;
3265
- selected?: boolean;
3266
- highlighted?: boolean;
3267
- autoFocus?: boolean;
3268
- PopoverElement: React.ElementType;
3269
- }
3270
- export interface BarSeparatorItem {
3271
- type: 'separator';
3272
- }
3273
- export type BarItem = BarTitleItem | BarButtonItem | BarToggleItem | BarDropdownItem | BarPopoverItem | BarSeparatorItem | false | undefined;
3274
- export interface BarProps {
3275
- as?: any;
3276
- className?: string;
3277
- compact?: boolean;
3278
- leftItems?: BarItem[];
3279
- items?: BarItem[];
3280
- rightItems?: BarItem[];
3281
- style?: React.CSSProperties;
3282
- tooltipPlacement?: TooltipProps['placement'];
3283
- popoverPlacement?: PopoverProps['placement'];
3284
- }
3285
- export function Bar(props: BarProps): React.JSX.Element;
3286
- }
3287
- declare module "editor/components/editors/pixie/PixieImageEditor" {
3288
- import React from 'react';
3289
- type ImageBlob = {
3290
- lastModifiedDate?: Date;
3291
- name?: string;
3292
- } & Blob;
3293
- export interface PixieImageEditorProps {
3294
- imageUrl: string;
3295
- toggleModal: () => void;
3296
- onComplete: (blob: ImageBlob) => void;
3297
- }
3298
- const PixieImageEditor: (props: PixieImageEditorProps) => React.JSX.Element;
3299
- export default PixieImageEditor;
3300
- }
3301
- declare module "editor/components/editors/ImageEditor" {
3302
- import { EditorPropsFromZodSchemas } from "engine/utils/zod/types";
3303
- export const schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>, zodSchemas: {
3304
- value__simple: any;
3305
- value: any;
3306
- };
3307
- export type ImageEditorProps = EditorPropsFromZodSchemas<typeof zodSchemas>;
3308
- export function isDefaultImage(imageUrl: string | undefined, widgetParamsUrl?: string): boolean;
3309
- }
3310
- declare module "editor/components/common/Dropzone" {
3311
- import React from 'react';
3312
- import { DropzoneOptions } from 'react-dropzone';
3313
- export interface DropzoneProps {
3314
- children?: React.ReactNode;
3315
- disabled?: boolean;
3316
- isUploading?: boolean;
3317
- maxSize?: number;
3318
- options?: DropzoneOptions;
3319
- uploadProgress?: number;
3320
- imageUrl?: string;
3321
- imageWidth?: number;
3322
- imageHeight?: number;
3323
- imageSize?: number;
3324
- imageName?: string;
3325
- isEditImageButtonDisabled?: boolean;
3326
- onEditImageClick?: () => void;
3327
- shouldRender?: {
3328
- dropzone?: boolean;
3329
- editImageButton?: boolean;
3330
- imageInfo?: boolean;
3331
- };
3332
- }
3333
- export function Dropzone(props: DropzoneProps): React.JSX.Element;
3334
- }
3335
- declare module "editor/components/common/ImageUploadErrorMessage" {
3336
- import React from 'react';
3337
- import { IntlShape } from 'react-intl';
3338
- export interface ImageUploadErrorMessageProps {
3339
- error: Error | boolean | null | undefined;
3340
- maxSize?: number;
3341
- onClick?: () => void;
3342
- }
3343
- export function getImageUploadErrorMessage(error: ImageUploadErrorMessageProps['error'], { maxSize, intl }: {
3344
- maxSize: number;
3345
- intl: IntlShape;
3346
- }): any;
3347
- export function ImageUploadErrorMessage(props: ImageUploadErrorMessageProps): React.JSX.Element;
3348
- }
3349
- declare module "editor/components/editors/ImageUploader" {
3350
- import React, { RefObject } from 'react';
3351
- import { DropEvent, FileRejection } from 'react-dropzone';
3352
- import { ImageUploadButtonInstance, ImageUploadButtonProps } from "editor/components/common/ImageUploadButton";
3353
- import { Location } from "state/types/types";
3354
- export interface ImageUploaderProps {
3355
- disabled?: boolean;
3356
- shouldRender: {
3357
- dropzone?: boolean;
3358
- editImageButton?: boolean;
3359
- /** @deprecated Use editImageButton instead */
3360
- effects?: boolean;
3361
- imageInfo?: boolean;
3362
- moreImages?: boolean;
3363
- stockImages?: boolean;
3364
- uploadButton?: boolean;
3365
- userUploads?: boolean;
3366
- };
3367
- label: string;
3368
- optionName: string;
3369
- location: Location;
3370
- maxSize: number;
3371
- intl: any;
3372
- onDropAccepted: (files: File[]) => void;
3373
- onDropRejected: (fileRejections: FileRejection[], event: DropEvent) => void;
3374
- isUploading?: boolean;
3375
- uploadProgress?: number;
3376
- imageUrl?: string;
3377
- imageWidth?: number;
3378
- imageHeight?: number;
3379
- imageSize?: number;
3380
- togglePixieModal: () => void;
3381
- imageExists?: boolean;
3382
- error: boolean | Error | null;
3383
- onImageSelect: ImageUploadButtonProps['onImageSelect'];
3384
- onImageUpload: ImageUploadButtonProps['onImageUpload'];
3385
- onUploadProgressChange: ImageUploadButtonProps['onUploadProgressChange'];
3386
- onUploadStatusChange: ImageUploadButtonProps['onUploadStatusChange'];
3387
- onErrorChange: (error: Error | null) => void;
3388
- imageUploadButtonRef: RefObject<ImageUploadButtonInstance>;
3389
- showError?: boolean;
3390
- }
3391
- 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;
3392
- }
3393
- declare module "editor/components/editors/BackgroundImageEditor" {
3394
- import { EditorPropsFromZodSchemas } from "engine/utils/zod/types";
3395
- export const schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>, zodSchemas: {
3396
- value__simple: any;
3397
- value: any;
3398
- };
3399
- export type BackgroundImageEditorProps = EditorPropsFromZodSchemas<typeof zodSchemas>;
3400
- }
3401
- declare module "engine/options/bodies" {
3402
- import { BackgroundImageEditorProps } from "editor/components/editors/BackgroundImageEditor";
3403
- export type BodyValues = {
3404
- backgroundColor: string;
3405
- backgroundImage: BackgroundImageEditorProps['value'];
3406
- contentWidth: string;
3407
- fontFamily: {
3408
- label: string;
3409
- value: string;
3410
- };
3411
- linkStyle: {
3412
- body: boolean;
3413
- linkColor: string;
3414
- linkHoverColor: string;
3415
- linkUnderline: boolean;
3416
- linkHoverUnderline: boolean;
3417
- };
3418
- preheaderText: string;
3419
- accessibilityTitle: string;
3420
- };
2202
+ declare module "packages/editor/src/engine/options/bodies" {
2203
+ export type { BodyValues } from '@libs/schemas/options/containers/bodies';
3421
2204
  }
3422
- declare module "engine/utils/stringifyFunction" {
2205
+ declare module "packages/editor/src/engine/utils/stringifyFunction" {
3423
2206
  export function stringifyFunction(fn: Function): string;
3424
2207
  export function stringifyFunctionsFromObject(obj: object): {};
3425
2208
  }
3426
- declare module "engine/utils/normalizeLinkTypes" {
3427
- import { LinkType, LinkTypes, LinkTypesSharedConfig } from "state/types/types";
2209
+ declare module "packages/editor/src/engine/utils/normalizeLinkTypes" {
2210
+ import { LinkType, LinkTypes, LinkTypesSharedConfig } from "packages/editor/src/state/types/types";
3428
2211
  export function normalizeLinkTypeSharedConfig(linkType: LinkTypesSharedConfig | null | undefined): LinkTypesSharedConfig & {
3429
2212
  attrs: {};
3430
2213
  };
@@ -3435,20 +2218,20 @@ declare module "engine/utils/normalizeLinkTypes" {
3435
2218
  attrs: {};
3436
2219
  })[];
3437
2220
  }
3438
- declare module "engine/utils/makeClassMethodsEnumerable" {
2221
+ declare module "packages/editor/src/engine/utils/makeClassMethodsEnumerable" {
3439
2222
  export function makeClassMethodsEnumerable(instance: InstanceType<any>, ignoreList?: string[]): void;
3440
2223
  }
3441
- declare module "embed/helpers" {
2224
+ declare module "packages/editor/src/embed/helpers" {
3442
2225
  export function convertReturnFunctionToDoneCallback<Fn extends (...args: [any]) => any>(fn: Fn): (info: Parameters<Fn>[0], done: Function) => void;
3443
2226
  }
3444
- declare module "embed/Editor" {
3445
- import { Frame } from "embed/Frame";
3446
- import { Config, ExportFromApiResult, ExportHtmlOptions, ExportHtmlResult, ExportPlainTextResult, ExportImageFromApiOptions, ExportLiveHtmlOptions, ExportPdfFromApiOptions, ExportPlainTextOptions, ExportZipFromApiOptions, SaveDesignOptions, ExportLiveHtmlResult } from "embed/Config";
3447
- import { AppearanceConfig, Audit, DesignMode, DesignTagsConfig, Device, DisplayConditions, DisplayMode, JSONTemplate, Language, LinkTypes, LinkTypesSharedConfig, MergeTags, MergeTagsConfig, SpecialLink, StyleGuideConfig, Tabs, Translations, User, Validator } from "state/types/types";
3448
- import { BodyValues } from "engine/options/bodies";
3449
- import { Locale, TextDirection } from "engine/config/intl";
3450
- import { DeepPartial } from "editor/components/editors/types";
3451
- import { ColorPicker } from "engine/config/features";
2227
+ declare module "packages/editor/src/embed/Editor" {
2228
+ import { Frame } from "packages/editor/src/embed/Frame";
2229
+ import { Config, ExportFromApiResult, ExportHtmlOptions, ExportHtmlResult, ExportPlainTextResult, ExportImageFromApiOptions, ExportLiveHtmlOptions, ExportPdfFromApiOptions, ExportPlainTextOptions, ExportZipFromApiOptions, SaveDesignOptions, ExportLiveHtmlResult } from "packages/editor/src/embed/Config";
2230
+ import { AppearanceConfig, Audit, DesignMode, DesignTagsConfig, Device, DisplayConditions, DisplayMode, JSONTemplate, Language, LinkTypes, LinkTypesSharedConfig, MergeTags, MergeTagsConfig, SpecialLink, StyleGuideConfig, Tabs, Translations, User, Validator } from "packages/editor/src/state/types/types";
2231
+ import { BodyValues } from "packages/editor/src/engine/options/bodies";
2232
+ import { Locale, TextDirection } from "packages/editor/src/engine/config/intl";
2233
+ import { DeepPartial } from "packages/editor/src/editor/components/editors/types";
2234
+ import { ColorPicker } from "packages/editor/src/engine/config/features";
3452
2235
  export const LATEST_VERSION: string;
3453
2236
  export const STABLE_VERSION: string;
3454
2237
  export const ENV_VERSION: string;
@@ -3534,9 +2317,9 @@ declare module "embed/Editor" {
3534
2317
  createWidget(): void;
3535
2318
  }
3536
2319
  }
3537
- declare module "embed/index" {
3538
- import { Editor } from "embed/Editor";
3539
- import { Config } from "embed/Config";
2320
+ declare module "packages/editor/src/embed/index" {
2321
+ import { Editor } from "packages/editor/src/embed/Editor";
2322
+ import { Config } from "packages/editor/src/embed/Config";
3540
2323
  class Embed extends Editor {
3541
2324
  createEditor(config: Config): Editor;
3542
2325
  }