builder-settings-types 0.0.330 → 0.0.335

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 (37) hide show
  1. package/dist/Font.svg +3 -3
  2. package/dist/Opacity.svg +7 -7
  3. package/dist/Typography-Size.svg +3 -3
  4. package/dist/URL.svg +3 -3
  5. package/dist/Upload.svg +4 -4
  6. package/dist/Weight.svg +3 -3
  7. package/dist/align-centre.svg +4 -4
  8. package/dist/align-left.svg +4 -4
  9. package/dist/align-right.svg +4 -4
  10. package/dist/base/settings-group/settingsGroup.d.ts +0 -8
  11. package/dist/base/settings.d.ts +0 -12
  12. package/dist/border-size.svg +3 -3
  13. package/dist/builder-settings-types.cjs.js +82 -233
  14. package/dist/builder-settings-types.es.js +3069 -4277
  15. package/dist/chevron-down.svg +5 -5
  16. package/dist/colors.svg +3 -3
  17. package/dist/index.css +1 -1
  18. package/dist/index.d.ts +0 -2
  19. package/dist/margins-bottom.svg +3 -3
  20. package/dist/margins-left.svg +3 -3
  21. package/dist/margins-right.svg +3 -3
  22. package/dist/margins-top.svg +3 -3
  23. package/dist/radius.svg +3 -3
  24. package/dist/settings/gradient-settings/GradientSetting.d.ts +0 -17
  25. package/dist/settings/gradient-settings/components/EmbeddedColorPicker.d.ts +28 -28
  26. package/dist/settings/gradient-settings/utils/icon.d.ts +0 -3
  27. package/dist/settings/gradient-settings/utils/types.d.ts +0 -1
  28. package/dist/settings/multi-language-settings/multiLanguageSettings.d.ts +0 -6
  29. package/dist/settings/select-api/select-api.d.ts +0 -1
  30. package/dist/spacing-height.svg +3 -3
  31. package/dist/spacing-width.svg +3 -3
  32. package/dist/types/index.d.ts +2 -10
  33. package/package.json +1 -1
  34. package/dist/groups/image-setting-set/imageSettingSet.d.ts +0 -21
  35. package/dist/settings/image-map-settings/ImageMapSetting.d.ts +0 -76
  36. package/dist/settings/image-map-settings/index.d.ts +0 -2
  37. package/dist/settings/image-map-settings/types.d.ts +0 -19
@@ -1,45 +1,45 @@
1
- import { RecentColorScope } from '../utils/types';
1
+ import { RecentColorDisplayScope } from '../utils/types';
2
2
  export interface EmbeddedColorPickerOptions {
3
3
  initialColor: string;
4
4
  initialOpacity: number;
5
5
  onColorChange: (color: string, opacity: number) => void;
6
- scope?: RecentColorScope;
6
+ scope?: RecentColorDisplayScope;
7
7
  }
8
8
  export declare class EmbeddedColorPicker {
9
- private element;
9
+ private currentColor;
10
+ private currentOpacity;
11
+ private onColorChange;
12
+ private container;
13
+ private recentScope;
14
+ private recentSectionRefresh?;
10
15
  private colorArea;
11
16
  private colorMarker;
12
17
  private hueSlider;
13
18
  private hueMarker;
14
19
  private opacitySlider;
15
20
  private opacityMarker;
16
- private input;
17
- private select;
18
- private currentColor;
19
- private currentOpacity;
20
- private onColorChange;
21
- private recentScope;
22
- private recentSectionRefresh?;
23
- private isDragging;
24
- private changeRafId?;
25
- private pendingExternalUpdate?;
26
- private dragRafId?;
27
- private cachedRect?;
21
+ private formatSelect;
22
+ private colorInput;
23
+ private inputUpdateTimeout?;
28
24
  constructor(options: EmbeddedColorPickerOptions);
29
- private parsePercentage;
30
- private sanitizeColor;
31
- private clampOpacity;
32
- private build;
33
- private bind;
34
- private setColor;
35
- private syncInput;
36
- private applyFromInput;
37
- private updateOpacityBg;
38
- private queueChange;
39
- private flushChange;
40
- private applyPendingExternal;
41
- private initFromColor;
25
+ private createContainer;
26
+ private initializePicker;
27
+ private scheduleInputUpdate;
28
+ private updateOpacityBackground;
29
+ private updateColorInput;
30
+ private applyRecentColor;
42
31
  commitRecentColor(): void;
32
+ private setupColorAreaEvents;
33
+ private setupHueSliderEvents;
34
+ private setupOpacitySliderEvents;
35
+ private setupFormatEvents;
36
+ private handleManualColorInput;
37
+ private parseHexInput;
38
+ private parseRgbInput;
39
+ private parseHslInput;
40
+ private autoDetectColorFormat;
41
+ private updatePickerVisualState;
42
+ private triggerChange;
43
43
  getElement(): HTMLElement;
44
44
  updateColor(color: string, opacity: number): void;
45
45
  }
