@wix/editor 1.490.0 → 1.492.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/dist/cjs/index.js +530 -602
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +522 -596
- package/dist/esm/index.js.map +1 -1
- package/dist/statics/docs-ts-model.json +2515 -1276
- package/dist/statics/index.js +530 -602
- package/dist/statics/index.js.map +1 -1
- package/dist/types/index.d.ts +101 -29
- package/package.json +6 -6
package/dist/types/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as _wix_sdk_types from '@wix/sdk-types';
|
|
|
5
5
|
import { Host } from '@wix/sdk-types';
|
|
6
6
|
import * as _wix_sdk_runtime_host_modules from '@wix/sdk-runtime/host-modules';
|
|
7
7
|
import * as _wix_editor_platform_transport from '@wix/editor-platform-transport';
|
|
8
|
-
import { IElement, ComponentRef, ElementStyleDefinitions, ElementStyles, ElementStylesUpdate, ElementStylesRemoval, ElementDataDefinitions, ElementData, ElementDataInput, ElementPresetDefinitions, ElementStateDefinitions,
|
|
8
|
+
import { IElement, ComponentRef, ElementStyleDefinitions, ElementStyles, ElementStylesUpdate, ElementStylesRemoval, ElementDataDefinitions, ElementData, ElementDataInput, ElementPresetDefinitions, ElementStateDefinitions, ElementLink, BackgroundPickerOptions, DsItem, BuilderStyle, StyleRef, OpenLinkPanelFn, OpenColorPickerFn, ListProvidersOptions, Provider, BindingProperties, UnbindAll, ListBindingsOptions, BindingTargetDetails, BindingCandidate, SelectBindingOptions } from '@wix/public-editor-platform-interfaces';
|
|
9
9
|
export { DataType, ElementA11y, ElementAddressLink, ElementAnchorLink, ElementAudio, ElementData, ElementDataDefinition, ElementDataDefinitions, ElementDataInput, ElementDataObject, ElementDataValue, ElementDirection, ElementDocumentLink, ElementDynamicPageLink, ElementEmailLink, ElementExternalLink, ElementImage, ElementLink, ElementLoginToWixLink, ElementMenuItems, ElementPageLink, ElementPhoneLink, ElementPresetDefinition, ElementPresetDefinitions, ElementRichText, ElementStateDefinition, ElementStateDefinitions, ElementStyleDefinition, ElementStyleDefinitions, ElementStyles, ElementStylesRemoval, ElementStylesUpdate, ElementTextLink, ElementTpaPageLink, ElementVectorArt, ElementVideo, ElementWhatsAppLink, NativeStateType } from '@wix/public-editor-platform-interfaces';
|
|
10
10
|
|
|
11
11
|
declare class Workspace implements NonNullable<WorkspaceHost$1['workspace']> {
|
|
@@ -134,6 +134,31 @@ declare class ModalsSDKShape extends BaseSDKShape {
|
|
|
134
134
|
}
|
|
135
135
|
declare const _default$6: ModalsSDKShape & _wix_sdk_runtime_host_modules.HostModule<ModalsSDKShape, _wix_sdk_types.Host>;
|
|
136
136
|
|
|
137
|
+
/** Represents a font family and its weight. */
|
|
138
|
+
interface IFontFamily {
|
|
139
|
+
/** The font family name. For example, 'Arial' or 'Helvetica Neue'. */
|
|
140
|
+
family: string;
|
|
141
|
+
/** The font weight. For example, '400' or 'bold'. */
|
|
142
|
+
weight: string;
|
|
143
|
+
}
|
|
144
|
+
/** Represents a font weight value. */
|
|
145
|
+
interface IFontWeight {
|
|
146
|
+
/** The font weight. For example, '400' or 'bold'. */
|
|
147
|
+
weight: string;
|
|
148
|
+
}
|
|
149
|
+
/** Combination of font family and weight properties. */
|
|
150
|
+
type IFontFamilyAndWeight = IFontFamily & IFontWeight;
|
|
151
|
+
type ISelectLinkSharedOptions = {
|
|
152
|
+
/** Identifier for the origin of the link selection (used for BI tracking). */
|
|
153
|
+
origin?: string;
|
|
154
|
+
};
|
|
155
|
+
/** Options for positioning a picker panel relative to a target element. */
|
|
156
|
+
type IPanelOptions = {
|
|
157
|
+
/** Where to place the picker panel relative to the target element. */
|
|
158
|
+
placement?: 'top' | 'bottom' | 'top-start' | 'bottom-start' | 'top-end' | 'bottom-end';
|
|
159
|
+
/** Vertical offset in pixels to shift the panel from its computed position. */
|
|
160
|
+
YShift?: number;
|
|
161
|
+
};
|
|
137
162
|
/**
|
|
138
163
|
* Methods for interacting with a component from a custom panel.
|
|
139
164
|
*
|
|
@@ -153,28 +178,10 @@ declare const _default$6: ModalsSDKShape & _wix_sdk_runtime_host_modules.HostMod
|
|
|
153
178
|
* }
|
|
154
179
|
* ```
|
|
155
180
|
*/
|
|
156
|
-
declare class ElementSDKShape extends BaseSDKShape
|
|
157
|
-
#private;
|
|
181
|
+
declare class ElementSDKShape extends BaseSDKShape {
|
|
158
182
|
protected overriddenApplicationContext: Promise<ApplicationContext> | null;
|
|
159
183
|
private childPath;
|
|
160
|
-
|
|
161
|
-
readonly compRef?: unknown;
|
|
162
|
-
constructor(overriddenApplicationContext?: Promise<ApplicationContext> | null, childPath?: number[], overrides?: {
|
|
163
|
-
manifestContextId?: string;
|
|
164
|
-
type?: string;
|
|
165
|
-
compRef?: unknown;
|
|
166
|
-
});
|
|
167
|
-
protected getManifestContextId(): Promise<string | null | undefined>;
|
|
168
|
-
/**
|
|
169
|
-
* Reads a single data-item value by key. Equivalent to `(await getData())[prop]`.
|
|
170
|
-
* Provided for interface parity with elements.getSelection() results.
|
|
171
|
-
*/
|
|
172
|
-
getProp<T = unknown>(prop: string): Promise<T | null | undefined | void>;
|
|
173
|
-
/**
|
|
174
|
-
* Writes a single data-item value by key. Equivalent to
|
|
175
|
-
* `setData({ [prop]: value })`. Other data items are left unchanged.
|
|
176
|
-
*/
|
|
177
|
-
setProp<T = unknown>(prop: string, value: T | null | undefined): Promise<void>;
|
|
184
|
+
constructor(overriddenApplicationContext?: Promise<ApplicationContext> | null, childPath?: number[]);
|
|
178
185
|
/**
|
|
179
186
|
* Retrieves the style definitions declared in the component's manifest,
|
|
180
187
|
* including `cssProperties` and `cssCustomProperties`.
|
|
@@ -470,7 +477,15 @@ declare class ElementSDKShape extends BaseSDKShape implements IElement {
|
|
|
470
477
|
* });
|
|
471
478
|
* ```
|
|
472
479
|
*/
|
|
473
|
-
selectFont(params:
|
|
480
|
+
selectFont(params: {
|
|
481
|
+
styleItemKey: string;
|
|
482
|
+
} | {
|
|
483
|
+
selectedFontFamily?: IFontFamilyAndWeight;
|
|
484
|
+
target?: HTMLElement;
|
|
485
|
+
panelOptions?: IPanelOptions;
|
|
486
|
+
onChange?: (value: IFontFamilyAndWeight) => void;
|
|
487
|
+
onPreview?: (value: IFontFamilyAndWeight) => void;
|
|
488
|
+
}): Promise<any>;
|
|
474
489
|
/**
|
|
475
490
|
* Opens the font family picker for selecting a font family without
|
|
476
491
|
* weight options. Works the same as {@link selectFont} but without
|
|
@@ -491,7 +506,15 @@ declare class ElementSDKShape extends BaseSDKShape implements IElement {
|
|
|
491
506
|
* });
|
|
492
507
|
* ```
|
|
493
508
|
*/
|
|
494
|
-
selectFontFamily(params:
|
|
509
|
+
selectFontFamily(params: {
|
|
510
|
+
styleItemKey: string;
|
|
511
|
+
} | {
|
|
512
|
+
selectedFontFamily?: IFontFamily;
|
|
513
|
+
target?: HTMLElement;
|
|
514
|
+
panelOptions?: IPanelOptions;
|
|
515
|
+
onChange?: (value: IFontFamily) => void;
|
|
516
|
+
onPreview?: (value: IFontFamily) => void;
|
|
517
|
+
}): Promise<any>;
|
|
495
518
|
/**
|
|
496
519
|
* Opens the media picker for selecting images, videos, or other media
|
|
497
520
|
* from the Wix Media Manager.
|
|
@@ -514,7 +537,12 @@ declare class ElementSDKShape extends BaseSDKShape implements IElement {
|
|
|
514
537
|
* });
|
|
515
538
|
* ```
|
|
516
539
|
*/
|
|
517
|
-
selectMedia(params:
|
|
540
|
+
selectMedia(params: {
|
|
541
|
+
dataItemKey: string;
|
|
542
|
+
} | {
|
|
543
|
+
isMultiSelect?: boolean;
|
|
544
|
+
category?: string;
|
|
545
|
+
}): Promise<any>;
|
|
518
546
|
/**
|
|
519
547
|
* Opens the link picker for creating or editing a link.
|
|
520
548
|
*
|
|
@@ -536,7 +564,15 @@ declare class ElementSDKShape extends BaseSDKShape implements IElement {
|
|
|
536
564
|
* });
|
|
537
565
|
* ```
|
|
538
566
|
*/
|
|
539
|
-
selectLink(params:
|
|
567
|
+
selectLink(params: {
|
|
568
|
+
dataItemKey: string;
|
|
569
|
+
options?: ISelectLinkSharedOptions;
|
|
570
|
+
} | {
|
|
571
|
+
value?: ElementLink;
|
|
572
|
+
options?: ISelectLinkSharedOptions & {
|
|
573
|
+
linkTypes?: string[];
|
|
574
|
+
};
|
|
575
|
+
}): Promise<ElementLink | null | undefined>;
|
|
540
576
|
/**
|
|
541
577
|
* Opens the color picker for selecting a color.
|
|
542
578
|
*
|
|
@@ -561,7 +597,27 @@ declare class ElementSDKShape extends BaseSDKShape implements IElement {
|
|
|
561
597
|
* });
|
|
562
598
|
* ```
|
|
563
599
|
*/
|
|
564
|
-
selectColor(params:
|
|
600
|
+
selectColor(params: {
|
|
601
|
+
styleItemKey: string;
|
|
602
|
+
} | {
|
|
603
|
+
initialValue?: string;
|
|
604
|
+
mode?: ('solid' | 'gradient')[];
|
|
605
|
+
showBrand?: boolean;
|
|
606
|
+
showCustom?: boolean;
|
|
607
|
+
showAdvancedSettings?: boolean;
|
|
608
|
+
showOpacity?: boolean;
|
|
609
|
+
position?: {
|
|
610
|
+
x: number;
|
|
611
|
+
y: number;
|
|
612
|
+
};
|
|
613
|
+
biData?: {
|
|
614
|
+
origin: string;
|
|
615
|
+
};
|
|
616
|
+
onChange?: (color: string) => void;
|
|
617
|
+
onApply?: (color: string) => void;
|
|
618
|
+
onClose?: () => void;
|
|
619
|
+
onCancel?: () => void;
|
|
620
|
+
}): Promise<any>;
|
|
565
621
|
/**
|
|
566
622
|
* Opens the background picker for selecting a background fill
|
|
567
623
|
* (color, gradient, or image).
|
|
@@ -605,7 +661,16 @@ declare class ElementSDKShape extends BaseSDKShape implements IElement {
|
|
|
605
661
|
* });
|
|
606
662
|
* ```
|
|
607
663
|
*/
|
|
608
|
-
selectFontWeight(params:
|
|
664
|
+
selectFontWeight(params: {
|
|
665
|
+
fontFamilyStyleItemKey: string;
|
|
666
|
+
fontWeightStyleItemKey: string;
|
|
667
|
+
} | {
|
|
668
|
+
fontStyleItemKey: string;
|
|
669
|
+
} | {
|
|
670
|
+
fontFamily?: IFontFamily;
|
|
671
|
+
target?: HTMLElement;
|
|
672
|
+
onChange?: (value: IFontWeight) => void;
|
|
673
|
+
}): Promise<IFontWeight>;
|
|
609
674
|
/**
|
|
610
675
|
* Opens the text theme picker for selecting a predefined text theme
|
|
611
676
|
* (a combination of font and color from the site's theme).
|
|
@@ -624,7 +689,13 @@ declare class ElementSDKShape extends BaseSDKShape implements IElement {
|
|
|
624
689
|
* });
|
|
625
690
|
* ```
|
|
626
691
|
*/
|
|
627
|
-
selectTextTheme(params:
|
|
692
|
+
selectTextTheme(params: {
|
|
693
|
+
target?: HTMLElement;
|
|
694
|
+
initialValue?: {
|
|
695
|
+
font?: string;
|
|
696
|
+
color?: string;
|
|
697
|
+
};
|
|
698
|
+
}): Promise<any>;
|
|
628
699
|
/**
|
|
629
700
|
* Retrieves the currently selected index in an array items data group.
|
|
630
701
|
*
|
|
@@ -689,6 +760,7 @@ declare class ElementSDKShape extends BaseSDKShape implements IElement {
|
|
|
689
760
|
*/
|
|
690
761
|
getBiToken(): Promise<string>;
|
|
691
762
|
}
|
|
763
|
+
|
|
692
764
|
declare const _default$5: ElementSDKShape & _wix_sdk_runtime_host_modules.HostModule<ElementSDKShape, _wix_sdk_types.Host>;
|
|
693
765
|
|
|
694
766
|
declare class PreferencesSDKShape extends BaseSDKShape {
|
|
@@ -796,4 +868,4 @@ declare const editor: {
|
|
|
796
868
|
};
|
|
797
869
|
};
|
|
798
870
|
|
|
799
|
-
export { BaseSDKShape, ElementSDKShape, PlatformSDKShape, Workspace, WorkspaceHost, _default$d as application, bindingsPublicSDKShape as bindings, _default as bindingsProviders, _default$1 as cmsBindings, _default$2 as controllers, editor, _default$5 as element, _default$c as elements, _default$b as events, _default$3 as externalPanels, _default$a as info, _default$8 as inputs, _default$6 as modals, _default$7 as panels, _default$4 as preferences, providersPublicSDKShape as providers, _default$9 as widget };
|
|
871
|
+
export { BaseSDKShape, ElementSDKShape, PlatformSDKShape, ElementSDKShape as ReactElementsSDKShape, Workspace, WorkspaceHost, _default$d as application, bindingsPublicSDKShape as bindings, _default as bindingsProviders, _default$1 as cmsBindings, _default$2 as controllers, editor, _default$5 as element, _default$c as elements, _default$b as events, _default$3 as externalPanels, _default$a as info, _default$8 as inputs, _default$6 as modals, _default$7 as panels, _default$4 as preferences, providersPublicSDKShape as providers, _default$5 as reactElements, _default$9 as widget };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.492.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Editor Platform <editor-platform-dev@wix.com>",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"*.{js,ts}": "yarn lint"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@wix/editor-platform-contexts": "1.
|
|
35
|
-
"@wix/editor-platform-environment-api": "1.
|
|
34
|
+
"@wix/editor-platform-contexts": "1.100.0",
|
|
35
|
+
"@wix/editor-platform-environment-api": "1.101.0",
|
|
36
36
|
"@wix/monitoring-browser-sdk-host": "^0.1.8",
|
|
37
37
|
"@wix/public-editor-platform-errors": "1.9.0",
|
|
38
|
-
"@wix/public-editor-platform-interfaces": "1.
|
|
38
|
+
"@wix/public-editor-platform-interfaces": "1.43.0",
|
|
39
39
|
"@wix/sdk-runtime": "^0.7.0",
|
|
40
|
-
"@wix/sdk-types": "^1.
|
|
40
|
+
"@wix/sdk-types": "^1.17.7",
|
|
41
41
|
"@wix/workspace": "^1.3.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
-
"falconPackageHash": "
|
|
72
|
+
"falconPackageHash": "80b987a5a1035a102955283e2334c8211f4b00ec9aad2251a125d031"
|
|
73
73
|
}
|