@gem-sdk/core 1.14.0-dev.489 → 1.14.0-dev.491

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.
Files changed (2) hide show
  1. package/dist/types/index.d.ts +152 -25
  2. package/package.json +1 -1
@@ -182,7 +182,7 @@ type HyperlinkInfo = {
182
182
  link?: string;
183
183
  modal?: CommonModalApp;
184
184
  };
185
- type Mapped$5<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
185
+ type Mapped$7<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
186
186
  id: K;
187
187
  label?: string;
188
188
  info?: string;
@@ -250,7 +250,67 @@ type Mapped$5<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
250
250
  default?: T;
251
251
  };
252
252
  type SharedControlType<T> = {
253
- [K in keyof T]-?: Mapped$5<K, T[K]>;
253
+ [K in keyof T]-?: Mapped$7<K, T[K]>;
254
+ }[keyof T];
255
+
256
+ type Option$5 = {
257
+ value: number | string;
258
+ label?: string | number;
259
+ type?: string;
260
+ icon?: string;
261
+ isTextIcon?: boolean;
262
+ };
263
+ type Mapped$6<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
264
+ id: K;
265
+ label: string;
266
+ info?: string;
267
+ hide?: boolean;
268
+ hideOnMode?: {
269
+ responsive?: boolean;
270
+ mobileOnly?: boolean;
271
+ };
272
+ disableToggle?: boolean;
273
+ state?: {
274
+ normal?: boolean;
275
+ hover?: boolean;
276
+ focus?: boolean;
277
+ active?: boolean;
278
+ };
279
+ placeholder?: string;
280
+ type: 'layout-custom-segment';
281
+ options: Option$5[];
282
+ devices?: ResponsiveConfig<U>;
283
+ iconViewBox?: string;
284
+ enableItemBackground?: boolean;
285
+ itemPerRow?: number;
286
+ itemSpacing?: 'large' | 'small';
287
+ enableTooltip?: boolean;
288
+ } : {
289
+ id: K;
290
+ label: string;
291
+ info?: string;
292
+ hide?: boolean;
293
+ hideOnMode?: {
294
+ responsive?: boolean;
295
+ mobileOnly?: boolean;
296
+ };
297
+ disableToggle?: boolean;
298
+ state?: {
299
+ normal?: boolean;
300
+ hover?: boolean;
301
+ focus?: boolean;
302
+ active?: boolean;
303
+ };
304
+ placeholder?: string;
305
+ type: 'layout-custom-segment';
306
+ options?: Option$5[];
307
+ iconViewBox?: string;
308
+ enableItemBackground?: boolean;
309
+ enableTooltip?: boolean;
310
+ default?: T;
311
+ };
312
+ type LayoutCustomSegmentControlType<T> = {
313
+ [K in keyof T]-?: Mapped$6<K, T[K]>;
254
314
  }[keyof T];
255
315
 
256
316
  type AngleControlType<T> = SharedControlType<T> & {
@@ -262,12 +322,12 @@ type AngleControlType<T> = SharedControlType<T> & {
262
322
  readonly?: boolean;
263
323
  };
264
324
 
265
- type Option$3<T> = {
325
+ type Option$4<T> = {
266
326
  value: T extends ObjectDevices<infer U> ? U extends StateProp<infer A> ? A : U : T extends StateProp<infer B> ? B : T;
267
327
  text: string | number;
268
328
  desc?: any;
269
329
  };
270
- type Mapped$4<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
330
+ type Mapped$5<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
271
331
  id: K;
272
332
  label: string;
273
333
  hideOnMode?: {
@@ -283,7 +343,7 @@ type Mapped$4<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
283
343
  active?: boolean;
284
344
  };
285
345
  type: 'checkbox';
286
- options: Option$3<T>[];
346
+ options: Option$4<T>[];
287
347
  devices?: ResponsiveConfig<U>;
288
348
  } : {
289
349
  id: K;
@@ -301,11 +361,11 @@ type Mapped$4<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
301
361
  active?: boolean;
302
362
  };
303
363
  type: 'checkbox';
304
- options: Option$3<T>[];
364
+ options: Option$4<T>[];
305
365
  default?: T;
306
366
  };
307
367
  type CheckboxControlType<T> = {
308
- [K in keyof T]-?: Mapped$4<K, T[K]>;
368
+ [K in keyof T]-?: Mapped$5<K, T[K]>;
309
369
  }[keyof T];
310
370
 