@@ -2,6 +2,3 @@ export declare const closeIcon = "<svg width=\"13\" height=\"13\" viewBox=\"0 0
2
2
  export declare const eyedropperIcon = "<svg width=\"23\" height=\"23\" viewBox=\"0 0 23 23\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M19.1972 3.29156C18.936 3.03034 18.6259 2.82313 18.2847 2.68176C17.9434 2.54039 17.5777 2.46763 17.2083 2.46763C16.8389 2.46763 16.4731 2.54039 16.1319 2.68176C15.7906 2.82313 15.4805 3.03034 15.2194 3.29156L13.7822 4.72875C13.2585 4.4772 12.6697 4.39449 12.097 4.49207C11.5243 4.58964 10.9961 4.86267 10.5853 5.27343L9.91687 5.94281C9.74268 6.11693 9.6045 6.32366 9.51023 6.5512C9.41595 6.77873 9.36743 7.02261 9.36743 7.2689C9.36743 7.5152 9.41595 7.75907 9.51023 7.98661C9.6045 8.21414 9.74268 8.42088 9.91687 8.595L3.83625 14.6747C3.57512 14.936 3.36803 15.2462 3.2268 15.5875C3.08556 15.9288 3.01296 16.2947 3.01312 16.6641V18.3516C3.01312 18.6499 3.13165 18.9361 3.34263 19.1471C3.55361 19.358 3.83975 19.4766 4.13812 19.4766H5.82562C6.57129 19.4759 7.28618 19.1792 7.81312 18.6516L13.8937 12.5728C14.0679 12.747 14.2746 12.8852 14.5021 12.9795C14.7297 13.0737 14.9735 13.1223 15.2198 13.1223C15.4661 13.1223 15.71 13.0737 15.9375 12.9795C16.1651 12.8852 16.3718 12.747 16.5459 12.5728L17.2153 11.9025C17.6261 11.4917 17.8991 10.9635 17.9967 10.3908C18.0942 9.81811 18.0115 9.22926 17.76 8.70562L19.1972 7.26937C19.4584 7.0082 19.6656 6.69813 19.807 6.35687C19.9484 6.01561 20.0211 5.64985 20.0211 5.28047C20.0211 4.91108 19.9484 4.54532 19.807 4.20406C19.6656 3.8628 19.4584 3.55273 19.1972 3.29156ZM5.16281 16.0012L11.2425 9.92062L12.5681 11.2462L6.48844 17.3269C6.31266 17.5027 6.07424 17.6015 5.82562 17.6016H4.88812V16.6641C4.88818 16.4154 4.98698 16.177 5.16281 16.0012Z\" fill=\"#353C47\"/>\n </svg>";
3
3
  export declare const flipIcon = "<svg width=\"15\" height=\"17\" viewBox=\"0 0 15 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M14.1333 12.4667H0.8M0.8 12.4667L4.13333 9.13332M0.8 12.4667L4.13333 15.8M0.8 4.13332H14.1333M14.1333 4.13332L10.8 0.799988M14.1333 4.13332L10.8 7.46665\" stroke=\"#919EAB\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>";
4
4
  export declare const deleteIcon = "<svg width=\"14\" height=\"2\" viewBox=\"0 0 14 2\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M0.8 0.800003H12.4667\" stroke=\"#919EAB\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>";
