@dreamcommerce/aurora 2.12.1-27 → 2.12.1-28

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.
@@ -26,6 +26,7 @@ const ColorPickerHeader = () => {
26
26
  handleCancel === null || handleCancel === void 0 ? void 0 : handleCancel();
27
27
  };
28
28
  React.useEffect(() => {
29
+ console.log('isOpen');
29
30
  if (!isOpen)
30
31
  return;
31
32
  document.addEventListener('visibilitychange', closePicker);
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oEAAwE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oEAAwE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -8,7 +8,6 @@ const ColorPickerNewContext = React.createContext({
8
8
  color: '',
9
9
  setColor: () => { },
10
10
  hex: '',
11
- hexString: '',
12
11
  hslArr: [],
13
12
  setHue: () => { },
14
13
  setSaturation: () => { },
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -13,7 +13,6 @@ const useColorPicker = ({ initialColor, onChange, onCancel, onSave }) => {
13
13
  const { hslArr, setHue, setSaturation, setLightness, rgbaArr, setR, setG, setB, setA } = useColorPicker$1.useColorPicker(color, setColor);
14
14
  const tinyColor = utilities.getTinyColorInstance(color);
15
15
  const hex = utilities.getHexValue(tinyColor);
16
- const hexString = utilities.getHexValueString(tinyColor);
17
16
  const [alpha, setAlpha] = React.useState(rgbaArr[3] * 100);
18
17
  const [alphaValue, setAlphaValue] = React.useState(`${alpha}`);
19
18
  const handleOnChangeAlpha = (event) => {
@@ -23,12 +22,15 @@ const useColorPicker = ({ initialColor, onChange, onCancel, onSave }) => {
23
22
  setAlpha(value > 100 ? 100 : value);
24
23
  };
25
24
  React.useEffect(() => {
25
+ console.log('alpha');
26
26
  setA(alpha);
27
27
  }, [alpha]);
28
28
  React.useEffect(() => {
29
+ console.log('rgbaArr[3]');
29
30
  setAlphaValue(`${Math.round(rgbaArr[3] * 100)}`);
30
31
  }, [rgbaArr[3]]);
31
32
  React.useEffect(() => {
33
+ console.log('color');
32
34
  onChange === null || onChange === void 0 ? void 0 : onChange(utilities.getAllColorTypes(color));
33
35
  }, [color]);
34
36
  const handleCancel = () => {
@@ -46,7 +48,6 @@ const useColorPicker = ({ initialColor, onChange, onCancel, onSave }) => {
46
48
  color,
47
49
  setColor,
48
50
  hex,
49
- hexString,
50
51
  hslArr,
51
52
  setHue,
52
53
  setSaturation,
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,8FAAkG;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,8FAAkG;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -18,6 +18,7 @@ const ColorPickerHeader = () => {
18
18
  handleCancel === null || handleCancel === void 0 ? void 0 : handleCancel();
19
19
  };
20
20
  useEffect(() => {
21
+ console.log('isOpen');
21
22
  if (!isOpen)
22
23
  return;
23
24
  document.addEventListener('visibilitychange', closePicker);
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,oEAAwE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,oEAAwE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -4,7 +4,6 @@ const ColorPickerNewContext = createContext({
4
4
  color: '',
5
5
  setColor: () => { },
6
6
  hex: '',
7
- hexString: '',
8
7
  hslArr: [],
9
8
  setHue: () => { },
10
9
  setSaturation: () => { },
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -10,7 +10,6 @@ declare const useColorPicker: ({ initialColor, onChange, onCancel, onSave }: Col
10
10
  color: string;
11
11
  setColor: import("react").Dispatch<import("react").SetStateAction<string>>;
12
12
  hex: string;
13
- hexString: string;
14
13
  hslArr: number[];
15
14
  setHue: (newHue: number) => void;
16
15
  setSaturation: (newSat: number) => void;
@@ -1,7 +1,7 @@
1
1
  import { useState, useEffect } from 'react';
2
2
  import { COLOR_PICKER_INITIAL_STATE } from '../constants.js';
3
3
  import { useColorPicker as useColorPicker$1 } from '../../../../../../external/react-best-gradient-color-picker/dist/esm/hooks/useColorPicker.js';
4
- import { getTinyColorInstance, getHexValue, getHexValueString, getAllColorTypes } from '../utilities.js';
4
+ import { getTinyColorInstance, getHexValue, getAllColorTypes } from '../utilities.js';
5
5
 
6
6
  const useColorPicker = ({ initialColor, onChange, onCancel, onSave }) => {
7
7
  const [color, setColor] = useState(initialColor ? initialColor : COLOR_PICKER_INITIAL_STATE);
@@ -9,7 +9,6 @@ const useColorPicker = ({ initialColor, onChange, onCancel, onSave }) => {
9
9
  const { hslArr, setHue, setSaturation, setLightness, rgbaArr, setR, setG, setB, setA } = useColorPicker$1(color, setColor);
10
10
  const tinyColor = getTinyColorInstance(color);
11
11
  const hex = getHexValue(tinyColor);
12
- const hexString = getHexValueString(tinyColor);
13
12
  const [alpha, setAlpha] = useState(rgbaArr[3] * 100);
14
13
  const [alphaValue, setAlphaValue] = useState(`${alpha}`);
15
14
  const handleOnChangeAlpha = (event) => {
@@ -19,12 +18,15 @@ const useColorPicker = ({ initialColor, onChange, onCancel, onSave }) => {
19
18
  setAlpha(value > 100 ? 100 : value);
20
19
  };
21
20
  useEffect(() => {
21
+ console.log('alpha');
22
22
  setA(alpha);
23
23
  }, [alpha]);
24
24
  useEffect(() => {
25
+ console.log('rgbaArr[3]');
25
26
  setAlphaValue(`${Math.round(rgbaArr[3] * 100)}`);
26
27
  }, [rgbaArr[3]]);
27
28
  useEffect(() => {
29
+ console.log('color');
28
30
  onChange === null || onChange === void 0 ? void 0 : onChange(getAllColorTypes(color));
29
31
  }, [color]);
30
32
  const handleCancel = () => {
@@ -42,7 +44,6 @@ const useColorPicker = ({ initialColor, onChange, onCancel, onSave }) => {
42
44
  color,
43
45
  setColor,
44
46
  hex,
45
- hexString,
46
47
  hslArr,
47
48
  setHue,
48
49
  setSaturation,
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA,mDAAmD,8FAAkG;AACrJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA,mDAAmD,8FAAkG;AACrJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -15,7 +15,6 @@ export interface IColorPickerNewContextProps {
15
15
  color: string;
16
16
  setColor: Dispatch<SetStateAction<string>>;
17
17
  hex: string;
18
- hexString: string;
19
18
  hslArr: number[];
20
19
  setHue: (newHue: number) => void;
21
20
  setSaturation: (newSat: number) => void;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dreamcommerce/aurora",
3
3
  "packageManager": "yarn@3.2.0",
4
4
  "sideEffects": false,
5
- "version": "2.12.1-27",
5
+ "version": "2.12.1-28",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",