@ax-design/reveal-highlight 0.3.0-alpha.6 → 0.4.0
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 -8
- package/build/BaseConfig.d.ts +43 -0
- package/build/BaseConfig.d.ts.map +1 -0
- package/build/CanvasConfig.d.ts +7 -92
- package/build/CanvasConfig.d.ts.map +1 -1
- package/build/CustomElements.d.ts +18 -4
- package/build/CustomElements.d.ts.map +1 -1
- package/build/Profiler.d.ts.map +1 -1
- package/build/RevealBoundryStore.d.ts +50 -10
- package/build/RevealBoundryStore.d.ts.map +1 -1
- package/build/RevealStateManager.d.ts +3 -0
- package/build/RevealStateManager.d.ts.map +1 -1
- package/build/SvgConfig.d.ts +17 -0
- package/build/SvgConfig.d.ts.map +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/main.js +169 -17
- package/build/utils/extractRGBValue.d.ts +2 -0
- package/build/utils/extractRGBValue.d.ts.map +1 -0
- package/build/utils/isValidateBorderDecorationType.d.ts +3 -0
- package/build/utils/isValidateBorderDecorationType.d.ts.map +1 -0
- package/build/utils/types.d.ts +103 -0
- package/build/utils/types.d.ts.map +1 -0
- package/build/variables.d.ts +1 -1
- package/build/variables.d.ts.map +1 -1
- package/docs/demo/index.html +70 -143
- package/docs/demo/ng.html +992 -0
- package/es/BaseConfig.d.ts +43 -0
- package/es/BaseConfig.d.ts.map +1 -0
- package/es/BaseConfig.js +220 -0
- package/es/BaseConfig.js.map +1 -0
- package/es/CanvasConfig.d.ts +7 -92
- package/es/CanvasConfig.d.ts.map +1 -1
- package/es/CanvasConfig.js +35 -233
- package/es/CanvasConfig.js.map +1 -1
- package/es/CustomElements.d.ts +18 -4
- package/es/CustomElements.d.ts.map +1 -1
- package/es/CustomElements.js +82 -7
- package/es/CustomElements.js.map +1 -1
- package/es/Profiler.d.ts.map +1 -1
- package/es/Profiler.js +0 -2
- package/es/Profiler.js.map +1 -1
- package/es/RevealBoundryStore.d.ts +50 -10
- package/es/RevealBoundryStore.d.ts.map +1 -1
- package/es/RevealBoundryStore.js +129 -35
- package/es/RevealBoundryStore.js.map +1 -1
- package/es/RevealStateManager.d.ts +3 -0
- package/es/RevealStateManager.d.ts.map +1 -1
- package/es/RevealStateManager.js +35 -8
- package/es/RevealStateManager.js.map +1 -1
- package/es/SvgConfig.d.ts +17 -0
- package/es/SvgConfig.d.ts.map +1 -0
- package/es/SvgConfig.js +346 -0
- package/es/SvgConfig.js.map +1 -0
- package/es/index.d.ts.map +1 -1
- package/es/index.js +15 -21
- package/es/index.js.map +1 -1
- package/es/utils/extractRGBValue.d.ts +2 -0
- package/es/utils/extractRGBValue.d.ts.map +1 -0
- package/es/utils/extractRGBValue.js +48 -0
- package/es/utils/extractRGBValue.js.map +1 -0
- package/es/utils/isValidateBorderDecorationType.d.ts +3 -0
- package/es/utils/isValidateBorderDecorationType.d.ts.map +1 -0
- package/es/utils/isValidateBorderDecorationType.js +10 -0
- package/es/utils/isValidateBorderDecorationType.js.map +1 -0
- package/es/utils/types.d.ts +103 -0
- package/es/utils/types.d.ts.map +1 -0
- package/es/utils/types.js +2 -0
- package/es/utils/types.js.map +1 -0
- package/es/variables.d.ts +1 -1
- package/es/variables.d.ts.map +1 -1
- package/es/variables.js +1 -1
- package/es/variables.js.map +1 -1
- package/package.json +30 -30
- package/src/BaseConfig.ts +311 -0
- package/src/CanvasConfig.ts +66 -377
- package/src/CustomElements.ts +97 -14
- package/src/Profiler.ts +0 -3
- package/src/RevealBoundryStore.ts +138 -39
- package/src/RevealStateManager.ts +40 -10
- package/src/SvgConfig.ts +422 -0
- package/src/index.ts +15 -21
- package/src/utils/extractRGBValue.ts +58 -0
- package/src/utils/isValidateBorderDecorationType.ts +8 -0
- package/src/utils/types.ts +106 -0
- package/src/variables.ts +1 -1
- package/.yarnrc.yml +0 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export type BorderDecoration = 'round' | 'bevel' | 'miter';
|
|
2
|
+
|
|
3
|
+
export interface CachedBoundingRect {
|
|
4
|
+
top: number;
|
|
5
|
+
left: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface CachedStyle {
|
|
11
|
+
color: string;
|
|
12
|
+
opacity: number;
|
|
13
|
+
trueFillRadius: [number, number];
|
|
14
|
+
borderColor: string;
|
|
15
|
+
borderFillRadius: number;
|
|
16
|
+
borderDecorationType: BorderDecoration;
|
|
17
|
+
borderDecorationRadius: number;
|
|
18
|
+
topLeftBorderDecorationRadius: number;
|
|
19
|
+
topRightBorderDecorationRadius: number;
|
|
20
|
+
bottomLeftBorderDecorationRadius: number;
|
|
21
|
+
bottomRightBorderDecorationRadius: number;
|
|
22
|
+
/**
|
|
23
|
+
* @param withLeftBorderFactor
|
|
24
|
+
* If the left border is shown, this value is 1, or the value is 0.
|
|
25
|
+
*/
|
|
26
|
+
withLeftBorderFactor: number;
|
|
27
|
+
/**
|
|
28
|
+
* @param withRightBorderFactor
|
|
29
|
+
* If the right border is shown, this value is 1, or the value is 0.
|
|
30
|
+
*/
|
|
31
|
+
withRightBorderFactor: number;
|
|
32
|
+
/**
|
|
33
|
+
* @param withTopBorderFactor
|
|
34
|
+
* If the top border is shown, this value is 1, or the value is 0.
|
|
35
|
+
*/
|
|
36
|
+
withTopBorderFactor: number;
|
|
37
|
+
/**
|
|
38
|
+
* @param withBottomBorderFactor
|
|
39
|
+
* If the bottom border is shown, this value is 1, or the value is 0.
|
|
40
|
+
*/
|
|
41
|
+
withBottomBorderFactor: number;
|
|
42
|
+
borderWidth: number;
|
|
43
|
+
hoverLight: boolean;
|
|
44
|
+
hoverLightColor: string;
|
|
45
|
+
hoverLightFillMode: string;
|
|
46
|
+
hoverLightFillRadius: number;
|
|
47
|
+
diffuse: boolean;
|
|
48
|
+
pressAnimation: boolean;
|
|
49
|
+
pressAnimationFillMode: string;
|
|
50
|
+
pressAnimationColor: string;
|
|
51
|
+
pressAnimationSpeed: number;
|
|
52
|
+
releaseAnimationAccelerateRate: number;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface CachedReveal {
|
|
56
|
+
radius: number;
|
|
57
|
+
radiusFactor: number;
|
|
58
|
+
color: string;
|
|
59
|
+
opacity: number;
|
|
60
|
+
pattern: CanvasPattern | null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Cached border and body pattern, for faster painting on the canvas.
|
|
65
|
+
* @interface CachedRevealBitmap
|
|
66
|
+
*/
|
|
67
|
+
export interface CachedRevealBitmap {
|
|
68
|
+
cachedReveal: {
|
|
69
|
+
borderReveal: CachedReveal;
|
|
70
|
+
fillReveal: CachedReveal;
|
|
71
|
+
};
|
|
72
|
+
cachedCanvas: {
|
|
73
|
+
borderReveal: HTMLCanvasElement;
|
|
74
|
+
fillReveal: HTMLCanvasElement;
|
|
75
|
+
};
|
|
76
|
+
cachedCtx: {
|
|
77
|
+
borderReveal: CanvasRenderingContext2D | null;
|
|
78
|
+
fillReveal: CanvasRenderingContext2D | null;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Cached border and body pattern, just to store something in similar way.
|
|
84
|
+
* @interface CachedRevealPath
|
|
85
|
+
*/
|
|
86
|
+
export interface CachedRevealPath {
|
|
87
|
+
cachedReveal: {
|
|
88
|
+
readonly borderReveal: CachedReveal;
|
|
89
|
+
readonly fillReveal: CachedReveal;
|
|
90
|
+
};
|
|
91
|
+
cachedPath: {
|
|
92
|
+
readonly borderReveal: SVGPathElement;
|
|
93
|
+
readonly fillReveal: SVGPathElement;
|
|
94
|
+
readonly rippleReveal: SVGPathElement;
|
|
95
|
+
};
|
|
96
|
+
cachedGradient: {
|
|
97
|
+
readonly borderReveal: SVGRadialGradientElement;
|
|
98
|
+
readonly fillReveal: SVGRadialGradientElement;
|
|
99
|
+
readonly rippleReveal: SVGRadialGradientElement;
|
|
100
|
+
};
|
|
101
|
+
cachedGradientStop: {
|
|
102
|
+
readonly borderReveal: Readonly<[SVGStopElement, SVGStopElement]>;
|
|
103
|
+
readonly fillReveal: Readonly<[SVGStopElement, SVGStopElement]>;
|
|
104
|
+
readonly rippleReveal: Readonly<[SVGStopElement, SVGStopElement, SVGStopElement]>;
|
|
105
|
+
};
|
|
106
|
+
}
|
package/src/variables.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const MAGIC_DEFAULT_COLOR = '
|
|
1
|
+
export const MAGIC_DEFAULT_COLOR = 'magic';
|
package/.yarnrc.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodeLinker: "node-modules"
|