311
371
  type ChildrensControlType = {
@@ -437,13 +497,13 @@ type RangeControlType<T> = SharedControlType<T> & {
437
497
  hideUnit?: boolean;
438
498
  };
439
499
 
440
- type Option$2<T> = {
500
+ type Option$3<T> = {
441
501
  value: T extends ObjectDevices<infer U> ? U extends StateProp<infer A> ? A : U : T extends StateProp<infer B> ? B : T;
442
502
  label?: string | number;
443
503
  type?: string;
444
504
  icon?: string;
445
505
  };
446
- type Mapped$3<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
506
+ type Mapped$4<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
447
507
  id: K;
448
508
  label?: string;
449
509
  info?: string;
@@ -461,7 +521,7 @@ type Mapped$3<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
461
521
  };
462
522
  placeholder?: string;
463
523
  type: 'segment' | 'accordion:segment';
464
- options: Option$2<T>[];
524
+ options: Option$3<T>[];
465
525
  iconCustom?: boolean;
466
526
  devices?: ResponsiveConfig<U>;
467
527
  } : {
@@ -482,15 +542,15 @@ type Mapped$3<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
482
542
  };
483
543
  placeholder?: string;
484
544
  type: 'segment' | 'accordion:segment';
485
- options: Option$2<T>[];
545
+ options: Option$3<T>[];
486
546
  iconCustom?: boolean;
487
547
  default?: T;
488
548
  };
489
549
  type SegmentControlType<T> = {
490
- [K in keyof T]-?: Mapped$3<K, T[K]>;
550
+ [K in keyof T]-?: Mapped$4<K, T[K]>;
491
551
  }[keyof T];
492
552
 
493
- type Option$1<T> = {
553
+ type Option$2<T> = {
494
554
  value: T extends ObjectDevices<infer U> ? U extends StateProp<infer A> ? A : U : T extends StateProp<infer B> ? B : T;
495
555
  label: string | number;
496
556
  hideOnPage?: string[];
@@ -498,7 +558,7 @@ type Option$1<T> = {
498
558
  condition?: 'and' | 'or';
499
559
  icon?: string;
500
560
  };
501
- type Mapped$2<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
561
+ type Mapped$3<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
502
562
  id: K;
503
563
  label?: string;
504
564
  info?: string;
@@ -516,7 +576,7 @@ type Mapped$2<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
516
576
  };
517
577
  placeholder?: string;
518
578
  type: 'select';
519
- options: Option$1<T>[];
579
+ options: Option$2<T>[];
520
580
  devices?: ResponsiveConfig<U>;
521
581
  } : {
522
582
  id: K;
@@ -536,11 +596,11 @@ type Mapped$2<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
536
596
  };
537
597
  placeholder?: string;
538
598
  type: 'select';
539
- options: Option$1<T>[];
599
+ options: Option$2<T>[];
540
600
  default?: T;
541
601
  };
542
602
  type SelectControlType<T> = {
543
- [K in keyof T]-?: Mapped$2<K, T[K]>;
603
+ [K in keyof T]-?: Mapped$3<K, T[K]>;
544
604
  }[keyof T];
545
605
 
546
606
  type TextareaControlType<T> = SharedControlType<T> & {
@@ -744,14 +804,14 @@ type CustomCodeEditor = {
744
804
  id: string;
745
805
  };
746
806
 
747
- type Option<T> = {
807
+ type Option$1<T> = {
748
808
  value: T extends ObjectDevices<infer U> ? U extends StateProp<infer A> ? A : U : T extends StateProp<infer B> ? B : T;
749
809
  label?: string | number;
750
810
  type?: string;
751
811
  icon?: string;
752
812
  isTextIcon?: boolean;
753
813
  };
754
- type Mapped$1<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
814
+ type Mapped$2<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
755
815
  id: K;
756
816
  label: string;
757
817
  info?: string;
@@ -769,7 +829,7 @@ type Mapped$1<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
769
829
  };
770
830
  placeholder?: string;
771
831
  type: 'layout-segment';
772
- options: Option<T>[];
832
+ options: Option$1<T>[];
773
833
  devices?: ResponsiveConfig<U>;
774
834
  iconViewBox?: string;
775
835
  enableItemBackground?: boolean;
@@ -794,14 +854,14 @@ type Mapped$1<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
794
854
  };
795
855
  placeholder?: string;
796
856
  type: 'layout-segment';
797
- options?: Option<T>[];
857
+ options?: Option$1<T>[];
798
858
  iconViewBox?: string;
799
859
  enableItemBackground?: boolean;
800
860
  enableTooltip?: boolean;
801
861
  default?: T;