5
- export declare const solidIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect x=\"21.25\" y=\"21.333\" width=\"18\" height=\"18\" rx=\"1\" transform=\"rotate(-180 21.25 21.333)\" stroke=\"#637381\"/>\n<rect x=\"18.5835\" y=\"18.667\" width=\"12.6667\" height=\"12.6667\" rx=\"1\" transform=\"rotate(-180 18.5835 18.667)\" fill=\"#637381\"/>\n</svg>\n\n";
6
- export declare const gradientIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M4.5 21L19.5 21C19.8978 21 20.2794 20.842 20.5607 20.5607C20.842 20.2794 21 19.8978 21 19.5L21 4.5C21 4.10218 20.842 3.72065 20.5607 3.43934C20.2794 3.15804 19.8978 3 19.5 3L4.5 3C4.10218 3 3.72065 3.15804 3.43934 3.43934C3.15804 3.72064 3 4.10218 3 4.5L3 19.5C3 19.8978 3.15804 20.2794 3.43934 20.5607C3.72065 20.842 4.10218 21 4.5 21ZM7.5 4.5L7.5 7.5L10.5 7.5L10.5 4.5L13.5 4.5L13.5 7.5L16.5 7.5L16.5 10.5L13.5 10.5L13.5 13.5L16.5 13.5L16.5 16.5L13.5 16.5L13.5 19.5L10.5 19.5L10.5 16.5L7.5 16.5L7.5 19.5L4.5 19.5L4.5 4.5L7.5 4.5Z\" fill=\"#637381\"/>\n<path d=\"M13.5 16.5L10.5 16.5L10.5 13.5L13.5 13.5L13.5 16.5ZM13.5 10.5L10.5 10.5L10.5 7.5L13.5 7.5L13.5 10.5ZM10.5 13.5L7.5 13.5L7.5 10.5L10.5 10.5L10.5 13.5Z\" fill=\"#637381\"/>\n</svg>\n\n";
7
- export declare const brokenLinkIcon = "<svg width=\"26\" height=\"26\" viewBox=\"0 0 26 26\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M20.6106 19.5062C20.6887 19.5843 20.6887 19.711 20.6106 19.7891L19.7896 20.6101C19.7115 20.6882 19.5848 20.6882 19.5067 20.6101L5.98957 7.09298C5.91146 7.01488 5.91146 6.88825 5.98957 6.81014L6.81063 5.98908C6.88873 5.91097 7.01537 5.91097 7.09347 5.98908L20.6106 19.5062Z\" fill=\"#46525C\"/>\n<path d=\"M9.69583 12.2146C9.81298 12.3318 9.81298 12.5217 9.69583 12.6389L7.80151 14.5332C6.72071 15.614 6.6062 17.4365 7.80151 18.6318C8.99473 19.8267 10.8184 19.7123 11.8992 18.6318L13.7935 16.7366C13.9106 16.6194 14.1006 16.6194 14.2178 16.7366L14.816 17.3348C14.9331 17.4519 14.9332 17.6418 14.816 17.759L12.9216 19.6543C11.2241 21.3536 8.47364 21.3518 6.77417 19.6543C5.07483 17.9568 5.0749 15.2064 6.77417 13.5068L8.66848 11.6116C8.78563 11.4944 8.97562 11.4944 9.0928 11.6116L9.69583 12.2146ZM13.5085 6.77441C15.2061 5.07514 17.9565 5.07509 19.656 6.77441C21.3535 8.47388 21.3533 11.2243 19.656 12.9238L17.7607 14.8182C17.6436 14.9354 17.4536 14.9353 17.3365 14.8182L16.7344 14.2161C16.6172 14.0989 16.6172 13.9089 16.7344 13.7918L18.6296 11.8975C19.7101 10.8167 19.8245 8.99503 18.6296 7.7998C17.4363 6.60449 15.6118 6.719 14.531 7.7998L12.6367 9.69412C12.5195 9.81128 12.3296 9.81128 12.2124 9.69412L11.6123 9.09402C11.4952 8.97684 11.4952 8.78685 11.6124 8.6697L13.5085 6.77441Z\" fill=\"#46525C\"/>\n</svg>\n";
@@ -22,5 +22,4 @@ export interface GradientSettingProps {
22
22
  icon?: string;
23
23
  id?: string;
24
24
  includeGetJson?: boolean;
25
- variant?: "default" | "global";
26
25
  }
@@ -14,8 +14,6 @@ export declare class MultiLanguageSetting extends Setting<MultiLanguageValue, Mu
14
14
  private container;
15
15
  private defaultLanguage;
16
16
  private uploadSettings;
17
- private languageChangeUnsubscribe?;
18
- private popup;
19
17
  private capitalizeFirstLetter;
20
18
  private textMeasureCanvas?;
21
19
  private measureTextWidth;
@@ -25,10 +23,6 @@ export declare class MultiLanguageSetting extends Setting<MultiLanguageValue, Mu
25
23
  private createTextareaRow;
