@zag-js/color-picker 0.81.1 → 0.82.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.
package/dist/index.js CHANGED
@@ -6,7 +6,6 @@ var domQuery = require('@zag-js/dom-query');
6
6
  var popper = require('@zag-js/popper');
7
7
  var core = require('@zag-js/core');
8
8
  var dismissable = require('@zag-js/dismissable');
9
- var formUtils = require('@zag-js/form-utils');
10
9
  var utils = require('@zag-js/utils');
11
10
 
12
11
  // src/color-picker.anatomy.ts
@@ -1142,7 +1141,7 @@ function machine(userContext) {
1142
1141
  },
1143
1142
  activities: {
1144
1143
  trackPositioning(ctx2) {
1145
- ctx2.currentPlacement = ctx2.positioning.placement;
1144
+ ctx2.currentPlacement || (ctx2.currentPlacement = ctx2.positioning.placement);
1146
1145
  const anchorEl = dom.getTriggerEl(ctx2);
1147
1146
  const getPositionerEl = () => dom.getPositionerEl(ctx2);
1148
1147
  return popper.getPlacement(anchorEl, getPositionerEl, {
@@ -1172,7 +1171,7 @@ function machine(userContext) {
1172
1171
  },
1173
1172
  trackFormControl(ctx2, _evt, { send, initialContext }) {
1174
1173
  const inputEl = dom.getHiddenInputEl(ctx2);
1175
- return formUtils.trackFormControl(inputEl, {
1174
+ return domQuery.trackFormControl(inputEl, {
1176
1175
  onFieldsetDisabledChange(disabled) {
1177
1176
  ctx2.fieldsetDisabled = disabled;
1178
1177
  },
@@ -1389,7 +1388,7 @@ var invoke = {
1389
1388
  value,
1390
1389
  valueAsString: ctx.valueAsString
1391
1390
  });
1392
- formUtils.dispatchInputValueEvent(dom.getHiddenInputEl(ctx), { value: ctx.valueAsString });
1391
+ domQuery.dispatchInputValueEvent(dom.getHiddenInputEl(ctx), { value: ctx.valueAsString });
1393
1392
  },
1394
1393
  formatChange(ctx) {
1395
1394
  ctx.onFormatChange?.({ format: ctx.format });
package/dist/index.mjs CHANGED
@@ -1,10 +1,9 @@
1
1
  import { createAnatomy } from '@zag-js/anatomy';
2
2
  import { normalizeColor, getColorAreaGradient, parseColor } from '@zag-js/color-utils';
3
- import { createScope, queryAll, getRelativePoint, dataAttr, query, isLeftClick, isModifierKey, getEventPoint, getEventStep, getEventKey, visuallyHiddenStyle, trackPointerMove, disableTextSelection, raf, getInitialFocus } from '@zag-js/dom-query';
3
+ import { createScope, queryAll, getRelativePoint, dataAttr, query, isLeftClick, isModifierKey, getEventPoint, getEventStep, getEventKey, visuallyHiddenStyle, trackFormControl, trackPointerMove, disableTextSelection, raf, getInitialFocus, dispatchInputValueEvent } from '@zag-js/dom-query';
4
4
  import { getPlacementStyles, getPlacement } from '@zag-js/popper';
5
5
  import { createMachine, guards } from '@zag-js/core';
6
6
  import { trackDismissableElement } from '@zag-js/dismissable';
7
- import { trackFormControl, dispatchInputValueEvent } from '@zag-js/form-utils';
8
7
  import { compact, tryCatch } from '@zag-js/utils';
9
8
 
10
9
  // src/color-picker.anatomy.ts
@@ -1140,7 +1139,7 @@ function machine(userContext) {
1140
1139
  },
1141
1140
  activities: {
1142
1141
  trackPositioning(ctx2) {
1143
- ctx2.currentPlacement = ctx2.positioning.placement;
1142
+ ctx2.currentPlacement || (ctx2.currentPlacement = ctx2.positioning.placement);
1144
1143
  const anchorEl = dom.getTriggerEl(ctx2);
1145
1144
  const getPositionerEl = () => dom.getPositionerEl(ctx2);
1146
1145
  return getPlacement(anchorEl, getPositionerEl, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/color-picker",
3
- "version": "0.81.1",
3
+ "version": "0.82.0",
4
4
  "description": "Core logic for the color-picker widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -27,15 +27,14 @@
27
27
  "url": "https://github.com/chakra-ui/zag/issues"
28
28
  },
29
29
  "dependencies": {
30
- "@zag-js/core": "0.81.1",
31
- "@zag-js/anatomy": "0.81.1",
32
- "@zag-js/dom-query": "0.81.1",
33
- "@zag-js/dismissable": "0.81.1",
34
- "@zag-js/utils": "0.81.1",
35
- "@zag-js/form-utils": "0.81.1",
36
- "@zag-js/color-utils": "0.81.1",
37
- "@zag-js/popper": "0.81.1",
38
- "@zag-js/types": "0.81.1"
30
+ "@zag-js/core": "0.82.0",
31
+ "@zag-js/anatomy": "0.82.0",
32
+ "@zag-js/dom-query": "0.82.0",
33
+ "@zag-js/dismissable": "0.82.0",
34
+ "@zag-js/utils": "0.82.0",
35
+ "@zag-js/color-utils": "0.82.0",
36
+ "@zag-js/popper": "0.82.0",
37
+ "@zag-js/types": "0.82.0"
39
38
  },
40
39
  "devDependencies": {
41
40
  "clean-package": "2.2.0"