@pixerate/editor 0.146.0 → 0.147.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 +3 -1
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/agent/index.cjs +36 -34
- package/dist/agent/index.js +7 -5
- package/dist/animation/index.cjs +5 -3
- package/dist/animation/index.js +4 -2
- package/dist/animation-editor/index.cjs +62 -60
- package/dist/animation-editor/index.js +6 -4
- package/dist/canvas/index.cjs +36 -34
- package/dist/canvas/index.js +19 -17
- package/dist/chart/index.cjs +88 -86
- package/dist/chart/index.js +7 -5
- package/dist/{chunk-WBJ6BG4R.js → chunk-2AQL4JHM.js} +6 -6
- package/dist/{chunk-HLMF3E53.cjs → chunk-2WDZI6QD.cjs} +15 -15
- package/dist/{chunk-ZNHB5RG6.js → chunk-37RLSNQ3.js} +2 -2
- package/dist/{chunk-5WOY52O6.cjs → chunk-4YQKRHMI.cjs} +8 -8
- package/dist/chunk-6ONMQ6WF.js +113 -0
- package/dist/{chunk-L434J57V.cjs → chunk-6QTON3VW.cjs} +16 -16
- package/dist/chunk-AA34BA7G.js +1913 -0
- package/dist/{chunk-QX25HWFL.js → chunk-AY65VQSU.js} +1 -1
- package/dist/{chunk-ONZJD2OD.cjs → chunk-BROJYMWU.cjs} +57 -153
- package/dist/{chunk-YM75DN54.js → chunk-DSZCDNTM.js} +1 -1
- package/dist/{chunk-PUR6BZFA.cjs → chunk-DVLMW3GB.cjs} +53 -53
- package/dist/{chunk-ALUWD3FG.js → chunk-EIUTJPEL.js} +1 -1
- package/dist/{chunk-X65C4DWV.js → chunk-EQ4SF4X4.js} +1 -1
- package/dist/{chunk-77SG47WT.js → chunk-FLOGD3QB.js} +1 -1
- package/dist/{chunk-AJSW5GMP.js → chunk-HVQVHUTV.js} +19 -115
- package/dist/{chunk-UR37VCIR.cjs → chunk-I4AHLP7F.cjs} +16 -35
- package/dist/chunk-IPJ3TEYR.cjs +113 -0
- package/dist/chunk-KY3FYKP3.js +52 -0
- package/dist/chunk-LEUZ4FRC.cjs +52 -0
- package/dist/{chunk-H6FX45CP.cjs → chunk-LIXLD433.cjs} +37 -37
- package/dist/{chunk-6GAYGQDC.js → chunk-O5ML2I6O.js} +3 -3
- package/dist/{chunk-KI2VBONS.js → chunk-OET45HIR.js} +2 -2
- package/dist/{chunk-XNZWATSB.cjs → chunk-QCEQIRJQ.cjs} +85 -85
- package/dist/{chunk-HRI3ZMDM.cjs → chunk-RHXW4TA5.cjs} +3 -3
- package/dist/{chunk-UUTTJK77.cjs → chunk-SUF6WRXR.cjs} +2 -2
- package/dist/{chunk-RN767PO6.js → chunk-SUVZJ2CP.js} +15 -34
- package/dist/{chunk-FLUTRPLY.cjs → chunk-TLMRGLQQ.cjs} +16 -16
- package/dist/{chunk-DAS7M4RY.js → chunk-UILRJQFD.js} +2 -2
- package/dist/chunk-UKCJ43YL.cjs +1913 -0
- package/dist/{chunk-XQ33O5BC.cjs → chunk-X35BV5YT.cjs} +44 -44
- package/dist/{chunk-6HMEHNWW.cjs → chunk-XTU6QO2W.cjs} +26 -26
- package/dist/{chunk-VM6JYWXQ.js → chunk-ZQUANEK4.js} +2 -2
- package/dist/cms/index.cjs +5 -3
- package/dist/cms/index.js +18 -16
- package/dist/color/contrast.d.cts +14 -0
- package/dist/color/contrast.d.ts +14 -0
- package/dist/color/convert.d.cts +30 -0
- package/dist/color/convert.d.ts +30 -0
- package/dist/color/dual.d.cts +98 -0
- package/dist/color/dual.d.ts +98 -0
- package/dist/color/format.d.cts +12 -0
- package/dist/color/format.d.ts +12 -0
- package/dist/color/gamut.d.cts +12 -0
- package/dist/color/gamut.d.ts +12 -0
- package/dist/color/harmony.d.cts +22 -0
- package/dist/color/harmony.d.ts +22 -0
- package/dist/color/index.cjs +115 -0
- package/dist/color/index.d.cts +18 -0
- package/dist/color/index.d.ts +18 -0
- package/dist/color/index.js +115 -0
- package/dist/color/mix.d.cts +11 -0
- package/dist/color/mix.d.ts +11 -0
- package/dist/color/named.d.cts +5 -0
- package/dist/color/named.d.ts +5 -0
- package/dist/color/parse.d.cts +11 -0
- package/dist/color/parse.d.ts +11 -0
- package/dist/color/picker.d.cts +52 -0
- package/dist/color/picker.d.ts +52 -0
- package/dist/color/recent.d.cts +8 -0
- package/dist/color/recent.d.ts +8 -0
- package/dist/color/tools.d.cts +15 -0
- package/dist/color/tools.d.ts +15 -0
- package/dist/color/types.d.cts +41 -0
- package/dist/color/types.d.ts +41 -0
- package/dist/color/vision.d.cts +36 -0
- package/dist/color/vision.d.ts +36 -0
- package/dist/export/index.cjs +6 -4
- package/dist/export/index.js +5 -3
- package/dist/extensions/index.cjs +10 -8
- package/dist/extensions/index.js +9 -7
- package/dist/gradient/controller.d.cts +109 -0
- package/dist/gradient/controller.d.ts +109 -0
- package/dist/gradient/editor.d.cts +38 -0
- package/dist/gradient/editor.d.ts +38 -0
- package/dist/gradient/index.cjs +1549 -0
- package/dist/gradient/index.d.cts +5 -0
- package/dist/gradient/index.d.ts +5 -0
- package/dist/gradient/index.js +1549 -0
- package/dist/gradient/model.d.cts +94 -0
- package/dist/gradient/model.d.ts +94 -0
- package/dist/gradient/tools.d.cts +11 -0
- package/dist/gradient/tools.d.ts +11 -0
- package/dist/gradient/types.d.cts +44 -0
- package/dist/gradient/types.d.ts +44 -0
- package/dist/image-editor/index.cjs +649 -647
- package/dist/image-editor/index.js +6 -4
- package/dist/index.cjs +19 -17
- package/dist/index.js +16 -14
- package/dist/paint-editor/color.d.cts +3 -13
- package/dist/paint-editor/color.d.ts +3 -13
- package/dist/paint-editor/index.cjs +23 -68
- package/dist/paint-editor/index.js +15 -60
- package/dist/vector/index.cjs +950 -948
- package/dist/vector/index.js +5 -3
- package/dist/video-editor/index.cjs +5 -3
- package/dist/video-editor/index.js +4 -2
- package/package.json +21 -1
- package/skills/README.md +1 -0
- package/skills/pixerate-color/SKILL.md +69 -0
- package/dist/chunk-45VRG4RB.js +0 -65
- package/dist/chunk-5FXOR7F2.cjs +0 -65
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { type ColorScheme, type ColorValue } from '../color/index.cjs';
|
|
2
|
+
import type { Gradient, GradientStop } from './types.cjs';
|
|
3
|
+
/** Formula matching gradientMidpointRemap from vector/gradient.ts */
|
|
4
|
+
export declare function gradientMidpointRemap(u: number, m: number): number;
|
|
5
|
+
/**
|
|
6
|
+
* Normalises an arbitrary gradient input into a validated Gradient object.
|
|
7
|
+
* Returns `{ gradient: Gradient }` or `{ error: string }`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function normalizeGradient(input: unknown): {
|
|
10
|
+
gradient: Gradient;
|
|
11
|
+
} | {
|
|
12
|
+
error: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Creates a Gradient with evenly spaced stops from an array of colors or options.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createGradient(colorsOrOptions?: readonly string[] | (Partial<Gradient> & {
|
|
18
|
+
stops?: readonly GradientStop[] | readonly string[];
|
|
19
|
+
}), options?: Partial<Omit<Gradient, 'stops'>>): Gradient;
|
|
20
|
+
/**
|
|
21
|
+
* Helper to check if a colour value represents a dual colour (light-dark string or DualColor object).
|
|
22
|
+
*/
|
|
23
|
+
export declare function isDualColorValue(val: unknown): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Checks whether any stop in the gradient has a dual colour (`light-dark()`).
|
|
26
|
+
*/
|
|
27
|
+
export declare function isDualGradient(g: Gradient): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Resolves a gradient for a specific ColorScheme ('light' or 'dark').
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveGradient(g: Gradient, scheme: ColorScheme): Gradient;
|
|
32
|
+
/**
|
|
33
|
+
* Samples a gradient at t (0–1), returning a hex colour string.
|
|
34
|
+
*/
|
|
35
|
+
export declare function sampleGradient(g: Gradient, t: number, scheme?: ColorScheme): string;
|
|
36
|
+
/**
|
|
37
|
+
* Inserts a new stop at the given offset.
|
|
38
|
+
* When colour is omitted, samples the gradient at that offset.
|
|
39
|
+
*/
|
|
40
|
+
export declare function insertGradientStop(g: Gradient, offset: number, color?: string): {
|
|
41
|
+
gradient: Gradient;
|
|
42
|
+
stop: GradientStop;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Updates a gradient stop by id. Throws sentence error if id not found.
|
|
46
|
+
*/
|
|
47
|
+
export declare function updateGradientStop(g: Gradient, id: string, patch: {
|
|
48
|
+
offset?: number;
|
|
49
|
+
color?: string;
|
|
50
|
+
midpoint?: number;
|
|
51
|
+
}): Gradient;
|
|
52
|
+
/**
|
|
53
|
+
* Removes a gradient stop by id. Refuses to go below 2 stops.
|
|
54
|
+
*/
|
|
55
|
+
export declare function removeGradientStop(g: Gradient, id: string): Gradient;
|
|
56
|
+
/**
|
|
57
|
+
* Reverses gradient stops (offsets become 1 - offset, midpoints become 1 - midpoint).
|
|
58
|
+
*/
|
|
59
|
+
export declare function reverseGradient(g: Gradient): Gradient;
|
|
60
|
+
/**
|
|
61
|
+
* Distributes stops evenly between 0 and 1 while preserving order.
|
|
62
|
+
*/
|
|
63
|
+
export declare function distributeGradientStops(g: Gradient): Gradient;
|
|
64
|
+
/**
|
|
65
|
+
* Formats a Gradient into standard CSS.
|
|
66
|
+
*/
|
|
67
|
+
export declare function gradientToCss(g: Gradient): string;
|
|
68
|
+
/**
|
|
69
|
+
* Fallback CSS gradient for legacy engines: expanded sRGB stops with no hints and no light-dark.
|
|
70
|
+
*/
|
|
71
|
+
export declare function gradientToCssFallback(g: Gradient, steps?: number, scheme?: ColorScheme): string;
|
|
72
|
+
/**
|
|
73
|
+
* Parses CSS linear-gradient, radial-gradient, conic-gradient strings.
|
|
74
|
+
* Returns null if invalid or unsupported.
|
|
75
|
+
*/
|
|
76
|
+
export declare function parseCssGradient(css: string): Gradient | null;
|
|
77
|
+
/**
|
|
78
|
+
* Generates an SVG `<linearGradient>` or `<radialGradient>` element string with sampled stops.
|
|
79
|
+
*/
|
|
80
|
+
export declare function gradientToSvgDef(g: Gradient, id: string, scheme?: ColorScheme): string;
|
|
81
|
+
/**
|
|
82
|
+
* Checks a gradient for issues (too close, out of sRGB, banding) and lowest text contrast.
|
|
83
|
+
*/
|
|
84
|
+
export declare function checkGradient(g: Gradient, options?: {
|
|
85
|
+
surface?: ColorValue;
|
|
86
|
+
text?: ColorValue;
|
|
87
|
+
}): {
|
|
88
|
+
issues: string[];
|
|
89
|
+
lowestTextContrast?: number | {
|
|
90
|
+
light: number;
|
|
91
|
+
dark: number;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export declare const GRADIENT_PRESETS: Readonly<Record<string, Gradient>>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { type ColorScheme, type ColorValue } from '../color/index.js';
|
|
2
|
+
import type { Gradient, GradientStop } from './types.js';
|
|
3
|
+
/** Formula matching gradientMidpointRemap from vector/gradient.ts */
|
|
4
|
+
export declare function gradientMidpointRemap(u: number, m: number): number;
|
|
5
|
+
/**
|
|
6
|
+
* Normalises an arbitrary gradient input into a validated Gradient object.
|
|
7
|
+
* Returns `{ gradient: Gradient }` or `{ error: string }`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function normalizeGradient(input: unknown): {
|
|
10
|
+
gradient: Gradient;
|
|
11
|
+
} | {
|
|
12
|
+
error: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Creates a Gradient with evenly spaced stops from an array of colors or options.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createGradient(colorsOrOptions?: readonly string[] | (Partial<Gradient> & {
|
|
18
|
+
stops?: readonly GradientStop[] | readonly string[];
|
|
19
|
+
}), options?: Partial<Omit<Gradient, 'stops'>>): Gradient;
|
|
20
|
+
/**
|
|
21
|
+
* Helper to check if a colour value represents a dual colour (light-dark string or DualColor object).
|
|
22
|
+
*/
|
|
23
|
+
export declare function isDualColorValue(val: unknown): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Checks whether any stop in the gradient has a dual colour (`light-dark()`).
|
|
26
|
+
*/
|
|
27
|
+
export declare function isDualGradient(g: Gradient): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Resolves a gradient for a specific ColorScheme ('light' or 'dark').
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveGradient(g: Gradient, scheme: ColorScheme): Gradient;
|
|
32
|
+
/**
|
|
33
|
+
* Samples a gradient at t (0–1), returning a hex colour string.
|
|
34
|
+
*/
|
|
35
|
+
export declare function sampleGradient(g: Gradient, t: number, scheme?: ColorScheme): string;
|
|
36
|
+
/**
|
|
37
|
+
* Inserts a new stop at the given offset.
|
|
38
|
+
* When colour is omitted, samples the gradient at that offset.
|
|
39
|
+
*/
|
|
40
|
+
export declare function insertGradientStop(g: Gradient, offset: number, color?: string): {
|
|
41
|
+
gradient: Gradient;
|
|
42
|
+
stop: GradientStop;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Updates a gradient stop by id. Throws sentence error if id not found.
|
|
46
|
+
*/
|
|
47
|
+
export declare function updateGradientStop(g: Gradient, id: string, patch: {
|
|
48
|
+
offset?: number;
|
|
49
|
+
color?: string;
|
|
50
|
+
midpoint?: number;
|
|
51
|
+
}): Gradient;
|
|
52
|
+
/**
|
|
53
|
+
* Removes a gradient stop by id. Refuses to go below 2 stops.
|
|
54
|
+
*/
|
|
55
|
+
export declare function removeGradientStop(g: Gradient, id: string): Gradient;
|
|
56
|
+
/**
|
|
57
|
+
* Reverses gradient stops (offsets become 1 - offset, midpoints become 1 - midpoint).
|
|
58
|
+
*/
|
|
59
|
+
export declare function reverseGradient(g: Gradient): Gradient;
|
|
60
|
+
/**
|
|
61
|
+
* Distributes stops evenly between 0 and 1 while preserving order.
|
|
62
|
+
*/
|
|
63
|
+
export declare function distributeGradientStops(g: Gradient): Gradient;
|
|
64
|
+
/**
|
|
65
|
+
* Formats a Gradient into standard CSS.
|
|
66
|
+
*/
|
|
67
|
+
export declare function gradientToCss(g: Gradient): string;
|
|
68
|
+
/**
|
|
69
|
+
* Fallback CSS gradient for legacy engines: expanded sRGB stops with no hints and no light-dark.
|
|
70
|
+
*/
|
|
71
|
+
export declare function gradientToCssFallback(g: Gradient, steps?: number, scheme?: ColorScheme): string;
|
|
72
|
+
/**
|
|
73
|
+
* Parses CSS linear-gradient, radial-gradient, conic-gradient strings.
|
|
74
|
+
* Returns null if invalid or unsupported.
|
|
75
|
+
*/
|
|
76
|
+
export declare function parseCssGradient(css: string): Gradient | null;
|
|
77
|
+
/**
|
|
78
|
+
* Generates an SVG `<linearGradient>` or `<radialGradient>` element string with sampled stops.
|
|
79
|
+
*/
|
|
80
|
+
export declare function gradientToSvgDef(g: Gradient, id: string, scheme?: ColorScheme): string;
|
|
81
|
+
/**
|
|
82
|
+
* Checks a gradient for issues (too close, out of sRGB, banding) and lowest text contrast.
|
|
83
|
+
*/
|
|
84
|
+
export declare function checkGradient(g: Gradient, options?: {
|
|
85
|
+
surface?: ColorValue;
|
|
86
|
+
text?: ColorValue;
|
|
87
|
+
}): {
|
|
88
|
+
issues: string[];
|
|
89
|
+
lowestTextContrast?: number | {
|
|
90
|
+
light: number;
|
|
91
|
+
dark: number;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export declare const GRADIENT_PRESETS: Readonly<Record<string, Gradient>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AgentToolProvider } from '../tools/registry.cjs';
|
|
2
|
+
import { type GradientController } from './controller.cjs';
|
|
3
|
+
export interface GradientToolProviderOptions {
|
|
4
|
+
/** Provider id (unique per registry). Default `gradient`. */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
7
|
+
namespace?: string;
|
|
8
|
+
/** Read-only reason string or boolean, or getter. Write tools are suppressed if read-only. */
|
|
9
|
+
readOnly?: boolean | string | (() => boolean | string);
|
|
10
|
+
}
|
|
11
|
+
export declare function createGradientToolProvider(controller: GradientController, options?: GradientToolProviderOptions): AgentToolProvider;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AgentToolProvider } from '../tools/registry.js';
|
|
2
|
+
import { type GradientController } from './controller.js';
|
|
3
|
+
export interface GradientToolProviderOptions {
|
|
4
|
+
/** Provider id (unique per registry). Default `gradient`. */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
7
|
+
namespace?: string;
|
|
8
|
+
/** Read-only reason string or boolean, or getter. Write tools are suppressed if read-only. */
|
|
9
|
+
readOnly?: boolean | string | (() => boolean | string);
|
|
10
|
+
}
|
|
11
|
+
export declare function createGradientToolProvider(controller: GradientController, options?: GradientToolProviderOptions): AgentToolProvider;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS-shaped gradient model types.
|
|
3
|
+
*
|
|
4
|
+
* Gradients are opt-in: `@pixerate/editor/color` never imports gradient code.
|
|
5
|
+
*/
|
|
6
|
+
export type GradientType = 'linear' | 'radial' | 'conic';
|
|
7
|
+
export type GradientInterpolation = 'srgb' | 'srgb-linear' | 'oklab' | 'oklch';
|
|
8
|
+
export interface GradientStop {
|
|
9
|
+
/** Stable id, unique within the gradient (e.g. "s1"). Assigned by the model when missing. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** 0–1 along the gradient. */
|
|
12
|
+
offset: number;
|
|
13
|
+
/**
|
|
14
|
+
* Any CSS colour, or a dual colour as `light-dark(a, b)` (Phase 5). Stored normalised by
|
|
15
|
+
* `normalizeGradient`: hex, or `light-dark(#a, #b)` when the halves differ.
|
|
16
|
+
*/
|
|
17
|
+
color: string;
|
|
18
|
+
/** 0.05–0.95: where between this stop and the next the colours are half mixed (default 0.5, CSS colour hint). */
|
|
19
|
+
midpoint?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface Gradient {
|
|
22
|
+
type: GradientType;
|
|
23
|
+
stops: GradientStop[];
|
|
24
|
+
/** Linear and conic: degrees, CSS convention (0 = to top, 90 = to right, default 180 = to bottom). */
|
|
25
|
+
angle?: number;
|
|
26
|
+
/** Radial and conic: centre, 0–1 of the box (default 0.5, 0.5). */
|
|
27
|
+
center?: {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
};
|
|
31
|
+
/** Radial: 'circle' or 'ellipse' (default 'ellipse', CSS farthest-corner). */
|
|
32
|
+
shape?: 'circle' | 'ellipse';
|
|
33
|
+
/** Default 'oklab'. */
|
|
34
|
+
interpolation?: GradientInterpolation;
|
|
35
|
+
/** Repeat the stop pattern (CSS repeating-*-gradient). Default false. */
|
|
36
|
+
repeating?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export type GradientShape = 'circle' | 'ellipse';
|
|
39
|
+
export interface GradientCheckOptions {
|
|
40
|
+
surface?: string;
|
|
41
|
+
text?: string;
|
|
42
|
+
fontSize?: number;
|
|
43
|
+
bold?: boolean;
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS-shaped gradient model types.
|
|
3
|
+
*
|
|
4
|
+
* Gradients are opt-in: `@pixerate/editor/color` never imports gradient code.
|
|
5
|
+
*/
|
|
6
|
+
export type GradientType = 'linear' | 'radial' | 'conic';
|
|
7
|
+
export type GradientInterpolation = 'srgb' | 'srgb-linear' | 'oklab' | 'oklch';
|
|
8
|
+
export interface GradientStop {
|
|
9
|
+
/** Stable id, unique within the gradient (e.g. "s1"). Assigned by the model when missing. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** 0–1 along the gradient. */
|
|
12
|
+
offset: number;
|
|
13
|
+
/**
|
|
14
|
+
* Any CSS colour, or a dual colour as `light-dark(a, b)` (Phase 5). Stored normalised by
|
|
15
|
+
* `normalizeGradient`: hex, or `light-dark(#a, #b)` when the halves differ.
|
|
16
|
+
*/
|
|
17
|
+
color: string;
|
|
18
|
+
/** 0.05–0.95: where between this stop and the next the colours are half mixed (default 0.5, CSS colour hint). */
|
|
19
|
+
midpoint?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface Gradient {
|
|
22
|
+
type: GradientType;
|
|
23
|
+
stops: GradientStop[];
|
|
24
|
+
/** Linear and conic: degrees, CSS convention (0 = to top, 90 = to right, default 180 = to bottom). */
|
|
25
|
+
angle?: number;
|
|
26
|
+
/** Radial and conic: centre, 0–1 of the box (default 0.5, 0.5). */
|
|
27
|
+
center?: {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
};
|
|
31
|
+
/** Radial: 'circle' or 'ellipse' (default 'ellipse', CSS farthest-corner). */
|
|
32
|
+
shape?: 'circle' | 'ellipse';
|
|
33
|
+
/** Default 'oklab'. */
|
|
34
|
+
interpolation?: GradientInterpolation;
|
|
35
|
+
/** Repeat the stop pattern (CSS repeating-*-gradient). Default false. */
|
|
36
|
+
repeating?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export type GradientShape = 'circle' | 'ellipse';
|
|
39
|
+
export interface GradientCheckOptions {
|
|
40
|
+
surface?: string;
|
|
41
|
+
text?: string;
|
|
42
|
+
fontSize?: number;
|
|
43
|
+
bold?: boolean;
|
|
44
|
+
}
|