@spectrum-web-components/color-area 0.35.1-rc.43 → 0.36.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.
@@ -0,0 +1,619 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "sp-color-area.js",
8
+ "declarations": [],
9
+ "exports": [
10
+ {
11
+ "kind": "custom-element-definition",
12
+ "name": "sp-color-area",
13
+ "declaration": {
14
+ "name": "ColorArea",
15
+ "module": "/src/ColorArea.js"
16
+ }
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "kind": "javascript-module",
22
+ "path": "src/ColorArea.js",
23
+ "declarations": [
24
+ {
25
+ "kind": "class",
26
+ "description": "",
27
+ "name": "ColorArea",
28
+ "slots": [
29
+ {
30
+ "description": "a custom gradient visually outlining the available color values",
31
+ "name": "gradient"
32
+ }
33
+ ],
34
+ "members": [
35
+ {
36
+ "kind": "field",
37
+ "name": "dir",
38
+ "type": {
39
+ "text": "'ltr' | 'rtl'"
40
+ },
41
+ "privacy": "public",
42
+ "attribute": "dir",
43
+ "reflects": true
44
+ },
45
+ {
46
+ "kind": "field",
47
+ "name": "disabled",
48
+ "type": {
49
+ "text": "boolean"
50
+ },
51
+ "privacy": "public",
52
+ "default": "false",
53
+ "attribute": "disabled",
54
+ "reflects": true
55
+ },
56
+ {
57
+ "kind": "field",
58
+ "name": "focused",
59
+ "type": {
60
+ "text": "boolean"
61
+ },
62
+ "privacy": "public",
63
+ "default": "false",
64
+ "attribute": "focused",
65
+ "reflects": true
66
+ },
67
+ {
68
+ "kind": "field",
69
+ "name": "label",
70
+ "type": {
71
+ "text": "string | undefined"
72
+ },
73
+ "privacy": "public",
74
+ "attribute": "label"
75
+ },
76
+ {
77
+ "kind": "field",
78
+ "name": "labelX",
79
+ "type": {
80
+ "text": "string"
81
+ },
82
+ "privacy": "public",
83
+ "default": "'saturation'",
84
+ "attribute": "label-x"
85
+ },
86
+ {
87
+ "kind": "field",
88
+ "name": "labelY",
89
+ "type": {
90
+ "text": "string"
91
+ },
92
+ "privacy": "public",
93
+ "default": "'luminosity'",
94
+ "attribute": "label-y"
95
+ },
96
+ {
97
+ "kind": "field",
98
+ "name": "handle",
99
+ "type": {
100
+ "text": "ColorHandle"
101
+ },
102
+ "privacy": "private"
103
+ },
104
+ {
105
+ "kind": "field",
106
+ "name": "languageResolver",
107
+ "privacy": "private",
108
+ "default": "new LanguageResolutionController(this)"
109
+ },
110
+ {
111
+ "kind": "field",
112
+ "name": "colorController",
113
+ "privacy": "private",
114
+ "default": "new ColorController(this, {\n extractColorFromState: () => ({\n h: this.hue,\n s: this.x,\n v: this.y,\n }),\n applyColorToState: ({ s, v }) => {\n this.x = s;\n this.y = v;\n },\n })"
115
+ },
116
+ {
117
+ "kind": "field",
118
+ "name": "hue",
119
+ "type": {
120
+ "text": "number"
121
+ },
122
+ "privacy": "public",
123
+ "attribute": "hue"
124
+ },
125
+ {
126
+ "kind": "field",
127
+ "name": "value",
128
+ "type": {
129
+ "text": "ColorValue"
130
+ },
131
+ "privacy": "public",
132
+ "readonly": true,
133
+ "attribute": "value"
134
+ },
135
+ {
136
+ "kind": "field",
137
+ "name": "color",
138
+ "type": {
139
+ "text": "ColorValue"
140
+ },
141
+ "privacy": "public",
142
+ "attribute": "color"
143
+ },
144
+ {
145
+ "kind": "field",
146
+ "name": "activeAxis",
147
+ "type": {
148
+ "text": "string"
149
+ },
150
+ "privacy": "private",
151
+ "default": "'x'"
152
+ },
153
+ {
154
+ "kind": "field",
155
+ "name": "x",
156
+ "type": {
157
+ "text": "number"
158
+ },
159
+ "privacy": "public",
160
+ "attribute": "x"
161
+ },
162
+ {
163
+ "kind": "field",
164
+ "name": "_x",
165
+ "type": {
166
+ "text": "number"
167
+ },
168
+ "privacy": "private",
169
+ "default": "1"
170
+ },
171
+ {
172
+ "kind": "field",
173
+ "name": "y",
174
+ "type": {
175
+ "text": "number"
176
+ },
177
+ "privacy": "public",
178
+ "attribute": "y"
179
+ },
180
+ {
181
+ "kind": "field",
182
+ "name": "_y",
183
+ "type": {
184
+ "text": "number"
185
+ },
186
+ "privacy": "private",
187
+ "default": "1"
188
+ },
189
+ {
190
+ "kind": "field",
191
+ "name": "step",
192
+ "type": {
193
+ "text": "number"
194
+ },
195
+ "privacy": "public",
196
+ "default": "0.01",
197
+ "attribute": "step"
198
+ },
199
+ {
200
+ "kind": "field",
201
+ "name": "inputX",
202
+ "type": {
203
+ "text": "HTMLInputElement"
204
+ },
205
+ "privacy": "public"
206
+ },
207
+ {
208
+ "kind": "field",
209
+ "name": "inputY",
210
+ "type": {
211
+ "text": "HTMLInputElement"
212
+ },
213
+ "privacy": "public"
214
+ },
215
+ {
216
+ "kind": "field",
217
+ "name": "altered",
218
+ "type": {
219
+ "text": "number"
220
+ },
221
+ "privacy": "private",
222
+ "default": "0"
223
+ },
224
+ {
225
+ "kind": "field",
226
+ "name": "activeKeys",
227
+ "privacy": "private",
228
+ "default": "new Set()"
229
+ },
230
+ {
231
+ "kind": "field",
232
+ "name": "_valueChanged",
233
+ "type": {
234
+ "text": "boolean"
235
+ },
236
+ "privacy": "private",
237
+ "default": "false"
238
+ },
239
+ {
240
+ "kind": "method",
241
+ "name": "focus",
242
+ "privacy": "public",
243
+ "return": {
244
+ "type": {
245
+ "text": "void"
246
+ }
247
+ },
248
+ "parameters": [
249
+ {
250
+ "name": "focusOptions",
251
+ "default": "{}",
252
+ "type": {
253
+ "text": "FocusOptions"
254
+ }
255
+ }
256
+ ]
257
+ },
258
+ {
259
+ "kind": "method",
260
+ "name": "forwardFocus",
261
+ "privacy": "private",
262
+ "return": {
263
+ "type": {
264
+ "text": "void"
265
+ }
266
+ }
267
+ },
268
+ {
269
+ "kind": "method",
270
+ "name": "handleFocus",
271
+ "privacy": "private",
272
+ "return": {
273
+ "type": {
274
+ "text": "void"
275
+ }
276
+ }
277
+ },
278
+ {
279
+ "kind": "method",
280
+ "name": "handleBlur",
281
+ "privacy": "private",
282
+ "return": {
283
+ "type": {
284
+ "text": "void"
285
+ }
286
+ }
287
+ },
288
+ {
289
+ "kind": "method",
290
+ "name": "handleKeydown",
291
+ "privacy": "private",
292
+ "return": {
293
+ "type": {
294
+ "text": "void"
295
+ }
296
+ },
297
+ "parameters": [
298
+ {
299
+ "name": "event",
300
+ "type": {
301
+ "text": "KeyboardEvent"
302
+ }
303
+ }
304
+ ]
305
+ },
306
+ {
307
+ "kind": "method",
308
+ "name": "handleKeypress",
309
+ "privacy": "private",
310
+ "return": {
311
+ "type": {
312
+ "text": "void"
313
+ }
314
+ }
315
+ },
316
+ {
317
+ "kind": "method",
318
+ "name": "handleKeyup",
319
+ "privacy": "private",
320
+ "return": {
321
+ "type": {
322
+ "text": "void"
323
+ }
324
+ },
325
+ "parameters": [
326
+ {
327
+ "name": "event",
328
+ "type": {
329
+ "text": "KeyboardEvent"
330
+ }
331
+ }
332
+ ]
333
+ },
334
+ {
335
+ "kind": "method",
336
+ "name": "handleInput",
337
+ "privacy": "private",
338
+ "return": {
339
+ "type": {
340
+ "text": "void"
341
+ }
342
+ },
343
+ "parameters": [
344
+ {
345
+ "name": "event",
346
+ "type": {
347
+ "text": "Event & { target: HTMLInputElement }"
348
+ }
349
+ }
350
+ ]
351
+ },
352
+ {
353
+ "kind": "method",
354
+ "name": "handleChange",
355
+ "privacy": "private",
356
+ "return": {
357
+ "type": {
358
+ "text": "void"
359
+ }
360
+ },
361
+ "parameters": [
362
+ {
363
+ "name": "event",
364
+ "type": {
365
+ "text": "Event & { target: HTMLInputElement }"
366
+ }
367
+ }
368
+ ]
369
+ },
370
+ {
371
+ "kind": "field",
372
+ "name": "boundingClientRect",
373
+ "type": {
374
+ "text": "DOMRect"
375
+ },
376
+ "privacy": "private"
377
+ },
378
+ {
379
+ "kind": "field",
380
+ "name": "_pointerDown",
381
+ "type": {
382
+ "text": "boolean"
383
+ },
384
+ "privacy": "private",
385
+ "default": "false"
386
+ },
387
+ {
388
+ "kind": "method",
389
+ "name": "handlePointerdown",
390
+ "privacy": "private",
391
+ "return": {
392
+ "type": {
393
+ "text": "void"
394
+ }
395
+ },
396
+ "parameters": [
397
+ {
398
+ "name": "event",
399
+ "type": {
400
+ "text": "PointerEvent"
401
+ }
402
+ }
403
+ ]
404
+ },
405
+ {
406
+ "kind": "method",
407
+ "name": "handlePointermove",
408
+ "privacy": "private",
409
+ "return": {
410
+ "type": {
411
+ "text": "void"
412
+ }
413
+ },
414
+ "parameters": [
415
+ {
416
+ "name": "event",
417
+ "type": {
418
+ "text": "PointerEvent"
419
+ }
420
+ }
421
+ ]
422
+ },
423
+ {
424
+ "kind": "method",
425
+ "name": "handlePointerup",
426
+ "privacy": "private",
427
+ "return": {
428
+ "type": {
429
+ "text": "void"
430
+ }
431
+ },
432
+ "parameters": [
433
+ {
434
+ "name": "event",
435
+ "type": {
436
+ "text": "PointerEvent"
437
+ }
438
+ }
439
+ ]
440
+ },
441
+ {
442
+ "kind": "method",
443
+ "name": "calculateHandlePosition",
444
+ "privacy": "private",
445
+ "return": {
446
+ "type": {
447
+ "text": ""
448
+ }
449
+ },
450
+ "parameters": [
451
+ {
452
+ "name": "event",
453
+ "type": {
454
+ "text": "PointerEvent"
455
+ }
456
+ },
457
+ {
458
+ "description": ": PointerEvent on slider",
459
+ "name": ""
460
+ }
461
+ ],
462
+ "description": "Returns the value under the cursor"
463
+ },
464
+ {
465
+ "kind": "method",
466
+ "name": "handleAreaPointerdown",
467
+ "privacy": "private",
468
+ "return": {
469
+ "type": {
470
+ "text": "void"
471
+ }
472
+ },
473
+ "parameters": [
474
+ {
475
+ "name": "event",
476
+ "type": {
477
+ "text": "PointerEvent"
478
+ }
479
+ }
480
+ ]
481
+ },
482
+ {
483
+ "kind": "field",
484
+ "name": "observer",
485
+ "type": {
486
+ "text": "WithSWCResizeObserver['ResizeObserver'] | undefined"
487
+ },
488
+ "privacy": "private"
489
+ }
490
+ ],
491
+ "events": [
492
+ {
493
+ "name": "input",
494
+ "type": {
495
+ "text": "Event"
496
+ },
497
+ "description": "The value of the Color Area has changed."
498
+ },
499
+ {
500
+ "name": "change",
501
+ "type": {
502
+ "text": "Event"
503
+ },
504
+ "description": "An alteration to the value of the Color Area has been committed by the user."
505
+ }
506
+ ],
507
+ "attributes": [
508
+ {
509
+ "name": "dir",
510
+ "type": {
511
+ "text": "'ltr' | 'rtl'"
512
+ },
513
+ "fieldName": "dir"
514
+ },
515
+ {
516
+ "name": "disabled",
517
+ "type": {
518
+ "text": "boolean"
519
+ },
520
+ "default": "false",
521
+ "fieldName": "disabled"
522
+ },
523
+ {
524
+ "name": "focused",
525
+ "type": {
526
+ "text": "boolean"
527
+ },
528
+ "default": "false",
529
+ "fieldName": "focused"
530
+ },
531
+ {
532
+ "name": "label",
533
+ "type": {
534
+ "text": "string | undefined"
535
+ },
536
+ "fieldName": "label"
537
+ },
538
+ {
539
+ "name": "label-x",
540
+ "type": {
541
+ "text": "string"
542
+ },
543
+ "default": "'saturation'",
544
+ "fieldName": "labelX"
545
+ },
546
+ {
547
+ "name": "label-y",
548
+ "type": {
549
+ "text": "string"
550
+ },
551
+ "default": "'luminosity'",
552
+ "fieldName": "labelY"
553
+ },
554
+ {
555
+ "name": "hue",
556
+ "type": {
557
+ "text": "number"
558
+ },
559
+ "fieldName": "hue"
560
+ },
561
+ {
562
+ "name": "value",
563
+ "type": {
564
+ "text": "ColorValue"
565
+ },
566
+ "readonly": true,
567
+ "fieldName": "value"
568
+ },
569
+ {
570
+ "name": "color",
571
+ "type": {
572
+ "text": "ColorValue"
573
+ },
574
+ "fieldName": "color"
575
+ },
576
+ {
577
+ "name": "x",
578
+ "type": {
579
+ "text": "number"
580
+ },
581
+ "fieldName": "x"
582
+ },
583
+ {
584
+ "name": "y",
585
+ "type": {
586
+ "text": "number"
587
+ },
588
+ "fieldName": "y"
589
+ },
590
+ {
591
+ "name": "step",
592
+ "type": {
593
+ "text": "number"
594
+ },
595
+ "default": "0.01",
596
+ "fieldName": "step"
597
+ }
598
+ ],
599
+ "superclass": {
600
+ "name": "SpectrumElement",
601
+ "package": "@spectrum-web-components/base"
602
+ },
603
+ "tagName": "sp-color-area",
604
+ "customElement": true
605
+ }
606
+ ],
607
+ "exports": [
608
+ {
609
+ "kind": "js",
610
+ "name": "ColorArea",
611
+ "declaration": {
612
+ "name": "ColorArea",
613
+ "module": "src/ColorArea.js"
614
+ }
615
+ }
616
+ ]
617
+ }
618
+ ]
619
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/color-area",
3
- "version": "0.35.1-rc.43+432051b80",
3
+ "version": "0.36.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -62,12 +62,12 @@
62
62
  ],
63
63
  "dependencies": {
64
64
  "@ctrl/tinycolor": "^3.3.3",
65
- "@spectrum-web-components/base": "^0.35.1-rc.43+432051b80",
66
- "@spectrum-web-components/color-handle": "^0.35.1-rc.43+432051b80",
67
- "@spectrum-web-components/reactive-controllers": "^0.35.1-rc.43+432051b80"
65
+ "@spectrum-web-components/base": "^0.36.0",
66
+ "@spectrum-web-components/color-handle": "^0.36.0",
67
+ "@spectrum-web-components/reactive-controllers": "^0.36.0"
68
68
  },
69
69
  "devDependencies": {
70
- "@spectrum-css/colorarea": "^4.0.29"
70
+ "@spectrum-css/colorarea": "^4.0.33"
71
71
  },
72
72
  "types": "./src/index.d.ts",
73
73
  "customElements": "custom-elements.json",
@@ -75,5 +75,5 @@
75
75
  "./sp-*.js",
76
76
  "./**/*.dev.js"
77
77
  ],
78
- "gitHead": "432051b8085e7c86032333fa296bfa5334d47d84"
78
+ "gitHead": "a532ff8a410abeefb54d9638a2316ae82570566e"
79
79
  }