@zag-js/color-picker 0.0.0-dev-20230605141821 → 0.0.0-dev-20230605145913

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,4 +1,4 @@
1
- import { Color, ColorChannel, ColorFormat } from "@zag-js/color-utils";
1
+ import { Color, type ColorChannel, type ColorFormat } from "@zag-js/color-utils";
2
2
  import { NormalizeProps, type PropTypes } from "@zag-js/types";
3
3
  import { ColorAreaProps, ColorChannelInputProps, ColorChannelProps, ColorSwatchProps, Send, State } from "./color-picker.types";
4
4
  export declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): {
@@ -1,4 +1,4 @@
1
- import { ColorChannel } from "@zag-js/color-utils";
1
+ import { type ColorChannel } from "@zag-js/color-utils";
2
2
  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: {
@@ -1,4 +1,4 @@
1
- import { Color, ColorAxes, ColorChannel } from "@zag-js/color-utils";
1
+ import { Color, type ColorAxes, type ColorChannel, type ColorFormat } from "@zag-js/color-utils";
2
2
  import type { StateMachine as S } from "@zag-js/core";
3
3
  import type { CommonProperties, Context, Orientation, RequiredBy } from "@zag-js/types";
4
4
  export type ColorChannelProps = {
@@ -96,4 +96,4 @@ export type MachineState = {
96
96
  };
97
97
  export type State = S.State<MachineContext, MachineState>;
98
98
  export type Send = S.Send<S.AnyEventObject>;
99
- export {};
99
+ export type { Color, ColorChannel, ColorFormat };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { anatomy } from "./color-picker.anatomy";
2
2
  export { connect } from "./color-picker.connect";
3
3
  export { machine } from "./color-picker.machine";
4
- export type { ColorAreaProps, ColorChannelProps, ColorSwatchProps, UserDefinedContext as Context, } from "./color-picker.types";
4
+ export type { Color, ColorAreaProps, ColorChannel, ColorChannelProps, ColorSwatchProps, UserDefinedContext as Context, } from "./color-picker.types";
@@ -1,4 +1,4 @@
1
- import type { ColorAxes, Color, ColorChannel } from '@zag-js/color-utils';
1
+ import type { 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,2 @@
1
- import { Color, ColorChannel } from "@zag-js/color-utils";
1
+ import { Color, type ColorChannel } from "@zag-js/color-utils";
2
2
  export declare function getChannelDisplayColor(color: Color, channel: ColorChannel): Color;
@@ -1,5 +1,5 @@
1
1
  import type { JSX } from '@zag-js/types';
2
- import { ColorChannel } from "@zag-js/color-utils";
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): {
5
5
  areaStyles: JSX.CSSProperties;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/color-picker",
3
- "version": "0.0.0-dev-20230605141821",
3
+ "version": "0.0.0-dev-20230605145913",
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.0.0-dev-20230605141821",
32
- "@zag-js/anatomy": "0.0.0-dev-20230605141821",
33
- "@zag-js/dom-query": "0.0.0-dev-20230605141821",
34
- "@zag-js/dom-event": "0.0.0-dev-20230605141821",
35
- "@zag-js/utils": "0.0.0-dev-20230605141821",
36
- "@zag-js/color-utils": "0.0.0-dev-20230605141821",
37
- "@zag-js/numeric-range": "0.0.0-dev-20230605141821",
38
- "@zag-js/text-selection": "0.0.0-dev-20230605141821",
39
- "@zag-js/types": "0.0.0-dev-20230605141821"
31
+ "@zag-js/core": "0.0.0-dev-20230605145913",
32
+ "@zag-js/anatomy": "0.0.0-dev-20230605145913",
33
+ "@zag-js/dom-query": "0.0.0-dev-20230605145913",
34
+ "@zag-js/dom-event": "0.0.0-dev-20230605145913",
35
+ "@zag-js/utils": "0.0.0-dev-20230605145913",
36
+ "@zag-js/color-utils": "0.0.0-dev-20230605145913",
37
+ "@zag-js/numeric-range": "0.0.0-dev-20230605145913",
38
+ "@zag-js/text-selection": "0.0.0-dev-20230605145913",
39
+ "@zag-js/types": "0.0.0-dev-20230605145913"
40
40
  },
41
41
  "devDependencies": {
42
42
  "clean-package": "2.2.0"
@@ -1,4 +1,4 @@
1
- import { Color, ColorChannel, ColorFormat, normalizeColor } from "@zag-js/color-utils"
1
+ import { Color, normalizeColor, type ColorChannel, type ColorFormat } from "@zag-js/color-utils"
2
2
  import {
3
3
  EventKeyMap,
4
4
  getEventKey,
@@ -1,4 +1,4 @@
1
- import { ColorChannel } from "@zag-js/color-utils"
1
+ import { type ColorChannel } from "@zag-js/color-utils"
2
2
  import { getRelativePoint, type Point } from "@zag-js/dom-event"
3
3
  import { createScope, queryAll } from "@zag-js/dom-query"
4
4
  import type { MachineContext as Ctx } from "./color-picker.types"
@@ -1,4 +1,4 @@
1
- import { Color, ColorAxes, ColorChannel } from "@zag-js/color-utils"
1
+ import { Color, type ColorAxes, type ColorChannel, type ColorFormat } from "@zag-js/color-utils"
2
2
  import type { StateMachine as S } from "@zag-js/core"
3
3
  import type { CommonProperties, Context, Orientation, RequiredBy } from "@zag-js/types"
4
4
 
@@ -111,3 +111,5 @@ export type MachineState = {
111
111
  export type State = S.State<MachineContext, MachineState>
112
112
 
113
113
  export type Send = S.Send<S.AnyEventObject>
114
+
115
+ export type { Color, ColorChannel, ColorFormat }
package/src/index.ts CHANGED
@@ -2,7 +2,9 @@ export { anatomy } from "./color-picker.anatomy"
2
2
  export { connect } from "./color-picker.connect"
3
3
  export { machine } from "./color-picker.machine"
4
4
  export type {
5
+ Color,
5
6
  ColorAreaProps,
7
+ ColorChannel,
6
8
  ColorChannelProps,
7
9
  ColorSwatchProps,
8
10
  UserDefinedContext as Context,
@@ -1,5 +1,5 @@
1
- import { Color, ColorChannel } from "@zag-js/color-utils"
2
- import { snapValueToStep, getPercentValue } from "@zag-js/numeric-range"
1
+ import { Color, type ColorChannel } from "@zag-js/color-utils"
2
+ import { getPercentValue, snapValueToStep } from "@zag-js/numeric-range"
3
3
 
4
4
  export function getChannelDetails(color: Color, xChannel: ColorChannel, yChannel: ColorChannel) {
5
5
  const channels = color.getColorSpaceAxes({ xChannel, yChannel })
@@ -1,4 +1,4 @@
1
- import { Color, ColorChannel, parseColor } from "@zag-js/color-utils"
1
+ import { Color, parseColor, type ColorChannel } from "@zag-js/color-utils"
2
2
 
3
3
  export function getChannelDisplayColor(color: Color, channel: ColorChannel) {
4
4
  switch (channel) {
@@ -1,4 +1,4 @@
1
- import { ColorChannel } from "@zag-js/color-utils"
1
+ import { type ColorChannel } from "@zag-js/color-utils"
2
2
  import { Style } from "@zag-js/types"
3
3
  import { MachineContext } from "../color-picker.types"
4
4
  import {