Skip to content

Commit

Permalink
chore: regenerates dist files
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinfreund committed Jul 24, 2023
1 parent ff38882 commit 8ec05d1
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 27 deletions.
58 changes: 37 additions & 21 deletions dist/ColorPicker.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,7 @@ declare global {
'color-picker': ColorPicker;
}
}
type VisibleColorFormat = 'hex' | 'hsl' | 'hwb' | 'rgb';
type ColorFormat = 'hex' | 'hsl' | 'hsv' | 'hwb' | 'rgb';
type AlphaChannelProp = 'show' | 'hide';
type ColorChangeDetail = {
colors: {
hex: string;
hsl: ColorHsl;
hsv: ColorHsv;
hwb: ColorHwb;
rgb: ColorRgb;
};
cssColor: string;
};
type ColorHsl = {
h: number;
s: number;
Expand All @@ -43,18 +31,46 @@ type ColorRgb = {
b: number;
a: number;
};
type AttributeTypeMap = {
id: string;
color: string;
'visible-formats': VisibleColorFormat[];
'default-format': VisibleColorFormat;
'alpha-channel': AlphaChannelProp;
type ColorMap = {
hex: string;
hsl: ColorHsl;
hsv: ColorHsv;
hwb: ColorHwb;
rgb: ColorRgb;
};
type ColorChangeDetail = {
colors: ColorMap;
cssColor: string;
};
type AttributeName = keyof AttributeTypeMap;
type ColorFormat = keyof ColorMap;
type VisibleColorFormat = Exclude<ColorFormat, 'hsv'>;
interface ColorPairHex {
format: 'hex';
color: string;
}
interface ColorPairHsl {
format: 'hsl';
color: ColorHsl;
}
interface ColorPairHsv {
format: 'hsv';
color: ColorHsv;
}
interface ColorPairHwb {
format: 'hwb';
color: ColorHwb;
}
interface ColorPairRgb {
format: 'rgb';
color: ColorRgb;
}
type ColorPair = ColorPairHex | ColorPairHsl | ColorPairHsv | ColorPairHwb | ColorPairRgb;
type VisibleColorPair = Exclude<ColorPair, ColorPairHsv>;
type AttributeName = 'alpha-channel' | 'color' | 'default-format' | 'id' | 'visible-formats';
type ColorPickerProperties = keyof ColorPicker;
declare class ColorPicker extends HTMLElement {
#private;
static observedAttributes: (keyof AttributeTypeMap)[];
static observedAttributes: AttributeName[];
get [Symbol.toStringTag](): string;
/**
* The currently active format. Changed by interacting with the “Switch format” button.
Expand Down Expand Up @@ -105,4 +121,4 @@ declare class ColorPicker extends HTMLElement {
switchFormat(): void;
}

export { AlphaChannelProp, ColorChangeDetail, ColorFormat, ColorHsl, ColorHsv, ColorHwb, ColorPicker, ColorPickerProperties, ColorRgb, VisibleColorFormat };
export { AlphaChannelProp, ColorChangeDetail, ColorFormat, ColorHsl, ColorHsv, ColorHwb, ColorMap, ColorPair, ColorPairHex, ColorPairHsl, ColorPairHsv, ColorPairHwb, ColorPairRgb, ColorPicker, ColorPickerProperties, ColorRgb, VisibleColorFormat, VisibleColorPair };
Loading

0 comments on commit 8ec05d1

Please sign in to comment.