802
862
  };
803
863
  type LayoutSegmentControlType<T> = {
804
- [K in keyof T]-?: Mapped$1<K, T[K]>;
864
+ [K in keyof T]-?: Mapped$2<K, T[K]>;
805
865
  }[keyof T];
806
866
 
807
867
  type InputSpacing<T> = SharedControlType<T> & {
@@ -911,7 +971,7 @@ type Actions = {
911
971
  actionHandle?: string;
912
972
  link?: string;
913
973
  };
914
- type Mapped<K, T> = {
974
+ type Mapped$1<K, T> = {
915
975
  id: K;
916
976
  label: string;
917
977
  info?: string;
@@ -920,7 +980,7 @@ type Mapped<K, T> = {
920
980
  default?: T;
921
981
  };
922
982
  type StepsGuide<T> = {
923
- [K in keyof T]-?: Mapped<K, T[K]>;
983
+ [K in keyof T]-?: Mapped$1<K, T[K]>;
924
984
  }[keyof T];
925
985
 
926
986
  type ImageShape<T> = SharedControlType<T> & {
@@ -1006,7 +1066,74 @@ type PlayPauseControlType<T> = SharedControlType<T> & {
1006
1066
  hideLabel?: boolean;
1007
1067
  };
1008
1068
 
1009
- type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | LayoutBannerControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T> | DropdownInput<T> | Dropdown<T> | AliPickSectionControlType<T> | ParallaxScrollingType<T> | PlayPauseControlType<T>;
1069
+ type SneakPeakRange<T> = SharedControlType<T> & {
1070
+ type: 'sneak-peak-range';
1071
+ placeholder?: string;
1072
+ readonly?: boolean;
1073
+ sneakPeakType?: string;
1074
+ };
1075
+
1076
+ type Option<T> = {
1077
+ value: T extends ObjectDevices<infer U> ? U extends StateProp<infer A> ? A : U : T extends StateProp<infer B> ? B : T;
1078
+ label?: string | number;
1079
+ type?: string;
1080
+ icon?: string;
1081
+ isTextIcon?: boolean;
1082
+ };
1083
+ type Mapped<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
1084
+ id: K;
1085
+ label: string;
1086
+ info?: string;
1087
+ hide?: boolean;
1088
+ hideOnMode?: {
1089
+ responsive?: boolean;
1090
+ mobileOnly?: boolean;
1091
+ };
1092
+ disableToggle?: boolean;
1093
+ state?: {
1094
+ normal?: boolean;
1095
+ hover?: boolean;
1096
+ focus?: boolean;
1097
+ active?: boolean;
1098
+ };
1099
+ placeholder?: string;
1100
+ type: 'sneak-peak-type';
1101
+ options: Option<T>[];
1102
+ devices?: ResponsiveConfig<U>;
1103
+ iconViewBox?: string;
1104
+ enableItemBackground?: boolean;
1105
+ itemPerRow?: number;
1106
+ itemSpacing?: 'large' | 'small';
1107
+ enableTooltip?: boolean;
1108
+ } : {
1109
+ id: K;
1110
+ label: string;
1111
+ info?: string;
1112
+ hide?: boolean;
1113
+ hideOnMode?: {
1114
+ responsive?: boolean;
1115
+ mobileOnly?: boolean;
1116
+ };
1117
+ disableToggle?: boolean;
1118
+ state?: {
1119
+ normal?: boolean;
1120
+ hover?: boolean;
1121
+ focus?: boolean;
1122
+ active?: boolean;
1123
+ };
1124
+ placeholder?: string;
1125
+ type: 'sneak-peak-type';
1126
+ options?: Option<T>[];
1127
+ iconViewBox?: string;
1128
+ enableItemBackground?: boolean;
1129
+ enableTooltip?: boolean;
1130
+ default?: T;
1131
+ };
1132
+ type SneakPeakTypeControlType<T> = {
1133
+ [K in keyof T]-?: Mapped<K, T[K]>;
1134
+ }[keyof T];
1135
+
1136
+ type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | LayoutBannerControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T> | DropdownInput<T> | Dropdown<T> | AliPickSectionControlType<T> | ParallaxScrollingType<T> | PlayPauseControlType<T> | LayoutCustomSegmentControlType<T> | SneakPeakRange<T> | SneakPeakTypeControlType<T>;
1010
1137
  type Setting<P extends BaseProps> = {
1011
1138
  id: 'setting';
1012
1139
  note?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.14.0-dev.489",
3
+ "version": "1.14.0-dev.491",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",