ngx-color 8.0.0 → 8.0.3
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/README.md +0 -1
- package/alpha/alpha-picker.component.d.ts +28 -0
- package/alpha/index.d.ts +5 -0
- package/alpha/public_api.d.ts +1 -0
- package/block/block-swatches.component.d.ts +24 -0
- package/block/block.component.d.ts +36 -0
- package/block/index.d.ts +5 -0
- package/block/public_api.d.ts +2 -0
- package/chrome/chrome-fields.component.d.ts +22 -0
- package/chrome/chrome.component.d.ts +25 -0
- package/chrome/index.d.ts +5 -0
- package/chrome/public_api.d.ts +2 -0
- package/circle/circle-swatch.component.d.ts +19 -0
- package/circle/circle.component.d.ts +32 -0
- package/circle/index.d.ts +5 -0
- package/circle/public_api.d.ts +2 -0
- package/compact/compact-color.component.d.ts +19 -0
- package/compact/compact-fields.component.d.ts +32 -0
- package/compact/compact.component.d.ts +30 -0
- package/compact/index.d.ts +5 -0
- package/compact/public_api.d.ts +3 -0
- package/coordinates.directive.d.ts +1 -1
- package/esm2020/alpha/alpha-picker.component.mjs +100 -0
- package/esm2020/alpha/ngx-color-alpha.mjs +5 -0
- package/esm2020/alpha/public_api.mjs +2 -0
- package/esm2020/alpha.component.mjs +7 -7
- package/esm2020/block/block-swatches.component.mjs +63 -0
- package/esm2020/block/block.component.mjs +158 -0
- package/esm2020/block/ngx-color-block.mjs +5 -0
- package/esm2020/block/public_api.mjs +3 -0
- package/esm2020/checkboard.component.mjs +7 -7
- package/esm2020/chrome/chrome-fields.component.mjs +314 -0
- package/esm2020/chrome/chrome.component.mjs +184 -0
- package/esm2020/chrome/ngx-color-chrome.mjs +5 -0
- package/esm2020/chrome/public_api.mjs +3 -0
- package/esm2020/circle/circle-swatch.component.mjs +69 -0
- package/esm2020/circle/circle.component.mjs +134 -0
- package/esm2020/circle/ngx-color-circle.mjs +5 -0
- package/esm2020/circle/public_api.mjs +3 -0
- package/esm2020/color-wrap.component.mjs +10 -10
- package/esm2020/compact/compact-color.component.mjs +70 -0
- package/esm2020/compact/compact-fields.component.mjs +164 -0
- package/esm2020/compact/compact.component.mjs +154 -0
- package/esm2020/compact/ngx-color-compact.mjs +5 -0
- package/esm2020/compact/public_api.mjs +4 -0
- package/esm2020/coordinates.directive.mjs +9 -9
- package/esm2020/editable-input.component.mjs +10 -14
- package/esm2020/github/github-swatch.component.mjs +53 -0
- package/esm2020/github/github.component.mjs +112 -0
- package/esm2020/github/ngx-color-github.mjs +5 -0
- package/esm2020/github/public_api.mjs +3 -0
- package/esm2020/hue/hue-picker.component.mjs +100 -0
- package/esm2020/hue/ngx-color-hue.mjs +5 -0
- package/esm2020/hue/public_api.mjs +2 -0
- package/esm2020/hue.component.mjs +7 -7
- package/esm2020/material/material.component.mjs +186 -0
- package/esm2020/material/ngx-color-material.mjs +5 -0
- package/esm2020/material/public_api.mjs +2 -0
- package/esm2020/photoshop/ngx-color-photoshop.mjs +5 -0
- package/esm2020/photoshop/photoshop-button.component.mjs +34 -0
- package/esm2020/photoshop/photoshop-fields.component.mjs +212 -0
- package/esm2020/photoshop/photoshop-previews.component.mjs +40 -0
- package/esm2020/photoshop/photoshop.component.mjs +185 -0
- package/esm2020/photoshop/public_api.mjs +5 -0
- package/esm2020/raised.component.mjs +7 -7
- package/esm2020/saturation.component.mjs +7 -7
- package/esm2020/shade/ngx-color-shade.mjs +5 -0
- package/esm2020/shade/public_api.mjs +2 -0
- package/esm2020/shade/shade-picker.component.mjs +92 -0
- package/esm2020/shade.component.mjs +7 -7
- package/esm2020/sketch/ngx-color-sketch.mjs +5 -0
- package/esm2020/sketch/public_api.mjs +4 -0
- package/esm2020/sketch/sketch-fields.component.mjs +209 -0
- package/esm2020/sketch/sketch-preset-colors.component.mjs +68 -0
- package/esm2020/sketch/sketch.component.mjs +212 -0
- package/esm2020/slider/ngx-color-slider.mjs +5 -0
- package/esm2020/slider/public_api.mjs +4 -0
- package/esm2020/slider/slider-swatch.component.mjs +52 -0
- package/esm2020/slider/slider-swatches.component.mjs +119 -0
- package/esm2020/slider/slider.component.mjs +102 -0
- package/esm2020/swatch.component.mjs +7 -7
- package/esm2020/swatches/ngx-color-swatches.mjs +5 -0
- package/esm2020/swatches/public_api.mjs +4 -0
- package/esm2020/swatches/swatches-color.component.mjs +104 -0
- package/esm2020/swatches/swatches-group.component.mjs +49 -0
- package/esm2020/swatches/swatches.component.mjs +242 -0
- package/esm2020/twitter/ngx-color-twitter.mjs +5 -0
- package/esm2020/twitter/public_api.mjs +2 -0
- package/esm2020/twitter/twitter.component.mjs +159 -0
- package/fesm2015/ngx-color-alpha.mjs +107 -0
- package/fesm2015/ngx-color-alpha.mjs.map +1 -0
- package/fesm2015/ngx-color-block.mjs +223 -0
- package/fesm2015/ngx-color-block.mjs.map +1 -0
- package/fesm2015/ngx-color-chrome.mjs +499 -0
- package/fesm2015/ngx-color-chrome.mjs.map +1 -0
- package/fesm2015/ngx-color-circle.mjs +207 -0
- package/fesm2015/ngx-color-circle.mjs.map +1 -0
- package/fesm2015/ngx-color-compact.mjs +385 -0
- package/fesm2015/ngx-color-compact.mjs.map +1 -0
- package/fesm2015/ngx-color-github.mjs +169 -0
- package/fesm2015/ngx-color-github.mjs.map +1 -0
- package/fesm2015/ngx-color-hue.mjs +107 -0
- package/fesm2015/ngx-color-hue.mjs.map +1 -0
- package/fesm2015/ngx-color-material.mjs +193 -0
- package/fesm2015/ngx-color-material.mjs.map +1 -0
- package/fesm2015/ngx-color-photoshop.mjs +467 -0
- package/fesm2015/ngx-color-photoshop.mjs.map +1 -0
- package/fesm2015/ngx-color-shade.mjs +99 -0
- package/fesm2015/ngx-color-shade.mjs.map +1 -0
- package/fesm2015/ngx-color-sketch.mjs +485 -0
- package/fesm2015/ngx-color-sketch.mjs.map +1 -0
- package/fesm2015/ngx-color-slider.mjs +273 -0
- package/fesm2015/ngx-color-slider.mjs.map +1 -0
- package/fesm2015/ngx-color-swatches.mjs +391 -0
- package/fesm2015/ngx-color-swatches.mjs.map +1 -0
- package/fesm2015/ngx-color-twitter.mjs +166 -0
- package/fesm2015/ngx-color-twitter.mjs.map +1 -0
- package/fesm2015/ngx-color.mjs +78 -80
- package/fesm2015/ngx-color.mjs.map +1 -1
- package/fesm2020/ngx-color-alpha.mjs +107 -0
- package/fesm2020/ngx-color-alpha.mjs.map +1 -0
- package/fesm2020/ngx-color-block.mjs +223 -0
- package/fesm2020/ngx-color-block.mjs.map +1 -0
- package/fesm2020/ngx-color-chrome.mjs +499 -0
- package/fesm2020/ngx-color-chrome.mjs.map +1 -0
- package/fesm2020/ngx-color-circle.mjs +207 -0
- package/fesm2020/ngx-color-circle.mjs.map +1 -0
- package/fesm2020/ngx-color-compact.mjs +385 -0
- package/fesm2020/ngx-color-compact.mjs.map +1 -0
- package/fesm2020/ngx-color-github.mjs +169 -0
- package/fesm2020/ngx-color-github.mjs.map +1 -0
- package/fesm2020/ngx-color-hue.mjs +107 -0
- package/fesm2020/ngx-color-hue.mjs.map +1 -0
- package/fesm2020/ngx-color-material.mjs +193 -0
- package/fesm2020/ngx-color-material.mjs.map +1 -0
- package/fesm2020/ngx-color-photoshop.mjs +467 -0
- package/fesm2020/ngx-color-photoshop.mjs.map +1 -0
- package/fesm2020/ngx-color-shade.mjs +99 -0
- package/fesm2020/ngx-color-shade.mjs.map +1 -0
- package/fesm2020/ngx-color-sketch.mjs +485 -0
- package/fesm2020/ngx-color-sketch.mjs.map +1 -0
- package/fesm2020/ngx-color-slider.mjs +273 -0
- package/fesm2020/ngx-color-slider.mjs.map +1 -0
- package/fesm2020/ngx-color-swatches.mjs +391 -0
- package/fesm2020/ngx-color-swatches.mjs.map +1 -0
- package/fesm2020/ngx-color-twitter.mjs +166 -0
- package/fesm2020/ngx-color-twitter.mjs.map +1 -0
- package/fesm2020/ngx-color.mjs +75 -79
- package/fesm2020/ngx-color.mjs.map +1 -1
- package/github/github-swatch.component.d.ts +19 -0
- package/github/github.component.d.ts +28 -0
- package/github/index.d.ts +5 -0
- package/github/public_api.d.ts +2 -0
- package/hue/hue-picker.component.d.ts +29 -0
- package/hue/index.d.ts +5 -0
- package/hue/public_api.d.ts +1 -0
- package/material/index.d.ts +5 -0
- package/material/material.component.d.ts +39 -0
- package/material/public_api.d.ts +1 -0
- package/package.json +113 -1
- package/photoshop/index.d.ts +5 -0
- package/photoshop/photoshop-button.component.d.ts +9 -0
- package/photoshop/photoshop-fields.component.d.ts +22 -0
- package/photoshop/photoshop-previews.component.d.ts +11 -0
- package/photoshop/photoshop.component.d.ts +33 -0
- package/photoshop/public_api.d.ts +4 -0
- package/shade/index.d.ts +5 -0
- package/shade/public_api.d.ts +1 -0
- package/shade/shade-picker.component.d.ts +27 -0
- package/sketch/index.d.ts +5 -0
- package/sketch/public_api.d.ts +3 -0
- package/sketch/sketch-fields.component.d.ts +23 -0
- package/sketch/sketch-preset-colors.component.d.ts +24 -0
- package/sketch/sketch.component.d.ts +32 -0
- package/slider/index.d.ts +5 -0
- package/slider/public_api.d.ts +3 -0
- package/slider/slider-swatch.component.d.ts +16 -0
- package/slider/slider-swatches.component.d.ts +15 -0
- package/slider/slider.component.d.ts +22 -0
- package/swatches/index.d.ts +5 -0
- package/swatches/public_api.d.ts +3 -0
- package/swatches/swatches-color.component.d.ts +18 -0
- package/swatches/swatches-group.component.d.ts +10 -0
- package/swatches/swatches.component.d.ts +29 -0
- package/twitter/index.d.ts +5 -0
- package/twitter/public_api.d.ts +1 -0
- package/twitter/twitter.component.d.ts +31 -0
package/README.md
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
import { OnChanges } from '@angular/core';
|
2
|
+
import { ColorWrap } from 'ngx-color';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
import * as i1 from "@angular/common";
|
5
|
+
import * as i2 from "ngx-color";
|
6
|
+
export declare class AlphaPickerComponent extends ColorWrap implements OnChanges {
|
7
|
+
/** Pixel value for picker width */
|
8
|
+
width: string | number;
|
9
|
+
/** Pixel value for picker height */
|
10
|
+
height: string | number;
|
11
|
+
direction: 'horizontal' | 'vertical';
|
12
|
+
pointer: {
|
13
|
+
[key: string]: string;
|
14
|
+
};
|
15
|
+
constructor();
|
16
|
+
ngOnChanges(): void;
|
17
|
+
handlePickerChange({ data, $event }: {
|
18
|
+
data: any;
|
19
|
+
$event: any;
|
20
|
+
}): void;
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AlphaPickerComponent, never>;
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AlphaPickerComponent, "color-alpha-picker", never, { "width": "width"; "height": "height"; "direction": "direction"; }, {}, never, never, false>;
|
23
|
+
}
|
24
|
+
export declare class ColorAlphaModule {
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColorAlphaModule, never>;
|
26
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ColorAlphaModule, [typeof AlphaPickerComponent], [typeof i1.CommonModule, typeof i2.AlphaModule, typeof i2.CheckboardModule], [typeof AlphaPickerComponent]>;
|
27
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ColorAlphaModule>;
|
28
|
+
}
|
package/alpha/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export { AlphaPickerComponent, ColorAlphaModule } from './alpha-picker.component';
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class BlockSwatchesComponent {
|
4
|
+
colors: string[];
|
5
|
+
onClick: EventEmitter<any>;
|
6
|
+
onSwatchHover: EventEmitter<any>;
|
7
|
+
swatchStyle: {
|
8
|
+
width: string;
|
9
|
+
height: string;
|
10
|
+
float: string;
|
11
|
+
marginRight: string;
|
12
|
+
marginBottom: string;
|
13
|
+
borderRadius: string;
|
14
|
+
};
|
15
|
+
handleClick({ hex, $event }: {
|
16
|
+
hex: any;
|
17
|
+
$event: any;
|
18
|
+
}): void;
|
19
|
+
focusStyle(c: any): {
|
20
|
+
boxShadow: string;
|
21
|
+
};
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BlockSwatchesComponent, never>;
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BlockSwatchesComponent, "color-block-swatches", never, { "colors": "colors"; }, { "onClick": "onClick"; "onSwatchHover": "onSwatchHover"; }, never, never, false>;
|
24
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { ColorWrap } from 'ngx-color';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
import * as i1 from "./block-swatches.component";
|
4
|
+
import * as i2 from "@angular/common";
|
5
|
+
import * as i3 from "ngx-color";
|
6
|
+
export declare class BlockComponent extends ColorWrap {
|
7
|
+
/** Pixel value for picker width */
|
8
|
+
width: string | number;
|
9
|
+
/** Color squares to display */
|
10
|
+
colors: string[];
|
11
|
+
triangle: 'top' | 'hide';
|
12
|
+
input: {
|
13
|
+
[key: string]: string;
|
14
|
+
};
|
15
|
+
wrap: {
|
16
|
+
[key: string]: string;
|
17
|
+
};
|
18
|
+
disableAlpha: boolean;
|
19
|
+
constructor();
|
20
|
+
handleValueChange({ data, $event }: {
|
21
|
+
data: any;
|
22
|
+
$event: any;
|
23
|
+
}): void;
|
24
|
+
getContrastingColor(hex: any): "#fff" | "rgba(0,0,0,0.4)" | "#000";
|
25
|
+
handleBlockChange({ hex, $event }: {
|
26
|
+
hex: any;
|
27
|
+
$event: any;
|
28
|
+
}): void;
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BlockComponent, never>;
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BlockComponent, "color-block", never, { "width": "width"; "colors": "colors"; "triangle": "triangle"; }, {}, never, never, false>;
|
31
|
+
}
|
32
|
+
export declare class ColorBlockModule {
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColorBlockModule, never>;
|
34
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ColorBlockModule, [typeof BlockComponent, typeof i1.BlockSwatchesComponent], [typeof i2.CommonModule, typeof i3.CheckboardModule, typeof i3.SwatchModule, typeof i3.EditableInputModule], [typeof BlockComponent, typeof i1.BlockSwatchesComponent]>;
|
35
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ColorBlockModule>;
|
36
|
+
}
|
package/block/index.d.ts
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
2
|
+
import { HSLA, RGBA } from 'ngx-color';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class ChromeFieldsComponent implements OnInit {
|
5
|
+
disableAlpha: boolean;
|
6
|
+
hsl: HSLA;
|
7
|
+
rgb: RGBA;
|
8
|
+
hex: string;
|
9
|
+
onChange: EventEmitter<any>;
|
10
|
+
view: string;
|
11
|
+
input: Record<string, string>;
|
12
|
+
label: Record<string, string>;
|
13
|
+
ngOnInit(): void;
|
14
|
+
toggleViews(): void;
|
15
|
+
round(value: any): number;
|
16
|
+
handleChange({ data, $event }: {
|
17
|
+
data: any;
|
18
|
+
$event: any;
|
19
|
+
}): void;
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChromeFieldsComponent, never>;
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChromeFieldsComponent, "color-chrome-fields", never, { "disableAlpha": "disableAlpha"; "hsl": "hsl"; "rgb": "rgb"; "hex": "hex"; }, { "onChange": "onChange"; }, never, never, false>;
|
22
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { ColorWrap } from 'ngx-color';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
import * as i1 from "./chrome-fields.component";
|
4
|
+
import * as i2 from "@angular/common";
|
5
|
+
import * as i3 from "ngx-color";
|
6
|
+
export declare class ChromeComponent extends ColorWrap {
|
7
|
+
/** Remove alpha slider and options from picker */
|
8
|
+
disableAlpha: boolean;
|
9
|
+
circle: Record<string, string>;
|
10
|
+
pointer: Record<string, string>;
|
11
|
+
activeBackground: string;
|
12
|
+
constructor();
|
13
|
+
afterValidChange(): void;
|
14
|
+
handleValueChange({ data, $event }: {
|
15
|
+
data: any;
|
16
|
+
$event: any;
|
17
|
+
}): void;
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChromeComponent, never>;
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChromeComponent, "color-chrome", never, { "disableAlpha": "disableAlpha"; }, {}, never, never, false>;
|
20
|
+
}
|
21
|
+
export declare class ColorChromeModule {
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColorChromeModule, never>;
|
23
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ColorChromeModule, [typeof ChromeComponent, typeof i1.ChromeFieldsComponent], [typeof i2.CommonModule, typeof i3.AlphaModule, typeof i3.CheckboardModule, typeof i3.EditableInputModule, typeof i3.HueModule, typeof i3.SaturationModule], [typeof ChromeComponent, typeof i1.ChromeFieldsComponent]>;
|
24
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ColorChromeModule>;
|
25
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { EventEmitter, OnChanges } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class CircleSwatchComponent implements OnChanges {
|
4
|
+
color: string;
|
5
|
+
circleSize: number;
|
6
|
+
circleSpacing: number;
|
7
|
+
focus: boolean;
|
8
|
+
onClick: EventEmitter<any>;
|
9
|
+
onSwatchHover: EventEmitter<any>;
|
10
|
+
focusStyle: Record<string, string>;
|
11
|
+
swatchStyle: Record<string, string>;
|
12
|
+
ngOnChanges(): void;
|
13
|
+
handleClick({ hex, $event }: {
|
14
|
+
hex: any;
|
15
|
+
$event: any;
|
16
|
+
}): void;
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CircleSwatchComponent, never>;
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CircleSwatchComponent, "color-circle-swatch", never, { "color": "color"; "circleSize": "circleSize"; "circleSpacing": "circleSpacing"; "focus": "focus"; }, { "onClick": "onClick"; "onSwatchHover": "onSwatchHover"; }, never, never, false>;
|
19
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { ColorWrap } from 'ngx-color';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
import * as i1 from "./circle-swatch.component";
|
4
|
+
import * as i2 from "@angular/common";
|
5
|
+
import * as i3 from "ngx-color";
|
6
|
+
export declare class CircleComponent extends ColorWrap {
|
7
|
+
/** Pixel value for picker width */
|
8
|
+
width: string | number;
|
9
|
+
/** Color squares to display */
|
10
|
+
colors: string[];
|
11
|
+
/** Value for circle size */
|
12
|
+
circleSize: number;
|
13
|
+
/** Value for spacing between circles */
|
14
|
+
circleSpacing: number;
|
15
|
+
constructor();
|
16
|
+
isActive(color: string): boolean;
|
17
|
+
handleBlockChange({ hex, $event }: {
|
18
|
+
hex: string;
|
19
|
+
$event: Event;
|
20
|
+
}): void;
|
21
|
+
handleValueChange({ data, $event }: {
|
22
|
+
data: any;
|
23
|
+
$event: any;
|
24
|
+
}): void;
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CircleComponent, never>;
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CircleComponent, "color-circle", never, { "width": "width"; "colors": "colors"; "circleSize": "circleSize"; "circleSpacing": "circleSpacing"; }, {}, never, never, false>;
|
27
|
+
}
|
28
|
+
export declare class ColorCircleModule {
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColorCircleModule, never>;
|
30
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ColorCircleModule, [typeof CircleComponent, typeof i1.CircleSwatchComponent], [typeof i2.CommonModule, typeof i3.SwatchModule], [typeof CircleComponent, typeof i1.CircleSwatchComponent]>;
|
31
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ColorCircleModule>;
|
32
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { EventEmitter, OnChanges } from '@angular/core';
|
2
|
+
import { getContrastingColor } from 'ngx-color';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class CompactColorComponent implements OnChanges {
|
5
|
+
color: string;
|
6
|
+
active: boolean;
|
7
|
+
onClick: EventEmitter<any>;
|
8
|
+
onSwatchHover: EventEmitter<any>;
|
9
|
+
swatchStyle: Record<string, string>;
|
10
|
+
swatchFocus: Record<string, string>;
|
11
|
+
getContrastingColor: typeof getContrastingColor;
|
12
|
+
ngOnChanges(): void;
|
13
|
+
handleClick({ hex, $event }: {
|
14
|
+
hex: any;
|
15
|
+
$event: any;
|
16
|
+
}): void;
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CompactColorComponent, never>;
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CompactColorComponent, "color-compact-color", never, { "color": "color"; "active": "active"; }, { "onClick": "onClick"; "onSwatchHover": "onSwatchHover"; }, never, never, false>;
|
19
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
2
|
+
import { RGBA } from 'ngx-color';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class CompactFieldsComponent {
|
5
|
+
hex: string;
|
6
|
+
rgb: RGBA;
|
7
|
+
onChange: EventEmitter<any>;
|
8
|
+
HEXWrap: {
|
9
|
+
[key: string]: string;
|
10
|
+
};
|
11
|
+
HEXinput: {
|
12
|
+
[key: string]: string;
|
13
|
+
};
|
14
|
+
HEXlabel: {
|
15
|
+
[key: string]: string;
|
16
|
+
};
|
17
|
+
RGBwrap: {
|
18
|
+
[key: string]: string;
|
19
|
+
};
|
20
|
+
RGBinput: {
|
21
|
+
[key: string]: string;
|
22
|
+
};
|
23
|
+
RGBlabel: {
|
24
|
+
[key: string]: string;
|
25
|
+
};
|
26
|
+
handleChange({ data, $event }: {
|
27
|
+
data: any;
|
28
|
+
$event: any;
|
29
|
+
}): void;
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CompactFieldsComponent, never>;
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CompactFieldsComponent, "color-compact-fields", never, { "hex": "hex"; "rgb": "rgb"; }, { "onChange": "onChange"; }, never, never, false>;
|
32
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { ColorWrap, zDepth } from 'ngx-color';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
import * as i1 from "./compact-color.component";
|
4
|
+
import * as i2 from "./compact-fields.component";
|
5
|
+
import * as i3 from "@angular/common";
|
6
|
+
import * as i4 from "ngx-color";
|
7
|
+
export declare class CompactComponent extends ColorWrap {
|
8
|
+
/** Color squares to display */
|
9
|
+
colors: string[];
|
10
|
+
zDepth: zDepth;
|
11
|
+
radius: number;
|
12
|
+
background: string;
|
13
|
+
disableAlpha: boolean;
|
14
|
+
constructor();
|
15
|
+
handleBlockChange({ hex, $event }: {
|
16
|
+
hex: any;
|
17
|
+
$event: any;
|
18
|
+
}): void;
|
19
|
+
handleValueChange({ data, $event }: {
|
20
|
+
data: any;
|
21
|
+
$event: any;
|
22
|
+
}): void;
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CompactComponent, never>;
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CompactComponent, "color-compact", never, { "colors": "colors"; "zDepth": "zDepth"; "radius": "radius"; "background": "background"; }, {}, never, never, false>;
|
25
|
+
}
|
26
|
+
export declare class ColorCompactModule {
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColorCompactModule, never>;
|
28
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ColorCompactModule, [typeof CompactComponent, typeof i1.CompactColorComponent, typeof i2.CompactFieldsComponent], [typeof i3.CommonModule, typeof i4.EditableInputModule, typeof i4.SwatchModule, typeof i4.RaisedModule], [typeof CompactComponent, typeof i1.CompactColorComponent, typeof i2.CompactFieldsComponent]>;
|
29
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ColorCompactModule>;
|
30
|
+
}
|
@@ -14,7 +14,7 @@ export declare class CoordinatesDirective implements OnInit, OnDestroy {
|
|
14
14
|
}>;
|
15
15
|
private mousechange;
|
16
16
|
private mouseListening;
|
17
|
-
private sub
|
17
|
+
private sub?;
|
18
18
|
mousemove($event: Event, x: number, y: number, isTouch?: boolean): void;
|
19
19
|
mouseup(): void;
|
20
20
|
mousedown($event: Event, x: number, y: number, isTouch?: boolean): void;
|
@@ -0,0 +1,100 @@
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
2
|
+
import { ChangeDetectionStrategy, Component, forwardRef, Input, NgModule } from '@angular/core';
|
3
|
+
import { AlphaModule, CheckboardModule, ColorWrap, toState } from 'ngx-color';
|
4
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
import * as i1 from "ngx-color";
|
7
|
+
export class AlphaPickerComponent extends ColorWrap {
|
8
|
+
constructor() {
|
9
|
+
super();
|
10
|
+
/** Pixel value for picker width */
|
11
|
+
this.width = 316;
|
12
|
+
/** Pixel value for picker height */
|
13
|
+
this.height = 16;
|
14
|
+
this.direction = 'horizontal';
|
15
|
+
this.pointer = {
|
16
|
+
width: '18px',
|
17
|
+
height: '18px',
|
18
|
+
borderRadius: '50%',
|
19
|
+
transform: 'translate(-9px, -2px)',
|
20
|
+
boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)',
|
21
|
+
};
|
22
|
+
}
|
23
|
+
ngOnChanges() {
|
24
|
+
if (this.direction === 'vertical') {
|
25
|
+
this.pointer.transform = 'translate(-3px, -9px)';
|
26
|
+
}
|
27
|
+
this.setState(toState(this.color, this.oldHue));
|
28
|
+
}
|
29
|
+
handlePickerChange({ data, $event }) {
|
30
|
+
this.handleChange(data, $event);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
AlphaPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlphaPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
34
|
+
AlphaPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: AlphaPickerComponent, selector: "color-alpha-picker", inputs: { width: "width", height: "height", direction: "direction" }, providers: [
|
35
|
+
{
|
36
|
+
provide: NG_VALUE_ACCESSOR,
|
37
|
+
useExisting: forwardRef(() => AlphaPickerComponent),
|
38
|
+
multi: true,
|
39
|
+
},
|
40
|
+
{
|
41
|
+
provide: ColorWrap,
|
42
|
+
useExisting: forwardRef(() => AlphaPickerComponent)
|
43
|
+
}
|
44
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
45
|
+
<div class="alpha-picker {{ className }}"
|
46
|
+
[style.width.px]="width" [style.height.px]="height">
|
47
|
+
<color-alpha
|
48
|
+
[hsl]="hsl"
|
49
|
+
[rgb]="rgb"
|
50
|
+
[pointer]="pointer"
|
51
|
+
[direction]="direction"
|
52
|
+
(onChange)="handlePickerChange($event)"
|
53
|
+
></color-alpha>
|
54
|
+
</div>
|
55
|
+
`, isInline: true, styles: [".alpha-picker{position:relative}.color-alpha{radius:2px}\n"], dependencies: [{ kind: "component", type: i1.AlphaComponent, selector: "color-alpha", inputs: ["hsl", "rgb", "pointer", "shadow", "radius", "direction"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlphaPickerComponent, decorators: [{
|
57
|
+
type: Component,
|
58
|
+
args: [{ selector: 'color-alpha-picker', template: `
|
59
|
+
<div class="alpha-picker {{ className }}"
|
60
|
+
[style.width.px]="width" [style.height.px]="height">
|
61
|
+
<color-alpha
|
62
|
+
[hsl]="hsl"
|
63
|
+
[rgb]="rgb"
|
64
|
+
[pointer]="pointer"
|
65
|
+
[direction]="direction"
|
66
|
+
(onChange)="handlePickerChange($event)"
|
67
|
+
></color-alpha>
|
68
|
+
</div>
|
69
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, providers: [
|
70
|
+
{
|
71
|
+
provide: NG_VALUE_ACCESSOR,
|
72
|
+
useExisting: forwardRef(() => AlphaPickerComponent),
|
73
|
+
multi: true,
|
74
|
+
},
|
75
|
+
{
|
76
|
+
provide: ColorWrap,
|
77
|
+
useExisting: forwardRef(() => AlphaPickerComponent)
|
78
|
+
}
|
79
|
+
], styles: [".alpha-picker{position:relative}.color-alpha{radius:2px}\n"] }]
|
80
|
+
}], ctorParameters: function () { return []; }, propDecorators: { width: [{
|
81
|
+
type: Input
|
82
|
+
}], height: [{
|
83
|
+
type: Input
|
84
|
+
}], direction: [{
|
85
|
+
type: Input
|
86
|
+
}] } });
|
87
|
+
export class ColorAlphaModule {
|
88
|
+
}
|
89
|
+
ColorAlphaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorAlphaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
90
|
+
ColorAlphaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: ColorAlphaModule, declarations: [AlphaPickerComponent], imports: [CommonModule, AlphaModule, CheckboardModule], exports: [AlphaPickerComponent] });
|
91
|
+
ColorAlphaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorAlphaModule, imports: [CommonModule, AlphaModule, CheckboardModule] });
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorAlphaModule, decorators: [{
|
93
|
+
type: NgModule,
|
94
|
+
args: [{
|
95
|
+
declarations: [AlphaPickerComponent],
|
96
|
+
exports: [AlphaPickerComponent],
|
97
|
+
imports: [CommonModule, AlphaModule, CheckboardModule],
|
98
|
+
}]
|
99
|
+
}] });
|
100
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxwaGEtcGlja2VyLmNvbXBvbmVudC5qcyIsInNv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BbHBoYVBpY2tlckNvbXBvbmVudF0sXG4gIGltcG9ydHM6IFtDb21tb25Nb2R1bGUsIEFscGhhTW9kdWxlLCBDaGVja2JvYXJkTW9kdWxlXSxcbn0pXG5leHBvcnQgY2xhc3MgQ29sb3JBbHBoYU1vZHVsZSB7fVxuIl19
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* Generated bundle index. Do not edit.
|
3
|
+
*/
|
4
|
+
export * from './public_api';
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNvbG9yLWFscGhhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9hbHBoYS9uZ3gtY29sb3ItYWxwaGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export { AlphaPickerComponent, ColorAlphaModule } from './alpha-picker.component';
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvYWxwaGEvcHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IEFscGhhUGlja2VyQ29tcG9uZW50LCBDb2xvckFscGhhTW9kdWxlIH0gZnJvbSAnLi9hbHBoYS1waWNrZXIuY29tcG9uZW50JztcbiJdfQ==
|
@@ -78,8 +78,8 @@ export class AlphaComponent {
|
|
78
78
|
this.onChange.emit({ data, $event });
|
79
79
|
}
|
80
80
|
}
|
81
|
-
AlphaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
82
|
-
AlphaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
81
|
+
AlphaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlphaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
82
|
+
AlphaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: AlphaComponent, selector: "color-alpha", inputs: { hsl: "hsl", rgb: "rgb", pointer: "pointer", shadow: "shadow", radius: "radius", direction: "direction" }, outputs: { onChange: "onChange" }, usesOnChanges: true, ngImport: i0, template: `
|
83
83
|
<div class="alpha" [style.border-radius]="radius">
|
84
84
|
<div class="alpha-checkboard">
|
85
85
|
<color-checkboard></color-checkboard>
|
@@ -92,7 +92,7 @@ AlphaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version
|
|
92
92
|
</div>
|
93
93
|
</div>
|
94
94
|
`, isInline: true, styles: [".alpha{position:absolute;top:0;bottom:0;left:0;right:0}.alpha-checkboard{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.alpha-gradient{position:absolute;top:0;bottom:0;left:0;right:0}.alpha-container{position:relative;height:100%;margin:0 3px}.alpha-pointer{position:absolute}.alpha-slider{width:4px;border-radius:1px;height:8px;box-shadow:0 0 2px #0009;background:#fff;margin-top:1px;transform:translate(-2px)}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.CheckboardComponent, selector: "color-checkboard", inputs: ["white", "size", "grey", "boxShadow", "borderRadius"] }, { kind: "directive", type: i3.CoordinatesDirective, selector: "[ngx-color-coordinates]", outputs: ["coordinatesChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlphaComponent, decorators: [{
|
96
96
|
type: Component,
|
97
97
|
args: [{ selector: 'color-alpha', template: `
|
98
98
|
<div class="alpha" [style.border-radius]="radius">
|
@@ -124,10 +124,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
124
124
|
}] } });
|
125
125
|
export class AlphaModule {
|
126
126
|
}
|
127
|
-
AlphaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
128
|
-
AlphaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
129
|
-
AlphaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
127
|
+
AlphaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlphaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
128
|
+
AlphaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: AlphaModule, declarations: [AlphaComponent], imports: [CommonModule, CheckboardModule, CoordinatesModule], exports: [AlphaComponent] });
|
129
|
+
AlphaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlphaModule, imports: [CommonModule, CheckboardModule, CoordinatesModule] });
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlphaModule, decorators: [{
|
131
131
|
type: NgModule,
|
132
132
|
args: [{
|
133
133
|
declarations: [AlphaComponent],
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
import * as i1 from "@angular/common";
|
4
|
+
import * as i2 from "ngx-color";
|
5
|
+
export class BlockSwatchesComponent {
|
6
|
+
constructor() {
|
7
|
+
this.onClick = new EventEmitter();
|
8
|
+
this.onSwatchHover = new EventEmitter();
|
9
|
+
this.swatchStyle = {
|
10
|
+
width: '22px',
|
11
|
+
height: '22px',
|
12
|
+
float: 'left',
|
13
|
+
marginRight: '10px',
|
14
|
+
marginBottom: '10px',
|
15
|
+
borderRadius: '4px',
|
16
|
+
};
|
17
|
+
}
|
18
|
+
handleClick({ hex, $event }) {
|
19
|
+
this.onClick.emit({ hex, $event });
|
20
|
+
}
|
21
|
+
focusStyle(c) {
|
22
|
+
return {
|
23
|
+
boxShadow: `${c} 0 0 4px`,
|
24
|
+
};
|
25
|
+
}
|
26
|
+
}
|
27
|
+
BlockSwatchesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BlockSwatchesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
28
|
+
BlockSwatchesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: BlockSwatchesComponent, selector: "color-block-swatches", inputs: { colors: "colors" }, outputs: { onClick: "onClick", onSwatchHover: "onSwatchHover" }, ngImport: i0, template: `
|
29
|
+
<div class="block-swatches">
|
30
|
+
<color-swatch
|
31
|
+
*ngFor="let c of colors"
|
32
|
+
[color]="c"
|
33
|
+
[style]="swatchStyle"
|
34
|
+
[focusStyle]="focusStyle(c)"
|
35
|
+
(onClick)="handleClick($event)"
|
36
|
+
(onHover)="onSwatchHover.emit($event)"
|
37
|
+
></color-swatch>
|
38
|
+
<div class="clear"></div>
|
39
|
+
</div>
|
40
|
+
`, isInline: true, styles: [".block-swatches{margin-right:-10px}.clear{clear:both}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2.SwatchComponent, selector: "color-swatch", inputs: ["color", "style", "focusStyle", "focus"], outputs: ["onClick", "onHover"] }] });
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BlockSwatchesComponent, decorators: [{
|
42
|
+
type: Component,
|
43
|
+
args: [{ selector: 'color-block-swatches', template: `
|
44
|
+
<div class="block-swatches">
|
45
|
+
<color-swatch
|
46
|
+
*ngFor="let c of colors"
|
47
|
+
[color]="c"
|
48
|
+
[style]="swatchStyle"
|
49
|
+
[focusStyle]="focusStyle(c)"
|
50
|
+
(onClick)="handleClick($event)"
|
51
|
+
(onHover)="onSwatchHover.emit($event)"
|
52
|
+
></color-swatch>
|
53
|
+
<div class="clear"></div>
|
54
|
+
</div>
|
55
|
+
`, styles: [".block-swatches{margin-right:-10px}.clear{clear:both}\n"] }]
|
56
|
+
}], propDecorators: { colors: [{
|
57
|
+
type: Input
|
58
|
+
}], onClick: [{
|
59
|
+
type: Output
|
60
|
+
}], onSwatchHover: [{
|
61
|
+
type: Output
|
62
|
+
}] } });
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2stc3dhdGNoZXMuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9ibG9jay9ibG9jay1zd2F0Y2hlcy5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxNQ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