26
24
  private updateLanguageValue;
27
25
  private updateOtherLanguagePlaceholders;
28
- private renderContent;
29
- private createPopup;
30
- private showPopup;
31
- private closePopup;
32
26
  draw(): HTMLElement;
33
27
  setValue(value: MultiLanguageValue): void;
34
28
  }
@@ -33,7 +33,6 @@ export declare class SelectApiSettings<T = SettingsMap> extends Setting<T, Selec
33
33
  private selectApiOption;
34
34
  private updateOptionsList;
35
35
  private updateButtonText;
36
- update(fireCallbacks?: boolean): void;
37
36
  setDetectChange(callback: (value: T | undefined) => void): void;
38
37
  setValue(value: T): void;
39
38
  }
@@ -1,3 +1,3 @@
1
- <svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M9 14L9 5M9 14L6.75 12.5M9 14L11.25 12.5M9 5L6.75 6.5M9 5L11.25 6.5M15.75 2.75H2.25M15.75 16.25H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
3
- </svg>
1
+ <svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9 14L9 5M9 14L6.75 12.5M9 14L11.25 12.5M9 5L6.75 6.5M9 5L11.25 6.5M15.75 2.75H2.25M15.75 16.25H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -1,3 +1,3 @@
1
- <svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M4.5 9.5H13.5M4.5 9.5L6 7.25M4.5 9.5L6 11.75M13.5 9.5L12 7.25M13.5 9.5L12 11.75M15.75 16.25V2.75M2.25 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
3
- </svg>
1
+ <svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M4.5 9.5H13.5M4.5 9.5L6 7.25M4.5 9.5L6 11.75M13.5 9.5L12 7.25M13.5 9.5L12 11.75M15.75 16.25V2.75M2.25 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -1,5 +1,5 @@
1
1
  import { Setting, SettingProps } from '../base/settings';
2
- import { SettingGroup, TabSettingGroup } from '../base/settings-group/settingsGroup';
2
+ import { SettingGroup } from '../base/settings-group/settingsGroup';
3
3
  import { HeaderTypographySettingSet } from '../groups/headerTypographySettingsSet';
4
4
  import { AlignValue } from '../settings/align-settings/alignSettings';
5
5
  import { GradientSetting } from '../settings/gradient-settings';
@@ -55,15 +55,7 @@ export declare type ExtractSettingGroupValues<T> = T extends SettingGroup<infer
55
55
  [K in keyof S]: S[K] extends Setting<infer V, infer P> ? ExtractSettingValue<S[K]> : S[K] extends SettingGroup<infer U> ? ExtractSettingGroupValues<S[K]> : unknown;
56
56
  } : never;
57
57
  type GradientSettingValue<T> = T extends GradientSetting ? ReturnType<T["getValue"]> : never;
