unlayer-types 1.81.0 → 1.95.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 +55 -6
  2. package/package.json +1 -1
package/embed.d.ts CHANGED
@@ -306,6 +306,13 @@ declare module "editor/themes/types" {
306
306
  backgroundColor?: ColorValue;
307
307
  textColor?: ColorValue;
308
308
  };
309
+ ':highlighted'?: {
310
+ backgroundColor?: ColorValue;
311
+ textColor?: ColorValue;
312
+ };
313
+ };
314
+ separator: {
315
+ borderColor?: ColorValue;
309
316
  };
310
317
  };
311
318
  input: {
@@ -1151,6 +1158,15 @@ declare module "state/types/types" {
1151
1158
  value: string;
1152
1159
  label: string;
1153
1160
  enabled?: boolean;
1161
+ highlight?: boolean;
1162
+ onClick?: (_option: {
1163
+ label?: string;
1164
+ value: string;
1165
+ }, _meta: object, done: (result: {
1166
+ value: string;
1167
+ }) => void) => void;
1168
+ } | {
1169
+ type: 'separator';
1154
1170
  };
1155
1171
  export interface LinkTypeField {
1156
1172
  name: string;
@@ -1177,6 +1193,7 @@ declare module "state/types/types" {
1177
1193
  target?: string;
1178
1194
  onClick?: string | Function;
1179
1195
  class?: string;
1196
+ download?: boolean;
1180
1197
  [key: string]: any;
1181
1198
  };
1182
1199
  fields?: LinkTypeField[];
@@ -1416,6 +1433,25 @@ declare module "engine/config/features" {
1416
1433
  text: string;
1417
1434
  }, callback: (text: string) => void) => void;
1418
1435
  }
1436
+ export type ColorGroup = {} & ({
1437
+ id: 'brand_colors' | 'common_colors' | 'template_colors';
1438
+ label?: string;
1439
+ colors?: string[];
1440
+ default?: boolean;
1441
+ } | {
1442
+ id?: never;
1443
+ label: string;
1444
+ colors: string[];
1445
+ default?: boolean;
1446
+ });
1447
+ export interface ColorPicker {
1448
+ /** @deprecated Use colors: string[] or colors: [{ id: "common_colors", label: 'Common Colors', colors: string[] }] instead */
1449
+ presets?: string[];
1450
+ /** @deprecated Use colors: [{ id: "brand_colors", label: 'Brand Colors', colors: string[] }] instead */
1451
+ brandColors?: string[];
1452
+ colors?: string[] | ColorGroup[];
1453
+ limit?: number;
1454
+ }
1419
1455
  export interface Features {
1420
1456
  audit?: boolean;
1421
1457
  blocks?: boolean;
@@ -1448,9 +1484,7 @@ declare module "engine/config/features" {
1448
1484
  defaultFontSize?: string;
1449
1485
  customButtons?: TextEditorCustomButton[];
1450
1486
  };
1451
- colorPicker?: {
1452
- presets?: string[];
1453
- };
1487
+ colorPicker?: ColorPicker;
1454
1488
  legacy?: {
1455
1489
  disableHoverButtonColors?: boolean;
1456
1490
  };
@@ -1472,7 +1506,9 @@ declare module "engine/config/features" {
1472
1506
  sendTestEmail?: boolean;
1473
1507
  }
1474
1508
  export function setFeatures(newFeatures: Features): void;
1475
- export function setOverrideFeatures(overrideFeatures: Features): void;
1509
+ export function setOverrideFeatures(overrideFeatures: Features, options?: {
1510
+ deepmerge?: boolean;
1511
+ }): void;
1476
1512
  export function overrideFeatures(newOverrideFeatures: Features): void;
1477
1513
  export function getFeatures(): Features;
1478
1514
  export function getFeature(path: string | string[]): any;
@@ -1642,6 +1678,7 @@ declare module "embed/Config" {
1642
1678
  export interface ExportHtmlOptions {
1643
1679
  amp?: boolean;
1644
1680
  cleanup?: boolean;
1681
+ inlineStyles?: boolean;
1645
1682
  textDirection?: TextDirection;
1646
1683
  isPreview?: boolean;
1647
1684
  language?: string;
@@ -1911,6 +1948,10 @@ declare module "editor/design-system/components/Tooltip" {
1911
1948
  }
1912
1949
  export function Tooltip(props: TooltipProps): JSX.Element;
1913
1950
  }
1951
+ declare module "editor/helpers/intl" {
1952
+ import { IntlShape } from 'react-intl';
1953
+ export function getIntlLabel<Label extends any>(intl: IntlShape, label: string | Label): string | Label;
1954
+ }
1914
1955
  declare module "editor/design-system/components/Dropdown" {
1915
1956
  import React from 'react';
1916
1957
  import * as Ariakit from '@ariakit/react';
@@ -1945,6 +1986,7 @@ declare module "editor/design-system/components/Dropdown" {
1945
1986
  caret?: boolean;
1946
1987
  disabled?: boolean;
1947
1988
  fallbackLabel?: string;
1989
+ id?: string;
1948
1990
  label?: React.ReactNode;
1949
1991
  multi?: boolean;
1950
1992
  triggerLabel?: string | React.ReactNode;
@@ -2737,15 +2779,21 @@ declare module "embed/Editor" {
2737
2779
  import { BodyValues } from "engine/options/bodies";
2738
2780
  import { Locale, TextDirection } from "engine/config/intl";
2739
2781
  import { DeepPartial } from "editor/components/editors/types";
2782
+ import { ColorPicker } from "engine/config/features";
2740
2783
  export const LATEST_VERSION: string;
2741
2784
  export const STABLE_VERSION: string;
2742
- export const DEFAULT_VERSION: string;
2785
+ export const ENV_VERSION: string;
2743
2786
  export class Editor {
2744
2787
  frame: Frame | null;
2745
2788
  constructor(config?: Config);
2746
2789
  init(config?: Config): void;
2747
2790
  destroy(): void;
2748
- version: string | undefined;
2791
+ versions: {
2792
+ current: string;
2793
+ latest: string;
2794
+ stable: string;
2795
+ };
2796
+ get version(): string;
2749
2797
  loadEditor(config: Config): void;
2750
2798
  renderEditor(config: Config): void;
2751
2799
  initEditor(config: Config): void;
@@ -2805,6 +2853,7 @@ declare module "embed/Editor" {
2805
2853
  clearValidators(): void;
2806
2854
  setCurrentLanguage(language: string): void;
2807
2855
  setLanguages(languages: Language[]): void;
2856
+ setColorPickerConfig(colorPickerConfig: ColorPicker): void;
2808
2857
  registerContainerExporter(): void;
2809
2858
  registerItemExporter(): void;
2810
2859
  registerTool(): void;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "unlayer-types",
3
- "version": "1.81.0",
3
+ "version": "1.95.0",
4
4
  "license": "MIT"
5
5
  }