@destyler/color-picker 0.0.7-beta.7 → 0.0.7-beta.9
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/dist/index.d.ts +293 -292
- package/dist/index.js +1449 -0
- package/package.json +14 -21
- package/dist/index.cjs +0 -1453
- package/dist/index.d.cts +0 -334
- package/dist/index.d.mts +0 -334
- package/dist/index.mjs +0 -1448
package/dist/index.d.ts
CHANGED
|
@@ -1,334 +1,335 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import * as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
export { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from '@zag-js/dismissable';
|
|
9
|
-
import { PositioningOptions } from '@zag-js/popper';
|
|
10
|
-
export { PositioningOptions } from '@zag-js/popper';
|
|
11
|
-
|
|
12
|
-
declare const anatomy: _zag_js_anatomy.Anatomy<"root" | "label" | "control" | "trigger" | "positioner" | "content" | "area" | "areaThumb" | "valueText" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderTrack" | "channelSliderThumb" | "channelSliderValueText" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger" | "formatSelect">;
|
|
1
|
+
import * as _destyler_anatomy0 from "@destyler/anatomy";
|
|
2
|
+
import { Color, Color as Color$1, ColorAxes, ColorChannel, ColorFormat, ColorType } from "@destyler/color";
|
|
3
|
+
import { PositioningOptions } from "@destyler/popper";
|
|
4
|
+
import { FocusOutsideEvent, InteractOutsideEvent, InteractOutsideHandlers, PointerDownOutsideEvent } from "@destyler/dismissable";
|
|
5
|
+
import * as _destyler_xstate0 from "@destyler/xstate";
|
|
6
|
+
import { AnyEventObject, Machine, XSend, XState } from "@destyler/xstate";
|
|
7
|
+
import { CommonProperties, DirectionProperty, NormalizeProps, Orientation, PropTypes, RequiredBy } from "@destyler/types";
|
|
13
8
|
|
|
9
|
+
//#region src/anatomy.d.ts
|
|
10
|
+
declare const anatomy: _destyler_anatomy0.Anatomy<"root" | "label" | "control" | "trigger" | "positioner" | "content" | "area" | "areaThumb" | "valueText" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderTrack" | "channelSliderThumb" | "channelSliderValueText" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger" | "formatSelect">;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/types.d.ts
|
|
14
13
|
type ExtendedColorChannel = ColorChannel | 'hex' | 'css';
|
|
15
14
|
interface EyeDropper {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
new (): EyeDropper;
|
|
16
|
+
open: (options?: {
|
|
17
|
+
signal?: AbortSignal;
|
|
18
|
+
}) => Promise<{
|
|
19
|
+
sRGBHex: string;
|
|
20
|
+
}>;
|
|
21
|
+
[Symbol.toStringTag]: 'EyeDropper';
|
|
23
22
|
}
|
|
24
23
|
declare global {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
interface Window {
|
|
25
|
+
EyeDropper: EyeDropper;
|
|
26
|
+
}
|
|
28
27
|
}
|
|
29
28
|
interface ValueChangeDetails {
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
value: Color;
|
|
30
|
+
valueAsString: string;
|
|
32
31
|
}
|
|
33
32
|
interface OpenChangeDetails {
|
|
34
|
-
|
|
33
|
+
open: boolean;
|
|
35
34
|
}
|
|
36
35
|
interface FormatChangeDetails {
|
|
37
|
-
|
|
36
|
+
format: ColorFormat;
|
|
38
37
|
}
|
|
39
38
|
type ElementIds = Partial<{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
39
|
+
root: string;
|
|
40
|
+
control: string;
|
|
41
|
+
trigger: string;
|
|
42
|
+
label: string;
|
|
43
|
+
input: string;
|
|
44
|
+
hiddenInput: string;
|
|
45
|
+
content: string;
|
|
46
|
+
area: string;
|
|
47
|
+
areaGradient: string;
|
|
48
|
+
positioner: string;
|
|
49
|
+
formatSelect: string;
|
|
50
|
+
areaThumb: string;
|
|
51
|
+
channelInput: (id: string) => string;
|
|
52
|
+
channelSliderTrack: (id: ColorChannel) => string;
|
|
53
|
+
channelSliderThumb: (id: ColorChannel) => string;
|
|
55
54
|
}>;
|
|
56
55
|
interface PublicContext extends CommonProperties, DirectionProperty, InteractOutsideHandlers {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
56
|
+
/**
|
|
57
|
+
* The ids of the elements in the color picker. Useful for composition.
|
|
58
|
+
*/
|
|
59
|
+
'ids'?: ElementIds | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* The current color value
|
|
62
|
+
* @default #000000
|
|
63
|
+
*/
|
|
64
|
+
'value': Color;
|
|
65
|
+
/**
|
|
66
|
+
* Whether the color picker is disabled
|
|
67
|
+
*/
|
|
68
|
+
'disabled'?: boolean | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Whether the color picker is read-only
|
|
71
|
+
*/
|
|
72
|
+
'readOnly'?: boolean | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Whether the color picker is required
|
|
75
|
+
*/
|
|
76
|
+
'required'?: boolean | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Whether the color picker is invalid
|
|
79
|
+
*/
|
|
80
|
+
'invalid'?: boolean | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Handler that is called when the value changes, as the user drags.
|
|
83
|
+
*/
|
|
84
|
+
'onValueChange'?: ((details: ValueChangeDetails) => void) | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Handler that is called when the user stops dragging.
|
|
87
|
+
*/
|
|
88
|
+
'onValueChangeEnd'?: ((details: ValueChangeDetails) => void) | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Handler that is called when the user opens or closes the color picker.
|
|
91
|
+
*/
|
|
92
|
+
'onOpenChange'?: ((details: OpenChangeDetails) => void) | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* The name for the form input
|
|
95
|
+
*/
|
|
96
|
+
'name'?: string | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* The positioning options for the color picker
|
|
99
|
+
*/
|
|
100
|
+
'positioning': PositioningOptions;
|
|
101
|
+
/**
|
|
102
|
+
* The initial focus element when the color picker is opened.
|
|
103
|
+
*/
|
|
104
|
+
'initialFocusEl'?: (() => HTMLElement | null) | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Whether the color picker is open
|
|
107
|
+
*/
|
|
108
|
+
'open'?: boolean | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* Whether the color picker open state is controlled by the user
|
|
111
|
+
*/
|
|
112
|
+
'open.controlled'?: boolean | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* The color format to use
|
|
115
|
+
* @default "rgba"
|
|
116
|
+
*/
|
|
117
|
+
'format': ColorFormat;
|
|
118
|
+
/**
|
|
119
|
+
* Function called when the color format changes
|
|
120
|
+
*/
|
|
121
|
+
'onFormatChange'?: ((details: FormatChangeDetails) => void) | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Whether to close the color picker when a swatch is selected
|
|
124
|
+
* @default false
|
|
125
|
+
*/
|
|
126
|
+
'closeOnSelect'?: boolean | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Whether to auto focus the color picker when it is opened
|
|
129
|
+
* @default true
|
|
130
|
+
*/
|
|
131
|
+
'openAutoFocus'?: boolean | undefined;
|
|
133
132
|
}
|
|
134
133
|
interface PrivateContext {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
134
|
+
/**
|
|
135
|
+
* @internal
|
|
136
|
+
* The id of the thumb that is currently being dragged
|
|
137
|
+
*/
|
|
138
|
+
activeId: string | null;
|
|
139
|
+
/**
|
|
140
|
+
* @internal
|
|
141
|
+
* The channel that is currently being interacted with
|
|
142
|
+
*/
|
|
143
|
+
activeChannel: Partial<ColorAxes> | null;
|
|
144
|
+
/**
|
|
145
|
+
* @internal
|
|
146
|
+
* The orientation of the channel that is currently being interacted with
|
|
147
|
+
*/
|
|
148
|
+
activeOrientation: Orientation | null;
|
|
149
|
+
/**
|
|
150
|
+
* @internal
|
|
151
|
+
* Whether the checkbox's fieldset is disabled
|
|
152
|
+
*/
|
|
153
|
+
fieldsetDisabled: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* @internal
|
|
156
|
+
* The current placement of the color picker
|
|
157
|
+
*/
|
|
158
|
+
currentPlacement?: PositioningOptions['placement'] | undefined;
|
|
159
|
+
/**
|
|
160
|
+
* @internal
|
|
161
|
+
* Whether the color picker should return focus to the trigger when closed
|
|
162
|
+
*/
|
|
163
|
+
restoreFocus?: boolean | undefined;
|
|
165
164
|
}
|
|
166
165
|
type ComputedContext = Readonly<{
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
166
|
+
/**
|
|
167
|
+
* @computed
|
|
168
|
+
* Whether the color picker is in RTL mode
|
|
169
|
+
*/
|
|
170
|
+
isRtl: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* @computed
|
|
173
|
+
* Whether the color picker is interactive
|
|
174
|
+
*/
|
|
175
|
+
isInteractive: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* @computed
|
|
178
|
+
* The color value as a Color object
|
|
179
|
+
*/
|
|
180
|
+
valueAsString: string;
|
|
181
|
+
/**
|
|
182
|
+
* @computed
|
|
183
|
+
* Whether the color picker is disabled
|
|
184
|
+
*/
|
|
185
|
+
isDisabled: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* @computed
|
|
188
|
+
* The area value as a Color object
|
|
189
|
+
*/
|
|
190
|
+
areaValue: Color;
|
|
192
191
|
}>;
|
|
193
192
|
type UserDefinedContext = RequiredBy<PublicContext, 'id'>;
|
|
194
|
-
interface MachineContext extends PublicContext, PrivateContext, ComputedContext {
|
|
195
|
-
}
|
|
193
|
+
interface MachineContext extends PublicContext, PrivateContext, ComputedContext {}
|
|
196
194
|
interface MachineState {
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
tags: 'open' | 'closed' | 'dragging' | 'focused';
|
|
196
|
+
value: 'idle' | 'focused' | 'open' | 'open:dragging';
|
|
199
197
|
}
|
|
200
|
-
type State =
|
|
201
|
-
type Send =
|
|
202
|
-
type Service = Machine<MachineContext, MachineState,
|
|
198
|
+
type State = XState<MachineContext, MachineState>;
|
|
199
|
+
type Send = XSend<AnyEventObject>;
|
|
200
|
+
type Service = Machine<MachineContext, MachineState, AnyEventObject>;
|
|
203
201
|
interface ChannelProps {
|
|
204
|
-
|
|
205
|
-
|
|
202
|
+
channel: ColorChannel;
|
|
203
|
+
orientation?: Orientation | undefined;
|
|
206
204
|
}
|
|
207
205
|
interface ChannelSliderProps extends ChannelProps {
|
|
208
|
-
|
|
206
|
+
format?: ColorFormat | undefined;
|
|
209
207
|
}
|
|
210
208
|
interface ChannelInputProps {
|
|
211
|
-
|
|
212
|
-
|
|
209
|
+
channel: ExtendedColorChannel;
|
|
210
|
+
orientation?: Orientation | undefined;
|
|
213
211
|
}
|
|
214
212
|
interface AreaProps {
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
xChannel?: ColorChannel | undefined;
|
|
214
|
+
yChannel?: ColorChannel | undefined;
|
|
217
215
|
}
|
|
218
216
|
interface SwatchTriggerProps {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
217
|
+
/**
|
|
218
|
+
* The color value
|
|
219
|
+
*/
|
|
220
|
+
value: string | Color;
|
|
221
|
+
/**
|
|
222
|
+
* Whether the swatch trigger is disabled
|
|
223
|
+
*/
|
|
224
|
+
disabled?: boolean | undefined;
|
|
227
225
|
}
|
|
228
226
|
interface SwatchTriggerState {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
227
|
+
value: Color;
|
|
228
|
+
valueAsString: string;
|
|
229
|
+
checked: boolean;
|
|
230
|
+
disabled: boolean;
|
|
233
231
|
}
|
|
234
232
|
interface SwatchProps {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
233
|
+
/**
|
|
234
|
+
* The color value
|
|
235
|
+
*/
|
|
236
|
+
value: string | Color;
|
|
237
|
+
/**
|
|
238
|
+
* Whether to include the alpha channel in the color
|
|
239
|
+
*/
|
|
240
|
+
respectAlpha?: boolean | undefined;
|
|
243
241
|
}
|
|
244
242
|
interface TransparencyGridProps {
|
|
245
|
-
|
|
243
|
+
size?: string | undefined;
|
|
246
244
|
}
|
|
247
245
|
interface MachineApi<T extends PropTypes = PropTypes> {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
246
|
+
/**
|
|
247
|
+
* Whether the color picker is being dragged
|
|
248
|
+
*/
|
|
249
|
+
dragging: boolean;
|
|
250
|
+
/**
|
|
251
|
+
* Whether the color picker is open
|
|
252
|
+
*/
|
|
253
|
+
open: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* The current color value (as a string)
|
|
256
|
+
*/
|
|
257
|
+
value: Color;
|
|
258
|
+
/**
|
|
259
|
+
* The current color value (as a Color object)
|
|
260
|
+
*/
|
|
261
|
+
valueAsString: string;
|
|
262
|
+
/**
|
|
263
|
+
* Function to set the color value
|
|
264
|
+
*/
|
|
265
|
+
setValue: (value: string | Color) => void;
|
|
266
|
+
/**
|
|
267
|
+
* Function to set the color value
|
|
268
|
+
*/
|
|
269
|
+
getChannelValue: (channel: ColorChannel) => string;
|
|
270
|
+
/**
|
|
271
|
+
* Function to get the formatted and localized value of a specific channel
|
|
272
|
+
*/
|
|
273
|
+
getChannelValueText: (channel: ColorChannel, locale: string) => string;
|
|
274
|
+
/**
|
|
275
|
+
* Function to set the color value of a specific channel
|
|
276
|
+
*/
|
|
277
|
+
setChannelValue: (channel: ColorChannel, value: number) => void;
|
|
278
|
+
/**
|
|
279
|
+
* The current color format
|
|
280
|
+
*/
|
|
281
|
+
format: ColorFormat;
|
|
282
|
+
/**
|
|
283
|
+
* Function to set the color format
|
|
284
|
+
*/
|
|
285
|
+
setFormat: (format: ColorFormat) => void;
|
|
286
|
+
/**
|
|
287
|
+
* The alpha value of the color
|
|
288
|
+
*/
|
|
289
|
+
alpha: number;
|
|
290
|
+
/**
|
|
291
|
+
* Function to set the color alpha
|
|
292
|
+
*/
|
|
293
|
+
setAlpha: (value: number) => void;
|
|
294
|
+
/**
|
|
295
|
+
* Function to open or close the color picker
|
|
296
|
+
*/
|
|
297
|
+
setOpen: (open: boolean) => void;
|
|
298
|
+
getRootProps: () => T['element'];
|
|
299
|
+
getLabelProps: () => T['element'];
|
|
300
|
+
getControlProps: () => T['element'];
|
|
301
|
+
getTriggerProps: () => T['button'];
|
|
302
|
+
getPositionerProps: () => T['element'];
|
|
303
|
+
getContentProps: () => T['element'];
|
|
304
|
+
getHiddenInputProps: () => T['input'];
|
|
305
|
+
getValueTextProps: () => T['element'];
|
|
306
|
+
getAreaProps: (props?: AreaProps) => T['element'];
|
|
307
|
+
getAreaBackgroundProps: (props?: AreaProps) => T['element'];
|
|
308
|
+
getAreaThumbProps: (props?: AreaProps) => T['element'];
|
|
309
|
+
getChannelInputProps: (props: ChannelInputProps) => T['input'];
|
|
310
|
+
getChannelSliderProps: (props: ChannelSliderProps) => T['element'];
|
|
311
|
+
getChannelSliderTrackProps: (props: ChannelSliderProps) => T['element'];
|
|
312
|
+
getChannelSliderThumbProps: (props: ChannelSliderProps) => T['element'];
|
|
313
|
+
getChannelSliderLabelProps: (props: ChannelProps) => T['element'];
|
|
314
|
+
getChannelSliderValueTextProps: (props: ChannelProps) => T['element'];
|
|
315
|
+
getTransparencyGridProps: (props?: TransparencyGridProps) => T['element'];
|
|
316
|
+
getEyeDropperTriggerProps: () => T['button'];
|
|
317
|
+
getSwatchGroupProps: () => T['element'];
|
|
318
|
+
getSwatchTriggerProps: (props: SwatchTriggerProps) => T['button'];
|
|
319
|
+
getSwatchTriggerState: (props: SwatchTriggerProps) => SwatchTriggerState;
|
|
320
|
+
getSwatchProps: (props: SwatchProps) => T['element'];
|
|
321
|
+
getSwatchIndicatorProps: (props: SwatchProps) => T['element'];
|
|
322
|
+
getFormatSelectProps: () => T['select'];
|
|
323
|
+
getFormatTriggerProps: () => T['button'];
|
|
326
324
|
}
|
|
327
|
-
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region src/connect.d.ts
|
|
328
327
|
declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): MachineApi<T>;
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
328
|
+
//#endregion
|
|
329
|
+
//#region src/machine.d.ts
|
|
330
|
+
declare function machine(userContext: UserDefinedContext): _destyler_xstate0.Machine<MachineContext, MachineState, _destyler_xstate0.AnyEventObject>;
|
|
331
|
+
//#endregion
|
|
332
|
+
//#region src/parse.d.ts
|
|
333
|
+
declare function parse(colorString: string): Color$1;
|
|
334
|
+
//#endregion
|
|
335
|
+
export { type MachineApi as Api, type AreaProps, type ChannelInputProps, type ChannelProps, type ChannelSliderProps, type Color, type ColorAxes, type ColorChannel, type ColorFormat, type ColorType, type UserDefinedContext as Context, type ElementIds, type FocusOutsideEvent, type FormatChangeDetails, type InteractOutsideEvent, type OpenChangeDetails, type PointerDownOutsideEvent, type PositioningOptions, type Service, type SwatchProps, type SwatchTriggerProps, type SwatchTriggerState, type TransparencyGridProps, type ValueChangeDetails, anatomy, connect, machine, parse };
|