builder-settings-types 0.0.278 → 0.0.280
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/builder-settings-types.cjs.js +39 -31
- package/dist/builder-settings-types.es.js +481 -436
- package/dist/groups/borderSettingsSet.d.ts +7 -5
- package/dist/groups/headerTypographySettingsSet.d.ts +3 -2
- package/dist/settings/gradient-settings/GradientSetting.d.ts +1 -1
- package/dist/settings/gradient-settings/components/EmbeddedColorPicker.d.ts +2 -0
- package/dist/settings/gradient-settings/recent/RecentColorManager.d.ts +3 -3
- package/dist/settings/gradient-settings/recent/createRecentColorsSection.d.ts +2 -2
- package/dist/settings/gradient-settings/utils/types.d.ts +1 -1
- package/dist/settings/select-settings/selectSettings.d.ts +0 -6
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SettingGroup } from '../base/settings-group/settingsGroup';
|
|
2
|
-
import {
|
|
2
|
+
import { GradientSetting } from '../settings/gradient-settings/GradientSetting';
|
|
3
3
|
import { NumberSetting } from '../settings/number-settings/numberSettings';
|
|
4
4
|
/**
|
|
5
5
|
* A SettingGroup for configuring "Border" settings.
|
|
@@ -7,7 +7,7 @@ import { NumberSetting } from '../settings/number-settings/numberSettings';
|
|
|
7
7
|
* You can pass default values to override the internal defaults.
|
|
8
8
|
*/
|
|
9
9
|
export declare class BorderSettingSet extends SettingGroup<{
|
|
10
|
-
color:
|
|
10
|
+
color: GradientSetting;
|
|
11
11
|
radius: NumberSetting;
|
|
12
12
|
size: NumberSetting;
|
|
13
13
|
}> {
|
|
@@ -17,8 +17,10 @@ export declare class BorderSettingSet extends SettingGroup<{
|
|
|
17
17
|
size?: number;
|
|
18
18
|
collapsed?: boolean;
|
|
19
19
|
});
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
getValues(): {
|
|
21
|
+
color: unknown;
|
|
22
|
+
radius: unknown;
|
|
23
|
+
size: unknown;
|
|
24
|
+
};
|
|
23
25
|
getCssCode(): string;
|
|
24
26
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SettingGroup } from '../base/settings-group/settingsGroup';
|
|
2
2
|
import { AlignSetting, AlignValue } from '../settings/align-settings/alignSettings';
|
|
3
|
-
import {
|
|
3
|
+
import { GradientSetting } from '../settings/gradient-settings/GradientSetting';
|
|
4
4
|
import { NumberSetting } from '../settings/number-settings/numberSettings';
|
|
5
5
|
import { SelectOption, SelectSetting } from '../settings/select-settings/selectSettings';
|
|
6
6
|
export interface HeaderTypographySettings {
|
|
@@ -23,7 +23,7 @@ export interface HeaderTypographySettings {
|
|
|
23
23
|
fontSizeMobileDefault?: number;
|
|
24
24
|
}
|
|
25
25
|
export declare class HeaderTypographySettingSet extends SettingGroup<{
|
|
26
|
-
color:
|
|
26
|
+
color: GradientSetting;
|
|
27
27
|
fontFamily: SelectSetting<string>;
|
|
28
28
|
fontWeight: SelectSetting<string>;
|
|
29
29
|
fontSize: NumberSetting;
|
|
@@ -31,4 +31,5 @@ export declare class HeaderTypographySettingSet extends SettingGroup<{
|
|
|
31
31
|
}> {
|
|
32
32
|
constructor(props?: HeaderTypographySettings);
|
|
33
33
|
getCssCode(): string;
|
|
34
|
+
getTextGradientCss(): string;
|
|
34
35
|
}
|
|
@@ -13,11 +13,11 @@ export declare class GradientSetting extends Setting<GradientValue, SettingProps
|
|
|
13
13
|
private popoverEl;
|
|
14
14
|
private isPopoverOpen;
|
|
15
15
|
private isEditing;
|
|
16
|
-
private forText;
|
|
17
16
|
detectChange?: (value: GradientValue | undefined) => void;
|
|
18
17
|
private previewUpdateTimeout;
|
|
19
18
|
private solidPicker;
|
|
20
19
|
private pendingSolidColor;
|
|
20
|
+
private recentGradientRefresh?;
|
|
21
21
|
constructor(props?: GradientSettingProps);
|
|
22
22
|
private originalDefault;
|
|
23
23
|
private defaultValue;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { RecentColorDisplayScope } from '../utils/types';
|
|
1
2
|
export interface EmbeddedColorPickerOptions {
|
|
2
3
|
initialColor: string;
|
|
3
4
|
initialOpacity: number;
|
|
4
5
|
onColorChange: (color: string, opacity: number) => void;
|
|
6
|
+
scope?: RecentColorDisplayScope;
|
|
5
7
|
}
|
|
6
8
|
export declare class EmbeddedColorPicker {
|
|
7
9
|
private currentColor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RecentColorDisplayScope } from '../utils/types';
|
|
2
2
|
export declare class RecentColorManager {
|
|
3
3
|
private static readonly STORAGE_KEY;
|
|
4
4
|
private static readonly MAX_COLORS;
|
|
@@ -8,6 +8,6 @@ export declare class RecentColorManager {
|
|
|
8
8
|
private static ensureLoaded;
|
|
9
9
|
private static persist;
|
|
10
10
|
private static list;
|
|
11
|
-
static getColors(scope:
|
|
12
|
-
static addColor(color: string | undefined, scope:
|
|
11
|
+
static getColors(scope: RecentColorDisplayScope): string[];
|
|
12
|
+
static addColor(color: string | undefined, scope: RecentColorDisplayScope): void;
|
|
13
13
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const createRecentColorsSection: (onSelect: (color: string) => void, scope:
|
|
1
|
+
import { RecentColorsSection, RecentColorDisplayScope } from '../utils/types';
|
|
2
|
+
export declare const createRecentColorsSection: (onSelect: (color: string) => void, scope: RecentColorDisplayScope) => RecentColorsSection;
|
|
@@ -9,13 +9,13 @@ export interface GradientValue {
|
|
|
9
9
|
stops: GradientStop[];
|
|
10
10
|
}
|
|
11
11
|
export type RecentColorScope = "solid" | "gradient";
|
|
12
|
+
export type RecentColorDisplayScope = RecentColorScope | "all";
|
|
12
13
|
export interface RecentColorsSection {
|
|
13
14
|
container: HTMLElement;
|
|
14
15
|
refresh: () => void;
|
|
15
16
|
}
|
|
16
17
|
export interface GradientSettingProps {
|
|
17
18
|
detectChange?: (value: GradientValue | undefined) => void;
|
|
18
|
-
forText?: boolean;
|
|
19
19
|
default?: GradientValue | string;
|
|
20
20
|
title?: string;
|
|
21
21
|
placeholder?: string;
|
|
@@ -27,14 +27,8 @@ export declare class SelectSetting<T = SettingsMap> extends Setting<T, SelectSet
|
|
|
27
27
|
setValue(newValue: T): void;
|
|
28
28
|
private createOption;
|
|
29
29
|
draw(): HTMLElement;
|
|
30
|
-
/**
|
|
31
|
-
* Check if dropdown should be positioned above the button
|
|
32
|
-
*/
|
|
33
30
|
private checkDropdownPosition;
|
|
34
31
|
private selectOption;
|
|
35
|
-
/**
|
|
36
|
-
* Clean up dropdown positioning when closed
|
|
37
|
-
*/
|
|
38
32
|
private cleanupDropdownPosition;
|
|
39
33
|
private updateOptionsList;
|
|
40
34
|
private updateButtonText;
|
package/package.json
CHANGED