builder-settings-types 0.0.277 → 0.0.279

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.
@@ -13,9 +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;
18
+ private solidPicker;
19
+ private pendingSolidColor;
20
+ private recentGradientRefresh?;
19
21
  constructor(props?: GradientSettingProps);
20
22
  private originalDefault;
21
23
  private defaultValue;
@@ -39,13 +41,16 @@ export declare class GradientSetting extends Setting<GradientValue, SettingProps
39
41
  private repositionPopover;
40
42
  private refreshPopoverContent;
41
43
  private onBackgroundClick;
44
+ private handlePopoverKeydown;
42
45
  private closePopover;
46
+ private commitPendingSolidColor;
43
47
  private handlePaste;
44
48
  private handleTextInput;
45
49
  private parseAndSet;
46
50
  private triggerChange;
47
51
  getElement(): HTMLElement | null;
48
- getValue(): string | object;
52
+ getValue(): string;
49
53
  getCSSValue(): string;
54
+ getCSSForText(): Record<string, string>;
50
55
  getRawValue(): GradientValue | undefined;
51
56
  }
@@ -1,18 +1,24 @@
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;
8
10
  private currentOpacity;
9
11
  private onColorChange;
10
12
  private container;
13
+ private recentScope;
14
+ private recentSectionRefresh?;
11
15
  constructor(options: EmbeddedColorPickerOptions);
12
16
  private createContainer;
13
17
  private initializePicker;
14
18
  private updateOpacityBackground;
15
19
  private updateColorInput;
20
+ private applyRecentColor;
21
+ commitRecentColor(): void;
16
22
  private setupColorAreaEvents;
17
23
  private setupHueSliderEvents;
18
24
  private setupOpacitySliderEvents;
@@ -1,12 +1,13 @@
1
- import { RecentColorScope } from '../utils/types';
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;
5
5
  private static colors;
6
6
  private static defaults;
7
+ private static normalizeList;
7
8
  private static ensureLoaded;
8
9
  private static persist;
9
10
  private static list;
10
- static getColors(scope: RecentColorScope): string[];
11
- static addColor(color: string | undefined, scope: RecentColorScope): void;
11
+ static getColors(scope: RecentColorDisplayScope): string[];
12
+ static addColor(color: string | undefined, scope: RecentColorDisplayScope): void;
12
13
  }
@@ -1,2 +1,2 @@
1
- import { RecentColorScope, RecentColorsSection } from '../utils/types';
2
- export declare const createRecentColorsSection: (onSelect: (color: string) => void, scope: RecentColorScope) => RecentColorsSection;
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;
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.277",
4
+ "version": "0.0.279",
5
5
  "type": "module",
6
6
  "main": "dist/builder-settings-types.cjs.js",
7
7
  "module": "dist/builder-settings-types.es.js",