@gem-sdk/core 1.5.39 → 1.5.40

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.
@@ -154,7 +154,7 @@ type LinkData = {
154
154
  hide?: true;
155
155
  };
156
156
  };
157
- type Mapped$3<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
157
+ type Mapped$4<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
158
158
  id: K;
159
159
  label: string;
160
160
  info?: string;
@@ -220,7 +220,7 @@ type Mapped$3<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
220
220
  default?: T;
221
221
  };
222
222
  type SharedControlType<T> = {
223
- [K in keyof T]-?: Mapped$3<K, T[K]>;
223
+ [K in keyof T]-?: Mapped$4<K, T[K]>;
224
224
  }[keyof T];
225
225
 
226
226
  type AngleControlType<T> = SharedControlType<T> & {
@@ -232,12 +232,12 @@ type AngleControlType<T> = SharedControlType<T> & {
232
232
  readonly?: boolean;
233
233
  };
234
234
 
235
- type Option$2<T> = {
235
+ type Option$3<T> = {
236
236
  value: T extends ObjectDevices<infer U> ? U extends StateProp<infer A> ? A : U : T extends StateProp<infer B> ? B : T;
237
237
  text: string | number;
238
238
  desc?: any;
239
239
  };
240
- type Mapped$2<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
240
+ type Mapped$3<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
241
241
  id: K;
242
242
  label: string;
243
243
  hideOnMode?: {
@@ -255,7 +255,7 @@ type Mapped$2<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
255
255
  active?: boolean;
256
256
  };
257
257
  type: 'checkbox';
258
- options: Option$2<T>[];
258
+ options: Option$3<T>[];
259
259
  devices?: ResponsiveConfig<U>;
260
260
  } : {
261
261
  id: K;
@@ -275,11 +275,11 @@ type Mapped$2<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
275
275
  active?: boolean;
276
276
  };
277
277
  type: 'checkbox';
278
- options: Option$2<T>[];
278
+ options: Option$3<T>[];
279
279
  default?: T;
280
280
  };
281
281
  type CheckboxControlType<T> = {
282
- [K in keyof T]-?: Mapped$2<K, T[K]>;
282
+ [K in keyof T]-?: Mapped$3<K, T[K]>;
283
283
  }[keyof T];
284
284
 
285
285
  type ChildrensControlType = {
@@ -401,13 +401,13 @@ type RangeControlType<T> = SharedControlType<T> & {
401
401
  disableOnChange?: boolean;
402
402
  };
403
403
 
404
- type Option$1<T> = {
404
+ type Option$2<T> = {
405
405
  value: T extends ObjectDevices<infer U> ? U extends StateProp<infer A> ? A : U : T extends StateProp<infer B> ? B : T;
406
406
  label?: string | number;
407
407
  type?: string;
408
408
  icon?: string;
409
409
  };
410
- type Mapped$1<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
410
+ type Mapped$2<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
411
411
  id: K;
412
412
  label: string;
413
413
  info?: string;
@@ -427,7 +427,8 @@ type Mapped$1<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
427
427
  };
428
428
  placeholder?: string;
429
429
  type: 'segment';
430
- options: Option$1<T>[];
430
+ options: Option$2<T>[];
431
+ iconCustom?: boolean;
431
432
  devices?: ResponsiveConfig<U>;
432
433
  } : {
433
434
  id: K;
@@ -449,18 +450,19 @@ type Mapped$1<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
449
450
  };
450
451
  placeholder?: string;
451
452
  type: 'segment';
452
- options: Option$1<T>[];
453
+ options: Option$2<T>[];
454
+ iconCustom?: boolean;
453
455
  default?: T;
454
456
  };
455
457
  type SegmentControlType<T> = {
456
- [K in keyof T]-?: Mapped$1<K, T[K]>;
458
+ [K in keyof T]-?: Mapped$2<K, T[K]>;
457
459
  }[keyof T];
458
460
 
459
- type Option<T> = {
461
+ type Option$1<T> = {
460
462
  value: T extends ObjectDevices<infer U> ? U extends StateProp<infer A> ? A : U : T extends StateProp<infer B> ? B : T;
461
463
  label: string | number;
462
464
  };
463
- type Mapped<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
465
+ type Mapped$1<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
464
466
  id: K;
465
467
  label: string;
466
468
  info?: string;
@@ -480,7 +482,7 @@ type Mapped<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
480
482
  };
481
483
  placeholder?: string;
482
484
  type: 'select';
483
- options: Option<T>[];
485
+ options: Option$1<T>[];
484
486
  devices?: ResponsiveConfig<U>;
485
487
  } : {
486
488
  id: K;
@@ -502,11 +504,11 @@ type Mapped<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
502
504
  };
503
505
  placeholder?: string;
504
506
  type: 'select';
505
- options: Option<T>[];
507
+ options: Option$1<T>[];
506
508
  default?: T;
507
509
  };
508
510
  type SelectControlType<T> = {
509
- [K in keyof T]-?: Mapped<K, T[K]>;
511
+ [K in keyof T]-?: Mapped$1<K, T[K]>;
510
512
  }[keyof T];
511
513
 
512
514
  type TextareaControlType<T> = SharedControlType<T> & {
@@ -703,7 +705,62 @@ type CustomCodeEditor = {
703
705
  id: string;
704
706
  };
705
707
 
706
- type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<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> | 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> | CustomCodeEditor;
708
+ type Option<T> = {
709
+ value: T extends ObjectDevices<infer U> ? U extends StateProp<infer A> ? A : U : T extends StateProp<infer B> ? B : T;
710
+ label?: string | number;
711
+ type?: string;
712
+ icon?: string;
713
+ };
714
+ type Mapped<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
715
+ id: K;
716
+ label: string;
717
+ info?: string;
718
+ hide?: boolean;
719
+ hideOnMode?: {
720
+ responsive?: boolean;
721
+ mobileOnly?: boolean;
722
+ };
723
+ links?: LinkData[];
724
+ allowReset?: boolean;
725
+ disableToggle?: boolean;
726
+ state?: {
727
+ normal?: boolean;
728
+ hover?: boolean;
729
+ focus?: boolean;
730
+ active?: boolean;
731
+ };
732
+ placeholder?: string;
733
+ type: 'layout-segment';
734
+ options: Option<T>[];
735
+ devices?: ResponsiveConfig<U>;
736
+ } : {
737
+ id: K;
738
+ label: string;
739
+ info?: string;
740
+ hide?: boolean;
741
+ hideOnMode?: {
742
+ responsive?: boolean;
743
+ mobileOnly?: boolean;
744
+ };
745
+ links?: LinkData[];
746
+ allowReset?: boolean;
747
+ disableToggle?: boolean;
748
+ state?: {
749
+ normal?: boolean;
750
+ hover?: boolean;
751
+ focus?: boolean;
752
+ active?: boolean;
753
+ };
754
+ placeholder?: string;
755
+ type: 'layout-segment';
756
+ options: Option<T>[];
757
+ default?: T;
758
+ };
759
+ type LayoutSegmentControlType<T> = {
760
+ [K in keyof T]-?: Mapped<K, T[K]>;
761
+ }[keyof T];
762
+
763
+ type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<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> | 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> | CustomCodeEditor | LayoutSegmentControlType<T>;
707
764
  type Setting<P extends BaseProps> = {
708
765
  id: 'setting';
709
766
  note?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.5.39",
3
+ "version": "1.5.40",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",