@wix/editor 1.505.0 → 1.506.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.
@@ -543,9 +543,9 @@
543
543
  *
544
544
  * @example
545
545
  * ```ts
546
- * import { element } from '@wix/editor';
546
+ * import { reactElements } from '@wix/editor';
547
547
  *
548
- * const defs = await element.getStyleDefinitions();
548
+ * const defs = await reactElements.getStyleDefinitions();
549
549
  * ```
550
550
  */
551
551
  async getStyleDefinitions() {
@@ -563,9 +563,9 @@
563
563
  *
564
564
  * @example
565
565
  * ```ts
566
- * import { element } from '@wix/editor';
566
+ * import { reactElements } from '@wix/editor';
567
567
  *
568
- * const styles = await element.getStyles();
568
+ * const styles = await reactElements.getStyles();
569
569
  * const bgColor = styles.cssProperties.backgroundColor;
570
570
  * ```
571
571
  */
@@ -582,16 +582,16 @@
582
582
  *
583
583
  * @example
584
584
  * ```ts
585
- * import { element } from '@wix/editor';
585
+ * import { reactElements } from '@wix/editor';
586
586
  * import { CssPropertyType } from '@wix/public-editor-platform-sdk';
587
587
  *
588
588
  * // Using enum (recommended):
589
- * await element.setStyles({
589
+ * await reactElements.setStyles({
590
590
  * cssProperties: { [CssPropertyType.color]: '#fff' }
591
591
  * });
592
592
  *
593
593
  * // Using string literal (also works):
594
- * await element.setStyles({
594
+ * await reactElements.setStyles({
595
595
  * cssProperties: { 'color': '#fff' }
596
596
  * });
597
597
  * ```
@@ -610,16 +610,16 @@
610
610
  *
611
611
  * @example
612
612
  * ```ts
613
- * import { element } from '@wix/editor';
613
+ * import { reactElements } from '@wix/editor';
614
614
  * import { CssPropertyType } from '@wix/public-editor-platform-sdk';
615
615
  *
616
616
  * // Using enum (recommended):
617
- * await element.removeStyles({
617
+ * await reactElements.removeStyles({
618
618
  * cssPropertiesKeys: [CssPropertyType.color]
619
619
  * });
620
620
  *
621
621
  * // Using string literal (also works):
622
- * await element.removeStyles({
622
+ * await reactElements.removeStyles({
623
623
  * cssPropertiesKeys: ['color']
624
624
  * });
625
625
  * ```
@@ -640,9 +640,9 @@
640
640
  *
641
641
  * @example
642
642
  * ```ts
643
- * import { element } from '@wix/editor';
643
+ * import { reactElements } from '@wix/editor';
644
644
  *
645
- * const defs = await element.getDataDefinitions();
645
+ * const defs = await reactElements.getDataDefinitions();
646
646
  * ```
647
647
  */
648
648
  async getDataDefinitions() {
@@ -661,9 +661,9 @@
661
661
  *
662
662
  * @example
663
663
  * ```ts
664
- * import { element } from '@wix/editor';
664
+ * import { reactElements } from '@wix/editor';
665
665
  *
666
- * const data = await element.getData();
666
+ * const data = await reactElements.getData();
667
667
  * ```
668
668
  */
669
669
  async getData() {
@@ -685,9 +685,9 @@
685
685
  *
686
686
  * @example
687
687
  * ```ts
688
- * import { element } from '@wix/editor';
688
+ * import { reactElements } from '@wix/editor';
689
689
  *
690
- * const resolved = await element.getResolvedData({
690
+ * const resolved = await reactElements.getResolvedData({
691
691
  * dataItemKey: 'heroImage',
692
692
  * });
693
693
  * ```
@@ -712,9 +712,9 @@
712
712
  *
713
713
  * @example
714
714
  * ```ts
715
- * import { element } from '@wix/editor';
715
+ * import { reactElements } from '@wix/editor';
716
716
  *
717
- * await element.setData({ title: 'New Title', showButton: false });
717
+ * await reactElements.setData({ title: 'New Title', showButton: false });
718
718
  * ```
719
719
  */
720
720
  async setData(values) {
@@ -733,9 +733,9 @@
733
733
  *
734
734
  * @example
735
735
  * ```ts
736
- * import { element } from '@wix/editor';
736
+ * import { reactElements } from '@wix/editor';
737
737
  *
738
- * const presets = await element.getPresetDefinitions();
738
+ * const presets = await reactElements.getPresetDefinitions();
739
739
  * ```
740
740
  */
741
741
  async getPresetDefinitions() {
@@ -753,9 +753,9 @@
753
753
  *
754
754
  * @example
755
755
  * ```ts
756
- * import { element } from '@wix/editor';
756
+ * import { reactElements } from '@wix/editor';
757
757
  *
758
- * const preset = await element.getAppliedPreset();
758
+ * const preset = await reactElements.getAppliedPreset();
759
759
  * ```
760
760
  */
761
761
  async getAppliedPreset() {
@@ -774,9 +774,9 @@
774
774
  *
775
775
  * @example
776
776
  * ```ts
777
- * import { element } from '@wix/editor';
777
+ * import { reactElements } from '@wix/editor';
778
778
  *
779
- * await element.applyPreset({ key: 'minimal' });
779
+ * await reactElements.applyPreset({ key: 'minimal' });
780
780
  * ```
781
781
  */
782
782
  async applyPreset(options) {
@@ -796,11 +796,11 @@
796
796
  *
797
797
  * @example
798
798
  * ```ts
799
- * import { element } from '@wix/editor';
799
+ * import { reactElements } from '@wix/editor';
800
800
  *
801
- * const groups = await element.getDisplayGroupDefinitions();
801
+ * const groups = await reactElements.getDisplayGroupDefinitions();
802
802
  *
803
- * const cssGroups = await element.getDisplayGroupDefinitions({
803
+ * const cssGroups = await reactElements.getDisplayGroupDefinitions({
804
804
  * filter: { groupType: 'cssDataType' },
805
805
  * });
806
806
  * ```
@@ -822,9 +822,9 @@
822
822
  *
823
823
  * @example
824
824
  * ```ts
825
- * import { element } from '@wix/editor';
825
+ * import { reactElements } from '@wix/editor';
826
826
  *
827
- * const name = await element.getDisplayName();
827
+ * const name = await reactElements.getDisplayName();
828
828
  * ```
829
829
  */
830
830
  async getDisplayName() {
@@ -842,9 +842,9 @@
842
842
  *
843
843
  * @example
844
844
  * ```ts
845
- * import { element } from '@wix/editor';
845
+ * import { reactElements } from '@wix/editor';
846
846
  *
847
- * const state = await element.getState();
847
+ * const state = await reactElements.getState();
848
848
  * ```
849
849
  */
850
850
  async getState() {
@@ -863,11 +863,11 @@
863
863
  *
864
864
  * @example
865
865
  * ```ts
866
- * import { element } from '@wix/editor';
866
+ * import { reactElements } from '@wix/editor';
867
867
  *
868
- * await element.setState('hover');
868
+ * await reactElements.setState('hover');
869
869
  *
870
- * await element.setState(null);
870
+ * await reactElements.setState(null);
871
871
  * ```
872
872
  */
873
873
  async setState(stateKey) {
@@ -886,9 +886,9 @@
886
886
  *
887
887
  * @example
888
888
  * ```ts
889
- * import { element } from '@wix/editor';
889
+ * import { reactElements } from '@wix/editor';
890
890
  *
891
- * const states = await element.getStateDefinitions();
891
+ * const states = await reactElements.getStateDefinitions();
892
892
  * ```
893
893
  */
894
894
  async getStateDefinitions() {
@@ -910,9 +910,9 @@
910
910
  *
911
911
  * @example
912
912
  * ```ts
913
- * import { element } from '@wix/editor';
913
+ * import { reactElements } from '@wix/editor';
914
914
  *
915
- * const unsubscribe = await element.onChange((patch) => {
915
+ * const unsubscribe = await reactElements.onChange((patch) => {
916
916
  * if (patch.type === 'data') {
917
917
  * console.log('Data changed:', patch.value);
918
918
  * }
@@ -941,11 +941,11 @@
941
941
  *
942
942
  * @example
943
943
  * ```ts
944
- * import { element } from '@wix/editor';
944
+ * import { reactElements } from '@wix/editor';
945
945
  *
946
- * const font = await element.selectFont({ styleItemKey: 'headingFont' });
946
+ * const font = await reactElements.selectFont({ styleItemKey: 'headingFont' });
947
947
  *
948
- * const font = await element.selectFont({
948
+ * const font = await reactElements.selectFont({
949
949
  * selectedFontFamily: { family: 'Arial', weight: '400' },
950
950
  * onChange: (value) => console.log('Selected:', value),
951
951
  * });
@@ -977,11 +977,11 @@
977
977
  *
978
978
  * @example
979
979
  * ```ts
980
- * import { element } from '@wix/editor';
980
+ * import { reactElements } from '@wix/editor';
981
981
  *
982
- * const font = await element.selectFontFamily({ styleItemKey: 'bodyFont' });
982
+ * const font = await reactElements.selectFontFamily({ styleItemKey: 'bodyFont' });
983
983
  *
984
- * const font = await element.selectFontFamily({
984
+ * const font = await reactElements.selectFontFamily({
985
985
  * selectedFontFamily: { family: 'Helvetica', weight: '400' },
986
986
  * onChange: (value) => console.log('Selected:', value.family),
987
987
  * });
@@ -1015,11 +1015,11 @@
1015
1015
  *
1016
1016
  * @example
1017
1017
  * ```ts
1018
- * import { element } from '@wix/editor';
1018
+ * import { reactElements } from '@wix/editor';
1019
1019
  *
1020
- * const media = await element.selectMedia({ dataItemKey: 'heroImage' });
1020
+ * const media = await reactElements.selectMedia({ dataItemKey: 'heroImage' });
1021
1021
  *
1022
- * const media = await element.selectMedia({
1022
+ * const media = await reactElements.selectMedia({
1023
1023
  * isMultiSelect: true,
1024
1024
  * category: 'image',
1025
1025
  * });
@@ -1045,11 +1045,11 @@
1045
1045
  *
1046
1046
  * @example
1047
1047
  * ```ts
1048
- * import { element } from '@wix/editor';
1048
+ * import { reactElements } from '@wix/editor';
1049
1049
  *
1050
- * const link = await element.selectLink({ dataItemKey: 'buttonLink' });
1050
+ * const link = await reactElements.selectLink({ dataItemKey: 'buttonLink' });
1051
1051
  *
1052
- * const link = await element.selectLink({
1052
+ * const link = await reactElements.selectLink({
1053
1053
  * value: currentLink,
1054
1054
  * options: { linkTypes: ['ExternalLink', 'PageLink'] },
1055
1055
  * });
@@ -1075,11 +1075,11 @@
1075
1075
  *
1076
1076
  * @example
1077
1077
  * ```ts
1078
- * import { element } from '@wix/editor';
1078
+ * import { reactElements } from '@wix/editor';
1079
1079
  *
1080
- * const color = await element.selectColor({ styleItemKey: 'backgroundColor' });
1080
+ * const color = await reactElements.selectColor({ styleItemKey: 'backgroundColor' });
1081
1081
  *
1082
- * const color = await element.selectColor({
1082
+ * const color = await reactElements.selectColor({
1083
1083
  * initialValue: '#ff0000',
1084
1084
  * mode: ['solid', 'gradient'],
1085
1085
  * showOpacity: true,
@@ -1110,9 +1110,9 @@
1110
1110
  *
1111
1111
  * @example
1112
1112
  * ```ts
1113
- * import { element } from '@wix/editor';
1113
+ * import { reactElements } from '@wix/editor';
1114
1114
  *
1115
- * const bg = await element.selectBackground({
1115
+ * const bg = await reactElements.selectBackground({
1116
1116
  * initialValue: { backgroundColor: '#fff', backgroundImage: '' },
1117
1117
  * onChange: (value) => console.log('Preview:', value),
1118
1118
  * });
@@ -1139,14 +1139,14 @@
1139
1139
  *
1140
1140
  * @example
1141
1141
  * ```ts
1142
- * import { element } from '@wix/editor';
1142
+ * import { reactElements } from '@wix/editor';
1143
1143
  *
1144
- * const weight = await element.selectFontWeight({
1144
+ * const weight = await reactElements.selectFontWeight({
1145
1145
  * fontFamilyStyleItemKey: 'headingFontFamily',
1146
1146
  * fontWeightStyleItemKey: 'headingFontWeight',
1147
1147
  * });
1148
1148
  *
1149
- * const weight = await element.selectFontWeight({
1149
+ * const weight = await reactElements.selectFontWeight({
1150
1150
  * fontFamily: { family: 'Arial', weight: '400' },
1151
1151
  * onChange: (value) => console.log('Selected weight:', value.weight),
1152
1152
  * });
@@ -1174,9 +1174,9 @@
1174
1174
  *
1175
1175
  * @example
1176
1176
  * ```ts
1177
- * import { element } from '@wix/editor';
1177
+ * import { reactElements } from '@wix/editor';
1178
1178
  *
1179
- * const theme = await element.selectTextTheme({
1179
+ * const theme = await reactElements.selectTextTheme({
1180
1180
  * initialValue: { font: 'Heading 1', color: '#333' },
1181
1181
  * });
1182
1182
  * ```
@@ -1198,9 +1198,9 @@
1198
1198
  *
1199
1199
  * @example
1200
1200
  * ```ts
1201
- * import { element } from '@wix/editor';
1201
+ * import { reactElements } from '@wix/editor';
1202
1202
  *
1203
- * const index = await element.getArrayItemsSelectedIndex();
1203
+ * const index = await reactElements.getArrayItemsSelectedIndex();
1204
1204
  * ```
1205
1205
  */
1206
1206
  async getArrayItemsSelectedIndex(options) {
@@ -1220,9 +1220,9 @@
1220
1220
  *
1221
1221
  * @example
1222
1222
  * ```ts
1223
- * import { element } from '@wix/editor';
1223
+ * import { reactElements } from '@wix/editor';
1224
1224
  *
1225
- * await element.setArrayItemsSelectedIndex({ index: 2 });
1225
+ * await reactElements.setArrayItemsSelectedIndex({ index: 2 });
1226
1226
  * ```
1227
1227
  */
1228
1228
  async setArrayItemsSelectedIndex(options) {
@@ -1242,9 +1242,9 @@
1242
1242
  *
1243
1243
  * @example
1244
1244
  * ```ts
1245
- * import { element } from '@wix/editor';
1245
+ * import { reactElements } from '@wix/editor';
1246
1246
  *
1247
- * await element.resetArrayItemsSelectedIndex();
1247
+ * await reactElements.resetArrayItemsSelectedIndex();
1248
1248
  * ```
1249
1249
  */
1250
1250
  async resetArrayItemsSelectedIndex(options) {
@@ -1263,9 +1263,9 @@
1263
1263
  *
1264
1264
  * @example
1265
1265
  * ```ts
1266
- * import { element } from '@wix/editor';
1266
+ * import { reactElements } from '@wix/editor';
1267
1267
  *
1268
- * const token = await element.getBiToken();
1268
+ * const token = await reactElements.getBiToken();
1269
1269
  * ```
1270
1270
  */
1271
1271
  async getBiToken() {