@zag-js/color-picker 0.10.3 → 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.
@@ -1,3 +1,3 @@
1
- import type { Anatomy, AnatomyPart } from '@zag-js/anatomy';
2
- export declare const anatomy: Anatomy<"content" | "label" | "area" | "areaThumb" | "areaGradient" | "channelSliderTrack" | "channelSliderTrackBg" | "channelSliderThumb" | "channelInput" | "swatch" | "swatchBg" | "eyeDropTrigger">;
3
- export declare const parts: Record<"content" | "label" | "area" | "areaThumb" | "areaGradient" | "channelSliderTrack" | "channelSliderTrackBg" | "channelSliderThumb" | "channelInput" | "swatch" | "swatchBg" | "eyeDropTrigger", AnatomyPart>;
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>;
@@ -3,22 +3,22 @@ import { type Point } from "@zag-js/dom-event";
3
3
  import type { MachineContext as Ctx } from "./color-picker.types";
4
4
  export declare const dom: {
5
5
  getRootNode: (ctx: {
6
- getRootNode?: (() => Node | ShadowRoot | Document) | undefined;
7
- }) => ShadowRoot | Document;
6
+ getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
7
+ }) => Document | ShadowRoot;
8
8
  getDoc: (ctx: {
9
- getRootNode?: (() => Node | ShadowRoot | Document) | undefined;
9
+ getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
10
10
  }) => Document;
11
11
  getWin: (ctx: {
12
- getRootNode?: (() => Node | ShadowRoot | Document) | undefined;
12
+ getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
13
13
  }) => Window & typeof globalThis;
14
14
  getActiveElement: (ctx: {
15
- getRootNode?: (() => Node | ShadowRoot | Document) | undefined;
15
+ getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
16
16
  }) => HTMLElement | null;
17
17
  getById: <T extends HTMLElement = HTMLElement>(ctx: {
18
- getRootNode?: (() => Node | ShadowRoot | Document) | undefined;
18
+ getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
19
19
  }, id: string) => T | null;
20
20
  queryById: <T_1 extends HTMLElement = HTMLElement>(ctx: {
21
- getRootNode?: (() => Node | ShadowRoot | Document) | undefined;
21
+ getRootNode?: (() => Document | Node | ShadowRoot) | undefined;
22
22
  }, id: string) => T_1;
23
23
  } & {
24
24
  getContentId: (ctx: Ctx) => string;
@@ -1,3 +1,3 @@
1
- import type { Machine, StateMachine } from '@zag-js/core';
1
+ import { Machine, StateMachine } from '@zag-js/core';
2
2
  import { MachineContext, MachineState, UserDefinedContext } from "./color-picker.types";
3
3
  export declare function machine(userContext: UserDefinedContext): Machine<MachineContext, MachineState, StateMachine.AnyEventObject>;
@@ -1,4 +1,4 @@
1
- import type { ColorAxes, Color, type ColorChannel } from '@zag-js/color-utils';
1
+ import { ColorAxes, Color, type ColorChannel } from '@zag-js/color-utils';
2
2
  export declare function getChannelDetails(color: Color, xChannel: ColorChannel, yChannel: ColorChannel): {
3
3
  channels: ColorAxes;
4
4
  xChannelStep: number;
@@ -1,2 +1,3 @@
1
+ import { ColorType } from '@zag-js/color-utils/src/types';
1
2
  import { Color, type ColorChannel } from "@zag-js/color-utils";
2
- export declare function getChannelDisplayColor(color: Color, channel: ColorChannel): Color;
3
+ export declare function getChannelDisplayColor(color: Color, channel: ColorChannel): ColorType;
@@ -1,4 +1,4 @@
1
- import type { ColorChannelRange } from '@zag-js/color-utils/src/types';
1
+ import { ColorChannelRange } from '@zag-js/color-utils/src/types';
2
2
  import { Color } from "@zag-js/color-utils";
3
3
  import { ExtendedColorChannel } from "../color-picker.types";
4
4
  export declare function getChannelInputValue(color: Color, channel: ExtendedColorChannel): string;
@@ -1,4 +1,4 @@
1
- import type { JSX } from '@zag-js/types';
1
+ import { JSX } from '@zag-js/types';
2
2
  import { type ColorChannel } from "@zag-js/color-utils";
3
3
  import { MachineContext } from "../color-picker.types";
4
4
  export declare function getColorAreaGradient(ctx: MachineContext, xChannel: ColorChannel, yChannel: ColorChannel): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/color-picker",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "description": "Core logic for the color-picker widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -28,15 +28,15 @@
28
28
  "url": "https://github.com/chakra-ui/zag/issues"
29
29
  },
30
30
  "dependencies": {
31
- "@zag-js/core": "0.10.3",
32
- "@zag-js/anatomy": "0.10.3",
33
- "@zag-js/dom-query": "0.10.3",
34
- "@zag-js/dom-event": "0.10.3",
35
- "@zag-js/utils": "0.10.3",
36
- "@zag-js/color-utils": "0.10.3",
37
- "@zag-js/numeric-range": "0.10.3",
38
- "@zag-js/text-selection": "0.10.3",
39
- "@zag-js/types": "0.10.3"
31
+ "@zag-js/core": "0.10.4",
32
+ "@zag-js/anatomy": "0.10.4",
33
+ "@zag-js/dom-query": "0.10.4",
34
+ "@zag-js/dom-event": "0.10.4",
35
+ "@zag-js/utils": "0.10.4",
36
+ "@zag-js/color-utils": "0.10.4",
37
+ "@zag-js/numeric-range": "0.10.4",
38
+ "@zag-js/text-selection": "0.10.4",
39
+ "@zag-js/types": "0.10.4"
40
40
  },
41
41
  "devDependencies": {
42
42
  "clean-package": "2.2.0"