unlayer-types 1.389.0 → 1.391.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 +24 -0
- package/package.json +1 -1
package/embed.d.ts
CHANGED
|
@@ -23,6 +23,14 @@ declare module "libs/utils/src/pruneObj" {
|
|
|
23
23
|
declare module "packages/editor/src/editor/components/editors/types" {
|
|
24
24
|
import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
|
|
25
25
|
import { AppearanceConfig, Device, DisplayMode, Location, UndoRedoBehavior, Variant } from "packages/editor/src/state/types/types";
|
|
26
|
+
/**
|
|
27
|
+
* Server-safe configuration for head CSS/JS generation.
|
|
28
|
+
* Passed via HeadArguments to allow dependency injection.
|
|
29
|
+
*/
|
|
30
|
+
export interface HeadConfig {
|
|
31
|
+
hasFeature?: (featureName: string) => boolean;
|
|
32
|
+
getInitialValues?: (containerType: string) => Record<string, any>;
|
|
33
|
+
}
|
|
26
34
|
export type LoadingState = 'not-loaded' | 'loading' | 'loaded' | 'error';
|
|
27
35
|
export type UpdatingState = 'updating' | undefined;
|
|
28
36
|
export type DeletionState = 'deleting' | 'failed' | undefined;
|
|
@@ -99,6 +107,7 @@ declare module "packages/editor/src/editor/components/editors/types" {
|
|
|
99
107
|
isViewer: boolean;
|
|
100
108
|
variant: Variant;
|
|
101
109
|
type?: string;
|
|
110
|
+
headConfig?: HeadConfig;
|
|
102
111
|
}
|
|
103
112
|
];
|
|
104
113
|
export interface Head {
|
|
@@ -1401,6 +1410,16 @@ declare module "packages/editor/src/state/types/types" {
|
|
|
1401
1410
|
import { collections, displayModes } from "packages/editor/src/engine/constants";
|
|
1402
1411
|
import { AppDispatch } from '../store';
|
|
1403
1412
|
export type { AICopilotDataType };
|
|
1413
|
+
/**
|
|
1414
|
+
* Server-safe configuration for exporters.
|
|
1415
|
+
* Passed via meta to allow dependency injection instead of importing config directly.
|
|
1416
|
+
*/
|
|
1417
|
+
export interface ExporterConfig {
|
|
1418
|
+
toSafeHtml?: (text: string | undefined, options?: any) => string;
|
|
1419
|
+
textDirection?: string | undefined;
|
|
1420
|
+
generateHtmlFromTextJson?: (textJson: any) => string;
|
|
1421
|
+
cdnBaseUrl?: string;
|
|
1422
|
+
}
|
|
1404
1423
|
export type DesignMode = 'live' | 'edit';
|
|
1405
1424
|
export type Device = 'desktop' | 'mobile' | 'tablet';
|
|
1406
1425
|
export type Resolution = {
|
|
@@ -1756,9 +1775,11 @@ declare module "packages/editor/src/state/types/types" {
|
|
|
1756
1775
|
rowCells: number[];
|
|
1757
1776
|
rowValues: RowValues;
|
|
1758
1777
|
bodyValues: BodyValues;
|
|
1778
|
+
defaultDevice: Device;
|
|
1759
1779
|
variant: Variant | undefined;
|
|
1760
1780
|
language: string | undefined;
|
|
1761
1781
|
collection: Collection;
|
|
1782
|
+
exporterConfig: ExporterConfig;
|
|
1762
1783
|
}) => string;
|
|
1763
1784
|
export type RowContainerExporters = Partial<Record<ExporterName, RowContainerExporter>>;
|
|
1764
1785
|
export type ColumnContainerExporter = (innerHTML: string, columnValues: Record<string, any>, // @deprecated use last param instead
|
|
@@ -1787,6 +1808,8 @@ declare module "packages/editor/src/state/types/types" {
|
|
|
1787
1808
|
rowCells: number[];
|
|
1788
1809
|
rowValues: RowValues;
|
|
1789
1810
|
bodyValues: BodyValues;
|
|
1811
|
+
defaultDevice: Device;
|
|
1812
|
+
exporterConfig: ExporterConfig;
|
|
1790
1813
|
variant: Variant | undefined;
|
|
1791
1814
|
language: string | undefined;
|
|
1792
1815
|
embeddedValues: Record<string, unknown>;
|
|
@@ -1811,6 +1834,7 @@ declare module "packages/editor/src/state/types/types" {
|
|
|
1811
1834
|
rowCells: number[];
|
|
1812
1835
|
rowValues: RowValues;
|
|
1813
1836
|
bodyValues: BodyValues;
|
|
1837
|
+
exporterConfig: ExporterConfig;
|
|
1814
1838
|
embeddedValues: Record<string, unknown>;
|
|
1815
1839
|
mergeTagState: {
|
|
1816
1840
|
mergeTagGroup: string;
|
package/package.json
CHANGED