@wix/editor 1.505.0 → 1.507.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 CHANGED
@@ -545,9 +545,9 @@ class ElementSDKShape extends BaseSDKShape {
545
545
  *
546
546
  * @example
547
547
  * ```ts
548
- * import { element } from '@wix/editor';
548
+ * import { reactElements } from '@wix/editor';
549
549
  *
550
- * const defs = await element.getStyleDefinitions();
550
+ * const defs = await reactElements.getStyleDefinitions();
551
551
  * ```
552
552
  */
553
553
  async getStyleDefinitions() {
@@ -565,9 +565,9 @@ class ElementSDKShape extends BaseSDKShape {
565
565
  *
566
566
  * @example
567
567
  * ```ts
568
- * import { element } from '@wix/editor';
568
+ * import { reactElements } from '@wix/editor';
569
569
  *
570
- * const styles = await element.getStyles();
570
+ * const styles = await reactElements.getStyles();
571
571
  * const bgColor = styles.cssProperties.backgroundColor;
572
572
  * ```
573
573
  */
@@ -584,16 +584,16 @@ class ElementSDKShape extends BaseSDKShape {
584
584
  *
585
585
  * @example
586
586
  * ```ts
587
- * import { element } from '@wix/editor';
587
+ * import { reactElements } from '@wix/editor';
588
588
  * import { CssPropertyType } from '@wix/public-editor-platform-sdk';
589
589
  *
590
590
  * // Using enum (recommended):
591
- * await element.setStyles({
591
+ * await reactElements.setStyles({
592
592
  * cssProperties: { [CssPropertyType.color]: '#fff' }
593
593
  * });
594
594
  *
595
595
  * // Using string literal (also works):
596
- * await element.setStyles({
596
+ * await reactElements.setStyles({
597
597
  * cssProperties: { 'color': '#fff' }
598
598
  * });
599
599
  * ```
@@ -612,16 +612,16 @@ class ElementSDKShape extends BaseSDKShape {
612
612
  *
613
613
  * @example
614
614
  * ```ts
615
- * import { element } from '@wix/editor';
615
+ * import { reactElements } from '@wix/editor';
616
616
  * import { CssPropertyType } from '@wix/public-editor-platform-sdk';
617
617
  *
618
618
  * // Using enum (recommended):
619
- * await element.removeStyles({
619
+ * await reactElements.removeStyles({
620
620
  * cssPropertiesKeys: [CssPropertyType.color]
621
621
  * });
622
622
  *
623
623
  * // Using string literal (also works):
624
- * await element.removeStyles({
624
+ * await reactElements.removeStyles({
625
625
  * cssPropertiesKeys: ['color']
626
626
  * });
627
627
  * ```
@@ -642,9 +642,9 @@ class ElementSDKShape extends BaseSDKShape {
642
642
  *
643
643
  * @example
644
644
  * ```ts
645
- * import { element } from '@wix/editor';
645
+ * import { reactElements } from '@wix/editor';
646
646
  *
647
- * const defs = await element.getDataDefinitions();
647
+ * const defs = await reactElements.getDataDefinitions();
648
648
  * ```
649
649
  */
650
650
  async getDataDefinitions() {
@@ -663,9 +663,9 @@ class ElementSDKShape extends BaseSDKShape {
663
663
  *
664
664
  * @example
665
665
  * ```ts
666
- * import { element } from '@wix/editor';
666
+ * import { reactElements } from '@wix/editor';
667
667
  *
668
- * const data = await element.getData();
668
+ * const data = await reactElements.getData();
669
669
  * ```
670
670
  */
671
671
  async getData() {
@@ -687,9 +687,9 @@ class ElementSDKShape extends BaseSDKShape {
687
687
  *
688
688
  * @example
689
689
  * ```ts
690
- * import { element } from '@wix/editor';
690
+ * import { reactElements } from '@wix/editor';
691
691
  *
692
- * const resolved = await element.getResolvedData({
692
+ * const resolved = await reactElements.getResolvedData({
693
693
  * dataItemKey: 'heroImage',
694
694
  * });
695
695
  * ```
@@ -714,9 +714,9 @@ class ElementSDKShape extends BaseSDKShape {
714
714
  *
715
715
  * @example
716
716
  * ```ts
717
- * import { element } from '@wix/editor';
717
+ * import { reactElements } from '@wix/editor';
718
718
  *
719
- * await element.setData({ title: 'New Title', showButton: false });
719
+ * await reactElements.setData({ title: 'New Title', showButton: false });
720
720
  * ```
721
721
  */
722
722
  async setData(values) {
@@ -735,9 +735,9 @@ class ElementSDKShape extends BaseSDKShape {
735
735
  *
736
736
  * @example
737
737
  * ```ts
738
- * import { element } from '@wix/editor';
738
+ * import { reactElements } from '@wix/editor';
739
739
  *
740
- * const presets = await element.getPresetDefinitions();
740
+ * const presets = await reactElements.getPresetDefinitions();
741
741
  * ```
742
742
  */
743
743
  async getPresetDefinitions() {
@@ -755,9 +755,9 @@ class ElementSDKShape extends BaseSDKShape {
755
755
  *
756
756
  * @example
757
757
  * ```ts
758
- * import { element } from '@wix/editor';
758
+ * import { reactElements } from '@wix/editor';
759
759
  *
760
- * const preset = await element.getAppliedPreset();
760
+ * const preset = await reactElements.getAppliedPreset();
761
761
  * ```
762
762
  */
763
763
  async getAppliedPreset() {
@@ -776,9 +776,9 @@ class ElementSDKShape extends BaseSDKShape {
776
776
  *
777
777
  * @example
778
778
  * ```ts
779
- * import { element } from '@wix/editor';
779
+ * import { reactElements } from '@wix/editor';
780
780
  *
781
- * await element.applyPreset({ key: 'minimal' });
781
+ * await reactElements.applyPreset({ key: 'minimal' });
782
782
  * ```
783
783
  */
784
784
  async applyPreset(options) {
@@ -798,11 +798,11 @@ class ElementSDKShape extends BaseSDKShape {
798
798
  *
799
799
  * @example
800
800
  * ```ts
801
- * import { element } from '@wix/editor';
801
+ * import { reactElements } from '@wix/editor';
802
802
  *
803
- * const groups = await element.getDisplayGroupDefinitions();
803
+ * const groups = await reactElements.getDisplayGroupDefinitions();
804
804
  *
805
- * const cssGroups = await element.getDisplayGroupDefinitions({
805
+ * const cssGroups = await reactElements.getDisplayGroupDefinitions({
806
806
  * filter: { groupType: 'cssDataType' },
807
807
  * });
808
808
  * ```
@@ -824,9 +824,9 @@ class ElementSDKShape extends BaseSDKShape {
824
824
  *
825
825
  * @example
826
826
  * ```ts
827
- * import { element } from '@wix/editor';
827
+ * import { reactElements } from '@wix/editor';
828
828
  *
829
- * const name = await element.getDisplayName();
829
+ * const name = await reactElements.getDisplayName();
830
830
  * ```
831
831
  */
832
832
  async getDisplayName() {
@@ -844,9 +844,9 @@ class ElementSDKShape extends BaseSDKShape {
844
844
  *
845
845
  * @example
846
846
  * ```ts
847
- * import { element } from '@wix/editor';
847
+ * import { reactElements } from '@wix/editor';
848
848
  *
849
- * const state = await element.getState();
849
+ * const state = await reactElements.getState();
850
850
  * ```
851
851
  */
852
852
  async getState() {
@@ -865,11 +865,11 @@ class ElementSDKShape extends BaseSDKShape {
865
865
  *
866
866
  * @example
867
867
  * ```ts
868
- * import { element } from '@wix/editor';
868
+ * import { reactElements } from '@wix/editor';
869
869
  *
870
- * await element.setState('hover');
870
+ * await reactElements.setState('hover');
871
871
  *
872
- * await element.setState(null);
872
+ * await reactElements.setState(null);
873
873
  * ```
874
874
  */
875
875
  async setState(stateKey) {
@@ -888,9 +888,9 @@ class ElementSDKShape extends BaseSDKShape {
888
888
  *
889
889
  * @example
890
890
  * ```ts
891
- * import { element } from '@wix/editor';
891
+ * import { reactElements } from '@wix/editor';
892
892
  *
893
- * const states = await element.getStateDefinitions();
893
+ * const states = await reactElements.getStateDefinitions();
894
894
  * ```
895
895
  */
896
896
  async getStateDefinitions() {
@@ -912,9 +912,9 @@ class ElementSDKShape extends BaseSDKShape {
912
912
  *
913
913
  * @example
914
914
  * ```ts
915
- * import { element } from '@wix/editor';
915
+ * import { reactElements } from '@wix/editor';
916
916
  *
917
- * const unsubscribe = await element.onChange((patch) => {
917
+ * const unsubscribe = await reactElements.onChange((patch) => {
918
918
  * if (patch.type === 'data') {
919
919
  * console.log('Data changed:', patch.value);
920
920
  * }
@@ -943,11 +943,11 @@ class ElementSDKShape extends BaseSDKShape {
943
943
  *
944
944
  * @example
945
945
  * ```ts
946
- * import { element } from '@wix/editor';
946
+ * import { reactElements } from '@wix/editor';
947
947
  *
948
- * const font = await element.selectFont({ styleItemKey: 'headingFont' });
948
+ * const font = await reactElements.selectFont({ styleItemKey: 'headingFont' });
949
949
  *
950
- * const font = await element.selectFont({
950
+ * const font = await reactElements.selectFont({
951
951
  * selectedFontFamily: { family: 'Arial', weight: '400' },
952
952
  * onChange: (value) => console.log('Selected:', value),
953
953
  * });
@@ -979,11 +979,11 @@ class ElementSDKShape extends BaseSDKShape {
979
979
  *
980
980
  * @example
981
981
  * ```ts
982
- * import { element } from '@wix/editor';
982
+ * import { reactElements } from '@wix/editor';
983
983
  *
984
- * const font = await element.selectFontFamily({ styleItemKey: 'bodyFont' });
984
+ * const font = await reactElements.selectFontFamily({ styleItemKey: 'bodyFont' });
985
985
  *
986
- * const font = await element.selectFontFamily({
986
+ * const font = await reactElements.selectFontFamily({
987
987
  * selectedFontFamily: { family: 'Helvetica', weight: '400' },
988
988
  * onChange: (value) => console.log('Selected:', value.family),
989
989
  * });
@@ -1017,11 +1017,11 @@ class ElementSDKShape extends BaseSDKShape {
1017
1017
  *
1018
1018
  * @example
1019
1019
  * ```ts
1020
- * import { element } from '@wix/editor';
1020
+ * import { reactElements } from '@wix/editor';
1021
1021
  *
1022
- * const media = await element.selectMedia({ dataItemKey: 'heroImage' });
1022
+ * const media = await reactElements.selectMedia({ dataItemKey: 'heroImage' });
1023
1023
  *
1024
- * const media = await element.selectMedia({
1024
+ * const media = await reactElements.selectMedia({
1025
1025
  * isMultiSelect: true,
1026
1026
  * category: 'image',
1027
1027
  * });
@@ -1047,11 +1047,11 @@ class ElementSDKShape extends BaseSDKShape {
1047
1047
  *
1048
1048
  * @example
1049
1049
  * ```ts
1050
- * import { element } from '@wix/editor';
1050
+ * import { reactElements } from '@wix/editor';
1051
1051
  *
1052
- * const link = await element.selectLink({ dataItemKey: 'buttonLink' });
1052
+ * const link = await reactElements.selectLink({ dataItemKey: 'buttonLink' });
1053
1053
  *
1054
- * const link = await element.selectLink({
1054
+ * const link = await reactElements.selectLink({
1055
1055
  * value: currentLink,
1056
1056
  * options: { linkTypes: ['ExternalLink', 'PageLink'] },
1057
1057
  * });
@@ -1077,11 +1077,11 @@ class ElementSDKShape extends BaseSDKShape {
1077
1077
  *
1078
1078
  * @example
1079
1079
  * ```ts
1080
- * import { element } from '@wix/editor';
1080
+ * import { reactElements } from '@wix/editor';
1081
1081
  *
1082
- * const color = await element.selectColor({ styleItemKey: 'backgroundColor' });
1082
+ * const color = await reactElements.selectColor({ styleItemKey: 'backgroundColor' });
1083
1083
  *
1084
- * const color = await element.selectColor({
1084
+ * const color = await reactElements.selectColor({
1085
1085
  * initialValue: '#ff0000',
1086
1086
  * mode: ['solid', 'gradient'],
1087
1087
  * showOpacity: true,
@@ -1112,9 +1112,9 @@ class ElementSDKShape extends BaseSDKShape {
1112
1112
  *
1113
1113
  * @example
1114
1114
  * ```ts
1115
- * import { element } from '@wix/editor';
1115
+ * import { reactElements } from '@wix/editor';
1116
1116
  *
1117
- * const bg = await element.selectBackground({
1117
+ * const bg = await reactElements.selectBackground({
1118
1118
  * initialValue: { backgroundColor: '#fff', backgroundImage: '' },
1119
1119
  * onChange: (value) => console.log('Preview:', value),
1120
1120
  * });
@@ -1141,14 +1141,14 @@ class ElementSDKShape extends BaseSDKShape {
1141
1141
  *
1142
1142
  * @example
1143
1143
  * ```ts
1144
- * import { element } from '@wix/editor';
1144
+ * import { reactElements } from '@wix/editor';
1145
1145
  *
1146
- * const weight = await element.selectFontWeight({
1146
+ * const weight = await reactElements.selectFontWeight({
1147
1147
  * fontFamilyStyleItemKey: 'headingFontFamily',
1148
1148
  * fontWeightStyleItemKey: 'headingFontWeight',
1149
1149
  * });
1150
1150
  *
1151
- * const weight = await element.selectFontWeight({
1151
+ * const weight = await reactElements.selectFontWeight({
1152
1152
  * fontFamily: { family: 'Arial', weight: '400' },
1153
1153
  * onChange: (value) => console.log('Selected weight:', value.weight),
1154
1154
  * });
@@ -1176,9 +1176,9 @@ class ElementSDKShape extends BaseSDKShape {
1176
1176
  *
1177
1177
  * @example
1178
1178
  * ```ts
1179
- * import { element } from '@wix/editor';
1179
+ * import { reactElements } from '@wix/editor';
1180
1180
  *
1181
- * const theme = await element.selectTextTheme({
1181
+ * const theme = await reactElements.selectTextTheme({
1182
1182
  * initialValue: { font: 'Heading 1', color: '#333' },
1183
1183
  * });
1184
1184
  * ```
@@ -1200,9 +1200,9 @@ class ElementSDKShape extends BaseSDKShape {
1200
1200
  *
1201
1201
  * @example
1202
1202
  * ```ts
1203
- * import { element } from '@wix/editor';
1203
+ * import { reactElements } from '@wix/editor';
1204
1204
  *
1205
- * const index = await element.getArrayItemsSelectedIndex();
1205
+ * const index = await reactElements.getArrayItemsSelectedIndex();
1206
1206
  * ```
1207
1207
  */
1208
1208
  async getArrayItemsSelectedIndex(options) {
@@ -1222,9 +1222,9 @@ class ElementSDKShape extends BaseSDKShape {
1222
1222
  *
1223
1223
  * @example
1224
1224
  * ```ts
1225
- * import { element } from '@wix/editor';
1225
+ * import { reactElements } from '@wix/editor';
1226
1226
  *
1227
- * await element.setArrayItemsSelectedIndex({ index: 2 });
1227
+ * await reactElements.setArrayItemsSelectedIndex({ index: 2 });
1228
1228
  * ```
1229
1229
  */
1230
1230
  async setArrayItemsSelectedIndex(options) {
@@ -1244,9 +1244,9 @@ class ElementSDKShape extends BaseSDKShape {
1244
1244
  *
1245
1245
  * @example
1246
1246
  * ```ts
1247
- * import { element } from '@wix/editor';
1247
+ * import { reactElements } from '@wix/editor';
1248
1248
  *
1249
- * await element.resetArrayItemsSelectedIndex();
1249
+ * await reactElements.resetArrayItemsSelectedIndex();
1250
1250
  * ```
1251
1251
  */
1252
1252
  async resetArrayItemsSelectedIndex(options) {
@@ -1265,9 +1265,9 @@ class ElementSDKShape extends BaseSDKShape {
1265
1265
  *
1266
1266
  * @example
1267
1267
  * ```ts
1268
- * import { element } from '@wix/editor';
1268
+ * import { reactElements } from '@wix/editor';
1269
1269
  *
1270
- * const token = await element.getBiToken();
1270
+ * const token = await reactElements.getBiToken();
1271
1271
  * ```
1272
1272
  */
1273
1273
  async getBiToken() {