unlayer-types 1.296.0 → 1.298.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 +167 -72
- package/package.json +1 -1
package/embed.d.ts
CHANGED
@@ -17,8 +17,8 @@ declare module "engine/config/editorSettings" {
|
|
17
17
|
}
|
18
18
|
declare module "editor/components/editors/types" {
|
19
19
|
import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
|
20
|
-
import { AppearanceConfig, Device, DisplayMode, Location, Variant } from "state/types/types";
|
21
|
-
export type LoadingState = 'not-loaded' | 'loading' | 'loaded';
|
20
|
+
import { AppearanceConfig, Device, DisplayMode, Location, UndoRedoBehavior, Variant } from "state/types/types";
|
21
|
+
export type LoadingState = 'not-loaded' | 'loading' | 'loaded' | 'error';
|
22
22
|
export type UpdatingState = 'updating' | undefined;
|
23
23
|
export type DeletionState = 'deleting' | 'failed' | undefined;
|
24
24
|
export interface EditorProps<Value, WidgetParams = object> {
|
@@ -26,7 +26,7 @@ declare module "editor/components/editors/types" {
|
|
26
26
|
defaultValue: Value | undefined;
|
27
27
|
updateValue: (newValue: Value | undefined, data?: object, options?: {
|
28
28
|
deviceOverride?: Device;
|
29
|
-
|
29
|
+
undoRedoBehavior?: UndoRedoBehavior;
|
30
30
|
}) => void;
|
31
31
|
name: string;
|
32
32
|
/** @deprecated Use widgetParams instead */
|
@@ -820,6 +820,7 @@ declare module "editor/themes/types" {
|
|
820
820
|
borderColor: string;
|
821
821
|
tabs: {
|
822
822
|
width: string;
|
823
|
+
smWidth?: string;
|
823
824
|
backgroundColor: string;
|
824
825
|
textColor: string;
|
825
826
|
activeTextColor: string;
|
@@ -1272,14 +1273,26 @@ declare module "editor/themes/types" {
|
|
1272
1273
|
};
|
1273
1274
|
}
|
1274
1275
|
declare module "engine/constants" {
|
1276
|
+
export const displayModes: readonly ["email", "web", "popup", "document"];
|
1275
1277
|
export const collections: readonly ["bodies", "columns", "contents", "footers", "headers", "pages", "rows"];
|
1276
1278
|
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"];
|
1279
|
+
export const IS_CYPRESS: boolean;
|
1277
1280
|
export const BROWSER: {
|
1278
1281
|
IS_IE: boolean;
|
1279
1282
|
IS_SAFARI: boolean;
|
1280
1283
|
};
|
1281
1284
|
}
|
1282
1285
|
declare module "engine/utils/zod/schemas" {
|
1286
|
+
import { z } from 'zod/v4';
|
1287
|
+
/**
|
1288
|
+
* zod/v4 workaround for z.function support
|
1289
|
+
* Not supported by z.toJSONSchema
|
1290
|
+
* @see https://zod.dev/v4/changelog?id=zfunction
|
1291
|
+
* @see https://github.com/colinhacks/zod/issues/4143#issuecomment-2845134912
|
1292
|
+
*/
|
1293
|
+
export const functionSchema: <T extends z.core.$ZodFunction>(schema: T) => any;
|
1294
|
+
export const createAsyncFunctionSchema: <T extends z.core.$ZodFunction>(schema: T) => any;
|
1295
|
+
export const locationSchema: any;
|
1283
1296
|
export const DisplayConditionZodSchema: any;
|
1284
1297
|
export const FontWeightZodSchema: any;
|
1285
1298
|
export const FontZodSchema: any;
|
@@ -1294,23 +1307,24 @@ declare module "engine/utils/zod/schemas" {
|
|
1294
1307
|
declare module "state/types/types" {
|
1295
1308
|
import * as Ariakit from '@ariakit/react';
|
1296
1309
|
import { MutableRefObject, ReactInstance } from 'react';
|
1297
|
-
import {
|
1298
|
-
import { z } from 'zod';
|
1310
|
+
import { z } from 'zod/v4';
|
1299
1311
|
import { State as Design } from '../reducer/design';
|
1300
1312
|
import { CollaborationThread } from "editor/components/editors/types";
|
1301
1313
|
import { RootState } from "state/types/RootState";
|
1302
1314
|
import { ThemeExtension, ThemeNamePlusLightDark } from "editor/themes/types";
|
1303
|
-
import { collections } from "engine/constants";
|
1315
|
+
import { collections, displayModes } from "engine/constants";
|
1304
1316
|
import { DisplayConditionZodSchema } from "engine/utils/zod/schemas";
|
1317
|
+
import { AppDispatch } from '../store';
|
1305
1318
|
export type DesignMode = 'live' | 'edit';
|
1306
1319
|
export type Device = 'desktop' | 'mobile' | 'tablet';
|
1307
1320
|
export type Resolution = {
|
1308
1321
|
value: number;
|
1309
1322
|
name: string;
|
1310
1323
|
};
|
1311
|
-
export type DisplayMode =
|
1324
|
+
export type DisplayMode = ArrayItem<typeof displayModes>;
|
1312
1325
|
export type Variant = 'amp' | null;
|
1313
1326
|
export type Ui = 'none' | 'visual' | 'classic';
|
1327
|
+
export type UndoRedoBehavior = 'save' | 'replace' | 'skip';
|
1314
1328
|
export interface MergeTag {
|
1315
1329
|
name: string;
|
1316
1330
|
value?: string;
|
@@ -1426,6 +1440,7 @@ declare module "state/types/types" {
|
|
1426
1440
|
}
|
1427
1441
|
export type Collection = ArrayItem<typeof collections>;
|
1428
1442
|
export type Container = 'body' | 'row' | 'column' | 'content';
|
1443
|
+
export type AICopilotDataType = 'template_block' | 'page_block' | 'body_block' | 'row_block' | 'header_block' | 'footer_block' | 'column_block' | 'content_block' | 'text';
|
1429
1444
|
export interface Location {
|
1430
1445
|
collection: Collection;
|
1431
1446
|
id: number | string;
|
@@ -1435,6 +1450,7 @@ declare module "state/types/types" {
|
|
1435
1450
|
location: Location | null;
|
1436
1451
|
parent: Location | null;
|
1437
1452
|
threadId: CollaborationThread['id'] | null;
|
1453
|
+
selectedAt: number | null;
|
1438
1454
|
}
|
1439
1455
|
export interface LayerGroup {
|
1440
1456
|
elementRef: MutableRefObject<ReactInstance | undefined> | null | undefined;
|
@@ -1497,7 +1513,7 @@ declare module "state/types/types" {
|
|
1497
1513
|
optimistic?: boolean;
|
1498
1514
|
}
|
1499
1515
|
export type ArrayItem<T> = T extends (infer I)[] ? I : T extends readonly (infer I)[] ? I : unknown;
|
1500
|
-
export type BodyItem =
|
1516
|
+
export type BodyItem = {
|
1501
1517
|
id: string;
|
1502
1518
|
cells: number[];
|
1503
1519
|
columns: Array<{
|
@@ -1506,14 +1522,14 @@ declare module "state/types/types" {
|
|
1506
1522
|
values: Record<string, any>;
|
1507
1523
|
}>;
|
1508
1524
|
values: Record<string, any>;
|
1509
|
-
}
|
1525
|
+
};
|
1510
1526
|
export type JSONTemplate = {
|
1511
1527
|
counters: Record<string, number>;
|
1512
1528
|
body: {
|
1513
1529
|
id: string | undefined;
|
1514
|
-
rows: BodyItem;
|
1515
|
-
headers: BodyItem;
|
1516
|
-
footers: BodyItem;
|
1530
|
+
rows: BodyItem[];
|
1531
|
+
headers: BodyItem[];
|
1532
|
+
footers: BodyItem[];
|
1517
1533
|
values: {};
|
1518
1534
|
};
|
1519
1535
|
schemaVersion?: number;
|
@@ -1579,6 +1595,7 @@ declare module "state/types/types" {
|
|
1579
1595
|
tools?: {
|
1580
1596
|
dock?: 'left' | 'right';
|
1581
1597
|
collapsible?: boolean;
|
1598
|
+
forceUncollapseOnSelect?: boolean;
|
1582
1599
|
tabs?: {
|
1583
1600
|
body?: {
|
1584
1601
|
visible?: boolean;
|
@@ -1632,9 +1649,16 @@ declare module "state/types/types" {
|
|
1632
1649
|
values: {
|
1633
1650
|
[id: string]: unknown;
|
1634
1651
|
};
|
1635
|
-
}, placeholder: string) => (dispatch:
|
1652
|
+
}, placeholder: string) => (dispatch: AppDispatch, getState: () => RootState) => Promise<void>;
|
1636
1653
|
export interface JSONSchema {
|
1637
1654
|
}
|
1655
|
+
export interface SuggestedSelection {
|
1656
|
+
parent?: Location | null;
|
1657
|
+
location: Location | null;
|
1658
|
+
table?: {
|
1659
|
+
globalClickedCellId: string | null;
|
1660
|
+
};
|
1661
|
+
}
|
1638
1662
|
export type TableValue = {
|
1639
1663
|
headers: {
|
1640
1664
|
cells: {
|
@@ -1667,7 +1691,7 @@ declare module "engine/config/features" {
|
|
1667
1691
|
}, callback: (text: string) => void) => void;
|
1668
1692
|
}
|
1669
1693
|
export type ColorGroup = {} & ({
|
1670
|
-
id: 'brand_colors' | 'common_colors' | 'recent_colors' | 'template_colors';
|
1694
|
+
id: 'brand_colors' | 'common_colors' | 'recent_colors' | 'template_colors' | (string & {});
|
1671
1695
|
label?: string;
|
1672
1696
|
colors?: string[];
|
1673
1697
|
default?: boolean;
|
@@ -1719,7 +1743,11 @@ declare module "engine/config/features" {
|
|
1719
1743
|
search?: boolean;
|
1720
1744
|
};
|
1721
1745
|
devTab?: boolean;
|
1722
|
-
undoRedo?: boolean
|
1746
|
+
undoRedo?: boolean | {
|
1747
|
+
enabled: boolean;
|
1748
|
+
autoSelect?: boolean;
|
1749
|
+
autoFocus?: boolean;
|
1750
|
+
};
|
1723
1751
|
textEditor?: {
|
1724
1752
|
spellChecker?: boolean;
|
1725
1753
|
tables?: boolean;
|
@@ -1745,11 +1773,15 @@ declare module "engine/config/features" {
|
|
1745
1773
|
};
|
1746
1774
|
styleGuide?: boolean;
|
1747
1775
|
ai?: boolean | {
|
1748
|
-
|
1749
|
-
|
1776
|
+
enabled?: boolean;
|
1777
|
+
copilot?: boolean;
|
1778
|
+
models?: boolean;
|
1750
1779
|
magicImage?: boolean;
|
1751
|
-
|
1780
|
+
smartButtons?: boolean;
|
1781
|
+
smartHeadings?: boolean;
|
1752
1782
|
smartImageAltText?: boolean;
|
1783
|
+
smartText?: boolean;
|
1784
|
+
smartParagraph?: boolean;
|
1753
1785
|
};
|
1754
1786
|
sendTestEmail?: boolean;
|
1755
1787
|
}
|
@@ -1759,8 +1791,10 @@ declare module "engine/config/features" {
|
|
1759
1791
|
deepmerge?: boolean;
|
1760
1792
|
}): void;
|
1761
1793
|
export function getFeatures(): Features;
|
1762
|
-
export function getFeature
|
1763
|
-
export function
|
1794
|
+
export function getFeature<Path extends keyof Features | [keyof Features, ...string[]]>(path: Path): Path extends keyof Features ? Features[Path] : any;
|
1795
|
+
export function normalizeFeatureAsObject<Object extends Record<string, any>, Feature extends boolean | Object>(feature: Feature | undefined): Partial<Feature & object>;
|
1796
|
+
export function getFeatureAsObject<Path extends keyof Features | [keyof Features, ...string[]]>(path: Path): Partial<(Path extends keyof Features ? Features[Path] : any) & object>;
|
1797
|
+
export function hasFeature<Path extends string | string[]>(path: Path, checkEntitlement?: boolean): boolean;
|
1764
1798
|
}
|
1765
1799
|
declare module "engine/config/offline" {
|
1766
1800
|
export function enableOffline(): void;
|
@@ -1797,7 +1831,7 @@ declare module "engine/config/callbacks" {
|
|
1797
1831
|
};
|
1798
1832
|
}
|
1799
1833
|
declare module "engine/config/fonts" {
|
1800
|
-
import { z } from 'zod';
|
1834
|
+
import { z } from 'zod/v4';
|
1801
1835
|
import { FontZodSchema } from "engine/utils/zod/schemas";
|
1802
1836
|
export type Font = z.infer<typeof FontZodSchema>;
|
1803
1837
|
export type FontList = Font[];
|
@@ -2110,29 +2144,35 @@ declare module "engine/utils/position" {
|
|
2110
2144
|
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;
|
2111
2145
|
}
|
2112
2146
|
declare module "engine/utils/zod/zodSchemasToJsonSchemas" {
|
2113
|
-
import {
|
2147
|
+
import { z } from 'zod/v4';
|
2114
2148
|
import { JSONSchema } from "state/types/types";
|
2115
|
-
export function zodSchemasToJsonSchemas<K extends string>(zodSchemas: Record<K,
|
2149
|
+
export function zodSchemasToJsonSchemas<K extends string>(zodSchemas: Partial<Record<K, z.ZodType | undefined>>): Record<K, JSONSchema>;
|
2116
2150
|
}
|
2117
2151
|
declare module "engine/utils/zod/propertyEditorSchemas" {
|
2118
2152
|
import { PropertyEditorZodSchemas } from '../../config';
|
2119
|
-
export function propertyEditorZodSchemas<
|
2120
|
-
|
2121
|
-
|
2153
|
+
export function propertyEditorZodSchemas<ValueSchema extends PropertyEditorZodSchemas['value']>(zodSchemas: Omit<PropertyEditorZodSchemas, 'value' | 'value__simple'> & {
|
2154
|
+
value: ValueSchema;
|
2155
|
+
value__simple: ((valueSchema: ValueSchema) => PropertyEditorZodSchemas['value__simple']) | PropertyEditorZodSchemas['value__simple'] | null | undefined;
|
2156
|
+
}): {
|
2157
|
+
zodSchemas: {
|
2158
|
+
value__simple: any;
|
2159
|
+
value: ValueSchema;
|
2160
|
+
};
|
2161
|
+
schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>;
|
2122
2162
|
};
|
2123
2163
|
}
|
2124
2164
|
declare module "engine/utils/zod/types" {
|
2125
|
-
import { z } from 'zod';
|
2165
|
+
import { z } from 'zod/v4';
|
2126
2166
|
import { EditorProps } from "editor/components/editors/types";
|
2127
2167
|
import { PropertyEditorZodSchemas } from '../../config';
|
2128
|
-
export type EditorPropsFromZodSchemas<T extends PropertyEditorZodSchemas
|
2168
|
+
export type EditorPropsFromZodSchemas<T extends Partial<PropertyEditorZodSchemas>> = EditorProps<z.infer<T['value']>, z.infer<T['widgetParams']>>;
|
2129
2169
|
}
|
2130
2170
|
declare module "editor/components/editors/PositionEditor" {
|
2131
2171
|
import React from 'react';
|
2132
2172
|
import { EditorPropsFromZodSchemas } from "engine/utils/zod/types";
|
2133
|
-
export const schemas: Record<
|
2173
|
+
export const schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>, zodSchemas: {
|
2174
|
+
value__simple: any;
|
2134
2175
|
value: any;
|
2135
|
-
widgetParams: any;
|
2136
2176
|
};
|
2137
2177
|
export type PositionEditorProps = EditorPropsFromZodSchemas<typeof zodSchemas>;
|
2138
2178
|
export function PositionEditor(props: PositionEditorProps): React.JSX.Element;
|
@@ -2170,11 +2210,13 @@ declare module "editor/design-system/components/Input" {
|
|
2170
2210
|
value: string;
|
2171
2211
|
}>;
|
2172
2212
|
icon?: Icon | IconDefinition;
|
2213
|
+
inputFooter?: React.ReactNode;
|
2214
|
+
inputHeader?: React.ReactNode;
|
2173
2215
|
label?: React.ReactNode;
|
2174
2216
|
labelPosition?: 'top' | 'left' | 'right';
|
2175
2217
|
name: string;
|
2176
2218
|
onClear?: () => void;
|
2177
|
-
onSubmit
|
2219
|
+
onSubmit: (value: string | number) => void;
|
2178
2220
|
placeholder?: string;
|
2179
2221
|
required?: boolean;
|
2180
2222
|
type?: Ariakit.FormInputProps['type'] | 'textarea';
|
@@ -2184,10 +2226,16 @@ declare module "editor/design-system/components/Input" {
|
|
2184
2226
|
value: string | number;
|
2185
2227
|
}
|
2186
2228
|
export const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
2229
|
+
export const CSS: {
|
2230
|
+
label: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
2231
|
+
};
|
2187
2232
|
export const S: {
|
2188
2233
|
Form: import("styled-components").StyledComponent<any, any, any, any>;
|
2189
2234
|
FormInputGroup: import("styled-components").StyledComponent<any, any, any, any>;
|
2190
2235
|
FormLabel: import("styled-components").StyledComponent<any, any, any, any>;
|
2236
|
+
FormInputWrapper: import("styled-components").StyledComponent<"div", any, {
|
2237
|
+
className: "input-wrapper";
|
2238
|
+
}, "className">;
|
2191
2239
|
FormInput: import("styled-components").StyledComponent<any, any, any, any>;
|
2192
2240
|
Message: import("styled-components").StyledComponent<"div", any, {}, never>;
|
2193
2241
|
ClearButton: import("styled-components").StyledComponent<any, any, any, any>;
|
@@ -2197,42 +2245,50 @@ declare module "editor/helpers/extractStringsFromReactNode" {
|
|
2197
2245
|
import React from 'react';
|
2198
2246
|
export function extractStringsFromReactNode(node: React.ReactNode): string;
|
2199
2247
|
}
|
2248
|
+
declare module "editor/design-system/components/Tooltip" {
|
2249
|
+
import React from 'react';
|
2250
|
+
import * as Ariakit from '@ariakit/react';
|
2251
|
+
export interface TooltipProps {
|
2252
|
+
arrow?: boolean;
|
2253
|
+
children?: Ariakit.TooltipAnchorProps['children'];
|
2254
|
+
className?: string;
|
2255
|
+
disabled?: boolean;
|
2256
|
+
gutter?: Ariakit.TooltipProps['gutter'];
|
2257
|
+
placement: Ariakit.TooltipStoreProps['placement'];
|
2258
|
+
style?: React.CSSProperties;
|
2259
|
+
timeout?: Ariakit.TooltipStoreProps['timeout'];
|
2260
|
+
tooltip: Ariakit.TooltipProps['children'];
|
2261
|
+
tooltipWrapper?: Ariakit.TooltipAnchorProps['render'];
|
2262
|
+
}
|
2263
|
+
export function Tooltip(props: TooltipProps): React.JSX.Element;
|
2264
|
+
}
|
2200
2265
|
declare module "editor/design-system/components/Button" {
|
2201
2266
|
import React from 'react';
|
2202
2267
|
import * as Ariakit from '@ariakit/react';
|
2268
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
2203
2269
|
import { Theme } from "editor/themes/types";
|
2270
|
+
import { TooltipProps } from "editor/design-system/components/Tooltip";
|
2204
2271
|
export interface ButtonProps extends Ariakit.ButtonProps {
|
2205
|
-
children
|
2272
|
+
children?: React.ReactNode;
|
2206
2273
|
circle?: boolean;
|
2207
2274
|
className?: string;
|
2275
|
+
contentAlign?: 'left' | 'center' | 'right';
|
2208
2276
|
danger?: boolean;
|
2209
2277
|
disabled?: boolean;
|
2278
|
+
icon?: IconProp;
|
2279
|
+
id?: string;
|
2210
2280
|
loading?: boolean;
|
2211
2281
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
2212
2282
|
size?: number | 'auto';
|
2213
2283
|
style?: React.CSSProperties;
|
2214
|
-
|
2284
|
+
tooltip?: string;
|
2285
|
+
tooltipPlacement?: TooltipProps['placement'];
|
2286
|
+
truncate?: boolean;
|
2215
2287
|
type?: Ariakit.ButtonProps['type'];
|
2216
|
-
|
2288
|
+
variant?: keyof Theme['components']['buttons'];
|
2217
2289
|
}
|
2218
2290
|
export const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<unknown>>;
|
2219
2291
|
}
|
2220
|
-
declare module "editor/design-system/components/Tooltip" {
|
2221
|
-
import React from 'react';
|
2222
|
-
import * as Ariakit from '@ariakit/react';
|
2223
|
-
export interface TooltipProps {
|
2224
|
-
arrow?: boolean;
|
2225
|
-
children: Ariakit.TooltipAnchorProps['children'];
|
2226
|
-
className?: string;
|
2227
|
-
disabled?: boolean;
|
2228
|
-
placement: Ariakit.TooltipStoreProps['placement'];
|
2229
|
-
style?: React.CSSProperties;
|
2230
|
-
timeout?: number;
|
2231
|
-
tooltip: Ariakit.TooltipProps['children'];
|
2232
|
-
tooltipWrapper?: Ariakit.TooltipAnchorProps['render'];
|
2233
|
-
}
|
2234
|
-
export function Tooltip(props: TooltipProps): React.JSX.Element;
|
2235
|
-
}
|
2236
2292
|
declare module "editor/helpers/intl" {
|
2237
2293
|
import _ from 'lodash';
|
2238
2294
|
import { IntlShape } from 'react-intl';
|
@@ -2267,7 +2323,7 @@ declare module "editor/design-system/components/Dropdown" {
|
|
2267
2323
|
export type DropdownProps = {
|
2268
2324
|
ariaLabel?: string;
|
2269
2325
|
asLink?: boolean;
|
2270
|
-
badge?: number;
|
2326
|
+
badge?: number | boolean;
|
2271
2327
|
className?: string;
|
2272
2328
|
icon?: IconDefinition;
|
2273
2329
|
caret?: boolean;
|
@@ -2338,7 +2394,6 @@ declare module "editor/themes/index" {
|
|
2338
2394
|
declare module "editor/hooks/useTheme" {
|
2339
2395
|
import React from 'react';
|
2340
2396
|
import { DeprecatedTheme, Theme } from "editor/themes/types";
|
2341
|
-
export function getCurrentTheme(): Theme & DeprecatedTheme;
|
2342
2397
|
export function ThemeProvider(props: React.PropsWithChildren): React.JSX.Element;
|
2343
2398
|
export function ThemeConsumer(props: {
|
2344
2399
|
children: React.ReactNode | ((params: {
|
@@ -2738,9 +2793,9 @@ declare module "editor/components/editors/AutoWidthEditor" {
|
|
2738
2793
|
import { WidgetLabelProps } from "editor/components/editors/common/WidgetLabel";
|
2739
2794
|
import { Device } from "state/types/types";
|
2740
2795
|
import { EditorPropsFromZodSchemas } from "engine/utils/zod/types";
|
2741
|
-
export const schemas: Record<
|
2796
|
+
export const schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>, zodSchemas: {
|
2797
|
+
value__simple: any;
|
2742
2798
|
value: any;
|
2743
|
-
widgetParams: any;
|
2744
2799
|
};
|
2745
2800
|
export type AutoWidthEditorProps = EditorPropsFromZodSchemas<typeof zodSchemas>;
|
2746
2801
|
export interface AutoWidthEditorBaseProps extends Pick<AutoWidthEditorProps, 'value' | 'defaultValue' | 'disabled' | 'isLocked' | 'lockReason'> {
|
@@ -2796,29 +2851,47 @@ declare module "editor/components/editors/pixie/pixie.umd" {
|
|
2796
2851
|
declare module "editor/design-system/components/Popover" {
|
2797
2852
|
import React from 'react';
|
2798
2853
|
import * as Ariakit from '@ariakit/react';
|
2799
|
-
export
|
2854
|
+
export type PopoverProps = {
|
2800
2855
|
arrow?: boolean;
|
2801
|
-
autoFocusOnShow?: boolean;
|
2802
2856
|
autoFocusOnHide?: boolean;
|
2857
|
+
autoFocusOnShow?: boolean;
|
2803
2858
|
children: Ariakit.PopoverAnchorProps['children'];
|
2804
2859
|
className?: string;
|
2805
2860
|
content: Ariakit.PopoverProps['children'];
|
2806
|
-
|
2861
|
+
defaultOpen?: Ariakit.PopoverStoreProps['defaultOpen'];
|
2862
|
+
destroyOnHide?: boolean;
|
2807
2863
|
disabled?: boolean;
|
2864
|
+
forcedOpenState?: boolean;
|
2865
|
+
gutter?: Ariakit.PopoverOptions['gutter'];
|
2808
2866
|
onHide?: () => void;
|
2809
2867
|
onShow?: () => void;
|
2810
2868
|
placement: Ariakit.PopoverStoreProps['placement'];
|
2811
|
-
|
2869
|
+
portal?: Ariakit.PopoverOptions['portal'];
|
2870
|
+
portalParent?: 'body' | 'editor';
|
2812
2871
|
style?: React.CSSProperties;
|
2813
|
-
|
2814
|
-
|
2815
|
-
|
2872
|
+
wrapper?: Ariakit.PopoverAnchorProps['render'];
|
2873
|
+
} & ({
|
2874
|
+
showOnHover?: false;
|
2875
|
+
hideTimeout?: never;
|
2876
|
+
showTimeout?: never;
|
2877
|
+
timeout?: never;
|
2878
|
+
} | {
|
2879
|
+
showOnHover?: true;
|
2880
|
+
hideTimeout?: Ariakit.HovercardStoreProps['hideTimeout'];
|
2881
|
+
showTimeout?: Ariakit.HovercardStoreProps['showTimeout'];
|
2882
|
+
timeout?: Ariakit.HovercardStoreProps['timeout'];
|
2883
|
+
});
|
2816
2884
|
export interface PopoverInstance {
|
2817
2885
|
isOpen: boolean;
|
2818
2886
|
show: () => void;
|
2819
2887
|
hide: () => void;
|
2820
2888
|
}
|
2821
2889
|
export const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<PopoverInstance>>;
|
2890
|
+
export const CSS: {
|
2891
|
+
popover: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
2892
|
+
anchor: import("styled-components").FlattenSimpleInterpolation;
|
2893
|
+
arrow: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
2894
|
+
};
|
2822
2895
|
}
|
2823
2896
|
declare module "editor/design-system/components/Bar" {
|
2824
2897
|
import React, { ReactNode } from 'react';
|
@@ -2849,24 +2922,27 @@ declare module "editor/design-system/components/Bar" {
|
|
2849
2922
|
}
|
2850
2923
|
export interface BarTitleItem {
|
2851
2924
|
key: string;
|
2852
|
-
type: 'title'
|
2925
|
+
type: 'title';
|
2926
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
2927
|
+
ai?: boolean;
|
2853
2928
|
icon?: IconDefinition;
|
2854
2929
|
text: string | React.ReactElement;
|
2855
2930
|
tooltip?: string;
|
2856
2931
|
tooltipPlacement?: TooltipProps['placement'];
|
2857
|
-
badge?: number;
|
2932
|
+
badge?: number | boolean;
|
2858
2933
|
loading?: boolean;
|
2859
2934
|
}
|
2860
2935
|
export interface BarButtonItem {
|
2861
2936
|
key: string;
|
2862
2937
|
type: 'button';
|
2938
|
+
ai?: boolean;
|
2863
2939
|
id?: string;
|
2864
2940
|
className?: string;
|
2865
|
-
icon: IconDefinition | undefined;
|
2941
|
+
icon: IconDefinition | null | undefined;
|
2866
2942
|
label?: string;
|
2867
2943
|
tooltip?: string;
|
2868
2944
|
tooltipPlacement?: TooltipProps['placement'];
|
2869
|
-
badge?: number;
|
2945
|
+
badge?: number | boolean;
|
2870
2946
|
onClick?: (e: React.MouseEvent) => void;
|
2871
2947
|
destructive?: boolean;
|
2872
2948
|
disabled?: boolean;
|
@@ -2882,7 +2958,7 @@ declare module "editor/design-system/components/Bar" {
|
|
2882
2958
|
tooltip?: string;
|
2883
2959
|
tooltipPlacement?: TooltipProps['placement'];
|
2884
2960
|
label?: string;
|
2885
|
-
badge?: number;
|
2961
|
+
badge?: number | boolean;
|
2886
2962
|
onClick?: (e: React.MouseEvent) => void;
|
2887
2963
|
onChange: (enabled: boolean) => void;
|
2888
2964
|
disabled?: boolean;
|
@@ -2902,7 +2978,7 @@ declare module "editor/design-system/components/Bar" {
|
|
2902
2978
|
renderOption?: (option: SelectOption) => React.ReactNode;
|
2903
2979
|
renderOptionLabel?: (option: SelectOption) => React.ReactNode;
|
2904
2980
|
onChange?: (option: SelectOption) => void;
|
2905
|
-
badge?: number;
|
2981
|
+
badge?: number | boolean;
|
2906
2982
|
disabled?: boolean;
|
2907
2983
|
tooltip?: string;
|
2908
2984
|
tooltipPlacement?: TooltipProps['placement'];
|
@@ -2919,10 +2995,29 @@ declare module "editor/design-system/components/Bar" {
|
|
2919
2995
|
groupedOptions?: never;
|
2920
2996
|
renderOptionGroupHeader?: never;
|
2921
2997
|
});
|
2998
|
+
export interface BarPopoverItem {
|
2999
|
+
key: string;
|
3000
|
+
type: 'popover';
|
3001
|
+
icon?: IconDefinition;
|
3002
|
+
ai?: boolean;
|
3003
|
+
label?: string;
|
3004
|
+
tooltip?: string;
|
3005
|
+
tooltipPlacement?: TooltipProps['placement'];
|
3006
|
+
badge?: number | boolean;
|
3007
|
+
onClick?: (e: React.MouseEvent) => void;
|
3008
|
+
className?: string;
|
3009
|
+
disabled?: boolean;
|
3010
|
+
open?: boolean;
|
3011
|
+
destructive?: boolean;
|
3012
|
+
selected?: boolean;
|
3013
|
+
highlighted?: boolean;
|
3014
|
+
autoFocus?: boolean;
|
3015
|
+
PopoverElement: React.ElementType;
|
3016
|
+
}
|
2922
3017
|
export interface BarSeparatorItem {
|
2923
3018
|
type: 'separator';
|
2924
3019
|
}
|
2925
|
-
export type BarItem = BarTitleItem | BarButtonItem | BarToggleItem | BarDropdownItem | BarSeparatorItem | false | undefined;
|
3020
|
+
export type BarItem = BarTitleItem | BarButtonItem | BarToggleItem | BarDropdownItem | BarPopoverItem | BarSeparatorItem | false | undefined;
|
2926
3021
|
export interface BarProps {
|
2927
3022
|
as?: any;
|
2928
3023
|
className?: string;
|
@@ -2952,9 +3047,9 @@ declare module "editor/components/editors/pixie/PixieImageEditor" {
|
|
2952
3047
|
}
|
2953
3048
|
declare module "editor/components/editors/ImageEditor" {
|
2954
3049
|
import { EditorPropsFromZodSchemas } from "engine/utils/zod/types";
|
2955
|
-
export const schemas: Record<
|
3050
|
+
export const schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>, zodSchemas: {
|
3051
|
+
value__simple: any;
|
2956
3052
|
value: any;
|
2957
|
-
widgetParams: any;
|
2958
3053
|
};
|
2959
3054
|
export type ImageEditorProps = EditorPropsFromZodSchemas<typeof zodSchemas>;
|
2960
3055
|
export function isDefaultImage(imageUrl: string | undefined, widgetParamsUrl?: string): boolean;
|
@@ -3044,9 +3139,9 @@ declare module "editor/components/editors/ImageUploader" {
|
|
3044
3139
|
}
|
3045
3140
|
declare module "editor/components/editors/BackgroundImageEditor" {
|
3046
3141
|
import { EditorPropsFromZodSchemas } from "engine/utils/zod/types";
|
3047
|
-
export const schemas: Record<
|
3142
|
+
export const schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>, zodSchemas: {
|
3143
|
+
value__simple: any;
|
3048
3144
|
value: any;
|
3049
|
-
widgetParams: any;
|
3050
3145
|
};
|
3051
3146
|
export type BackgroundImageEditorProps = EditorPropsFromZodSchemas<typeof zodSchemas>;
|
3052
3147
|
}
|
package/package.json
CHANGED