@zag-js/color-picker 0.10.2 → 0.10.4
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/color-picker.anatomy.d.ts +3 -6
- package/dist/color-picker.anatomy.js +10 -33
- package/dist/color-picker.anatomy.mjs +19 -8
- package/dist/color-picker.connect.d.ts +4 -8
- package/dist/color-picker.connect.js +56 -436
- package/dist/color-picker.connect.mjs +368 -14
- package/dist/color-picker.dom.d.ts +27 -32
- package/dist/color-picker.dom.js +12 -34
- package/dist/color-picker.dom.mjs +33 -6
- package/dist/color-picker.machine.d.ts +3 -8
- package/dist/color-picker.machine.js +46 -163
- package/dist/color-picker.machine.mjs +335 -8
- package/dist/color-picker.types.d.ts +14 -16
- package/dist/index.d.ts +4 -8
- package/dist/index.js +8 -1085
- package/dist/index.mjs +3 -21
- package/dist/utils/generate-format-background.d.ts +9 -11
- package/dist/utils/generate-format-background.js +22 -53
- package/dist/utils/generate-format-background.mjs +120 -21
- package/dist/utils/get-channel-details.d.ts +3 -7
- package/dist/utils/get-channel-details.js +15 -37
- package/dist/utils/get-channel-details.mjs +53 -6
- package/dist/utils/get-channel-display-color.d.ts +3 -5
- package/dist/utils/get-channel-display-color.js +8 -30
- package/dist/utils/get-channel-display-color.mjs +22 -6
- package/dist/utils/get-channel-input-value.d.ts +5 -10
- package/dist/utils/get-channel-input-value.js +6 -30
- package/dist/utils/get-channel-input-value.mjs +21 -8
- package/dist/utils/get-color-area-gradient.d.ts +6 -10
- package/dist/utils/get-color-area-gradient.js +14 -158
- package/dist/utils/get-color-area-gradient.mjs +61 -7
- package/dist/utils/get-slider-background.d.ts +2 -8
- package/dist/utils/get-slider-background.js +6 -29
- package/dist/utils/get-slider-background.mjs +38 -5
- package/package.json +11 -16
- package/src/color-picker.connect.ts +1 -1
- package/src/color-picker.dom.ts +1 -1
- package/src/color-picker.types.ts +3 -1
- package/src/index.ts +2 -0
- package/src/utils/get-channel-details.ts +2 -2
- package/src/utils/get-channel-display-color.ts +1 -1
- package/src/utils/get-color-area-gradient.ts +1 -1
- package/dist/chunk-2ERX54SV.mjs +0 -25
- package/dist/chunk-3XH465XT.mjs +0 -42
- package/dist/chunk-5QSFKCT5.mjs +0 -393
- package/dist/chunk-75JXJMB5.mjs +0 -22
- package/dist/chunk-JNBNPPMF.mjs +0 -24
- package/dist/chunk-KLLIOTK6.mjs +0 -55
- package/dist/chunk-KO4TBUXB.mjs +0 -74
- package/dist/chunk-ML3WX6YS.mjs +0 -345
- package/dist/chunk-OY3B7NXA.mjs +0 -132
- package/dist/chunk-SPSDVZCT.mjs +0 -35
- package/dist/color-picker.types.js +0 -18
- package/dist/color-picker.types.mjs +0 -0
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
declare const parts: Record<"area" | "areaThumb" | "areaGradient" | "channelSliderTrack" | "channelSliderTrackBg" | "channelSliderThumb" | "channelInput" | "swatch" | "swatchBg" | "content" | "label" | "eyeDropTrigger", _zag_js_anatomy.AnatomyPart>;
|
|
5
|
-
|
|
6
|
-
export { anatomy, parts };
|
|
1
|
+
import { Anatomy, AnatomyPart } from '@zag-js/anatomy';
|
|
2
|
+
export declare const anatomy: Anatomy<"area" | "areaThumb" | "areaGradient" | "channelSliderTrack" | "channelSliderTrackBg" | "channelSliderThumb" | "channelInput" | "swatch" | "swatchBg" | "content" | "label" | "eyeDropTrigger">;
|
|
3
|
+
export declare const parts: Record<"area" | "areaThumb" | "areaGradient" | "channelSliderTrack" | "channelSliderTrackBg" | "channelSliderThumb" | "channelInput" | "swatch" | "swatchBg" | "content" | "label" | "eyeDropTrigger", AnatomyPart>;
|
|
@@ -1,31 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
'use strict';
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(color_picker_anatomy_exports);
|
|
27
|
-
var import_anatomy = require("@zag-js/anatomy");
|
|
28
|
-
var anatomy = (0, import_anatomy.createAnatomy)("color-picker", [
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const anatomy$1 = require('@zag-js/anatomy');
|
|
6
|
+
|
|
7
|
+
const anatomy = anatomy$1.createAnatomy("color-picker", [
|
|
29
8
|
"area",
|
|
30
9
|
"areaThumb",
|
|
31
10
|
"areaGradient",
|
|
@@ -39,9 +18,7 @@ var anatomy = (0, import_anatomy.createAnatomy)("color-picker", [
|
|
|
39
18
|
"label",
|
|
40
19
|
"eyeDropTrigger"
|
|
41
20
|
]);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
parts
|
|
47
|
-
});
|
|
21
|
+
const parts = anatomy.build();
|
|
22
|
+
|
|
23
|
+
exports.anatomy = anatomy;
|
|
24
|
+
exports.parts = parts;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { createAnatomy } from '@zag-js/anatomy';
|
|
2
|
+
|
|
3
|
+
const anatomy = createAnatomy("color-picker", [
|
|
4
|
+
"area",
|
|
5
|
+
"areaThumb",
|
|
6
|
+
"areaGradient",
|
|
7
|
+
"channelSliderTrack",
|
|
8
|
+
"channelSliderTrackBg",
|
|
9
|
+
"channelSliderThumb",
|
|
10
|
+
"channelInput",
|
|
11
|
+
"swatch",
|
|
12
|
+
"swatchBg",
|
|
13
|
+
"content",
|
|
14
|
+
"label",
|
|
15
|
+
"eyeDropTrigger"
|
|
16
|
+
]);
|
|
17
|
+
const parts = anatomy.build();
|
|
18
|
+
|
|
19
|
+
export { anatomy, parts };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { Color, ColorChannel, ColorFormat } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): {
|
|
1
|
+
import { Color, type ColorChannel, type ColorFormat } from "@zag-js/color-utils";
|
|
2
|
+
import { NormalizeProps, type PropTypes } from "@zag-js/types";
|
|
3
|
+
import { ColorAreaProps, ColorChannelInputProps, ColorChannelProps, ColorSwatchProps, Send, State } from "./color-picker.types";
|
|
4
|
+
export declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): {
|
|
7
5
|
/**
|
|
8
6
|
* Whether the color picker is being dragged
|
|
9
7
|
*/
|
|
@@ -44,5 +42,3 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
|
|
|
44
42
|
getSwatchBackgroundProps(props: ColorSwatchProps): T["element"];
|
|
45
43
|
getSwatchProps(props: ColorSwatchProps): T["element"];
|
|
46
44
|
};
|
|
47
|
-
|
|
48
|
-
export { connect };
|