58
- export type SettingsToProps<T> = T extends TabSettingGroup<infer S> ? {
59
- [K in keyof S]: S[K] extends GradientSetting ? GradientSettingValue<S[K]> : S[K] extends Setting<infer V, infer P> ? V : S[K] extends HeaderTypographySettingSet ? HeaderTypographyValue<S[K]> : S[K] extends SettingGroup<infer U> ? SettingsToProps<S[K]> : S[K] extends {
60
- setValue(value: infer V | undefined): void;
61
- } ? V : S[K] extends {
62
- value: infer V;
63
- } ? V : unknown;
64
- } & {
65
- activeTabId: string;
66
- } : T extends SettingGroup<infer S> ? {
58
+ export type SettingsToProps<T> = T extends SettingGroup<infer S> ? {
67
59
  [K in keyof S]: S[K] extends GradientSetting ? GradientSettingValue<S[K]> : S[K] extends Setting<infer V, infer P> ? V : S[K] extends HeaderTypographySettingSet ? HeaderTypographyValue<S[K]> : S[K] extends SettingGroup<infer U> ? SettingsToProps<S[K]> : S[K] extends {
68
60
  setValue(value: infer V | undefined): void;
69
61
  } ? V : S[K] extends {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "builder-settings-types",
3
3
  "description": "builder settings",
4
- "version": "0.0.330",
4
+ "version": "0.0.335",
5
5
  "type": "module",
6
6
  "main": "dist/builder-settings-types.cjs.js",
7
7
  "module": "dist/builder-settings-types.es.js",
@@ -1,21 +0,0 @@
1
- import { SettingGroup } from '../../base/settings-group/settingsGroup';
2
- import { WidthSetting } from '../../settings/width-setting/widthSettings';
3
- import { HeightSetting } from '../../settings/height-setting/heightSettings';
4
- import { UploadSetting, UploadSettingProps } from '../../settings/upload-image-settings/uploadImageSettings';
5
- export interface ImageSettingSetProps {
6
- image?: string;
7
- width?: number;
8
- height?: number;
9
- widthMobile?: number;
10
- heightMobile?: number;
11
- uploadProps?: UploadSettingProps;
12
- collapsed?: boolean;
13
- title?: string;
14
- }
15
- export declare class ImageSettingSet extends SettingGroup<{
16
- image: UploadSetting;
17
- width: WidthSetting;
18
- height: HeightSetting;
19
- }> {
20
- constructor(props?: ImageSettingSetProps);
21
- }
@@ -1,76 +0,0 @@
1
- import { Setting, InputTypes } from '../../base/settings';
2
- import { ImageMapValue, ImageMapSettingProps } from './types';
3
- export declare class ImageMapSetting extends Setting<ImageMapValue, ImageMapSettingProps> {
4
- inputType: {
5
- imageUrl: InputTypes;
6
- markers: InputTypes;
7
- };
8
- private static openInstance;
9
- private mainButton;
10
- private thumbnailEl;
11
- private markerCountEl;
12
- private mapIconEl;
13
- private popoverEl;
14
- private backdropEl;
15
- private imageElement;
16
- private cursorTooltip;
17
- private popoverPosition;
18
- private isPopoverOpen;
19
- private confirmOverlayEl;
20
- private confirmPromise;
21
- private lastImageNaturalSize;
22
- private draggingMarkerId;
23
- private history;
24
- private historyIndex;
25
- private isUndoRedoOperation;
26
- private initialValue;
27
- private onBackgroundClick;
28
- private handlePopoverKeydown;
29
- private boundHandleMarkerDrag;
30
- private boundStopDragging;
31
- private messageListener;
32
- constructor(props?: ImageMapSettingProps);
33
- private setupMessageListener;
34
- private cleanupMessageListener;
35
- draw(): HTMLElement;
36
- private updateMainDisplay;
37
- private createPopover;
38
- private openPopover;
39
- private hasAllMarkers;
40
- private hasChanges;
41
- private closePopover;
42
- private positionPopover;
43
- private refreshPopoverContent;
44
- private refreshPopoverContentAndScrollToBottom;
45
- private scrollPrizeListToBottom;
46
- private renderUploadSection;
47
- private renderControlsRow;
48
- private renderImageMapSection;
49
- private renderBottomButtons;
50
- private renderPrizeList;
51
- private createMarkerElement;
52
- private handleImageUpload;
53
- private handleImageClick;
54
- private handleMarkerDrag;
55
- private stopDragging;
56
- private handleDeleteMarker;
57
- private handleClearAllMarkers;
58
- private getNextPrizeInfo;
59
- private showCursorTooltip;
60
- private hideCursorTooltip;
61
- private updateCursorTooltip;
62
- private saveState;
63
- private canUndo;
64
- private canRedo;
65
- private undo;
66
- private redo;
67
- private updateUndoRedoButtons;
68
- private showError;
69
- private setMarkers;
70
- private scaleMarkersForNewImage;
71
- private clampPercentage;
72
- private recordImageNaturalSize;
73
- private showConfirmModal;
74
- private triggerChange;
75
- destroy(): void;
76
- }
@@ -1,2 +0,0 @@
1
- export { ImageMapSetting } from './ImageMapSetting';
2
- export type { ImageMapValue, ImageMapMarker, ImageMapSettingProps } from './types';
@@ -1,19 +0,0 @@
1
- import { SettingProps } from '../../base/settings';
2
- export interface ImageMapMarker {
3
- id: number;
4
- index: number;
5
- x: number;
6
- y: number;
7
- prizeName?: string;
8
- }
9
- export interface ImageMapValue {
10
- imageUrl: string;
11
- markers: ImageMapMarker[];
12
- }
13
- export interface ImageMapSettingProps extends SettingProps<ImageMapValue> {
14
- maxMarkers?: number;
15
- markerSize?: number;
16
- maxFileSizeMB?: number;
17
- prizeMap?: string[];
18
- upload?: 'input' | 'file-manager';
19
- }