@react-stately/color 3.4.3-nightly.4149 → 3.4.3-nightly.4157

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/import.mjs CHANGED
@@ -541,7 +541,7 @@ class $799cddbef784668f$var$Color {
541
541
  return $799cddbef784668f$var$strings.getStringForLocale(channel, locale);
542
542
  }
543
543
  getColorSpaceAxes(xyChannels) {
544
- let { xChannel: xChannel , yChannel: yChannel } = xyChannels;
544
+ let { xChannel: xChannel, yChannel: yChannel } = xyChannels;
545
545
  let xCh = xChannel || this.getColorChannels().find((c)=>c !== yChannel);
546
546
  let yCh = yChannel || this.getColorChannels().find((c)=>c !== xCh);
547
547
  let zCh = this.getColorChannels().find((c)=>c !== xCh && c !== yCh);
@@ -1052,7 +1052,7 @@ class $799cddbef784668f$var$HSLColor extends $799cddbef784668f$var$Color {
1052
1052
 
1053
1053
  const $6e14a98a7f67141d$var$DEFAULT_COLOR = (0, $799cddbef784668f$export$6e865ea70d7724f)("#ffffff");
1054
1054
  function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
1055
- let { value: value , defaultValue: defaultValue , xChannel: xChannel , yChannel: yChannel , onChange: onChange , onChangeEnd: onChangeEnd } = props;
1055
+ let { value: value, defaultValue: defaultValue, xChannel: xChannel, yChannel: yChannel, onChange: onChange, onChangeEnd: onChangeEnd } = props;
1056
1056
  if (!value && !defaultValue) defaultValue = $6e14a98a7f67141d$var$DEFAULT_COLOR;
1057
1057
  let [color, setColorState] = (0, $cBgAy$useControlledState)(value && (0, $799cddbef784668f$export$4cde5df63f53f473)(value), defaultValue && (0, $799cddbef784668f$export$4cde5df63f53f473)(defaultValue), onChange);
1058
1058
  let valueRef = (0, $cBgAy$useRef)(color);
@@ -1070,8 +1070,8 @@ function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
1070
1070
  ]);
1071
1071
  let xChannelRange = color.getChannelRange(channels.xChannel);
1072
1072
  let yChannelRange = color.getChannelRange(channels.yChannel);
1073
- let { minValue: minValueX , maxValue: maxValueX , step: stepX , pageSize: pageSizeX } = xChannelRange;
1074
- let { minValue: minValueY , maxValue: maxValueY , step: stepY , pageSize: pageSizeY } = yChannelRange;
1073
+ let { minValue: minValueX, maxValue: maxValueX, step: stepX, pageSize: pageSizeX } = xChannelRange;
1074
+ let { minValue: minValueY, maxValue: maxValueY, step: stepY, pageSize: pageSizeY } = yChannelRange;
1075
1075
  let [isDragging, setDragging] = (0, $cBgAy$useState)(false);
1076
1076
  let isDraggingRef = (0, $cBgAy$useRef)(false);
1077
1077
  let xValue = color.getChannelValue(channels.xChannel);
@@ -1164,7 +1164,7 @@ function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
1164
1164
 
1165
1165
 
1166
1166
  function $25a25ac0d1624665$export$57bc203e1c9c6d44(props) {
1167
- let { channel: channel , value: value , defaultValue: defaultValue , onChange: onChange , locale: locale , ...otherProps } = props;
1167
+ let { channel: channel, value: value, defaultValue: defaultValue, onChange: onChange, locale: locale, ...otherProps } = props;
1168
1168
  if (value == null && defaultValue == null) throw new Error("useColorSliderState requires a value or defaultValue");
1169
1169
  let [color, setColor] = (0, $cBgAy$useControlledState)(value && (0, $799cddbef784668f$export$4cde5df63f53f473)(value), defaultValue && (0, $799cddbef784668f$export$4cde5df63f53f473)(defaultValue), onChange);
1170
1170
  let sliderState = (0, $cBgAy$useSliderState)({
@@ -1181,7 +1181,7 @@ function $25a25ac0d1624665$export$57bc203e1c9c6d44(props) {
1181
1181
  if (props.onChangeEnd) props.onChangeEnd(color.withChannelValue(channel, v));
1182
1182
  }
1183
1183
  });
1184
- let { step: step , pageSize: pageSize } = color.getChannelRange(channel);
1184
+ let { step: step, pageSize: pageSize } = color.getChannelRange(channel);
1185
1185
  return {
1186
1186
  ...sliderState,
1187
1187
  value: color,
@@ -1260,7 +1260,7 @@ function $ee4262c74a467b07$var$cartesianToAngle(x, y, radius) {
1260
1260
  return (deg + 360) % 360;
1261
1261
  }
1262
1262
  function $ee4262c74a467b07$export$f4301076d9336137(props) {
1263
- let { defaultValue: defaultValue , onChange: onChange , onChangeEnd: onChangeEnd } = props;
1263
+ let { defaultValue: defaultValue, onChange: onChange, onChangeEnd: onChangeEnd } = props;
1264
1264
  if (!props.value && !defaultValue) defaultValue = $ee4262c74a467b07$var$DEFAULT_COLOR;
1265
1265
  let [value, setValueState] = (0, $cBgAy$useControlledState)((0, $799cddbef784668f$export$4cde5df63f53f473)(props.value), (0, $799cddbef784668f$export$4cde5df63f53f473)(defaultValue), onChange);
1266
1266
  let valueRef = (0, $cBgAy$useRef)(value);
@@ -1269,7 +1269,7 @@ function $ee4262c74a467b07$export$f4301076d9336137(props) {
1269
1269
  setValueState(value);
1270
1270
  };
1271
1271
  let channelRange = value.getChannelRange("hue");
1272
- let { minValue: minValueX , maxValue: maxValueX , step: step , pageSize: pageStep } = channelRange;
1272
+ let { minValue: minValueX, maxValue: maxValueX, step: step, pageSize: pageStep } = channelRange;
1273
1273
  let [isDragging, setDragging] = (0, $cBgAy$useState)(false);
1274
1274
  let isDraggingRef = (0, $cBgAy$useRef)(false);
1275
1275
  let hue = value.getChannelValue("hue");
@@ -1370,8 +1370,8 @@ const $b335ada08155d9c0$var$MAX_COLOR = (0, $799cddbef784668f$export$6e865ea70d7
1370
1370
  const $b335ada08155d9c0$var$MIN_COLOR_INT = $b335ada08155d9c0$var$MIN_COLOR.toHexInt();
1371
1371
  const $b335ada08155d9c0$var$MAX_COLOR_INT = $b335ada08155d9c0$var$MAX_COLOR.toHexInt();
1372
1372
  function $b335ada08155d9c0$export$d52a01683abdfcd6(props) {
1373
- let { value: value , defaultValue: defaultValue , onChange: onChange } = props;
1374
- let { step: step } = $b335ada08155d9c0$var$MIN_COLOR.getChannelRange("red");
1373
+ let { value: value, defaultValue: defaultValue, onChange: onChange } = props;
1374
+ let { step: step } = $b335ada08155d9c0$var$MIN_COLOR.getChannelRange("red");
1375
1375
  let initialValue = (0, $aa90ad8b2b1d015f$export$5aadd9c0606af5c2)(value);
1376
1376
  let initialDefaultValue = (0, $aa90ad8b2b1d015f$export$5aadd9c0606af5c2)(defaultValue);
1377
1377
  let [colorValue, setColorValue] = (0, $cBgAy$useControlledState)(initialValue, initialDefaultValue, onChange);
package/dist/main.js CHANGED
@@ -550,7 +550,7 @@ class $83fe1a57d631223b$var$Color {
550
550
  return $83fe1a57d631223b$var$strings.getStringForLocale(channel, locale);
551
551
  }
552
552
  getColorSpaceAxes(xyChannels) {
553
- let { xChannel: xChannel , yChannel: yChannel } = xyChannels;
553
+ let { xChannel: xChannel, yChannel: yChannel } = xyChannels;
554
554
  let xCh = xChannel || this.getColorChannels().find((c)=>c !== yChannel);
555
555
  let yCh = yChannel || this.getColorChannels().find((c)=>c !== xCh);
556
556
  let zCh = this.getColorChannels().find((c)=>c !== xCh && c !== yCh);
@@ -1061,7 +1061,7 @@ class $83fe1a57d631223b$var$HSLColor extends $83fe1a57d631223b$var$Color {
1061
1061
 
1062
1062
  const $af2d7ac9990cfee2$var$DEFAULT_COLOR = (0, $83fe1a57d631223b$export$6e865ea70d7724f)("#ffffff");
1063
1063
  function $af2d7ac9990cfee2$export$6df7f0e2cabc7eef(props) {
1064
- let { value: value , defaultValue: defaultValue , xChannel: xChannel , yChannel: yChannel , onChange: onChange , onChangeEnd: onChangeEnd } = props;
1064
+ let { value: value, defaultValue: defaultValue, xChannel: xChannel, yChannel: yChannel, onChange: onChange, onChangeEnd: onChangeEnd } = props;
1065
1065
  if (!value && !defaultValue) defaultValue = $af2d7ac9990cfee2$var$DEFAULT_COLOR;
1066
1066
  let [color, setColorState] = (0, $4tN2K$reactstatelyutils.useControlledState)(value && (0, $83fe1a57d631223b$export$4cde5df63f53f473)(value), defaultValue && (0, $83fe1a57d631223b$export$4cde5df63f53f473)(defaultValue), onChange);
1067
1067
  let valueRef = (0, $4tN2K$react.useRef)(color);
@@ -1079,8 +1079,8 @@ function $af2d7ac9990cfee2$export$6df7f0e2cabc7eef(props) {
1079
1079
  ]);
1080
1080
  let xChannelRange = color.getChannelRange(channels.xChannel);
1081
1081
  let yChannelRange = color.getChannelRange(channels.yChannel);
1082
- let { minValue: minValueX , maxValue: maxValueX , step: stepX , pageSize: pageSizeX } = xChannelRange;
1083
- let { minValue: minValueY , maxValue: maxValueY , step: stepY , pageSize: pageSizeY } = yChannelRange;
1082
+ let { minValue: minValueX, maxValue: maxValueX, step: stepX, pageSize: pageSizeX } = xChannelRange;
1083
+ let { minValue: minValueY, maxValue: maxValueY, step: stepY, pageSize: pageSizeY } = yChannelRange;
1084
1084
  let [isDragging, setDragging] = (0, $4tN2K$react.useState)(false);
1085
1085
  let isDraggingRef = (0, $4tN2K$react.useRef)(false);
1086
1086
  let xValue = color.getChannelValue(channels.xChannel);
@@ -1173,7 +1173,7 @@ function $af2d7ac9990cfee2$export$6df7f0e2cabc7eef(props) {
1173
1173
 
1174
1174
 
1175
1175
  function $5386a492cfd3234c$export$57bc203e1c9c6d44(props) {
1176
- let { channel: channel , value: value , defaultValue: defaultValue , onChange: onChange , locale: locale , ...otherProps } = props;
1176
+ let { channel: channel, value: value, defaultValue: defaultValue, onChange: onChange, locale: locale, ...otherProps } = props;
1177
1177
  if (value == null && defaultValue == null) throw new Error("useColorSliderState requires a value or defaultValue");
1178
1178
  let [color, setColor] = (0, $4tN2K$reactstatelyutils.useControlledState)(value && (0, $83fe1a57d631223b$export$4cde5df63f53f473)(value), defaultValue && (0, $83fe1a57d631223b$export$4cde5df63f53f473)(defaultValue), onChange);
1179
1179
  let sliderState = (0, $4tN2K$reactstatelyslider.useSliderState)({
@@ -1190,7 +1190,7 @@ function $5386a492cfd3234c$export$57bc203e1c9c6d44(props) {
1190
1190
  if (props.onChangeEnd) props.onChangeEnd(color.withChannelValue(channel, v));
1191
1191
  }
1192
1192
  });
1193
- let { step: step , pageSize: pageSize } = color.getChannelRange(channel);
1193
+ let { step: step, pageSize: pageSize } = color.getChannelRange(channel);
1194
1194
  return {
1195
1195
  ...sliderState,
1196
1196
  value: color,
@@ -1269,7 +1269,7 @@ function $9d7d8736d45f74b8$var$cartesianToAngle(x, y, radius) {
1269
1269
  return (deg + 360) % 360;
1270
1270
  }
1271
1271
  function $9d7d8736d45f74b8$export$f4301076d9336137(props) {
1272
- let { defaultValue: defaultValue , onChange: onChange , onChangeEnd: onChangeEnd } = props;
1272
+ let { defaultValue: defaultValue, onChange: onChange, onChangeEnd: onChangeEnd } = props;
1273
1273
  if (!props.value && !defaultValue) defaultValue = $9d7d8736d45f74b8$var$DEFAULT_COLOR;
1274
1274
  let [value, setValueState] = (0, $4tN2K$reactstatelyutils.useControlledState)((0, $83fe1a57d631223b$export$4cde5df63f53f473)(props.value), (0, $83fe1a57d631223b$export$4cde5df63f53f473)(defaultValue), onChange);
1275
1275
  let valueRef = (0, $4tN2K$react.useRef)(value);
@@ -1278,7 +1278,7 @@ function $9d7d8736d45f74b8$export$f4301076d9336137(props) {
1278
1278
  setValueState(value);
1279
1279
  };
1280
1280
  let channelRange = value.getChannelRange("hue");
1281
- let { minValue: minValueX , maxValue: maxValueX , step: step , pageSize: pageStep } = channelRange;
1281
+ let { minValue: minValueX, maxValue: maxValueX, step: step, pageSize: pageStep } = channelRange;
1282
1282
  let [isDragging, setDragging] = (0, $4tN2K$react.useState)(false);
1283
1283
  let isDraggingRef = (0, $4tN2K$react.useRef)(false);
1284
1284
  let hue = value.getChannelValue("hue");
@@ -1379,8 +1379,8 @@ const $d59d0c2b2ce1568f$var$MAX_COLOR = (0, $83fe1a57d631223b$export$6e865ea70d7
1379
1379
  const $d59d0c2b2ce1568f$var$MIN_COLOR_INT = $d59d0c2b2ce1568f$var$MIN_COLOR.toHexInt();
1380
1380
  const $d59d0c2b2ce1568f$var$MAX_COLOR_INT = $d59d0c2b2ce1568f$var$MAX_COLOR.toHexInt();
1381
1381
  function $d59d0c2b2ce1568f$export$d52a01683abdfcd6(props) {
1382
- let { value: value , defaultValue: defaultValue , onChange: onChange } = props;
1383
- let { step: step } = $d59d0c2b2ce1568f$var$MIN_COLOR.getChannelRange("red");
1382
+ let { value: value, defaultValue: defaultValue, onChange: onChange } = props;
1383
+ let { step: step } = $d59d0c2b2ce1568f$var$MIN_COLOR.getChannelRange("red");
1384
1384
  let initialValue = (0, $f8b3be23ba4462b1$export$5aadd9c0606af5c2)(value);
1385
1385
  let initialDefaultValue = (0, $f8b3be23ba4462b1$export$5aadd9c0606af5c2)(defaultValue);
1386
1386
  let [colorValue, setColorValue] = (0, $4tN2K$reactstatelyutils.useControlledState)(initialValue, initialDefaultValue, onChange);
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;;;AEVD,4BAAiB;IAAG,SAAS,CAAC,IAAI,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC;IACd,cAAc,CAAC,MAAM,CAAC;IACtB,SAAS,CAAC,IAAI,CAAC;IACf,OAAO,CAAC,UAAU,CAAC;IACnB,aAAa,CAAC,OAAO,CAAC;IACtB,OAAO,CAAC,IAAI,CAAC;IACb,cAAc,CAAC,MAAM,CAAC;AACxB;;;;ACRA,4BAAiB;IAAG,SAAS,CAAC,IAAI,CAAC;IACjC,QAAQ,CAAC,KAAK,CAAC;IACf,cAAc,CAAC,MAAM,CAAC;IACtB,SAAS,CAAC,MAAM,CAAC;IACjB,OAAO,CAAC,OAAO,CAAC;IAChB,aAAa,CAAC,MAAM,CAAC;IACrB,OAAO,CAAC,OAAO,CAAC;IAChB,cAAc,CAAC,UAAU,CAAC;AAC5B;;;;ACRA,4BAAiB;IAAG,SAAS,CAAC,IAAI,CAAC;IACjC,QAAQ,CAAC,KAAK,CAAC;IACf,cAAc,CAAC,GAAG,CAAC;IACnB,SAAS,CAAC,MAAM,CAAC;IACjB,OAAO,CAAC,MAAM,CAAC;IACf,aAAa,CAAC,QAAQ,CAAC;IACvB,OAAO,CAAC,OAAO,CAAC;IAChB,cAAc,CAAC,MAAM,CAAC;AAC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EA,iFAAiF;QACjF,IAAI,eAAe,MAAM;YACvB,cAAc,aAAa,WAAW,SAAS,SAAS;YACxD;QACF;QAEA,oBAAoB;QACpB,yGAAyG;QACzG,IAAI,gBAAgB;QACpB,IAAI,YACF,gBAAgB,WAAW,SAAS;QAEtC,cAAc;IAChB;IAEA,IAAI,YAAY;QACd,IAAI,WAAW,oCAAc,aAAa;QAC1C,2EAA2E;QAC3E,yCAAyC;QACzC,+FAA+F;QAC/F,6GAA6G;QAC7G,IAAI,aAAa,YACf,cAAc,SAAS,SAAS;QAElC,oBAAoB;IACtB;IACA,IAAI,YAAY;QACd,IAAI,WAAW,oCAAc,aAAa,CAAC;QAC3C,2EAA2E;QAC3E,yCAAyC;QACzC,+FAA+F;QAC/F,6GAA6G;QAC7G,IAAI,aAAa,YACf,cAAc,SAAS,SAAS;QAElC,oBAAoB;IACtB;IACA,IAAI,iBAAiB,IAAM,oBAAoB;IAC/C,IAAI,iBAAiB,IAAM,oBAAoB;IAE/C,IAAI,WAAW,CAAC;YAAoC;QAAlB,OAAA,UAAU,MAAM,CAAC,CAAC,CAAA,CAAA,eAAA,MAAM,MAAM,mCAAZ,0BAAA,KAAA,IAAA,YAAmC,CAAC,EAAE,AAAD;;IAEzF,OAAO;kBACL;oBACA;oBACA;uBACA;gBACA;mBACA;wBACA;mBACA;wBACA;IACF;AACF;AAEA,SAAS,oCAAc,KAAY,EAAE,IAAY;IAC/C,IAAI,WAAW,QAAQ,QAAQ;IAC/B,IAAI,WAAW,SAAS;IAExB,IAAI,WAAW,KAAK,IAAI,KAAK,IAAI,WAAW,MAAM,sCAAgB;IAClE,IAAI,aAAa,UAAU;QACzB,IAAI,iBAAiB,CAAC,CAAC,EAAE,SAAS,SAAS,IAAI,SAAS,GAAG,KAAK,cAAc,CAAC;QAC/E,WAAW,CAAA,GAAA,wCAAS,EAAE;IACxB;IACA,OAAO;AACT;;","sources":["packages/@react-stately/color/src/index.ts","packages/@react-stately/color/src/Color.ts","packages/@react-stately/color/src/*.js","packages/@react-stately/color/intl/ar-AE.json","packages/@react-stately/color/intl/bg-BG.json","packages/@react-stately/color/intl/cs-CZ.json","packages/@react-stately/color/intl/da-DK.json","packages/@react-stately/color/intl/de-DE.json","packages/@react-stately/color/intl/el-GR.json","packages/@react-stately/color/intl/en-US.json","packages/@react-stately/color/intl/es-ES.json","packages/@react-stately/color/intl/et-EE.json","packages/@react-stately/color/intl/fi-FI.json","packages/@react-stately/color/intl/fr-FR.json","packages/@react-stately/color/intl/he-IL.json","packages/@react-stately/color/intl/hr-HR.json","packages/@react-stately/color/intl/hu-HU.json","packages/@react-stately/color/intl/it-IT.json","packages/@react-stately/color/intl/ja-JP.json","packages/@react-stately/color/intl/ko-KR.json","packages/@react-stately/color/intl/lt-LT.json","packages/@react-stately/color/intl/lv-LV.json","packages/@react-stately/color/intl/nb-NO.json","packages/@react-stately/color/intl/nl-NL.json","packages/@react-stately/color/intl/pl-PL.json","packages/@react-stately/color/intl/pt-BR.json","packages/@react-stately/color/intl/pt-PT.json","packages/@react-stately/color/intl/ro-RO.json","packages/@react-stately/color/intl/ru-RU.json","packages/@react-stately/color/intl/sk-SK.json","packages/@react-stately/color/intl/sl-SI.json","packages/@react-stately/color/intl/sr-SP.json","packages/@react-stately/color/intl/sv-SE.json","packages/@react-stately/color/intl/tr-TR.json","packages/@react-stately/color/intl/uk-UA.json","packages/@react-stately/color/intl/zh-CN.json","packages/@react-stately/color/intl/zh-TW.json","packages/@react-stately/color/src/useColorAreaState.ts","packages/@react-stately/color/src/useColorSliderState.ts","packages/@react-stately/color/src/useColorWheelState.ts","packages/@react-stately/color/src/useColorFieldState.ts","packages/@react-stately/color/src/useColor.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport type {ColorAreaState} from './useColorAreaState';\nexport type {ColorSliderState} from './useColorSliderState';\nexport type {ColorWheelState} from './useColorWheelState';\nexport type {ColorFieldState} from './useColorFieldState';\n\nexport {parseColor} from './Color';\nexport {useColorAreaState} from './useColorAreaState';\nexport {useColorSliderState} from './useColorSliderState';\nexport {useColorWheelState} from './useColorWheelState';\nexport {useColorFieldState} from './useColorFieldState';\n\nexport type {Color, ColorAreaProps, ColorFieldProps, ColorWheelProps} from '@react-types/color';\nexport type {ColorSliderStateOptions} from './useColorSliderState';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {clamp, toFixedNumber} from '@react-stately/utils';\nimport {ColorAxes, ColorChannel, ColorChannelRange, ColorFormat, Color as IColor} from '@react-types/color';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {LocalizedStringDictionary} from '@internationalized/string';\nimport {NumberFormatter} from '@internationalized/number';\n\nconst strings = new LocalizedStringDictionary(intlMessages);\n\n/** Parses a color from a string value. Throws an error if the string could not be parsed. */\nexport function parseColor(value: string): IColor {\n let res = RGBColor.parse(value) || HSBColor.parse(value) || HSLColor.parse(value);\n if (res) {\n return res;\n }\n\n throw new Error('Invalid color value: ' + value);\n}\n\nexport function normalizeColor(v: string | IColor) {\n if (typeof v === 'string') {\n return parseColor(v);\n } else {\n return v;\n }\n}\n\nabstract class Color implements IColor {\n abstract toFormat(format: ColorFormat): IColor;\n abstract toString(format: ColorFormat | 'css'): string;\n abstract clone(): IColor;\n abstract getChannelRange(channel: ColorChannel): ColorChannelRange;\n abstract formatChannelValue(channel: ColorChannel, locale: string): string;\n\n toHexInt(): number {\n return this.toFormat('rgb').toHexInt();\n }\n\n getChannelValue(channel: ColorChannel): number {\n if (channel in this) {\n return this[channel];\n }\n\n throw new Error('Unsupported color channel: ' + channel);\n }\n\n withChannelValue(channel: ColorChannel, value: number): IColor {\n if (channel in this) {\n let x = this.clone();\n x[channel] = value;\n return x;\n }\n\n throw new Error('Unsupported color channel: ' + channel);\n }\n\n getChannelName(channel: ColorChannel, locale: string) {\n return strings.getStringForLocale(channel, locale);\n }\n\n abstract getColorSpace(): ColorFormat\n getColorSpaceAxes(xyChannels: {xChannel?: ColorChannel, yChannel?: ColorChannel}): ColorAxes {\n let {xChannel, yChannel} = xyChannels;\n let xCh = xChannel || this.getColorChannels().find(c => c !== yChannel);\n let yCh = yChannel || this.getColorChannels().find(c => c !== xCh);\n let zCh = this.getColorChannels().find(c => c !== xCh && c !== yCh);\n\n return {xChannel: xCh, yChannel: yCh, zChannel: zCh};\n }\n abstract getColorChannels(): [ColorChannel, ColorChannel, ColorChannel]\n}\nclass RGBColor extends Color {\n constructor(private red: number, private green: number, private blue: number, private alpha: number) {\n super();\n }\n\n static parse(value: string) {\n let colors = [];\n // matching #rgb, #rgba, #rrggbb, #rrggbbaa\n if (/^#[\\da-f]+$/i.test(value) && [4, 5, 7, 9].includes(value.length)) {\n const values = (value.length < 6 ? value.replace(/[^#]/gi, '$&$&') : value).slice(1).split('');\n while (values.length > 0) {\n colors.push(parseInt(values.splice(0, 2).join(''), 16));\n }\n colors[3] = colors[3] !== undefined ? colors[3] / 255 : undefined;\n }\n\n // matching rgb(rrr, ggg, bbb), rgba(rrr, ggg, bbb, 0.a)\n const match = value.match(/^rgba?\\((.*)\\)$/);\n if (match?.[1]) {\n colors = match[1].split(',').map(value => Number(value.trim()));\n colors = colors.map((num, i) => clamp(num, 0, i < 3 ? 255 : 1));\n }\n\n return colors.length < 3 ? undefined : new RGBColor(colors[0], colors[1], colors[2], colors[3] ?? 1);\n }\n\n\n toString(format: ColorFormat | 'css') {\n switch (format) {\n case 'hex':\n return '#' + (this.red.toString(16).padStart(2, '0') + this.green.toString(16).padStart(2, '0') + this.blue.toString(16).padStart(2, '0')).toUpperCase();\n case 'hexa':\n return '#' + (this.red.toString(16).padStart(2, '0') + this.green.toString(16).padStart(2, '0') + this.blue.toString(16).padStart(2, '0') + Math.round(this.alpha * 255).toString(16).padStart(2, '0')).toUpperCase();\n case 'rgb':\n return `rgb(${this.red}, ${this.green}, ${this.blue})`;\n case 'css':\n case 'rgba':\n return `rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;\n default:\n return this.toFormat(format).toString(format);\n }\n }\n\n toFormat(format: ColorFormat): IColor {\n switch (format) {\n case 'hex':\n case 'hexa':\n case 'rgb':\n case 'rgba':\n return this;\n case 'hsb':\n case 'hsba':\n return this.toHSB();\n case 'hsl':\n case 'hsla':\n return this.toHSL();\n default:\n throw new Error('Unsupported color conversion: rgb -> ' + format);\n }\n }\n\n toHexInt(): number {\n return this.red << 16 | this.green << 8 | this.blue;\n }\n\n /**\n * Converts an RGB color value to HSB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB.\n * @returns An HSBColor object.\n */\n private toHSB(): IColor {\n const red = this.red / 255;\n const green = this.green / 255;\n const blue = this.blue / 255;\n const min = Math.min(red, green, blue);\n const brightness = Math.max(red, green, blue);\n const chroma = brightness - min;\n const saturation = brightness === 0 ? 0 : chroma / brightness;\n let hue = 0; // achromatic\n\n if (chroma !== 0) {\n switch (brightness) {\n case red:\n hue = (green - blue) / chroma + (green < blue ? 6 : 0);\n break;\n case green:\n hue = (blue - red) / chroma + 2;\n break;\n case blue:\n hue = (red - green) / chroma + 4;\n break;\n }\n\n hue /= 6;\n }\n\n return new HSBColor(\n toFixedNumber(hue * 360, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(brightness * 100, 2),\n this.alpha\n );\n }\n\n /**\n * Converts an RGB color value to HSL.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB.\n * @returns An HSLColor object.\n */\n private toHSL(): IColor {\n const red = this.red / 255;\n const green = this.green / 255;\n const blue = this.blue / 255;\n const min = Math.min(red, green, blue);\n const max = Math.max(red, green, blue);\n const lightness = (max + min) / 2;\n const chroma = max - min;\n let hue: number;\n let saturation: number;\n\n if (chroma === 0) {\n hue = saturation = 0; // achromatic\n } else {\n saturation = chroma / (lightness < .5 ? max + min : 2 - max - min);\n\n switch (max) {\n case red:\n hue = (green - blue) / chroma + (green < blue ? 6 : 0);\n break;\n case green:\n hue = (blue - red) / chroma + 2;\n break;\n case blue:\n hue = (red - green) / chroma + 4;\n break;\n }\n\n hue /= 6;\n }\n\n return new HSLColor(\n toFixedNumber(hue * 360, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(lightness * 100, 2),\n this.alpha);\n }\n\n clone(): IColor {\n return new RGBColor(this.red, this.green, this.blue, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'red':\n case 'green':\n case 'blue':\n return {minValue: 0x0, maxValue: 0xFF, step: 0x1, pageSize: 0x11};\n case 'alpha':\n return {minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1};\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n formatChannelValue(channel: ColorChannel, locale: string) {\n let options: Intl.NumberFormatOptions;\n let value = this.getChannelValue(channel);\n switch (channel) {\n case 'red':\n case 'green':\n case 'blue':\n options = {style: 'decimal'};\n break;\n case 'alpha':\n options = {style: 'percent'};\n break;\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n return new NumberFormatter(locale, options).format(value);\n }\n\n getColorSpace(): ColorFormat {\n return 'rgb';\n }\n\n private static colorChannels: [ColorChannel, ColorChannel, ColorChannel] = ['red', 'green', 'blue'];\n getColorChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return RGBColor.colorChannels;\n }\n}\n\n// X = <negative/positive number with/without decimal places>\n// before/after a comma, 0 or more whitespaces are allowed\n// - hsb(X, X%, X%)\n// - hsba(X, X%, X%, X)\nconst HSB_REGEX = /hsb\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%)\\)|hsba\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d(.\\d+)?)\\)/;\n\nclass HSBColor extends Color {\n constructor(private hue: number, private saturation: number, private brightness: number, private alpha: number) {\n super();\n }\n\n static parse(value: string): HSBColor | void {\n let m: RegExpMatchArray | void;\n if ((m = value.match(HSB_REGEX))) {\n const [h, s, b, a] = (m[1] ?? m[2]).split(',').map(n => Number(n.trim().replace('%', '')));\n return new HSBColor(mod(h, 360), clamp(s, 0, 100), clamp(b, 0, 100), clamp(a ?? 1, 0, 1));\n }\n }\n\n toString(format: ColorFormat | 'css') {\n switch (format) {\n case 'css':\n return this.toHSL().toString('css');\n case 'hex':\n return this.toRGB().toString('hex');\n case 'hexa':\n return this.toRGB().toString('hexa');\n case 'hsb':\n return `hsb(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%)`;\n case 'hsba':\n return `hsba(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%, ${this.alpha})`;\n default:\n return this.toFormat(format).toString(format);\n }\n }\n\n toFormat(format: ColorFormat): IColor {\n switch (format) {\n case 'hsb':\n case 'hsba':\n return this;\n case 'hsl':\n case 'hsla':\n return this.toHSL();\n case 'rgb':\n case 'rgba':\n return this.toRGB();\n default:\n throw new Error('Unsupported color conversion: hsb -> ' + format);\n }\n }\n\n /**\n * Converts a HSB color to HSL.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSV_to_HSL.\n * @returns An HSLColor object.\n */\n private toHSL(): IColor {\n let saturation = this.saturation / 100;\n let brightness = this.brightness / 100;\n let lightness = brightness * (1 - saturation / 2);\n saturation = lightness === 0 || lightness === 1 ? 0 : (brightness - lightness) / Math.min(lightness, 1 - lightness);\n\n return new HSLColor(\n toFixedNumber(this.hue, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(lightness * 100, 2),\n this.alpha\n );\n }\n\n /**\n * Converts a HSV color value to RGB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSV_to_RGB_alternative.\n * @returns An RGBColor object.\n */\n private toRGB(): IColor {\n let hue = this.hue;\n let saturation = this.saturation / 100;\n let brightness = this.brightness / 100;\n let fn = (n: number, k = (n + hue / 60) % 6) => brightness - saturation * brightness * Math.max(Math.min(k, 4 - k, 1), 0);\n return new RGBColor(\n Math.round(fn(5) * 255),\n Math.round(fn(3) * 255),\n Math.round(fn(1) * 255),\n this.alpha\n );\n }\n\n clone(): IColor {\n return new HSBColor(this.hue, this.saturation, this.brightness, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'hue':\n return {minValue: 0, maxValue: 360, step: 1, pageSize: 15};\n case 'saturation':\n case 'brightness':\n return {minValue: 0, maxValue: 100, step: 1, pageSize: 10};\n case 'alpha':\n return {minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1};\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n formatChannelValue(channel: ColorChannel, locale: string) {\n let options: Intl.NumberFormatOptions;\n let value = this.getChannelValue(channel);\n switch (channel) {\n case 'hue':\n options = {style: 'unit', unit: 'degree', unitDisplay: 'narrow'};\n break;\n case 'saturation':\n case 'brightness':\n options = {style: 'percent'};\n value /= 100;\n break;\n case 'alpha':\n options = {style: 'percent'};\n break;\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n return new NumberFormatter(locale, options).format(value);\n }\n\n getColorSpace(): ColorFormat {\n return 'hsb';\n }\n\n private static colorChannels: [ColorChannel, ColorChannel, ColorChannel] = ['hue', 'saturation', 'brightness'];\n getColorChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return HSBColor.colorChannels;\n }\n}\n\n// X = <negative/positive number with/without decimal places>\n// before/after a comma, 0 or more whitespaces are allowed\n// - hsl(X, X%, X%)\n// - hsla(X, X%, X%, X)\nconst HSL_REGEX = /hsl\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%)\\)|hsla\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d(.\\d+)?)\\)/;\n\nfunction mod(n, m) {\n return ((n % m) + m) % m;\n}\n\nclass HSLColor extends Color {\n constructor(private hue: number, private saturation: number, private lightness: number, private alpha: number) {\n super();\n }\n\n static parse(value: string): HSLColor | void {\n let m: RegExpMatchArray | void;\n if ((m = value.match(HSL_REGEX))) {\n const [h, s, l, a] = (m[1] ?? m[2]).split(',').map(n => Number(n.trim().replace('%', '')));\n return new HSLColor(mod(h, 360), clamp(s, 0, 100), clamp(l, 0, 100), clamp(a ?? 1, 0, 1));\n }\n }\n\n toString(format: ColorFormat | 'css') {\n switch (format) {\n case 'hex':\n return this.toRGB().toString('hex');\n case 'hexa':\n return this.toRGB().toString('hexa');\n case 'hsl':\n return `hsl(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.lightness, 2)}%)`;\n case 'css':\n case 'hsla':\n return `hsla(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.lightness, 2)}%, ${this.alpha})`;\n default:\n return this.toFormat(format).toString(format);\n }\n }\n toFormat(format: ColorFormat): IColor {\n switch (format) {\n case 'hsl':\n case 'hsla':\n return this;\n case 'hsb':\n case 'hsba':\n return this.toHSB();\n case 'rgb':\n case 'rgba':\n return this.toRGB();\n default:\n throw new Error('Unsupported color conversion: hsl -> ' + format);\n }\n }\n\n /**\n * Converts a HSL color to HSB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_HSV.\n * @returns An HSBColor object.\n */\n private toHSB(): IColor {\n let saturation = this.saturation / 100;\n let lightness = this.lightness / 100;\n let brightness = lightness + saturation * Math.min(lightness, 1 - lightness);\n saturation = brightness === 0 ? 0 : 2 * (1 - lightness / brightness);\n return new HSBColor(\n toFixedNumber(this.hue, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(brightness * 100, 2),\n this.alpha\n );\n }\n\n /**\n * Converts a HSL color to RGB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB_alternative.\n * @returns An RGBColor object.\n */\n private toRGB(): IColor {\n let hue = this.hue;\n let saturation = this.saturation / 100;\n let lightness = this.lightness / 100;\n let a = saturation * Math.min(lightness, 1 - lightness);\n let fn = (n: number, k = (n + hue / 30) % 12) => lightness - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n return new RGBColor(\n Math.round(fn(0) * 255),\n Math.round(fn(8) * 255),\n Math.round(fn(4) * 255),\n this.alpha\n );\n }\n\n clone(): IColor {\n return new HSLColor(this.hue, this.saturation, this.lightness, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'hue':\n return {minValue: 0, maxValue: 360, step: 1, pageSize: 15};\n case 'saturation':\n case 'lightness':\n return {minValue: 0, maxValue: 100, step: 1, pageSize: 10};\n case 'alpha':\n return {minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1};\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n formatChannelValue(channel: ColorChannel, locale: string) {\n let options: Intl.NumberFormatOptions;\n let value = this.getChannelValue(channel);\n switch (channel) {\n case 'hue':\n options = {style: 'unit', unit: 'degree', unitDisplay: 'narrow'};\n break;\n case 'saturation':\n case 'lightness':\n options = {style: 'percent'};\n value /= 100;\n break;\n case 'alpha':\n options = {style: 'percent'};\n break;\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n return new NumberFormatter(locale, options).format(value);\n }\n\n getColorSpace(): ColorFormat {\n return 'hsl';\n }\n\n private static colorChannels: [ColorChannel, ColorChannel, ColorChannel] = ['hue', 'saturation', 'lightness'];\n getColorChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return HSLColor.colorChannels;\n }\n}\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"alpha\": \"ألفا\",\n \"blue\": \"أزرق\",\n \"brightness\": \"السطوع\",\n \"green\": \"أخضر\",\n \"hue\": \"درجة اللون\",\n \"lightness\": \"الإضاءة\",\n \"red\": \"أحمر\",\n \"saturation\": \"التشبع\"\n}\n","{\n \"alpha\": \"Алфа\",\n \"blue\": \"Синьо\",\n \"brightness\": \"Яркост\",\n \"green\": \"Зелено\",\n \"hue\": \"Оттенък\",\n \"lightness\": \"Лекота\",\n \"red\": \"Червено\",\n \"saturation\": \"Наситеност\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Modrá\",\n \"brightness\": \"Jas\",\n \"green\": \"Zelená\",\n \"hue\": \"Odstín\",\n \"lightness\": \"Světlost\",\n \"red\": \"Červená\",\n \"saturation\": \"Sytost\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blå\",\n \"brightness\": \"Lysstyrke\",\n \"green\": \"Grøn\",\n \"hue\": \"Tone\",\n \"lightness\": \"Lyshed\",\n \"red\": \"Rød\",\n \"saturation\": \"Farvemætning\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Blau\",\n \"brightness\": \"Helligkeit\",\n \"green\": \"Grün\",\n \"hue\": \"Farbton\",\n \"lightness\": \"Leuchtkraft\",\n \"red\": \"Rot\",\n \"saturation\": \"Sättigung\"\n}\n","{\n \"alpha\": \"Άλφα\",\n \"blue\": \"Μπλε\",\n \"brightness\": \"Φωτεινότητα\",\n \"green\": \"Πράσινο\",\n \"hue\": \"Τόνος\",\n \"lightness\": \"Φωτεινότητα\",\n \"red\": \"Κόκκινο\",\n \"saturation\": \"Κορεσμός\"\n}\n","{\n \"hue\": \"Hue\",\n \"saturation\": \"Saturation\",\n \"lightness\": \"Lightness\",\n \"brightness\": \"Brightness\",\n \"red\": \"Red\",\n \"green\": \"Green\",\n \"blue\": \"Blue\",\n \"alpha\": \"Alpha\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Azul\",\n \"brightness\": \"Brillo\",\n \"green\": \"Verde\",\n \"hue\": \"Tono\",\n \"lightness\": \"Luminosidad\",\n \"red\": \"Rojo\",\n \"saturation\": \"Saturación\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Sinine\",\n \"brightness\": \"Heledus\",\n \"green\": \"Roheline\",\n \"hue\": \"Värv\",\n \"lightness\": \"Valgus\",\n \"red\": \"Punane\",\n \"saturation\": \"Küllastus\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Sininen\",\n \"brightness\": \"Kirkkaus\",\n \"green\": \"Vihreä\",\n \"hue\": \"Sävy\",\n \"lightness\": \"Valomäärä\",\n \"red\": \"Punainen\",\n \"saturation\": \"Värikylläisyys\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Bleu\",\n \"brightness\": \"Luminosité\",\n \"green\": \"Vert\",\n \"hue\": \"Teinte\",\n \"lightness\": \"Luminosité\",\n \"red\": \"Rouge\",\n \"saturation\": \"Saturation\"\n}\n","{\n \"alpha\": \"אלפא\",\n \"blue\": \"כחול\",\n \"brightness\": \"בהירות\",\n \"green\": \"ירוק\",\n \"hue\": \"גוון\",\n \"lightness\": \"כמות אור\",\n \"red\": \"אדום\",\n \"saturation\": \"רוויה\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Plava\",\n \"brightness\": \"Svjetlina\",\n \"green\": \"Zelena\",\n \"hue\": \"Nijansa\",\n \"lightness\": \"Osvijetljenost\",\n \"red\": \"Crvena\",\n \"saturation\": \"Zasićenost\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Kék\",\n \"brightness\": \"Fényesség\",\n \"green\": \"Zöld\",\n \"hue\": \"Színárnyalat\",\n \"lightness\": \"Világosság\",\n \"red\": \"Piros\",\n \"saturation\": \"Telítettség\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blu\",\n \"brightness\": \"Luminosità\",\n \"green\": \"Verde\",\n \"hue\": \"Tonalità\",\n \"lightness\": \"Luminosità\",\n \"red\": \"Rosso\",\n \"saturation\": \"Saturazione\"\n}\n","{\n \"alpha\": \"アルファ\",\n \"blue\": \"青\",\n \"brightness\": \"明るさ\",\n \"green\": \"緑\",\n \"hue\": \"色相\",\n \"lightness\": \"明度\",\n \"red\": \"赤\",\n \"saturation\": \"彩度\"\n}\n","{\n \"alpha\": \"알파\",\n \"blue\": \"파랑\",\n \"brightness\": \"명도\",\n \"green\": \"초록\",\n \"hue\": \"색조\",\n \"lightness\": \"밝기\",\n \"red\": \"빨강\",\n \"saturation\": \"채도\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Mėlyna\",\n \"brightness\": \"Ryškumas\",\n \"green\": \"Žalia\",\n \"hue\": \"Atspalvis\",\n \"lightness\": \"Šviesumas\",\n \"red\": \"Raudona\",\n \"saturation\": \"Įsotinimas\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Zila\",\n \"brightness\": \"Spilgtums\",\n \"green\": \"Zaļa\",\n \"hue\": \"Nokrāsa\",\n \"lightness\": \"Gaišums\",\n \"red\": \"Sarkana\",\n \"saturation\": \"Piesātinājums\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blå\",\n \"brightness\": \"Lysstyrke\",\n \"green\": \"Grønn\",\n \"hue\": \"Fargetone\",\n \"lightness\": \"Lyshet\",\n \"red\": \"Rød\",\n \"saturation\": \"Metning\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blauw\",\n \"brightness\": \"Helderheid\",\n \"green\": \"Groen\",\n \"hue\": \"Kleurtoon\",\n \"lightness\": \"Lichtsterkte\",\n \"red\": \"Rood\",\n \"saturation\": \"Verzadiging\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Niebieski\",\n \"brightness\": \"Jasność\",\n \"green\": \"Zielony\",\n \"hue\": \"Odcień\",\n \"lightness\": \"Jaskrawość\",\n \"red\": \"Czerwony\",\n \"saturation\": \"Nasycenie\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Azul\",\n \"brightness\": \"Brilho\",\n \"green\": \"Verde\",\n \"hue\": \"Matiz\",\n \"lightness\": \"Luminosidade\",\n \"red\": \"Vermelho\",\n \"saturation\": \"Saturação\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Azul\",\n \"brightness\": \"Luminosidade\",\n \"green\": \"Verde\",\n \"hue\": \"Tonalidade\",\n \"lightness\": \"Claridade\",\n \"red\": \"Vermelho\",\n \"saturation\": \"Saturação\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Albastru\",\n \"brightness\": \"Luminozitate\",\n \"green\": \"Verde\",\n \"hue\": \"Nuanță\",\n \"lightness\": \"Luminozitate\",\n \"red\": \"Roșu\",\n \"saturation\": \"Saturație\"\n}\n","{\n \"alpha\": \"Альфа\",\n \"blue\": \"Синий\",\n \"brightness\": \"Яркость\",\n \"green\": \"Зеленый\",\n \"hue\": \"Оттенок\",\n \"lightness\": \"Освещенность\",\n \"red\": \"Красный\",\n \"saturation\": \"Насыщенность\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Modrá\",\n \"brightness\": \"Jas\",\n \"green\": \"Zelená\",\n \"hue\": \"Odtieň\",\n \"lightness\": \"Svetlosť\",\n \"red\": \"Červená\",\n \"saturation\": \"Sýtosť\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Modra\",\n \"brightness\": \"Svetlost\",\n \"green\": \"Zelena\",\n \"hue\": \"Barva\",\n \"lightness\": \"Lahkost\",\n \"red\": \"Rdeča\",\n \"saturation\": \"Nasičenost\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Plava\",\n \"brightness\": \"Osvetljenost\",\n \"green\": \"Zelena\",\n \"hue\": \"Nijansa\",\n \"lightness\": \"Osvetljenje\",\n \"red\": \"Crvena\",\n \"saturation\": \"Zasićenje\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blått\",\n \"brightness\": \"Ljusstyrka\",\n \"green\": \"Grönt\",\n \"hue\": \"Nyans\",\n \"lightness\": \"Ljushet\",\n \"red\": \"Rött\",\n \"saturation\": \"Mättnad\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Mavi\",\n \"brightness\": \"Parlaklık\",\n \"green\": \"Yeşil\",\n \"hue\": \"Ton\",\n \"lightness\": \"Canlılık\",\n \"red\": \"Kırmızı\",\n \"saturation\": \"Doygunluk\"\n}\n","{\n \"alpha\": \"Альфа\",\n \"blue\": \"Синій\",\n \"brightness\": \"Яскравість\",\n \"green\": \"Зелений\",\n \"hue\": \"Тон\",\n \"lightness\": \"Освітленість\",\n \"red\": \"Червоний\",\n \"saturation\": \"Насиченість\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"蓝色\",\n \"brightness\": \"亮度\",\n \"green\": \"绿色\",\n \"hue\": \"色相\",\n \"lightness\": \"明亮度\",\n \"red\": \"红色\",\n \"saturation\": \"饱和度\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"藍色\",\n \"brightness\": \"亮度\",\n \"green\": \"綠色\",\n \"hue\": \"色相\",\n \"lightness\": \"明亮\",\n \"red\": \"紅色\",\n \"saturation\": \"飽和度\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {clamp, snapValueToStep, useControlledState} from '@react-stately/utils';\nimport {Color, ColorAreaProps, ColorChannel} from '@react-types/color';\nimport {normalizeColor, parseColor} from './Color';\nimport {useMemo, useRef, useState} from 'react';\n\nexport interface ColorAreaState {\n /** The current color value displayed by the color area. */\n readonly value: Color,\n /** Sets the current color value. If a string is passed, it will be parsed to a Color. */\n setValue(value: string | Color): void,\n\n /** The current value of the horizontal axis channel displayed by the color area. */\n xValue: number,\n /** Sets the value for the horizontal axis channel displayed by the color area, and triggers `onChange`. */\n setXValue(value: number): void,\n\n /** The current value of the vertical axis channel displayed by the color area. */\n yValue: number,\n /** Sets the value for the vertical axis channel displayed by the color area, and triggers `onChange`. */\n setYValue(value: number): void,\n\n /** Sets the x and y channels of the current color value based on a percentage of the width and height of the color area, and triggers `onChange`. */\n setColorFromPoint(x: number, y: number): void,\n /** Returns the coordinates of the thumb relative to the upper left corner of the color area as a percentage. */\n getThumbPosition(): {x: number, y: number},\n\n /** Increments the value of the horizontal axis channel by the channel step or page amount. */\n incrementX(stepSize?: number): void,\n /** Decrements the value of the horizontal axis channel by the channel step or page amount. */\n decrementX(stepSize?: number): void,\n\n /** Increments the value of the vertical axis channel by the channel step or page amount. */\n incrementY(stepSize?: number): void,\n /** Decrements the value of the vertical axis channel by the channel step or page amount. */\n decrementY(stepSize?: number): void,\n\n /** Whether the color area is currently being dragged. */\n readonly isDragging: boolean,\n /** Sets whether the color area is being dragged. */\n setDragging(value: boolean): void,\n\n /** Returns the xChannel, yChannel and zChannel names based on the color value. */\n channels: {xChannel: ColorChannel, yChannel: ColorChannel, zChannel: ColorChannel},\n /** The step value of the xChannel, used when incrementing and decrementing. */\n xChannelStep: number,\n /** The step value of the yChannel, used when incrementing and decrementing. */\n yChannelStep: number,\n /** The page step value of the xChannel, used when incrementing and decrementing. */\n xChannelPageStep: number,\n /** The page step value of the yChannel, used when incrementing and decrementing. */\n yChannelPageStep: number,\n\n /** Returns the color that should be displayed in the color area thumb instead of `value`. */\n getDisplayColor(): Color\n}\n\nconst DEFAULT_COLOR = parseColor('#ffffff');\n/**\n * Provides state management for a color area component.\n * Color area allows users to adjust two channels of an HSL, HSB or RGB color value against a two-dimensional gradient background.\n */\nexport function useColorAreaState(props: ColorAreaProps): ColorAreaState {\n let {\n value,\n defaultValue,\n xChannel,\n yChannel,\n onChange,\n onChangeEnd\n } = props;\n\n if (!value && !defaultValue) {\n defaultValue = DEFAULT_COLOR;\n }\n\n let [color, setColorState] = useControlledState(value && normalizeColor(value), defaultValue && normalizeColor(defaultValue), onChange);\n let valueRef = useRef(color);\n let setColor = (color: Color) => {\n valueRef.current = color;\n setColorState(color);\n };\n\n let channels = useMemo(() =>\n color.getColorSpaceAxes({xChannel, yChannel}),\n [color, xChannel, yChannel]\n );\n\n let xChannelRange = color.getChannelRange(channels.xChannel);\n let yChannelRange = color.getChannelRange(channels.yChannel);\n let {minValue: minValueX, maxValue: maxValueX, step: stepX, pageSize: pageSizeX} = xChannelRange;\n let {minValue: minValueY, maxValue: maxValueY, step: stepY, pageSize: pageSizeY} = yChannelRange;\n\n let [isDragging, setDragging] = useState(false);\n let isDraggingRef = useRef(false);\n\n let xValue = color.getChannelValue(channels.xChannel);\n let yValue = color.getChannelValue(channels.yChannel);\n let setXValue = (v: number) => {\n if (v === xValue) {\n return;\n }\n let newColor = color.withChannelValue(channels.xChannel, v);\n setColor(newColor);\n };\n let setYValue = (v: number) => {\n if (v === yValue) {\n return;\n }\n let newColor = color.withChannelValue(channels.yChannel, v);\n setColor(newColor);\n };\n\n return {\n channels,\n xChannelStep: stepX,\n yChannelStep: stepY,\n xChannelPageStep: pageSizeX,\n yChannelPageStep: pageSizeY,\n value: color,\n setValue(value) {\n setColor(normalizeColor(value));\n },\n xValue,\n setXValue,\n yValue,\n setYValue,\n setColorFromPoint(x: number, y: number) {\n let newXValue = minValueX + clamp(x, 0, 1) * (maxValueX - minValueX);\n let newYValue = minValueY + (1 - clamp(y, 0, 1)) * (maxValueY - minValueY);\n let newColor:Color;\n if (newXValue !== xValue) {\n // Round new value to multiple of step, clamp value between min and max\n newXValue = snapValueToStep(newXValue, minValueX, maxValueX, stepX);\n newColor = color.withChannelValue(channels.xChannel, newXValue);\n }\n if (newYValue !== yValue) {\n // Round new value to multiple of step, clamp value between min and max\n newYValue = snapValueToStep(newYValue, minValueY, maxValueY, stepY);\n newColor = (newColor || color).withChannelValue(channels.yChannel, newYValue);\n }\n if (newColor) {\n setColor(newColor);\n }\n },\n getThumbPosition() {\n let x = (xValue - minValueX) / (maxValueX - minValueX);\n let y = 1 - (yValue - minValueY) / (maxValueY - minValueY);\n return {x, y};\n },\n incrementX(stepSize) {\n setXValue(xValue + stepSize > maxValueX ? maxValueX : snapValueToStep(xValue + stepSize, minValueX, maxValueX, stepX));\n },\n incrementY(stepSize) {\n setYValue(yValue + stepSize > maxValueY ? maxValueY : snapValueToStep(yValue + stepSize, minValueY, maxValueY, stepY));\n },\n decrementX(stepSize) {\n setXValue(snapValueToStep(xValue - stepSize, minValueX, maxValueX, stepX));\n },\n decrementY(stepSize) {\n setYValue(snapValueToStep(yValue - stepSize, minValueY, maxValueY, stepY));\n },\n setDragging(isDragging) {\n let wasDragging = isDraggingRef.current;\n isDraggingRef.current = isDragging;\n\n if (onChangeEnd && !isDragging && wasDragging) {\n onChangeEnd(valueRef.current);\n }\n\n setDragging(isDragging);\n },\n isDragging,\n getDisplayColor() {\n return color.withChannelValue('alpha', 1);\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorSliderProps} from '@react-types/color';\nimport {normalizeColor, parseColor} from './Color';\nimport {SliderState, useSliderState} from '@react-stately/slider';\nimport {useControlledState} from '@react-stately/utils';\n\nexport interface ColorSliderState extends SliderState {\n /** The current color value represented by the color slider. */\n readonly value: Color,\n /** Sets the current color value. If a string is passed, it will be parsed to a Color. */\n setValue(value: string | Color): void,\n /** Returns the color that should be displayed in the slider instead of `value` or the optional parameter. */\n getDisplayColor(): Color\n}\n\n\nexport interface ColorSliderStateOptions extends ColorSliderProps {\n /** The locale to use for formatting the color channel value. */\n locale: string\n}\n\n/**\n * Provides state management for a color slider component.\n * Color sliders allow users to adjust an individual channel of a color value.\n */\nexport function useColorSliderState(props: ColorSliderStateOptions): ColorSliderState {\n let {channel, value, defaultValue, onChange, locale, ...otherProps} = props;\n if (value == null && defaultValue == null) {\n throw new Error('useColorSliderState requires a value or defaultValue');\n }\n\n let [color, setColor] = useControlledState(value && normalizeColor(value), defaultValue && normalizeColor(defaultValue), onChange);\n let sliderState = useSliderState({\n ...color.getChannelRange(channel),\n ...otherProps,\n // Unused except in getThumbValueLabel, which is overridden below. null to appease TypeScript.\n numberFormatter: null,\n value: color.getChannelValue(channel),\n onChange(v) {\n setColor(color.withChannelValue(channel, v));\n },\n onChangeEnd(v) {\n // onChange will have already been called with the right value, this is just to trigger onChangeEnd\n if (props.onChangeEnd) {\n props.onChangeEnd(color.withChannelValue(channel, v));\n }\n }\n });\n\n let {step, pageSize} = color.getChannelRange(channel);\n return {\n ...sliderState,\n value: color,\n setValue(value) {\n setColor(normalizeColor(value));\n },\n getDisplayColor() {\n switch (channel) {\n case 'hue':\n return parseColor(`hsl(${color.getChannelValue('hue')}, 100%, 50%)`);\n case 'lightness':\n case 'brightness':\n case 'saturation':\n case 'red':\n case 'green':\n case 'blue':\n return color.withChannelValue('alpha', 1);\n case 'alpha': {\n return color;\n }\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n },\n getThumbValueLabel() {\n return color.formatChannelValue(channel, locale);\n },\n step,\n pageSize\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorWheelProps} from '@react-types/color';\nimport {normalizeColor, parseColor} from './Color';\nimport {useControlledState} from '@react-stately/utils';\nimport {useRef, useState} from 'react';\n\nexport interface ColorWheelState {\n /** The current color value represented by the color wheel. */\n readonly value: Color,\n /** Sets the color value represented by the color wheel, and triggers `onChange`. */\n setValue(value: string | Color): void,\n\n /** The current value of the hue channel displayed by the color wheel. */\n readonly hue: number,\n /** Sets the hue channel of the current color value and triggers `onChange`. */\n setHue(value: number): void,\n\n /** Sets the hue channel of the current color value based on the given coordinates and radius of the color wheel, and triggers `onChange`. */\n setHueFromPoint(x: number, y: number, radius: number): void,\n /** Returns the coordinates of the thumb relative to the center point of the color wheel. */\n getThumbPosition(radius: number): {x: number, y: number},\n\n /** Increments the hue by the given amount (defaults to 1). */\n increment(stepSize?: number): void,\n /** Decrements the hue by the given amount (defaults to 1). */\n decrement(stepSize?: number): void,\n\n /** Whether the color wheel is currently being dragged. */\n readonly isDragging: boolean,\n /** Sets whether the color wheel is being dragged. */\n setDragging(value: boolean): void,\n /** Returns the color that should be displayed in the color wheel instead of `value`. */\n getDisplayColor(): Color,\n /** The step value of the hue channel, used when incrementing and decrementing. */\n step: number,\n /** The page step value of the hue channel, used when incrementing and decrementing. */\n pageStep: number\n}\n\nconst DEFAULT_COLOR = parseColor('hsl(0, 100%, 50%)');\n\nfunction roundToStep(value: number, step: number): number {\n return Math.round(value / step) * step;\n}\n\nfunction mod(n: number, m: number) {\n return ((n % m) + m) % m;\n}\n\nfunction roundDown(v: number) {\n let r = Math.floor(v);\n if (r === v) {\n return v - 1;\n } else {\n return r;\n }\n}\n\nfunction degToRad(deg: number) {\n return deg * Math.PI / 180;\n}\n\nfunction radToDeg(rad: number) {\n return rad * 180 / Math.PI;\n}\n\n// 0deg = 3 o'clock. increases clockwise\nfunction angleToCartesian(angle: number, radius: number): {x: number, y: number} {\n let rad = degToRad(360 - angle + 90);\n let x = Math.sin(rad) * (radius);\n let y = Math.cos(rad) * (radius);\n return {x, y};\n}\n\nfunction cartesianToAngle(x: number, y: number, radius: number): number {\n let deg = radToDeg(Math.atan2(y / radius, x / radius));\n return (deg + 360) % 360;\n}\n\n/**\n * Provides state management for a color wheel component.\n * Color wheels allow users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport function useColorWheelState(props: ColorWheelProps): ColorWheelState {\n let {defaultValue, onChange, onChangeEnd} = props;\n\n if (!props.value && !defaultValue) {\n defaultValue = DEFAULT_COLOR;\n }\n\n let [value, setValueState] = useControlledState(normalizeColor(props.value), normalizeColor(defaultValue), onChange);\n let valueRef = useRef(value);\n let setValue = (value: Color) => {\n valueRef.current = value;\n setValueState(value);\n };\n\n let channelRange = value.getChannelRange('hue');\n let {minValue: minValueX, maxValue: maxValueX, step: step, pageSize: pageStep} = channelRange;\n let [isDragging, setDragging] = useState(false);\n let isDraggingRef = useRef(false);\n\n let hue = value.getChannelValue('hue');\n function setHue(v: number) {\n if (v > 360) {\n // Make sure you can always get back to 0.\n v = 0;\n }\n v = roundToStep(mod(v, 360), step);\n if (hue !== v) {\n let color = value.withChannelValue('hue', v);\n setValue(color);\n }\n }\n\n return {\n value,\n step,\n pageStep,\n setValue(v) {\n let color = normalizeColor(v);\n setValue(color);\n },\n hue,\n setHue,\n setHueFromPoint(x, y, radius) {\n setHue(cartesianToAngle(x, y, radius));\n },\n getThumbPosition(radius) {\n return angleToCartesian(value.getChannelValue('hue'), radius);\n },\n increment(stepSize = 1) {\n let s = Math.max(stepSize, step);\n let newValue = hue + s;\n if (newValue >= maxValueX) {\n // Make sure you can always get back to 0.\n newValue = minValueX;\n }\n setHue(roundToStep(mod(newValue, 360), s));\n },\n decrement(stepSize = 1) {\n let s = Math.max(stepSize, step);\n if (hue === 0) {\n // We can't just subtract step because this might be the case:\n // |(previous step) - 0| < step size\n setHue(roundDown(360 / s) * s);\n } else {\n setHue(roundToStep(mod(hue - s, 360), s));\n }\n },\n setDragging(isDragging) {\n let wasDragging = isDraggingRef.current;\n isDraggingRef.current = isDragging;\n\n if (onChangeEnd && !isDragging && wasDragging) {\n onChangeEnd(valueRef.current);\n }\n\n setDragging(isDragging);\n },\n isDragging,\n getDisplayColor() {\n return value.toFormat('hsl').withChannelValue('saturation', 100).withChannelValue('lightness', 50).withChannelValue('alpha', 1);\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorFieldProps} from '@react-types/color';\nimport {parseColor} from './Color';\nimport {useColor} from './useColor';\nimport {useControlledState} from '@react-stately/utils';\nimport {useMemo, useState} from 'react';\n\nexport interface ColorFieldState {\n /**\n * The current text value of the input. Updated as the user types,\n * and formatted according to `formatOptions` on blur.\n */\n readonly inputValue: string,\n /**\n * The currently parsed color value, or null if the field is empty.\n * Updated based on the `inputValue` as the user types.\n */\n readonly colorValue: Color,\n /** Sets the current text value of the input. */\n setInputValue(value: string): void,\n /**\n * Updates the input value based on the currently parsed color value.\n * Typically this is called when the field is blurred.\n */\n commit(): void,\n /** Increments the current input value to the next step boundary, and fires `onChange`. */\n increment(): void,\n /** Decrements the current input value to the next step boundary, and fires `onChange`. */\n decrement(): void,\n /** Sets the current value to the maximum color value, and fires `onChange`. */\n incrementToMax(): void,\n /** Sets the current value to the minimum color value, and fires `onChange`. */\n decrementToMin(): void,\n /**\n * Validates a user input string.\n * Values can be partially entered, and may be valid even if they cannot currently be parsed to a color.\n * Can be used to implement validation as a user types.\n */\n validate(value: string): boolean\n}\n\nconst MIN_COLOR = parseColor('#000000');\nconst MAX_COLOR = parseColor('#FFFFFF');\nconst MIN_COLOR_INT = MIN_COLOR.toHexInt();\nconst MAX_COLOR_INT = MAX_COLOR.toHexInt();\n\n/**\n * Provides state management for a color field component. Color fields allow\n * users to enter and adjust a hex color value.\n */\nexport function useColorFieldState(\n props: ColorFieldProps\n): ColorFieldState {\n let {\n value,\n defaultValue,\n onChange\n } = props;\n let {step} = MIN_COLOR.getChannelRange('red');\n\n let initialValue = useColor(value);\n let initialDefaultValue = useColor(defaultValue);\n let [colorValue, setColorValue] = useControlledState<Color>(initialValue, initialDefaultValue, onChange);\n let [inputValue, setInputValue] = useState(() => (value || defaultValue) && colorValue ? colorValue.toString('hex') : '');\n\n let safelySetColorValue = (newColor: Color) => {\n if (!colorValue || !newColor) {\n setColorValue(newColor);\n return;\n }\n if (newColor.toHexInt() !== colorValue.toHexInt()) {\n setColorValue(newColor);\n return;\n }\n };\n\n let [prevValue, setPrevValue] = useState(colorValue);\n if (prevValue !== colorValue) {\n setInputValue(colorValue ? colorValue.toString('hex') : '');\n setPrevValue(colorValue);\n }\n\n let parsedValue = useMemo(() => {\n let color;\n try {\n color = parseColor(inputValue.startsWith('#') ? inputValue : `#${inputValue}`);\n } catch (err) {\n color = null;\n }\n return color;\n }, [inputValue]);\n\n let commit = () => {\n // Set to empty state if input value is empty\n if (!inputValue.length) {\n safelySetColorValue(null);\n setInputValue(value === undefined ? '' : colorValue.toString('hex'));\n return;\n }\n\n // if it failed to parse, then reset input to formatted version of current number\n if (parsedValue == null) {\n setInputValue(colorValue ? colorValue.toString('hex') : '');\n return;\n }\n\n safelySetColorValue(parsedValue);\n // in a controlled state, the numberValue won't change, so we won't go back to our old input without help\n let newColorValue = '';\n if (colorValue) {\n newColorValue = colorValue.toString('hex');\n }\n setInputValue(newColorValue);\n };\n\n let increment = () => {\n let newValue = addColorValue(parsedValue, step);\n // if we've arrived at the same value that was previously in the state, the\n // input value should be updated to match\n // ex type 4, press increment, highlight the number in the input, type 4 again, press increment\n // you'd be at 5, then incrementing to 5 again, so no re-render would happen and 4 would be left in the input\n if (newValue === colorValue) {\n setInputValue(newValue.toString('hex'));\n }\n safelySetColorValue(newValue);\n };\n let decrement = () => {\n let newValue = addColorValue(parsedValue, -step);\n // if we've arrived at the same value that was previously in the state, the\n // input value should be updated to match\n // ex type 4, press increment, highlight the number in the input, type 4 again, press increment\n // you'd be at 5, then incrementing to 5 again, so no re-render would happen and 4 would be left in the input\n if (newValue === colorValue) {\n setInputValue(newValue.toString('hex'));\n }\n safelySetColorValue(newValue);\n };\n let incrementToMax = () => safelySetColorValue(MAX_COLOR);\n let decrementToMin = () => safelySetColorValue(MIN_COLOR);\n\n let validate = (value: string) => value === '' || !!value.match(/^#?[0-9a-f]{0,6}$/i)?.[0];\n\n return {\n validate,\n colorValue,\n inputValue,\n setInputValue,\n commit,\n increment,\n incrementToMax,\n decrement,\n decrementToMin\n };\n}\n\nfunction addColorValue(color: Color, step: number) {\n let newColor = color ? color : MIN_COLOR;\n let colorInt = newColor.toHexInt();\n\n let clampInt = Math.min(Math.max(colorInt + step, MIN_COLOR_INT), MAX_COLOR_INT);\n if (clampInt !== colorInt) {\n let newColorString = `#${clampInt.toString(16).padStart(6, '0').toUpperCase()}`;\n newColor = parseColor(newColorString);\n }\n return newColor;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color} from '@react-types/color';\nimport {parseColor} from './Color';\nimport {useMemo} from 'react';\n\nexport function useColor(value: string | Color | undefined | null) {\n return useMemo(() => {\n if (typeof value === 'string') {\n try {\n return parseColor(value);\n } catch (err) {\n return undefined;\n }\n }\n return value;\n }, [value]);\n}\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;;;AEVD,4BAAiB;IAAG,SAAS,CAAC,IAAI,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC;IACd,cAAc,CAAC,MAAM,CAAC;IACtB,SAAS,CAAC,IAAI,CAAC;IACf,OAAO,CAAC,UAAU,CAAC;IACnB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IAAI,WAAW,CAAC;YAAoC;QAAlB,OAAA,UAAU,MAAM,CAAC,CAAC,CAAA,CAAA,eAAA,MAAM,MAAM,mCAAZ,0BAAA,KAAA,IAAA,YAAmC,CAAC,EAAE,AAAD;;IAEzF,OAAO;kBACL;oBACA;oBACA;uBACA;gBACA;mBACA;wBACA;mBACA;wBACA;IACF;AACF;AAEA,SAAS,oCAAc,KAAY,EAAE,IAAY;IAC/C,IAAI,WAAW,QAAQ,QAAQ;IAC/B,IAAI,WAAW,SAAS;IAExB,IAAI,WAAW,KAAK,IAAI,KAAK,IAAI,WAAW,MAAM,sCAAgB;IAClE,IAAI,aAAa,UAAU;QACzB,IAAI,iBAAiB,CAAC,CAAC,EAAE,SAAS,SAAS,IAAI,SAAS,GAAG,KAAK,cAAc,CAAC;QAC/E,WAAW,CAAA,GAAA,wCAAS,EAAE;IACxB;IACA,OAAO;AACT;;","sources":["packages/@react-stately/color/src/index.ts","packages/@react-stately/color/src/Color.ts","packages/@react-stately/color/src/*.js","packages/@react-stately/color/intl/ar-AE.json","packages/@react-stately/color/intl/bg-BG.json","packages/@react-stately/color/intl/cs-CZ.json","packages/@react-stately/color/intl/da-DK.json","packages/@react-stately/color/intl/de-DE.json","packages/@react-stately/color/intl/el-GR.json","packages/@react-stately/color/intl/en-US.json","packages/@react-stately/color/intl/es-ES.json","packages/@react-stately/color/intl/et-EE.json","packages/@react-stately/color/intl/fi-FI.json","packages/@react-stately/color/intl/fr-FR.json","packages/@react-stately/color/intl/he-IL.json","packages/@react-stately/color/intl/hr-HR.json","packages/@react-stately/color/intl/hu-HU.json","packages/@react-stately/color/intl/it-IT.json","packages/@react-stately/color/intl/ja-JP.json","packages/@react-stately/color/intl/ko-KR.json","packages/@react-stately/color/intl/lt-LT.json","packages/@react-stately/color/intl/lv-LV.json","packages/@react-stately/color/intl/nb-NO.json","packages/@react-stately/color/intl/nl-NL.json","packages/@react-stately/color/intl/pl-PL.json","packages/@react-stately/color/intl/pt-BR.json","packages/@react-stately/color/intl/pt-PT.json","packages/@react-stately/color/intl/ro-RO.json","packages/@react-stately/color/intl/ru-RU.json","packages/@react-stately/color/intl/sk-SK.json","packages/@react-stately/color/intl/sl-SI.json","packages/@react-stately/color/intl/sr-SP.json","packages/@react-stately/color/intl/sv-SE.json","packages/@react-stately/color/intl/tr-TR.json","packages/@react-stately/color/intl/uk-UA.json","packages/@react-stately/color/intl/zh-CN.json","packages/@react-stately/color/intl/zh-TW.json","packages/@react-stately/color/src/useColorAreaState.ts","packages/@react-stately/color/src/useColorSliderState.ts","packages/@react-stately/color/src/useColorWheelState.ts","packages/@react-stately/color/src/useColorFieldState.ts","packages/@react-stately/color/src/useColor.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport type {ColorAreaState} from './useColorAreaState';\nexport type {ColorSliderState} from './useColorSliderState';\nexport type {ColorWheelState} from './useColorWheelState';\nexport type {ColorFieldState} from './useColorFieldState';\n\nexport {parseColor} from './Color';\nexport {useColorAreaState} from './useColorAreaState';\nexport {useColorSliderState} from './useColorSliderState';\nexport {useColorWheelState} from './useColorWheelState';\nexport {useColorFieldState} from './useColorFieldState';\n\nexport type {Color, ColorAreaProps, ColorFieldProps, ColorWheelProps} from '@react-types/color';\nexport type {ColorSliderStateOptions} from './useColorSliderState';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {clamp, toFixedNumber} from '@react-stately/utils';\nimport {ColorAxes, ColorChannel, ColorChannelRange, ColorFormat, Color as IColor} from '@react-types/color';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {LocalizedStringDictionary} from '@internationalized/string';\nimport {NumberFormatter} from '@internationalized/number';\n\nconst strings = new LocalizedStringDictionary(intlMessages);\n\n/** Parses a color from a string value. Throws an error if the string could not be parsed. */\nexport function parseColor(value: string): IColor {\n let res = RGBColor.parse(value) || HSBColor.parse(value) || HSLColor.parse(value);\n if (res) {\n return res;\n }\n\n throw new Error('Invalid color value: ' + value);\n}\n\nexport function normalizeColor(v: string | IColor) {\n if (typeof v === 'string') {\n return parseColor(v);\n } else {\n return v;\n }\n}\n\nabstract class Color implements IColor {\n abstract toFormat(format: ColorFormat): IColor;\n abstract toString(format: ColorFormat | 'css'): string;\n abstract clone(): IColor;\n abstract getChannelRange(channel: ColorChannel): ColorChannelRange;\n abstract formatChannelValue(channel: ColorChannel, locale: string): string;\n\n toHexInt(): number {\n return this.toFormat('rgb').toHexInt();\n }\n\n getChannelValue(channel: ColorChannel): number {\n if (channel in this) {\n return this[channel];\n }\n\n throw new Error('Unsupported color channel: ' + channel);\n }\n\n withChannelValue(channel: ColorChannel, value: number): IColor {\n if (channel in this) {\n let x = this.clone();\n x[channel] = value;\n return x;\n }\n\n throw new Error('Unsupported color channel: ' + channel);\n }\n\n getChannelName(channel: ColorChannel, locale: string) {\n return strings.getStringForLocale(channel, locale);\n }\n\n abstract getColorSpace(): ColorFormat\n getColorSpaceAxes(xyChannels: {xChannel?: ColorChannel, yChannel?: ColorChannel}): ColorAxes {\n let {xChannel, yChannel} = xyChannels;\n let xCh = xChannel || this.getColorChannels().find(c => c !== yChannel);\n let yCh = yChannel || this.getColorChannels().find(c => c !== xCh);\n let zCh = this.getColorChannels().find(c => c !== xCh && c !== yCh);\n\n return {xChannel: xCh, yChannel: yCh, zChannel: zCh};\n }\n abstract getColorChannels(): [ColorChannel, ColorChannel, ColorChannel]\n}\nclass RGBColor extends Color {\n constructor(private red: number, private green: number, private blue: number, private alpha: number) {\n super();\n }\n\n static parse(value: string) {\n let colors = [];\n // matching #rgb, #rgba, #rrggbb, #rrggbbaa\n if (/^#[\\da-f]+$/i.test(value) && [4, 5, 7, 9].includes(value.length)) {\n const values = (value.length < 6 ? value.replace(/[^#]/gi, '$&$&') : value).slice(1).split('');\n while (values.length > 0) {\n colors.push(parseInt(values.splice(0, 2).join(''), 16));\n }\n colors[3] = colors[3] !== undefined ? colors[3] / 255 : undefined;\n }\n\n // matching rgb(rrr, ggg, bbb), rgba(rrr, ggg, bbb, 0.a)\n const match = value.match(/^rgba?\\((.*)\\)$/);\n if (match?.[1]) {\n colors = match[1].split(',').map(value => Number(value.trim()));\n colors = colors.map((num, i) => clamp(num, 0, i < 3 ? 255 : 1));\n }\n\n return colors.length < 3 ? undefined : new RGBColor(colors[0], colors[1], colors[2], colors[3] ?? 1);\n }\n\n\n toString(format: ColorFormat | 'css') {\n switch (format) {\n case 'hex':\n return '#' + (this.red.toString(16).padStart(2, '0') + this.green.toString(16).padStart(2, '0') + this.blue.toString(16).padStart(2, '0')).toUpperCase();\n case 'hexa':\n return '#' + (this.red.toString(16).padStart(2, '0') + this.green.toString(16).padStart(2, '0') + this.blue.toString(16).padStart(2, '0') + Math.round(this.alpha * 255).toString(16).padStart(2, '0')).toUpperCase();\n case 'rgb':\n return `rgb(${this.red}, ${this.green}, ${this.blue})`;\n case 'css':\n case 'rgba':\n return `rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;\n default:\n return this.toFormat(format).toString(format);\n }\n }\n\n toFormat(format: ColorFormat): IColor {\n switch (format) {\n case 'hex':\n case 'hexa':\n case 'rgb':\n case 'rgba':\n return this;\n case 'hsb':\n case 'hsba':\n return this.toHSB();\n case 'hsl':\n case 'hsla':\n return this.toHSL();\n default:\n throw new Error('Unsupported color conversion: rgb -> ' + format);\n }\n }\n\n toHexInt(): number {\n return this.red << 16 | this.green << 8 | this.blue;\n }\n\n /**\n * Converts an RGB color value to HSB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB.\n * @returns An HSBColor object.\n */\n private toHSB(): IColor {\n const red = this.red / 255;\n const green = this.green / 255;\n const blue = this.blue / 255;\n const min = Math.min(red, green, blue);\n const brightness = Math.max(red, green, blue);\n const chroma = brightness - min;\n const saturation = brightness === 0 ? 0 : chroma / brightness;\n let hue = 0; // achromatic\n\n if (chroma !== 0) {\n switch (brightness) {\n case red:\n hue = (green - blue) / chroma + (green < blue ? 6 : 0);\n break;\n case green:\n hue = (blue - red) / chroma + 2;\n break;\n case blue:\n hue = (red - green) / chroma + 4;\n break;\n }\n\n hue /= 6;\n }\n\n return new HSBColor(\n toFixedNumber(hue * 360, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(brightness * 100, 2),\n this.alpha\n );\n }\n\n /**\n * Converts an RGB color value to HSL.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB.\n * @returns An HSLColor object.\n */\n private toHSL(): IColor {\n const red = this.red / 255;\n const green = this.green / 255;\n const blue = this.blue / 255;\n const min = Math.min(red, green, blue);\n const max = Math.max(red, green, blue);\n const lightness = (max + min) / 2;\n const chroma = max - min;\n let hue: number;\n let saturation: number;\n\n if (chroma === 0) {\n hue = saturation = 0; // achromatic\n } else {\n saturation = chroma / (lightness < .5 ? max + min : 2 - max - min);\n\n switch (max) {\n case red:\n hue = (green - blue) / chroma + (green < blue ? 6 : 0);\n break;\n case green:\n hue = (blue - red) / chroma + 2;\n break;\n case blue:\n hue = (red - green) / chroma + 4;\n break;\n }\n\n hue /= 6;\n }\n\n return new HSLColor(\n toFixedNumber(hue * 360, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(lightness * 100, 2),\n this.alpha);\n }\n\n clone(): IColor {\n return new RGBColor(this.red, this.green, this.blue, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'red':\n case 'green':\n case 'blue':\n return {minValue: 0x0, maxValue: 0xFF, step: 0x1, pageSize: 0x11};\n case 'alpha':\n return {minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1};\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n formatChannelValue(channel: ColorChannel, locale: string) {\n let options: Intl.NumberFormatOptions;\n let value = this.getChannelValue(channel);\n switch (channel) {\n case 'red':\n case 'green':\n case 'blue':\n options = {style: 'decimal'};\n break;\n case 'alpha':\n options = {style: 'percent'};\n break;\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n return new NumberFormatter(locale, options).format(value);\n }\n\n getColorSpace(): ColorFormat {\n return 'rgb';\n }\n\n private static colorChannels: [ColorChannel, ColorChannel, ColorChannel] = ['red', 'green', 'blue'];\n getColorChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return RGBColor.colorChannels;\n }\n}\n\n// X = <negative/positive number with/without decimal places>\n// before/after a comma, 0 or more whitespaces are allowed\n// - hsb(X, X%, X%)\n// - hsba(X, X%, X%, X)\nconst HSB_REGEX = /hsb\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%)\\)|hsba\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d(.\\d+)?)\\)/;\n\nclass HSBColor extends Color {\n constructor(private hue: number, private saturation: number, private brightness: number, private alpha: number) {\n super();\n }\n\n static parse(value: string): HSBColor | void {\n let m: RegExpMatchArray | void;\n if ((m = value.match(HSB_REGEX))) {\n const [h, s, b, a] = (m[1] ?? m[2]).split(',').map(n => Number(n.trim().replace('%', '')));\n return new HSBColor(mod(h, 360), clamp(s, 0, 100), clamp(b, 0, 100), clamp(a ?? 1, 0, 1));\n }\n }\n\n toString(format: ColorFormat | 'css') {\n switch (format) {\n case 'css':\n return this.toHSL().toString('css');\n case 'hex':\n return this.toRGB().toString('hex');\n case 'hexa':\n return this.toRGB().toString('hexa');\n case 'hsb':\n return `hsb(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%)`;\n case 'hsba':\n return `hsba(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%, ${this.alpha})`;\n default:\n return this.toFormat(format).toString(format);\n }\n }\n\n toFormat(format: ColorFormat): IColor {\n switch (format) {\n case 'hsb':\n case 'hsba':\n return this;\n case 'hsl':\n case 'hsla':\n return this.toHSL();\n case 'rgb':\n case 'rgba':\n return this.toRGB();\n default:\n throw new Error('Unsupported color conversion: hsb -> ' + format);\n }\n }\n\n /**\n * Converts a HSB color to HSL.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSV_to_HSL.\n * @returns An HSLColor object.\n */\n private toHSL(): IColor {\n let saturation = this.saturation / 100;\n let brightness = this.brightness / 100;\n let lightness = brightness * (1 - saturation / 2);\n saturation = lightness === 0 || lightness === 1 ? 0 : (brightness - lightness) / Math.min(lightness, 1 - lightness);\n\n return new HSLColor(\n toFixedNumber(this.hue, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(lightness * 100, 2),\n this.alpha\n );\n }\n\n /**\n * Converts a HSV color value to RGB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSV_to_RGB_alternative.\n * @returns An RGBColor object.\n */\n private toRGB(): IColor {\n let hue = this.hue;\n let saturation = this.saturation / 100;\n let brightness = this.brightness / 100;\n let fn = (n: number, k = (n + hue / 60) % 6) => brightness - saturation * brightness * Math.max(Math.min(k, 4 - k, 1), 0);\n return new RGBColor(\n Math.round(fn(5) * 255),\n Math.round(fn(3) * 255),\n Math.round(fn(1) * 255),\n this.alpha\n );\n }\n\n clone(): IColor {\n return new HSBColor(this.hue, this.saturation, this.brightness, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'hue':\n return {minValue: 0, maxValue: 360, step: 1, pageSize: 15};\n case 'saturation':\n case 'brightness':\n return {minValue: 0, maxValue: 100, step: 1, pageSize: 10};\n case 'alpha':\n return {minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1};\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n formatChannelValue(channel: ColorChannel, locale: string) {\n let options: Intl.NumberFormatOptions;\n let value = this.getChannelValue(channel);\n switch (channel) {\n case 'hue':\n options = {style: 'unit', unit: 'degree', unitDisplay: 'narrow'};\n break;\n case 'saturation':\n case 'brightness':\n options = {style: 'percent'};\n value /= 100;\n break;\n case 'alpha':\n options = {style: 'percent'};\n break;\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n return new NumberFormatter(locale, options).format(value);\n }\n\n getColorSpace(): ColorFormat {\n return 'hsb';\n }\n\n private static colorChannels: [ColorChannel, ColorChannel, ColorChannel] = ['hue', 'saturation', 'brightness'];\n getColorChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return HSBColor.colorChannels;\n }\n}\n\n// X = <negative/positive number with/without decimal places>\n// before/after a comma, 0 or more whitespaces are allowed\n// - hsl(X, X%, X%)\n// - hsla(X, X%, X%, X)\nconst HSL_REGEX = /hsl\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%)\\)|hsla\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d(.\\d+)?)\\)/;\n\nfunction mod(n, m) {\n return ((n % m) + m) % m;\n}\n\nclass HSLColor extends Color {\n constructor(private hue: number, private saturation: number, private lightness: number, private alpha: number) {\n super();\n }\n\n static parse(value: string): HSLColor | void {\n let m: RegExpMatchArray | void;\n if ((m = value.match(HSL_REGEX))) {\n const [h, s, l, a] = (m[1] ?? m[2]).split(',').map(n => Number(n.trim().replace('%', '')));\n return new HSLColor(mod(h, 360), clamp(s, 0, 100), clamp(l, 0, 100), clamp(a ?? 1, 0, 1));\n }\n }\n\n toString(format: ColorFormat | 'css') {\n switch (format) {\n case 'hex':\n return this.toRGB().toString('hex');\n case 'hexa':\n return this.toRGB().toString('hexa');\n case 'hsl':\n return `hsl(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.lightness, 2)}%)`;\n case 'css':\n case 'hsla':\n return `hsla(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.lightness, 2)}%, ${this.alpha})`;\n default:\n return this.toFormat(format).toString(format);\n }\n }\n toFormat(format: ColorFormat): IColor {\n switch (format) {\n case 'hsl':\n case 'hsla':\n return this;\n case 'hsb':\n case 'hsba':\n return this.toHSB();\n case 'rgb':\n case 'rgba':\n return this.toRGB();\n default:\n throw new Error('Unsupported color conversion: hsl -> ' + format);\n }\n }\n\n /**\n * Converts a HSL color to HSB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_HSV.\n * @returns An HSBColor object.\n */\n private toHSB(): IColor {\n let saturation = this.saturation / 100;\n let lightness = this.lightness / 100;\n let brightness = lightness + saturation * Math.min(lightness, 1 - lightness);\n saturation = brightness === 0 ? 0 : 2 * (1 - lightness / brightness);\n return new HSBColor(\n toFixedNumber(this.hue, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(brightness * 100, 2),\n this.alpha\n );\n }\n\n /**\n * Converts a HSL color to RGB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB_alternative.\n * @returns An RGBColor object.\n */\n private toRGB(): IColor {\n let hue = this.hue;\n let saturation = this.saturation / 100;\n let lightness = this.lightness / 100;\n let a = saturation * Math.min(lightness, 1 - lightness);\n let fn = (n: number, k = (n + hue / 30) % 12) => lightness - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n return new RGBColor(\n Math.round(fn(0) * 255),\n Math.round(fn(8) * 255),\n Math.round(fn(4) * 255),\n this.alpha\n );\n }\n\n clone(): IColor {\n return new HSLColor(this.hue, this.saturation, this.lightness, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'hue':\n return {minValue: 0, maxValue: 360, step: 1, pageSize: 15};\n case 'saturation':\n case 'lightness':\n return {minValue: 0, maxValue: 100, step: 1, pageSize: 10};\n case 'alpha':\n return {minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1};\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n formatChannelValue(channel: ColorChannel, locale: string) {\n let options: Intl.NumberFormatOptions;\n let value = this.getChannelValue(channel);\n switch (channel) {\n case 'hue':\n options = {style: 'unit', unit: 'degree', unitDisplay: 'narrow'};\n break;\n case 'saturation':\n case 'lightness':\n options = {style: 'percent'};\n value /= 100;\n break;\n case 'alpha':\n options = {style: 'percent'};\n break;\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n return new NumberFormatter(locale, options).format(value);\n }\n\n getColorSpace(): ColorFormat {\n return 'hsl';\n }\n\n private static colorChannels: [ColorChannel, ColorChannel, ColorChannel] = ['hue', 'saturation', 'lightness'];\n getColorChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return HSLColor.colorChannels;\n }\n}\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"alpha\": \"ألفا\",\n \"blue\": \"أزرق\",\n \"brightness\": \"السطوع\",\n \"green\": \"أخضر\",\n \"hue\": \"درجة اللون\",\n \"lightness\": \"الإضاءة\",\n \"red\": \"أحمر\",\n \"saturation\": \"التشبع\"\n}\n","{\n \"alpha\": \"Алфа\",\n \"blue\": \"Синьо\",\n \"brightness\": \"Яркост\",\n \"green\": \"Зелено\",\n \"hue\": \"Оттенък\",\n \"lightness\": \"Лекота\",\n \"red\": \"Червено\",\n \"saturation\": \"Наситеност\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Modrá\",\n \"brightness\": \"Jas\",\n \"green\": \"Zelená\",\n \"hue\": \"Odstín\",\n \"lightness\": \"Světlost\",\n \"red\": \"Červená\",\n \"saturation\": \"Sytost\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blå\",\n \"brightness\": \"Lysstyrke\",\n \"green\": \"Grøn\",\n \"hue\": \"Tone\",\n \"lightness\": \"Lyshed\",\n \"red\": \"Rød\",\n \"saturation\": \"Farvemætning\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Blau\",\n \"brightness\": \"Helligkeit\",\n \"green\": \"Grün\",\n \"hue\": \"Farbton\",\n \"lightness\": \"Leuchtkraft\",\n \"red\": \"Rot\",\n \"saturation\": \"Sättigung\"\n}\n","{\n \"alpha\": \"Άλφα\",\n \"blue\": \"Μπλε\",\n \"brightness\": \"Φωτεινότητα\",\n \"green\": \"Πράσινο\",\n \"hue\": \"Τόνος\",\n \"lightness\": \"Φωτεινότητα\",\n \"red\": \"Κόκκινο\",\n \"saturation\": \"Κορεσμός\"\n}\n","{\n \"hue\": \"Hue\",\n \"saturation\": \"Saturation\",\n \"lightness\": \"Lightness\",\n \"brightness\": \"Brightness\",\n \"red\": \"Red\",\n \"green\": \"Green\",\n \"blue\": \"Blue\",\n \"alpha\": \"Alpha\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Azul\",\n \"brightness\": \"Brillo\",\n \"green\": \"Verde\",\n \"hue\": \"Tono\",\n \"lightness\": \"Luminosidad\",\n \"red\": \"Rojo\",\n \"saturation\": \"Saturación\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Sinine\",\n \"brightness\": \"Heledus\",\n \"green\": \"Roheline\",\n \"hue\": \"Värv\",\n \"lightness\": \"Valgus\",\n \"red\": \"Punane\",\n \"saturation\": \"Küllastus\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Sininen\",\n \"brightness\": \"Kirkkaus\",\n \"green\": \"Vihreä\",\n \"hue\": \"Sävy\",\n \"lightness\": \"Valomäärä\",\n \"red\": \"Punainen\",\n \"saturation\": \"Värikylläisyys\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Bleu\",\n \"brightness\": \"Luminosité\",\n \"green\": \"Vert\",\n \"hue\": \"Teinte\",\n \"lightness\": \"Luminosité\",\n \"red\": \"Rouge\",\n \"saturation\": \"Saturation\"\n}\n","{\n \"alpha\": \"אלפא\",\n \"blue\": \"כחול\",\n \"brightness\": \"בהירות\",\n \"green\": \"ירוק\",\n \"hue\": \"גוון\",\n \"lightness\": \"כמות אור\",\n \"red\": \"אדום\",\n \"saturation\": \"רוויה\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Plava\",\n \"brightness\": \"Svjetlina\",\n \"green\": \"Zelena\",\n \"hue\": \"Nijansa\",\n \"lightness\": \"Osvijetljenost\",\n \"red\": \"Crvena\",\n \"saturation\": \"Zasićenost\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Kék\",\n \"brightness\": \"Fényesség\",\n \"green\": \"Zöld\",\n \"hue\": \"Színárnyalat\",\n \"lightness\": \"Világosság\",\n \"red\": \"Piros\",\n \"saturation\": \"Telítettség\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blu\",\n \"brightness\": \"Luminosità\",\n \"green\": \"Verde\",\n \"hue\": \"Tonalità\",\n \"lightness\": \"Luminosità\",\n \"red\": \"Rosso\",\n \"saturation\": \"Saturazione\"\n}\n","{\n \"alpha\": \"アルファ\",\n \"blue\": \"青\",\n \"brightness\": \"明るさ\",\n \"green\": \"緑\",\n \"hue\": \"色相\",\n \"lightness\": \"明度\",\n \"red\": \"赤\",\n \"saturation\": \"彩度\"\n}\n","{\n \"alpha\": \"알파\",\n \"blue\": \"파랑\",\n \"brightness\": \"명도\",\n \"green\": \"초록\",\n \"hue\": \"색조\",\n \"lightness\": \"밝기\",\n \"red\": \"빨강\",\n \"saturation\": \"채도\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Mėlyna\",\n \"brightness\": \"Ryškumas\",\n \"green\": \"Žalia\",\n \"hue\": \"Atspalvis\",\n \"lightness\": \"Šviesumas\",\n \"red\": \"Raudona\",\n \"saturation\": \"Įsotinimas\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Zila\",\n \"brightness\": \"Spilgtums\",\n \"green\": \"Zaļa\",\n \"hue\": \"Nokrāsa\",\n \"lightness\": \"Gaišums\",\n \"red\": \"Sarkana\",\n \"saturation\": \"Piesātinājums\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blå\",\n \"brightness\": \"Lysstyrke\",\n \"green\": \"Grønn\",\n \"hue\": \"Fargetone\",\n \"lightness\": \"Lyshet\",\n \"red\": \"Rød\",\n \"saturation\": \"Metning\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blauw\",\n \"brightness\": \"Helderheid\",\n \"green\": \"Groen\",\n \"hue\": \"Kleurtoon\",\n \"lightness\": \"Lichtsterkte\",\n \"red\": \"Rood\",\n \"saturation\": \"Verzadiging\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Niebieski\",\n \"brightness\": \"Jasność\",\n \"green\": \"Zielony\",\n \"hue\": \"Odcień\",\n \"lightness\": \"Jaskrawość\",\n \"red\": \"Czerwony\",\n \"saturation\": \"Nasycenie\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Azul\",\n \"brightness\": \"Brilho\",\n \"green\": \"Verde\",\n \"hue\": \"Matiz\",\n \"lightness\": \"Luminosidade\",\n \"red\": \"Vermelho\",\n \"saturation\": \"Saturação\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Azul\",\n \"brightness\": \"Luminosidade\",\n \"green\": \"Verde\",\n \"hue\": \"Tonalidade\",\n \"lightness\": \"Claridade\",\n \"red\": \"Vermelho\",\n \"saturation\": \"Saturação\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Albastru\",\n \"brightness\": \"Luminozitate\",\n \"green\": \"Verde\",\n \"hue\": \"Nuanță\",\n \"lightness\": \"Luminozitate\",\n \"red\": \"Roșu\",\n \"saturation\": \"Saturație\"\n}\n","{\n \"alpha\": \"Альфа\",\n \"blue\": \"Синий\",\n \"brightness\": \"Яркость\",\n \"green\": \"Зеленый\",\n \"hue\": \"Оттенок\",\n \"lightness\": \"Освещенность\",\n \"red\": \"Красный\",\n \"saturation\": \"Насыщенность\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Modrá\",\n \"brightness\": \"Jas\",\n \"green\": \"Zelená\",\n \"hue\": \"Odtieň\",\n \"lightness\": \"Svetlosť\",\n \"red\": \"Červená\",\n \"saturation\": \"Sýtosť\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Modra\",\n \"brightness\": \"Svetlost\",\n \"green\": \"Zelena\",\n \"hue\": \"Barva\",\n \"lightness\": \"Lahkost\",\n \"red\": \"Rdeča\",\n \"saturation\": \"Nasičenost\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Plava\",\n \"brightness\": \"Osvetljenost\",\n \"green\": \"Zelena\",\n \"hue\": \"Nijansa\",\n \"lightness\": \"Osvetljenje\",\n \"red\": \"Crvena\",\n \"saturation\": \"Zasićenje\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blått\",\n \"brightness\": \"Ljusstyrka\",\n \"green\": \"Grönt\",\n \"hue\": \"Nyans\",\n \"lightness\": \"Ljushet\",\n \"red\": \"Rött\",\n \"saturation\": \"Mättnad\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Mavi\",\n \"brightness\": \"Parlaklık\",\n \"green\": \"Yeşil\",\n \"hue\": \"Ton\",\n \"lightness\": \"Canlılık\",\n \"red\": \"Kırmızı\",\n \"saturation\": \"Doygunluk\"\n}\n","{\n \"alpha\": \"Альфа\",\n \"blue\": \"Синій\",\n \"brightness\": \"Яскравість\",\n \"green\": \"Зелений\",\n \"hue\": \"Тон\",\n \"lightness\": \"Освітленість\",\n \"red\": \"Червоний\",\n \"saturation\": \"Насиченість\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"蓝色\",\n \"brightness\": \"亮度\",\n \"green\": \"绿色\",\n \"hue\": \"色相\",\n \"lightness\": \"明亮度\",\n \"red\": \"红色\",\n \"saturation\": \"饱和度\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"藍色\",\n \"brightness\": \"亮度\",\n \"green\": \"綠色\",\n \"hue\": \"色相\",\n \"lightness\": \"明亮\",\n \"red\": \"紅色\",\n \"saturation\": \"飽和度\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {clamp, snapValueToStep, useControlledState} from '@react-stately/utils';\nimport {Color, ColorAreaProps, ColorChannel} from '@react-types/color';\nimport {normalizeColor, parseColor} from './Color';\nimport {useMemo, useRef, useState} from 'react';\n\nexport interface ColorAreaState {\n /** The current color value displayed by the color area. */\n readonly value: Color,\n /** Sets the current color value. If a string is passed, it will be parsed to a Color. */\n setValue(value: string | Color): void,\n\n /** The current value of the horizontal axis channel displayed by the color area. */\n xValue: number,\n /** Sets the value for the horizontal axis channel displayed by the color area, and triggers `onChange`. */\n setXValue(value: number): void,\n\n /** The current value of the vertical axis channel displayed by the color area. */\n yValue: number,\n /** Sets the value for the vertical axis channel displayed by the color area, and triggers `onChange`. */\n setYValue(value: number): void,\n\n /** Sets the x and y channels of the current color value based on a percentage of the width and height of the color area, and triggers `onChange`. */\n setColorFromPoint(x: number, y: number): void,\n /** Returns the coordinates of the thumb relative to the upper left corner of the color area as a percentage. */\n getThumbPosition(): {x: number, y: number},\n\n /** Increments the value of the horizontal axis channel by the channel step or page amount. */\n incrementX(stepSize?: number): void,\n /** Decrements the value of the horizontal axis channel by the channel step or page amount. */\n decrementX(stepSize?: number): void,\n\n /** Increments the value of the vertical axis channel by the channel step or page amount. */\n incrementY(stepSize?: number): void,\n /** Decrements the value of the vertical axis channel by the channel step or page amount. */\n decrementY(stepSize?: number): void,\n\n /** Whether the color area is currently being dragged. */\n readonly isDragging: boolean,\n /** Sets whether the color area is being dragged. */\n setDragging(value: boolean): void,\n\n /** Returns the xChannel, yChannel and zChannel names based on the color value. */\n channels: {xChannel: ColorChannel, yChannel: ColorChannel, zChannel: ColorChannel},\n /** The step value of the xChannel, used when incrementing and decrementing. */\n xChannelStep: number,\n /** The step value of the yChannel, used when incrementing and decrementing. */\n yChannelStep: number,\n /** The page step value of the xChannel, used when incrementing and decrementing. */\n xChannelPageStep: number,\n /** The page step value of the yChannel, used when incrementing and decrementing. */\n yChannelPageStep: number,\n\n /** Returns the color that should be displayed in the color area thumb instead of `value`. */\n getDisplayColor(): Color\n}\n\nconst DEFAULT_COLOR = parseColor('#ffffff');\n/**\n * Provides state management for a color area component.\n * Color area allows users to adjust two channels of an HSL, HSB or RGB color value against a two-dimensional gradient background.\n */\nexport function useColorAreaState(props: ColorAreaProps): ColorAreaState {\n let {\n value,\n defaultValue,\n xChannel,\n yChannel,\n onChange,\n onChangeEnd\n } = props;\n\n if (!value && !defaultValue) {\n defaultValue = DEFAULT_COLOR;\n }\n\n let [color, setColorState] = useControlledState(value && normalizeColor(value), defaultValue && normalizeColor(defaultValue), onChange);\n let valueRef = useRef(color);\n let setColor = (color: Color) => {\n valueRef.current = color;\n setColorState(color);\n };\n\n let channels = useMemo(() =>\n color.getColorSpaceAxes({xChannel, yChannel}),\n [color, xChannel, yChannel]\n );\n\n let xChannelRange = color.getChannelRange(channels.xChannel);\n let yChannelRange = color.getChannelRange(channels.yChannel);\n let {minValue: minValueX, maxValue: maxValueX, step: stepX, pageSize: pageSizeX} = xChannelRange;\n let {minValue: minValueY, maxValue: maxValueY, step: stepY, pageSize: pageSizeY} = yChannelRange;\n\n let [isDragging, setDragging] = useState(false);\n let isDraggingRef = useRef(false);\n\n let xValue = color.getChannelValue(channels.xChannel);\n let yValue = color.getChannelValue(channels.yChannel);\n let setXValue = (v: number) => {\n if (v === xValue) {\n return;\n }\n let newColor = color.withChannelValue(channels.xChannel, v);\n setColor(newColor);\n };\n let setYValue = (v: number) => {\n if (v === yValue) {\n return;\n }\n let newColor = color.withChannelValue(channels.yChannel, v);\n setColor(newColor);\n };\n\n return {\n channels,\n xChannelStep: stepX,\n yChannelStep: stepY,\n xChannelPageStep: pageSizeX,\n yChannelPageStep: pageSizeY,\n value: color,\n setValue(value) {\n setColor(normalizeColor(value));\n },\n xValue,\n setXValue,\n yValue,\n setYValue,\n setColorFromPoint(x: number, y: number) {\n let newXValue = minValueX + clamp(x, 0, 1) * (maxValueX - minValueX);\n let newYValue = minValueY + (1 - clamp(y, 0, 1)) * (maxValueY - minValueY);\n let newColor:Color;\n if (newXValue !== xValue) {\n // Round new value to multiple of step, clamp value between min and max\n newXValue = snapValueToStep(newXValue, minValueX, maxValueX, stepX);\n newColor = color.withChannelValue(channels.xChannel, newXValue);\n }\n if (newYValue !== yValue) {\n // Round new value to multiple of step, clamp value between min and max\n newYValue = snapValueToStep(newYValue, minValueY, maxValueY, stepY);\n newColor = (newColor || color).withChannelValue(channels.yChannel, newYValue);\n }\n if (newColor) {\n setColor(newColor);\n }\n },\n getThumbPosition() {\n let x = (xValue - minValueX) / (maxValueX - minValueX);\n let y = 1 - (yValue - minValueY) / (maxValueY - minValueY);\n return {x, y};\n },\n incrementX(stepSize) {\n setXValue(xValue + stepSize > maxValueX ? maxValueX : snapValueToStep(xValue + stepSize, minValueX, maxValueX, stepX));\n },\n incrementY(stepSize) {\n setYValue(yValue + stepSize > maxValueY ? maxValueY : snapValueToStep(yValue + stepSize, minValueY, maxValueY, stepY));\n },\n decrementX(stepSize) {\n setXValue(snapValueToStep(xValue - stepSize, minValueX, maxValueX, stepX));\n },\n decrementY(stepSize) {\n setYValue(snapValueToStep(yValue - stepSize, minValueY, maxValueY, stepY));\n },\n setDragging(isDragging) {\n let wasDragging = isDraggingRef.current;\n isDraggingRef.current = isDragging;\n\n if (onChangeEnd && !isDragging && wasDragging) {\n onChangeEnd(valueRef.current);\n }\n\n setDragging(isDragging);\n },\n isDragging,\n getDisplayColor() {\n return color.withChannelValue('alpha', 1);\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorSliderProps} from '@react-types/color';\nimport {normalizeColor, parseColor} from './Color';\nimport {SliderState, useSliderState} from '@react-stately/slider';\nimport {useControlledState} from '@react-stately/utils';\n\nexport interface ColorSliderState extends SliderState {\n /** The current color value represented by the color slider. */\n readonly value: Color,\n /** Sets the current color value. If a string is passed, it will be parsed to a Color. */\n setValue(value: string | Color): void,\n /** Returns the color that should be displayed in the slider instead of `value` or the optional parameter. */\n getDisplayColor(): Color\n}\n\n\nexport interface ColorSliderStateOptions extends ColorSliderProps {\n /** The locale to use for formatting the color channel value. */\n locale: string\n}\n\n/**\n * Provides state management for a color slider component.\n * Color sliders allow users to adjust an individual channel of a color value.\n */\nexport function useColorSliderState(props: ColorSliderStateOptions): ColorSliderState {\n let {channel, value, defaultValue, onChange, locale, ...otherProps} = props;\n if (value == null && defaultValue == null) {\n throw new Error('useColorSliderState requires a value or defaultValue');\n }\n\n let [color, setColor] = useControlledState(value && normalizeColor(value), defaultValue && normalizeColor(defaultValue), onChange);\n let sliderState = useSliderState({\n ...color.getChannelRange(channel),\n ...otherProps,\n // Unused except in getThumbValueLabel, which is overridden below. null to appease TypeScript.\n numberFormatter: null,\n value: color.getChannelValue(channel),\n onChange(v) {\n setColor(color.withChannelValue(channel, v));\n },\n onChangeEnd(v) {\n // onChange will have already been called with the right value, this is just to trigger onChangeEnd\n if (props.onChangeEnd) {\n props.onChangeEnd(color.withChannelValue(channel, v));\n }\n }\n });\n\n let {step, pageSize} = color.getChannelRange(channel);\n return {\n ...sliderState,\n value: color,\n setValue(value) {\n setColor(normalizeColor(value));\n },\n getDisplayColor() {\n switch (channel) {\n case 'hue':\n return parseColor(`hsl(${color.getChannelValue('hue')}, 100%, 50%)`);\n case 'lightness':\n case 'brightness':\n case 'saturation':\n case 'red':\n case 'green':\n case 'blue':\n return color.withChannelValue('alpha', 1);\n case 'alpha': {\n return color;\n }\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n },\n getThumbValueLabel() {\n return color.formatChannelValue(channel, locale);\n },\n step,\n pageSize\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorWheelProps} from '@react-types/color';\nimport {normalizeColor, parseColor} from './Color';\nimport {useControlledState} from '@react-stately/utils';\nimport {useRef, useState} from 'react';\n\nexport interface ColorWheelState {\n /** The current color value represented by the color wheel. */\n readonly value: Color,\n /** Sets the color value represented by the color wheel, and triggers `onChange`. */\n setValue(value: string | Color): void,\n\n /** The current value of the hue channel displayed by the color wheel. */\n readonly hue: number,\n /** Sets the hue channel of the current color value and triggers `onChange`. */\n setHue(value: number): void,\n\n /** Sets the hue channel of the current color value based on the given coordinates and radius of the color wheel, and triggers `onChange`. */\n setHueFromPoint(x: number, y: number, radius: number): void,\n /** Returns the coordinates of the thumb relative to the center point of the color wheel. */\n getThumbPosition(radius: number): {x: number, y: number},\n\n /** Increments the hue by the given amount (defaults to 1). */\n increment(stepSize?: number): void,\n /** Decrements the hue by the given amount (defaults to 1). */\n decrement(stepSize?: number): void,\n\n /** Whether the color wheel is currently being dragged. */\n readonly isDragging: boolean,\n /** Sets whether the color wheel is being dragged. */\n setDragging(value: boolean): void,\n /** Returns the color that should be displayed in the color wheel instead of `value`. */\n getDisplayColor(): Color,\n /** The step value of the hue channel, used when incrementing and decrementing. */\n step: number,\n /** The page step value of the hue channel, used when incrementing and decrementing. */\n pageStep: number\n}\n\nconst DEFAULT_COLOR = parseColor('hsl(0, 100%, 50%)');\n\nfunction roundToStep(value: number, step: number): number {\n return Math.round(value / step) * step;\n}\n\nfunction mod(n: number, m: number) {\n return ((n % m) + m) % m;\n}\n\nfunction roundDown(v: number) {\n let r = Math.floor(v);\n if (r === v) {\n return v - 1;\n } else {\n return r;\n }\n}\n\nfunction degToRad(deg: number) {\n return deg * Math.PI / 180;\n}\n\nfunction radToDeg(rad: number) {\n return rad * 180 / Math.PI;\n}\n\n// 0deg = 3 o'clock. increases clockwise\nfunction angleToCartesian(angle: number, radius: number): {x: number, y: number} {\n let rad = degToRad(360 - angle + 90);\n let x = Math.sin(rad) * (radius);\n let y = Math.cos(rad) * (radius);\n return {x, y};\n}\n\nfunction cartesianToAngle(x: number, y: number, radius: number): number {\n let deg = radToDeg(Math.atan2(y / radius, x / radius));\n return (deg + 360) % 360;\n}\n\n/**\n * Provides state management for a color wheel component.\n * Color wheels allow users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport function useColorWheelState(props: ColorWheelProps): ColorWheelState {\n let {defaultValue, onChange, onChangeEnd} = props;\n\n if (!props.value && !defaultValue) {\n defaultValue = DEFAULT_COLOR;\n }\n\n let [value, setValueState] = useControlledState(normalizeColor(props.value), normalizeColor(defaultValue), onChange);\n let valueRef = useRef(value);\n let setValue = (value: Color) => {\n valueRef.current = value;\n setValueState(value);\n };\n\n let channelRange = value.getChannelRange('hue');\n let {minValue: minValueX, maxValue: maxValueX, step: step, pageSize: pageStep} = channelRange;\n let [isDragging, setDragging] = useState(false);\n let isDraggingRef = useRef(false);\n\n let hue = value.getChannelValue('hue');\n function setHue(v: number) {\n if (v > 360) {\n // Make sure you can always get back to 0.\n v = 0;\n }\n v = roundToStep(mod(v, 360), step);\n if (hue !== v) {\n let color = value.withChannelValue('hue', v);\n setValue(color);\n }\n }\n\n return {\n value,\n step,\n pageStep,\n setValue(v) {\n let color = normalizeColor(v);\n setValue(color);\n },\n hue,\n setHue,\n setHueFromPoint(x, y, radius) {\n setHue(cartesianToAngle(x, y, radius));\n },\n getThumbPosition(radius) {\n return angleToCartesian(value.getChannelValue('hue'), radius);\n },\n increment(stepSize = 1) {\n let s = Math.max(stepSize, step);\n let newValue = hue + s;\n if (newValue >= maxValueX) {\n // Make sure you can always get back to 0.\n newValue = minValueX;\n }\n setHue(roundToStep(mod(newValue, 360), s));\n },\n decrement(stepSize = 1) {\n let s = Math.max(stepSize, step);\n if (hue === 0) {\n // We can't just subtract step because this might be the case:\n // |(previous step) - 0| < step size\n setHue(roundDown(360 / s) * s);\n } else {\n setHue(roundToStep(mod(hue - s, 360), s));\n }\n },\n setDragging(isDragging) {\n let wasDragging = isDraggingRef.current;\n isDraggingRef.current = isDragging;\n\n if (onChangeEnd && !isDragging && wasDragging) {\n onChangeEnd(valueRef.current);\n }\n\n setDragging(isDragging);\n },\n isDragging,\n getDisplayColor() {\n return value.toFormat('hsl').withChannelValue('saturation', 100).withChannelValue('lightness', 50).withChannelValue('alpha', 1);\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorFieldProps} from '@react-types/color';\nimport {parseColor} from './Color';\nimport {useColor} from './useColor';\nimport {useControlledState} from '@react-stately/utils';\nimport {useMemo, useState} from 'react';\n\nexport interface ColorFieldState {\n /**\n * The current text value of the input. Updated as the user types,\n * and formatted according to `formatOptions` on blur.\n */\n readonly inputValue: string,\n /**\n * The currently parsed color value, or null if the field is empty.\n * Updated based on the `inputValue` as the user types.\n */\n readonly colorValue: Color,\n /** Sets the current text value of the input. */\n setInputValue(value: string): void,\n /**\n * Updates the input value based on the currently parsed color value.\n * Typically this is called when the field is blurred.\n */\n commit(): void,\n /** Increments the current input value to the next step boundary, and fires `onChange`. */\n increment(): void,\n /** Decrements the current input value to the next step boundary, and fires `onChange`. */\n decrement(): void,\n /** Sets the current value to the maximum color value, and fires `onChange`. */\n incrementToMax(): void,\n /** Sets the current value to the minimum color value, and fires `onChange`. */\n decrementToMin(): void,\n /**\n * Validates a user input string.\n * Values can be partially entered, and may be valid even if they cannot currently be parsed to a color.\n * Can be used to implement validation as a user types.\n */\n validate(value: string): boolean\n}\n\nconst MIN_COLOR = parseColor('#000000');\nconst MAX_COLOR = parseColor('#FFFFFF');\nconst MIN_COLOR_INT = MIN_COLOR.toHexInt();\nconst MAX_COLOR_INT = MAX_COLOR.toHexInt();\n\n/**\n * Provides state management for a color field component. Color fields allow\n * users to enter and adjust a hex color value.\n */\nexport function useColorFieldState(\n props: ColorFieldProps\n): ColorFieldState {\n let {\n value,\n defaultValue,\n onChange\n } = props;\n let {step} = MIN_COLOR.getChannelRange('red');\n\n let initialValue = useColor(value);\n let initialDefaultValue = useColor(defaultValue);\n let [colorValue, setColorValue] = useControlledState<Color>(initialValue, initialDefaultValue, onChange);\n let [inputValue, setInputValue] = useState(() => (value || defaultValue) && colorValue ? colorValue.toString('hex') : '');\n\n let safelySetColorValue = (newColor: Color) => {\n if (!colorValue || !newColor) {\n setColorValue(newColor);\n return;\n }\n if (newColor.toHexInt() !== colorValue.toHexInt()) {\n setColorValue(newColor);\n return;\n }\n };\n\n let [prevValue, setPrevValue] = useState(colorValue);\n if (prevValue !== colorValue) {\n setInputValue(colorValue ? colorValue.toString('hex') : '');\n setPrevValue(colorValue);\n }\n\n let parsedValue = useMemo(() => {\n let color;\n try {\n color = parseColor(inputValue.startsWith('#') ? inputValue : `#${inputValue}`);\n } catch (err) {\n color = null;\n }\n return color;\n }, [inputValue]);\n\n let commit = () => {\n // Set to empty state if input value is empty\n if (!inputValue.length) {\n safelySetColorValue(null);\n setInputValue(value === undefined ? '' : colorValue.toString('hex'));\n return;\n }\n\n // if it failed to parse, then reset input to formatted version of current number\n if (parsedValue == null) {\n setInputValue(colorValue ? colorValue.toString('hex') : '');\n return;\n }\n\n safelySetColorValue(parsedValue);\n // in a controlled state, the numberValue won't change, so we won't go back to our old input without help\n let newColorValue = '';\n if (colorValue) {\n newColorValue = colorValue.toString('hex');\n }\n setInputValue(newColorValue);\n };\n\n let increment = () => {\n let newValue = addColorValue(parsedValue, step);\n // if we've arrived at the same value that was previously in the state, the\n // input value should be updated to match\n // ex type 4, press increment, highlight the number in the input, type 4 again, press increment\n // you'd be at 5, then incrementing to 5 again, so no re-render would happen and 4 would be left in the input\n if (newValue === colorValue) {\n setInputValue(newValue.toString('hex'));\n }\n safelySetColorValue(newValue);\n };\n let decrement = () => {\n let newValue = addColorValue(parsedValue, -step);\n // if we've arrived at the same value that was previously in the state, the\n // input value should be updated to match\n // ex type 4, press increment, highlight the number in the input, type 4 again, press increment\n // you'd be at 5, then incrementing to 5 again, so no re-render would happen and 4 would be left in the input\n if (newValue === colorValue) {\n setInputValue(newValue.toString('hex'));\n }\n safelySetColorValue(newValue);\n };\n let incrementToMax = () => safelySetColorValue(MAX_COLOR);\n let decrementToMin = () => safelySetColorValue(MIN_COLOR);\n\n let validate = (value: string) => value === '' || !!value.match(/^#?[0-9a-f]{0,6}$/i)?.[0];\n\n return {\n validate,\n colorValue,\n inputValue,\n setInputValue,\n commit,\n increment,\n incrementToMax,\n decrement,\n decrementToMin\n };\n}\n\nfunction addColorValue(color: Color, step: number) {\n let newColor = color ? color : MIN_COLOR;\n let colorInt = newColor.toHexInt();\n\n let clampInt = Math.min(Math.max(colorInt + step, MIN_COLOR_INT), MAX_COLOR_INT);\n if (clampInt !== colorInt) {\n let newColorString = `#${clampInt.toString(16).padStart(6, '0').toUpperCase()}`;\n newColor = parseColor(newColorString);\n }\n return newColor;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color} from '@react-types/color';\nimport {parseColor} from './Color';\nimport {useMemo} from 'react';\n\nexport function useColor(value: string | Color | undefined | null) {\n return useMemo(() => {\n if (typeof value === 'string') {\n try {\n return parseColor(value);\n } catch (err) {\n return undefined;\n }\n }\n return value;\n }, [value]);\n}\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -541,7 +541,7 @@ class $799cddbef784668f$var$Color {
541
541
  return $799cddbef784668f$var$strings.getStringForLocale(channel, locale);
542
542
  }
543
543
  getColorSpaceAxes(xyChannels) {
544
- let { xChannel: xChannel , yChannel: yChannel } = xyChannels;
544
+ let { xChannel: xChannel, yChannel: yChannel } = xyChannels;
545
545
  let xCh = xChannel || this.getColorChannels().find((c)=>c !== yChannel);
546
546
  let yCh = yChannel || this.getColorChannels().find((c)=>c !== xCh);
547
547
  let zCh = this.getColorChannels().find((c)=>c !== xCh && c !== yCh);
@@ -1052,7 +1052,7 @@ class $799cddbef784668f$var$HSLColor extends $799cddbef784668f$var$Color {
1052
1052
 
1053
1053
  const $6e14a98a7f67141d$var$DEFAULT_COLOR = (0, $799cddbef784668f$export$6e865ea70d7724f)("#ffffff");
1054
1054
  function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
1055
- let { value: value , defaultValue: defaultValue , xChannel: xChannel , yChannel: yChannel , onChange: onChange , onChangeEnd: onChangeEnd } = props;
1055
+ let { value: value, defaultValue: defaultValue, xChannel: xChannel, yChannel: yChannel, onChange: onChange, onChangeEnd: onChangeEnd } = props;
1056
1056
  if (!value && !defaultValue) defaultValue = $6e14a98a7f67141d$var$DEFAULT_COLOR;
1057
1057
  let [color, setColorState] = (0, $cBgAy$useControlledState)(value && (0, $799cddbef784668f$export$4cde5df63f53f473)(value), defaultValue && (0, $799cddbef784668f$export$4cde5df63f53f473)(defaultValue), onChange);
1058
1058
  let valueRef = (0, $cBgAy$useRef)(color);
@@ -1070,8 +1070,8 @@ function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
1070
1070
  ]);
1071
1071
  let xChannelRange = color.getChannelRange(channels.xChannel);
1072
1072
  let yChannelRange = color.getChannelRange(channels.yChannel);
1073
- let { minValue: minValueX , maxValue: maxValueX , step: stepX , pageSize: pageSizeX } = xChannelRange;
1074
- let { minValue: minValueY , maxValue: maxValueY , step: stepY , pageSize: pageSizeY } = yChannelRange;
1073
+ let { minValue: minValueX, maxValue: maxValueX, step: stepX, pageSize: pageSizeX } = xChannelRange;
1074
+ let { minValue: minValueY, maxValue: maxValueY, step: stepY, pageSize: pageSizeY } = yChannelRange;
1075
1075
  let [isDragging, setDragging] = (0, $cBgAy$useState)(false);
1076
1076
  let isDraggingRef = (0, $cBgAy$useRef)(false);
1077
1077
  let xValue = color.getChannelValue(channels.xChannel);
@@ -1164,7 +1164,7 @@ function $6e14a98a7f67141d$export$6df7f0e2cabc7eef(props) {
1164
1164
 
1165
1165
 
1166
1166
  function $25a25ac0d1624665$export$57bc203e1c9c6d44(props) {
1167
- let { channel: channel , value: value , defaultValue: defaultValue , onChange: onChange , locale: locale , ...otherProps } = props;
1167
+ let { channel: channel, value: value, defaultValue: defaultValue, onChange: onChange, locale: locale, ...otherProps } = props;
1168
1168
  if (value == null && defaultValue == null) throw new Error("useColorSliderState requires a value or defaultValue");
1169
1169
  let [color, setColor] = (0, $cBgAy$useControlledState)(value && (0, $799cddbef784668f$export$4cde5df63f53f473)(value), defaultValue && (0, $799cddbef784668f$export$4cde5df63f53f473)(defaultValue), onChange);
1170
1170
  let sliderState = (0, $cBgAy$useSliderState)({
@@ -1181,7 +1181,7 @@ function $25a25ac0d1624665$export$57bc203e1c9c6d44(props) {
1181
1181
  if (props.onChangeEnd) props.onChangeEnd(color.withChannelValue(channel, v));
1182
1182
  }
1183
1183
  });
1184
- let { step: step , pageSize: pageSize } = color.getChannelRange(channel);
1184
+ let { step: step, pageSize: pageSize } = color.getChannelRange(channel);
1185
1185
  return {
1186
1186
  ...sliderState,
1187
1187
  value: color,
@@ -1260,7 +1260,7 @@ function $ee4262c74a467b07$var$cartesianToAngle(x, y, radius) {
1260
1260
  return (deg + 360) % 360;
1261
1261
  }
1262
1262
  function $ee4262c74a467b07$export$f4301076d9336137(props) {
1263
- let { defaultValue: defaultValue , onChange: onChange , onChangeEnd: onChangeEnd } = props;
1263
+ let { defaultValue: defaultValue, onChange: onChange, onChangeEnd: onChangeEnd } = props;
1264
1264
  if (!props.value && !defaultValue) defaultValue = $ee4262c74a467b07$var$DEFAULT_COLOR;
1265
1265
  let [value, setValueState] = (0, $cBgAy$useControlledState)((0, $799cddbef784668f$export$4cde5df63f53f473)(props.value), (0, $799cddbef784668f$export$4cde5df63f53f473)(defaultValue), onChange);
1266
1266
  let valueRef = (0, $cBgAy$useRef)(value);
@@ -1269,7 +1269,7 @@ function $ee4262c74a467b07$export$f4301076d9336137(props) {
1269
1269
  setValueState(value);
1270
1270
  };
1271
1271
  let channelRange = value.getChannelRange("hue");
1272
- let { minValue: minValueX , maxValue: maxValueX , step: step , pageSize: pageStep } = channelRange;
1272
+ let { minValue: minValueX, maxValue: maxValueX, step: step, pageSize: pageStep } = channelRange;
1273
1273
  let [isDragging, setDragging] = (0, $cBgAy$useState)(false);
1274
1274
  let isDraggingRef = (0, $cBgAy$useRef)(false);
1275
1275
  let hue = value.getChannelValue("hue");
@@ -1370,8 +1370,8 @@ const $b335ada08155d9c0$var$MAX_COLOR = (0, $799cddbef784668f$export$6e865ea70d7
1370
1370
  const $b335ada08155d9c0$var$MIN_COLOR_INT = $b335ada08155d9c0$var$MIN_COLOR.toHexInt();
1371
1371
  const $b335ada08155d9c0$var$MAX_COLOR_INT = $b335ada08155d9c0$var$MAX_COLOR.toHexInt();
1372
1372
  function $b335ada08155d9c0$export$d52a01683abdfcd6(props) {
1373
- let { value: value , defaultValue: defaultValue , onChange: onChange } = props;
1374
- let { step: step } = $b335ada08155d9c0$var$MIN_COLOR.getChannelRange("red");
1373
+ let { value: value, defaultValue: defaultValue, onChange: onChange } = props;
1374
+ let { step: step } = $b335ada08155d9c0$var$MIN_COLOR.getChannelRange("red");
1375
1375
  let initialValue = (0, $aa90ad8b2b1d015f$export$5aadd9c0606af5c2)(value);
1376
1376
  let initialDefaultValue = (0, $aa90ad8b2b1d015f$export$5aadd9c0606af5c2)(defaultValue);
1377
1377
  let [colorValue, setColorValue] = (0, $cBgAy$useControlledState)(initialValue, initialDefaultValue, onChange);
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;;;AEVD,4BAAiB;IAAG,SAAS,CAAC,IAAI,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC;IACd,cAAc,CAAC,MAAM,CAAC;IACtB,SAAS,CAAC,IAAI,CAAC;IACf,OAAO,CAAC,UAAU,CAAC;IACnB,aAAa,CAAC,OAAO,CAAC;IACtB,OAAO,CAAC,IAAI,CAAC;IACb,cAAc,CAAC,MAAM,CAAC;AACxB;;;;ACRA,4BAAiB;IAAG,SAAS,CAAC,IAAI,CAAC;IACjC,QAAQ,CAAC,KAAK,CAAC;IACf,cAAc,CAAC,MAAM,CAAC;IACtB,SAAS,CAAC,MAAM,CAAC;IACjB,OAAO,CAAC,OAAO,CAAC;IAChB,aAAa,CAAC,MAAM,CAAC;IACrB,OAAO,CAAC,OAAO,CAAC;IAChB,cAAc,CAAC,UAAU,CAAC;AAC5B;;;;ACRA,4BAAiB;IAAG,SAAS,CAAC,IAAI,CAAC;IACjC,QAAQ,CAAC,KAAK,CAAC;IACf,cAAc,CAAC,GAAG,CAAC;IACnB,SAAS,CAAC,MAAM,CAAC;IACjB,OAAO,CAAC,MAAM,CAAC;IACf,aAAa,CAAC,QAAQ,CAAC;IACvB,OAAO,CAAC,OAAO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ts","packages/@react-stately/color/src/*.js","packages/@react-stately/color/intl/ar-AE.json","packages/@react-stately/color/intl/bg-BG.json","packages/@react-stately/color/intl/cs-CZ.json","packages/@react-stately/color/intl/da-DK.json","packages/@react-stately/color/intl/de-DE.json","packages/@react-stately/color/intl/el-GR.json","packages/@react-stately/color/intl/en-US.json","packages/@react-stately/color/intl/es-ES.json","packages/@react-stately/color/intl/et-EE.json","packages/@react-stately/color/intl/fi-FI.json","packages/@react-stately/color/intl/fr-FR.json","packages/@react-stately/color/intl/he-IL.json","packages/@react-stately/color/intl/hr-HR.json","packages/@react-stately/color/intl/hu-HU.json","packages/@react-stately/color/intl/it-IT.json","packages/@react-stately/color/intl/ja-JP.json","packages/@react-stately/color/intl/ko-KR.json","packages/@react-stately/color/intl/lt-LT.json","packages/@react-stately/color/intl/lv-LV.json","packages/@react-stately/color/intl/nb-NO.json","packages/@react-stately/color/intl/nl-NL.json","packages/@react-stately/color/intl/pl-PL.json","packages/@react-stately/color/intl/pt-BR.json","packages/@react-stately/color/intl/pt-PT.json","packages/@react-stately/color/intl/ro-RO.json","packages/@react-stately/color/intl/ru-RU.json","packages/@react-stately/color/intl/sk-SK.json","packages/@react-stately/color/intl/sl-SI.json","packages/@react-stately/color/intl/sr-SP.json","packages/@react-stately/color/intl/sv-SE.json","packages/@react-stately/color/intl/tr-TR.json","packages/@react-stately/color/intl/uk-UA.json","packages/@react-stately/color/intl/zh-CN.json","packages/@react-stately/color/intl/zh-TW.json","packages/@react-stately/color/src/useColorAreaState.ts","packages/@react-stately/color/src/useColorSliderState.ts","packages/@react-stately/color/src/useColorWheelState.ts","packages/@react-stately/color/src/useColorFieldState.ts","packages/@react-stately/color/src/useColor.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport type {ColorAreaState} from './useColorAreaState';\nexport type {ColorSliderState} from './useColorSliderState';\nexport type {ColorWheelState} from './useColorWheelState';\nexport type {ColorFieldState} from './useColorFieldState';\n\nexport {parseColor} from './Color';\nexport {useColorAreaState} from './useColorAreaState';\nexport {useColorSliderState} from './useColorSliderState';\nexport {useColorWheelState} from './useColorWheelState';\nexport {useColorFieldState} from './useColorFieldState';\n\nexport type {Color, ColorAreaProps, ColorFieldProps, ColorWheelProps} from '@react-types/color';\nexport type {ColorSliderStateOptions} from './useColorSliderState';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {clamp, toFixedNumber} from '@react-stately/utils';\nimport {ColorAxes, ColorChannel, ColorChannelRange, ColorFormat, Color as IColor} from '@react-types/color';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {LocalizedStringDictionary} from '@internationalized/string';\nimport {NumberFormatter} from '@internationalized/number';\n\nconst strings = new LocalizedStringDictionary(intlMessages);\n\n/** Parses a color from a string value. Throws an error if the string could not be parsed. */\nexport function parseColor(value: string): IColor {\n let res = RGBColor.parse(value) || HSBColor.parse(value) || HSLColor.parse(value);\n if (res) {\n return res;\n }\n\n throw new Error('Invalid color value: ' + value);\n}\n\nexport function normalizeColor(v: string | IColor) {\n if (typeof v === 'string') {\n return parseColor(v);\n } else {\n return v;\n }\n}\n\nabstract class Color implements IColor {\n abstract toFormat(format: ColorFormat): IColor;\n abstract toString(format: ColorFormat | 'css'): string;\n abstract clone(): IColor;\n abstract getChannelRange(channel: ColorChannel): ColorChannelRange;\n abstract formatChannelValue(channel: ColorChannel, locale: string): string;\n\n toHexInt(): number {\n return this.toFormat('rgb').toHexInt();\n }\n\n getChannelValue(channel: ColorChannel): number {\n if (channel in this) {\n return this[channel];\n }\n\n throw new Error('Unsupported color channel: ' + channel);\n }\n\n withChannelValue(channel: ColorChannel, value: number): IColor {\n if (channel in this) {\n let x = this.clone();\n x[channel] = value;\n return x;\n }\n\n throw new Error('Unsupported color channel: ' + channel);\n }\n\n getChannelName(channel: ColorChannel, locale: string) {\n return strings.getStringForLocale(channel, locale);\n }\n\n abstract getColorSpace(): ColorFormat\n getColorSpaceAxes(xyChannels: {xChannel?: ColorChannel, yChannel?: ColorChannel}): ColorAxes {\n let {xChannel, yChannel} = xyChannels;\n let xCh = xChannel || this.getColorChannels().find(c => c !== yChannel);\n let yCh = yChannel || this.getColorChannels().find(c => c !== xCh);\n let zCh = this.getColorChannels().find(c => c !== xCh && c !== yCh);\n\n return {xChannel: xCh, yChannel: yCh, zChannel: zCh};\n }\n abstract getColorChannels(): [ColorChannel, ColorChannel, ColorChannel]\n}\nclass RGBColor extends Color {\n constructor(private red: number, private green: number, private blue: number, private alpha: number) {\n super();\n }\n\n static parse(value: string) {\n let colors = [];\n // matching #rgb, #rgba, #rrggbb, #rrggbbaa\n if (/^#[\\da-f]+$/i.test(value) && [4, 5, 7, 9].includes(value.length)) {\n const values = (value.length < 6 ? value.replace(/[^#]/gi, '$&$&') : value).slice(1).split('');\n while (values.length > 0) {\n colors.push(parseInt(values.splice(0, 2).join(''), 16));\n }\n colors[3] = colors[3] !== undefined ? colors[3] / 255 : undefined;\n }\n\n // matching rgb(rrr, ggg, bbb), rgba(rrr, ggg, bbb, 0.a)\n const match = value.match(/^rgba?\\((.*)\\)$/);\n if (match?.[1]) {\n colors = match[1].split(',').map(value => Number(value.trim()));\n colors = colors.map((num, i) => clamp(num, 0, i < 3 ? 255 : 1));\n }\n\n return colors.length < 3 ? undefined : new RGBColor(colors[0], colors[1], colors[2], colors[3] ?? 1);\n }\n\n\n toString(format: ColorFormat | 'css') {\n switch (format) {\n case 'hex':\n return '#' + (this.red.toString(16).padStart(2, '0') + this.green.toString(16).padStart(2, '0') + this.blue.toString(16).padStart(2, '0')).toUpperCase();\n case 'hexa':\n return '#' + (this.red.toString(16).padStart(2, '0') + this.green.toString(16).padStart(2, '0') + this.blue.toString(16).padStart(2, '0') + Math.round(this.alpha * 255).toString(16).padStart(2, '0')).toUpperCase();\n case 'rgb':\n return `rgb(${this.red}, ${this.green}, ${this.blue})`;\n case 'css':\n case 'rgba':\n return `rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;\n default:\n return this.toFormat(format).toString(format);\n }\n }\n\n toFormat(format: ColorFormat): IColor {\n switch (format) {\n case 'hex':\n case 'hexa':\n case 'rgb':\n case 'rgba':\n return this;\n case 'hsb':\n case 'hsba':\n return this.toHSB();\n case 'hsl':\n case 'hsla':\n return this.toHSL();\n default:\n throw new Error('Unsupported color conversion: rgb -> ' + format);\n }\n }\n\n toHexInt(): number {\n return this.red << 16 | this.green << 8 | this.blue;\n }\n\n /**\n * Converts an RGB color value to HSB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB.\n * @returns An HSBColor object.\n */\n private toHSB(): IColor {\n const red = this.red / 255;\n const green = this.green / 255;\n const blue = this.blue / 255;\n const min = Math.min(red, green, blue);\n const brightness = Math.max(red, green, blue);\n const chroma = brightness - min;\n const saturation = brightness === 0 ? 0 : chroma / brightness;\n let hue = 0; // achromatic\n\n if (chroma !== 0) {\n switch (brightness) {\n case red:\n hue = (green - blue) / chroma + (green < blue ? 6 : 0);\n break;\n case green:\n hue = (blue - red) / chroma + 2;\n break;\n case blue:\n hue = (red - green) / chroma + 4;\n break;\n }\n\n hue /= 6;\n }\n\n return new HSBColor(\n toFixedNumber(hue * 360, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(brightness * 100, 2),\n this.alpha\n );\n }\n\n /**\n * Converts an RGB color value to HSL.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB.\n * @returns An HSLColor object.\n */\n private toHSL(): IColor {\n const red = this.red / 255;\n const green = this.green / 255;\n const blue = this.blue / 255;\n const min = Math.min(red, green, blue);\n const max = Math.max(red, green, blue);\n const lightness = (max + min) / 2;\n const chroma = max - min;\n let hue: number;\n let saturation: number;\n\n if (chroma === 0) {\n hue = saturation = 0; // achromatic\n } else {\n saturation = chroma / (lightness < .5 ? max + min : 2 - max - min);\n\n switch (max) {\n case red:\n hue = (green - blue) / chroma + (green < blue ? 6 : 0);\n break;\n case green:\n hue = (blue - red) / chroma + 2;\n break;\n case blue:\n hue = (red - green) / chroma + 4;\n break;\n }\n\n hue /= 6;\n }\n\n return new HSLColor(\n toFixedNumber(hue * 360, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(lightness * 100, 2),\n this.alpha);\n }\n\n clone(): IColor {\n return new RGBColor(this.red, this.green, this.blue, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'red':\n case 'green':\n case 'blue':\n return {minValue: 0x0, maxValue: 0xFF, step: 0x1, pageSize: 0x11};\n case 'alpha':\n return {minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1};\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n formatChannelValue(channel: ColorChannel, locale: string) {\n let options: Intl.NumberFormatOptions;\n let value = this.getChannelValue(channel);\n switch (channel) {\n case 'red':\n case 'green':\n case 'blue':\n options = {style: 'decimal'};\n break;\n case 'alpha':\n options = {style: 'percent'};\n break;\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n return new NumberFormatter(locale, options).format(value);\n }\n\n getColorSpace(): ColorFormat {\n return 'rgb';\n }\n\n private static colorChannels: [ColorChannel, ColorChannel, ColorChannel] = ['red', 'green', 'blue'];\n getColorChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return RGBColor.colorChannels;\n }\n}\n\n// X = <negative/positive number with/without decimal places>\n// before/after a comma, 0 or more whitespaces are allowed\n// - hsb(X, X%, X%)\n// - hsba(X, X%, X%, X)\nconst HSB_REGEX = /hsb\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%)\\)|hsba\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d(.\\d+)?)\\)/;\n\nclass HSBColor extends Color {\n constructor(private hue: number, private saturation: number, private brightness: number, private alpha: number) {\n super();\n }\n\n static parse(value: string): HSBColor | void {\n let m: RegExpMatchArray | void;\n if ((m = value.match(HSB_REGEX))) {\n const [h, s, b, a] = (m[1] ?? m[2]).split(',').map(n => Number(n.trim().replace('%', '')));\n return new HSBColor(mod(h, 360), clamp(s, 0, 100), clamp(b, 0, 100), clamp(a ?? 1, 0, 1));\n }\n }\n\n toString(format: ColorFormat | 'css') {\n switch (format) {\n case 'css':\n return this.toHSL().toString('css');\n case 'hex':\n return this.toRGB().toString('hex');\n case 'hexa':\n return this.toRGB().toString('hexa');\n case 'hsb':\n return `hsb(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%)`;\n case 'hsba':\n return `hsba(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%, ${this.alpha})`;\n default:\n return this.toFormat(format).toString(format);\n }\n }\n\n toFormat(format: ColorFormat): IColor {\n switch (format) {\n case 'hsb':\n case 'hsba':\n return this;\n case 'hsl':\n case 'hsla':\n return this.toHSL();\n case 'rgb':\n case 'rgba':\n return this.toRGB();\n default:\n throw new Error('Unsupported color conversion: hsb -> ' + format);\n }\n }\n\n /**\n * Converts a HSB color to HSL.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSV_to_HSL.\n * @returns An HSLColor object.\n */\n private toHSL(): IColor {\n let saturation = this.saturation / 100;\n let brightness = this.brightness / 100;\n let lightness = brightness * (1 - saturation / 2);\n saturation = lightness === 0 || lightness === 1 ? 0 : (brightness - lightness) / Math.min(lightness, 1 - lightness);\n\n return new HSLColor(\n toFixedNumber(this.hue, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(lightness * 100, 2),\n this.alpha\n );\n }\n\n /**\n * Converts a HSV color value to RGB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSV_to_RGB_alternative.\n * @returns An RGBColor object.\n */\n private toRGB(): IColor {\n let hue = this.hue;\n let saturation = this.saturation / 100;\n let brightness = this.brightness / 100;\n let fn = (n: number, k = (n + hue / 60) % 6) => brightness - saturation * brightness * Math.max(Math.min(k, 4 - k, 1), 0);\n return new RGBColor(\n Math.round(fn(5) * 255),\n Math.round(fn(3) * 255),\n Math.round(fn(1) * 255),\n this.alpha\n );\n }\n\n clone(): IColor {\n return new HSBColor(this.hue, this.saturation, this.brightness, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'hue':\n return {minValue: 0, maxValue: 360, step: 1, pageSize: 15};\n case 'saturation':\n case 'brightness':\n return {minValue: 0, maxValue: 100, step: 1, pageSize: 10};\n case 'alpha':\n return {minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1};\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n formatChannelValue(channel: ColorChannel, locale: string) {\n let options: Intl.NumberFormatOptions;\n let value = this.getChannelValue(channel);\n switch (channel) {\n case 'hue':\n options = {style: 'unit', unit: 'degree', unitDisplay: 'narrow'};\n break;\n case 'saturation':\n case 'brightness':\n options = {style: 'percent'};\n value /= 100;\n break;\n case 'alpha':\n options = {style: 'percent'};\n break;\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n return new NumberFormatter(locale, options).format(value);\n }\n\n getColorSpace(): ColorFormat {\n return 'hsb';\n }\n\n private static colorChannels: [ColorChannel, ColorChannel, ColorChannel] = ['hue', 'saturation', 'brightness'];\n getColorChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return HSBColor.colorChannels;\n }\n}\n\n// X = <negative/positive number with/without decimal places>\n// before/after a comma, 0 or more whitespaces are allowed\n// - hsl(X, X%, X%)\n// - hsla(X, X%, X%, X)\nconst HSL_REGEX = /hsl\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%)\\)|hsla\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d(.\\d+)?)\\)/;\n\nfunction mod(n, m) {\n return ((n % m) + m) % m;\n}\n\nclass HSLColor extends Color {\n constructor(private hue: number, private saturation: number, private lightness: number, private alpha: number) {\n super();\n }\n\n static parse(value: string): HSLColor | void {\n let m: RegExpMatchArray | void;\n if ((m = value.match(HSL_REGEX))) {\n const [h, s, l, a] = (m[1] ?? m[2]).split(',').map(n => Number(n.trim().replace('%', '')));\n return new HSLColor(mod(h, 360), clamp(s, 0, 100), clamp(l, 0, 100), clamp(a ?? 1, 0, 1));\n }\n }\n\n toString(format: ColorFormat | 'css') {\n switch (format) {\n case 'hex':\n return this.toRGB().toString('hex');\n case 'hexa':\n return this.toRGB().toString('hexa');\n case 'hsl':\n return `hsl(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.lightness, 2)}%)`;\n case 'css':\n case 'hsla':\n return `hsla(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.lightness, 2)}%, ${this.alpha})`;\n default:\n return this.toFormat(format).toString(format);\n }\n }\n toFormat(format: ColorFormat): IColor {\n switch (format) {\n case 'hsl':\n case 'hsla':\n return this;\n case 'hsb':\n case 'hsba':\n return this.toHSB();\n case 'rgb':\n case 'rgba':\n return this.toRGB();\n default:\n throw new Error('Unsupported color conversion: hsl -> ' + format);\n }\n }\n\n /**\n * Converts a HSL color to HSB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_HSV.\n * @returns An HSBColor object.\n */\n private toHSB(): IColor {\n let saturation = this.saturation / 100;\n let lightness = this.lightness / 100;\n let brightness = lightness + saturation * Math.min(lightness, 1 - lightness);\n saturation = brightness === 0 ? 0 : 2 * (1 - lightness / brightness);\n return new HSBColor(\n toFixedNumber(this.hue, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(brightness * 100, 2),\n this.alpha\n );\n }\n\n /**\n * Converts a HSL color to RGB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB_alternative.\n * @returns An RGBColor object.\n */\n private toRGB(): IColor {\n let hue = this.hue;\n let saturation = this.saturation / 100;\n let lightness = this.lightness / 100;\n let a = saturation * Math.min(lightness, 1 - lightness);\n let fn = (n: number, k = (n + hue / 30) % 12) => lightness - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n return new RGBColor(\n Math.round(fn(0) * 255),\n Math.round(fn(8) * 255),\n Math.round(fn(4) * 255),\n this.alpha\n );\n }\n\n clone(): IColor {\n return new HSLColor(this.hue, this.saturation, this.lightness, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'hue':\n return {minValue: 0, maxValue: 360, step: 1, pageSize: 15};\n case 'saturation':\n case 'lightness':\n return {minValue: 0, maxValue: 100, step: 1, pageSize: 10};\n case 'alpha':\n return {minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1};\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n formatChannelValue(channel: ColorChannel, locale: string) {\n let options: Intl.NumberFormatOptions;\n let value = this.getChannelValue(channel);\n switch (channel) {\n case 'hue':\n options = {style: 'unit', unit: 'degree', unitDisplay: 'narrow'};\n break;\n case 'saturation':\n case 'lightness':\n options = {style: 'percent'};\n value /= 100;\n break;\n case 'alpha':\n options = {style: 'percent'};\n break;\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n return new NumberFormatter(locale, options).format(value);\n }\n\n getColorSpace(): ColorFormat {\n return 'hsl';\n }\n\n private static colorChannels: [ColorChannel, ColorChannel, ColorChannel] = ['hue', 'saturation', 'lightness'];\n getColorChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return HSLColor.colorChannels;\n }\n}\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"alpha\": \"ألفا\",\n \"blue\": \"أزرق\",\n \"brightness\": \"السطوع\",\n \"green\": \"أخضر\",\n \"hue\": \"درجة اللون\",\n \"lightness\": \"الإضاءة\",\n \"red\": \"أحمر\",\n \"saturation\": \"التشبع\"\n}\n","{\n \"alpha\": \"Алфа\",\n \"blue\": \"Синьо\",\n \"brightness\": \"Яркост\",\n \"green\": \"Зелено\",\n \"hue\": \"Оттенък\",\n \"lightness\": \"Лекота\",\n \"red\": \"Червено\",\n \"saturation\": \"Наситеност\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Modrá\",\n \"brightness\": \"Jas\",\n \"green\": \"Zelená\",\n \"hue\": \"Odstín\",\n \"lightness\": \"Světlost\",\n \"red\": \"Červená\",\n \"saturation\": \"Sytost\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blå\",\n \"brightness\": \"Lysstyrke\",\n \"green\": \"Grøn\",\n \"hue\": \"Tone\",\n \"lightness\": \"Lyshed\",\n \"red\": \"Rød\",\n \"saturation\": \"Farvemætning\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Blau\",\n \"brightness\": \"Helligkeit\",\n \"green\": \"Grün\",\n \"hue\": \"Farbton\",\n \"lightness\": \"Leuchtkraft\",\n \"red\": \"Rot\",\n \"saturation\": \"Sättigung\"\n}\n","{\n \"alpha\": \"Άλφα\",\n \"blue\": \"Μπλε\",\n \"brightness\": \"Φωτεινότητα\",\n \"green\": \"Πράσινο\",\n \"hue\": \"Τόνος\",\n \"lightness\": \"Φωτεινότητα\",\n \"red\": \"Κόκκινο\",\n \"saturation\": \"Κορεσμός\"\n}\n","{\n \"hue\": \"Hue\",\n \"saturation\": \"Saturation\",\n \"lightness\": \"Lightness\",\n \"brightness\": \"Brightness\",\n \"red\": \"Red\",\n \"green\": \"Green\",\n \"blue\": \"Blue\",\n \"alpha\": \"Alpha\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Azul\",\n \"brightness\": \"Brillo\",\n \"green\": \"Verde\",\n \"hue\": \"Tono\",\n \"lightness\": \"Luminosidad\",\n \"red\": \"Rojo\",\n \"saturation\": \"Saturación\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Sinine\",\n \"brightness\": \"Heledus\",\n \"green\": \"Roheline\",\n \"hue\": \"Värv\",\n \"lightness\": \"Valgus\",\n \"red\": \"Punane\",\n \"saturation\": \"Küllastus\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Sininen\",\n \"brightness\": \"Kirkkaus\",\n \"green\": \"Vihreä\",\n \"hue\": \"Sävy\",\n \"lightness\": \"Valomäärä\",\n \"red\": \"Punainen\",\n \"saturation\": \"Värikylläisyys\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Bleu\",\n \"brightness\": \"Luminosité\",\n \"green\": \"Vert\",\n \"hue\": \"Teinte\",\n \"lightness\": \"Luminosité\",\n \"red\": \"Rouge\",\n \"saturation\": \"Saturation\"\n}\n","{\n \"alpha\": \"אלפא\",\n \"blue\": \"כחול\",\n \"brightness\": \"בהירות\",\n \"green\": \"ירוק\",\n \"hue\": \"גוון\",\n \"lightness\": \"כמות אור\",\n \"red\": \"אדום\",\n \"saturation\": \"רוויה\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Plava\",\n \"brightness\": \"Svjetlina\",\n \"green\": \"Zelena\",\n \"hue\": \"Nijansa\",\n \"lightness\": \"Osvijetljenost\",\n \"red\": \"Crvena\",\n \"saturation\": \"Zasićenost\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Kék\",\n \"brightness\": \"Fényesség\",\n \"green\": \"Zöld\",\n \"hue\": \"Színárnyalat\",\n \"lightness\": \"Világosság\",\n \"red\": \"Piros\",\n \"saturation\": \"Telítettség\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blu\",\n \"brightness\": \"Luminosità\",\n \"green\": \"Verde\",\n \"hue\": \"Tonalità\",\n \"lightness\": \"Luminosità\",\n \"red\": \"Rosso\",\n \"saturation\": \"Saturazione\"\n}\n","{\n \"alpha\": \"アルファ\",\n \"blue\": \"青\",\n \"brightness\": \"明るさ\",\n \"green\": \"緑\",\n \"hue\": \"色相\",\n \"lightness\": \"明度\",\n \"red\": \"赤\",\n \"saturation\": \"彩度\"\n}\n","{\n \"alpha\": \"알파\",\n \"blue\": \"파랑\",\n \"brightness\": \"명도\",\n \"green\": \"초록\",\n \"hue\": \"색조\",\n \"lightness\": \"밝기\",\n \"red\": \"빨강\",\n \"saturation\": \"채도\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Mėlyna\",\n \"brightness\": \"Ryškumas\",\n \"green\": \"Žalia\",\n \"hue\": \"Atspalvis\",\n \"lightness\": \"Šviesumas\",\n \"red\": \"Raudona\",\n \"saturation\": \"Įsotinimas\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Zila\",\n \"brightness\": \"Spilgtums\",\n \"green\": \"Zaļa\",\n \"hue\": \"Nokrāsa\",\n \"lightness\": \"Gaišums\",\n \"red\": \"Sarkana\",\n \"saturation\": \"Piesātinājums\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blå\",\n \"brightness\": \"Lysstyrke\",\n \"green\": \"Grønn\",\n \"hue\": \"Fargetone\",\n \"lightness\": \"Lyshet\",\n \"red\": \"Rød\",\n \"saturation\": \"Metning\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blauw\",\n \"brightness\": \"Helderheid\",\n \"green\": \"Groen\",\n \"hue\": \"Kleurtoon\",\n \"lightness\": \"Lichtsterkte\",\n \"red\": \"Rood\",\n \"saturation\": \"Verzadiging\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Niebieski\",\n \"brightness\": \"Jasność\",\n \"green\": \"Zielony\",\n \"hue\": \"Odcień\",\n \"lightness\": \"Jaskrawość\",\n \"red\": \"Czerwony\",\n \"saturation\": \"Nasycenie\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Azul\",\n \"brightness\": \"Brilho\",\n \"green\": \"Verde\",\n \"hue\": \"Matiz\",\n \"lightness\": \"Luminosidade\",\n \"red\": \"Vermelho\",\n \"saturation\": \"Saturação\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Azul\",\n \"brightness\": \"Luminosidade\",\n \"green\": \"Verde\",\n \"hue\": \"Tonalidade\",\n \"lightness\": \"Claridade\",\n \"red\": \"Vermelho\",\n \"saturation\": \"Saturação\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Albastru\",\n \"brightness\": \"Luminozitate\",\n \"green\": \"Verde\",\n \"hue\": \"Nuanță\",\n \"lightness\": \"Luminozitate\",\n \"red\": \"Roșu\",\n \"saturation\": \"Saturație\"\n}\n","{\n \"alpha\": \"Альфа\",\n \"blue\": \"Синий\",\n \"brightness\": \"Яркость\",\n \"green\": \"Зеленый\",\n \"hue\": \"Оттенок\",\n \"lightness\": \"Освещенность\",\n \"red\": \"Красный\",\n \"saturation\": \"Насыщенность\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Modrá\",\n \"brightness\": \"Jas\",\n \"green\": \"Zelená\",\n \"hue\": \"Odtieň\",\n \"lightness\": \"Svetlosť\",\n \"red\": \"Červená\",\n \"saturation\": \"Sýtosť\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Modra\",\n \"brightness\": \"Svetlost\",\n \"green\": \"Zelena\",\n \"hue\": \"Barva\",\n \"lightness\": \"Lahkost\",\n \"red\": \"Rdeča\",\n \"saturation\": \"Nasičenost\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Plava\",\n \"brightness\": \"Osvetljenost\",\n \"green\": \"Zelena\",\n \"hue\": \"Nijansa\",\n \"lightness\": \"Osvetljenje\",\n \"red\": \"Crvena\",\n \"saturation\": \"Zasićenje\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blått\",\n \"brightness\": \"Ljusstyrka\",\n \"green\": \"Grönt\",\n \"hue\": \"Nyans\",\n \"lightness\": \"Ljushet\",\n \"red\": \"Rött\",\n \"saturation\": \"Mättnad\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Mavi\",\n \"brightness\": \"Parlaklık\",\n \"green\": \"Yeşil\",\n \"hue\": \"Ton\",\n \"lightness\": \"Canlılık\",\n \"red\": \"Kırmızı\",\n \"saturation\": \"Doygunluk\"\n}\n","{\n \"alpha\": \"Альфа\",\n \"blue\": \"Синій\",\n \"brightness\": \"Яскравість\",\n \"green\": \"Зелений\",\n \"hue\": \"Тон\",\n \"lightness\": \"Освітленість\",\n \"red\": \"Червоний\",\n \"saturation\": \"Насиченість\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"蓝色\",\n \"brightness\": \"亮度\",\n \"green\": \"绿色\",\n \"hue\": \"色相\",\n \"lightness\": \"明亮度\",\n \"red\": \"红色\",\n \"saturation\": \"饱和度\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"藍色\",\n \"brightness\": \"亮度\",\n \"green\": \"綠色\",\n \"hue\": \"色相\",\n \"lightness\": \"明亮\",\n \"red\": \"紅色\",\n \"saturation\": \"飽和度\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {clamp, snapValueToStep, useControlledState} from '@react-stately/utils';\nimport {Color, ColorAreaProps, ColorChannel} from '@react-types/color';\nimport {normalizeColor, parseColor} from './Color';\nimport {useMemo, useRef, useState} from 'react';\n\nexport interface ColorAreaState {\n /** The current color value displayed by the color area. */\n readonly value: Color,\n /** Sets the current color value. If a string is passed, it will be parsed to a Color. */\n setValue(value: string | Color): void,\n\n /** The current value of the horizontal axis channel displayed by the color area. */\n xValue: number,\n /** Sets the value for the horizontal axis channel displayed by the color area, and triggers `onChange`. */\n setXValue(value: number): void,\n\n /** The current value of the vertical axis channel displayed by the color area. */\n yValue: number,\n /** Sets the value for the vertical axis channel displayed by the color area, and triggers `onChange`. */\n setYValue(value: number): void,\n\n /** Sets the x and y channels of the current color value based on a percentage of the width and height of the color area, and triggers `onChange`. */\n setColorFromPoint(x: number, y: number): void,\n /** Returns the coordinates of the thumb relative to the upper left corner of the color area as a percentage. */\n getThumbPosition(): {x: number, y: number},\n\n /** Increments the value of the horizontal axis channel by the channel step or page amount. */\n incrementX(stepSize?: number): void,\n /** Decrements the value of the horizontal axis channel by the channel step or page amount. */\n decrementX(stepSize?: number): void,\n\n /** Increments the value of the vertical axis channel by the channel step or page amount. */\n incrementY(stepSize?: number): void,\n /** Decrements the value of the vertical axis channel by the channel step or page amount. */\n decrementY(stepSize?: number): void,\n\n /** Whether the color area is currently being dragged. */\n readonly isDragging: boolean,\n /** Sets whether the color area is being dragged. */\n setDragging(value: boolean): void,\n\n /** Returns the xChannel, yChannel and zChannel names based on the color value. */\n channels: {xChannel: ColorChannel, yChannel: ColorChannel, zChannel: ColorChannel},\n /** The step value of the xChannel, used when incrementing and decrementing. */\n xChannelStep: number,\n /** The step value of the yChannel, used when incrementing and decrementing. */\n yChannelStep: number,\n /** The page step value of the xChannel, used when incrementing and decrementing. */\n xChannelPageStep: number,\n /** The page step value of the yChannel, used when incrementing and decrementing. */\n yChannelPageStep: number,\n\n /** Returns the color that should be displayed in the color area thumb instead of `value`. */\n getDisplayColor(): Color\n}\n\nconst DEFAULT_COLOR = parseColor('#ffffff');\n/**\n * Provides state management for a color area component.\n * Color area allows users to adjust two channels of an HSL, HSB or RGB color value against a two-dimensional gradient background.\n */\nexport function useColorAreaState(props: ColorAreaProps): ColorAreaState {\n let {\n value,\n defaultValue,\n xChannel,\n yChannel,\n onChange,\n onChangeEnd\n } = props;\n\n if (!value && !defaultValue) {\n defaultValue = DEFAULT_COLOR;\n }\n\n let [color, setColorState] = useControlledState(value && normalizeColor(value), defaultValue && normalizeColor(defaultValue), onChange);\n let valueRef = useRef(color);\n let setColor = (color: Color) => {\n valueRef.current = color;\n setColorState(color);\n };\n\n let channels = useMemo(() =>\n color.getColorSpaceAxes({xChannel, yChannel}),\n [color, xChannel, yChannel]\n );\n\n let xChannelRange = color.getChannelRange(channels.xChannel);\n let yChannelRange = color.getChannelRange(channels.yChannel);\n let {minValue: minValueX, maxValue: maxValueX, step: stepX, pageSize: pageSizeX} = xChannelRange;\n let {minValue: minValueY, maxValue: maxValueY, step: stepY, pageSize: pageSizeY} = yChannelRange;\n\n let [isDragging, setDragging] = useState(false);\n let isDraggingRef = useRef(false);\n\n let xValue = color.getChannelValue(channels.xChannel);\n let yValue = color.getChannelValue(channels.yChannel);\n let setXValue = (v: number) => {\n if (v === xValue) {\n return;\n }\n let newColor = color.withChannelValue(channels.xChannel, v);\n setColor(newColor);\n };\n let setYValue = (v: number) => {\n if (v === yValue) {\n return;\n }\n let newColor = color.withChannelValue(channels.yChannel, v);\n setColor(newColor);\n };\n\n return {\n channels,\n xChannelStep: stepX,\n yChannelStep: stepY,\n xChannelPageStep: pageSizeX,\n yChannelPageStep: pageSizeY,\n value: color,\n setValue(value) {\n setColor(normalizeColor(value));\n },\n xValue,\n setXValue,\n yValue,\n setYValue,\n setColorFromPoint(x: number, y: number) {\n let newXValue = minValueX + clamp(x, 0, 1) * (maxValueX - minValueX);\n let newYValue = minValueY + (1 - clamp(y, 0, 1)) * (maxValueY - minValueY);\n let newColor:Color;\n if (newXValue !== xValue) {\n // Round new value to multiple of step, clamp value between min and max\n newXValue = snapValueToStep(newXValue, minValueX, maxValueX, stepX);\n newColor = color.withChannelValue(channels.xChannel, newXValue);\n }\n if (newYValue !== yValue) {\n // Round new value to multiple of step, clamp value between min and max\n newYValue = snapValueToStep(newYValue, minValueY, maxValueY, stepY);\n newColor = (newColor || color).withChannelValue(channels.yChannel, newYValue);\n }\n if (newColor) {\n setColor(newColor);\n }\n },\n getThumbPosition() {\n let x = (xValue - minValueX) / (maxValueX - minValueX);\n let y = 1 - (yValue - minValueY) / (maxValueY - minValueY);\n return {x, y};\n },\n incrementX(stepSize) {\n setXValue(xValue + stepSize > maxValueX ? maxValueX : snapValueToStep(xValue + stepSize, minValueX, maxValueX, stepX));\n },\n incrementY(stepSize) {\n setYValue(yValue + stepSize > maxValueY ? maxValueY : snapValueToStep(yValue + stepSize, minValueY, maxValueY, stepY));\n },\n decrementX(stepSize) {\n setXValue(snapValueToStep(xValue - stepSize, minValueX, maxValueX, stepX));\n },\n decrementY(stepSize) {\n setYValue(snapValueToStep(yValue - stepSize, minValueY, maxValueY, stepY));\n },\n setDragging(isDragging) {\n let wasDragging = isDraggingRef.current;\n isDraggingRef.current = isDragging;\n\n if (onChangeEnd && !isDragging && wasDragging) {\n onChangeEnd(valueRef.current);\n }\n\n setDragging(isDragging);\n },\n isDragging,\n getDisplayColor() {\n return color.withChannelValue('alpha', 1);\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorSliderProps} from '@react-types/color';\nimport {normalizeColor, parseColor} from './Color';\nimport {SliderState, useSliderState} from '@react-stately/slider';\nimport {useControlledState} from '@react-stately/utils';\n\nexport interface ColorSliderState extends SliderState {\n /** The current color value represented by the color slider. */\n readonly value: Color,\n /** Sets the current color value. If a string is passed, it will be parsed to a Color. */\n setValue(value: string | Color): void,\n /** Returns the color that should be displayed in the slider instead of `value` or the optional parameter. */\n getDisplayColor(): Color\n}\n\n\nexport interface ColorSliderStateOptions extends ColorSliderProps {\n /** The locale to use for formatting the color channel value. */\n locale: string\n}\n\n/**\n * Provides state management for a color slider component.\n * Color sliders allow users to adjust an individual channel of a color value.\n */\nexport function useColorSliderState(props: ColorSliderStateOptions): ColorSliderState {\n let {channel, value, defaultValue, onChange, locale, ...otherProps} = props;\n if (value == null && defaultValue == null) {\n throw new Error('useColorSliderState requires a value or defaultValue');\n }\n\n let [color, setColor] = useControlledState(value && normalizeColor(value), defaultValue && normalizeColor(defaultValue), onChange);\n let sliderState = useSliderState({\n ...color.getChannelRange(channel),\n ...otherProps,\n // Unused except in getThumbValueLabel, which is overridden below. null to appease TypeScript.\n numberFormatter: null,\n value: color.getChannelValue(channel),\n onChange(v) {\n setColor(color.withChannelValue(channel, v));\n },\n onChangeEnd(v) {\n // onChange will have already been called with the right value, this is just to trigger onChangeEnd\n if (props.onChangeEnd) {\n props.onChangeEnd(color.withChannelValue(channel, v));\n }\n }\n });\n\n let {step, pageSize} = color.getChannelRange(channel);\n return {\n ...sliderState,\n value: color,\n setValue(value) {\n setColor(normalizeColor(value));\n },\n getDisplayColor() {\n switch (channel) {\n case 'hue':\n return parseColor(`hsl(${color.getChannelValue('hue')}, 100%, 50%)`);\n case 'lightness':\n case 'brightness':\n case 'saturation':\n case 'red':\n case 'green':\n case 'blue':\n return color.withChannelValue('alpha', 1);\n case 'alpha': {\n return color;\n }\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n },\n getThumbValueLabel() {\n return color.formatChannelValue(channel, locale);\n },\n step,\n pageSize\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorWheelProps} from '@react-types/color';\nimport {normalizeColor, parseColor} from './Color';\nimport {useControlledState} from '@react-stately/utils';\nimport {useRef, useState} from 'react';\n\nexport interface ColorWheelState {\n /** The current color value represented by the color wheel. */\n readonly value: Color,\n /** Sets the color value represented by the color wheel, and triggers `onChange`. */\n setValue(value: string | Color): void,\n\n /** The current value of the hue channel displayed by the color wheel. */\n readonly hue: number,\n /** Sets the hue channel of the current color value and triggers `onChange`. */\n setHue(value: number): void,\n\n /** Sets the hue channel of the current color value based on the given coordinates and radius of the color wheel, and triggers `onChange`. */\n setHueFromPoint(x: number, y: number, radius: number): void,\n /** Returns the coordinates of the thumb relative to the center point of the color wheel. */\n getThumbPosition(radius: number): {x: number, y: number},\n\n /** Increments the hue by the given amount (defaults to 1). */\n increment(stepSize?: number): void,\n /** Decrements the hue by the given amount (defaults to 1). */\n decrement(stepSize?: number): void,\n\n /** Whether the color wheel is currently being dragged. */\n readonly isDragging: boolean,\n /** Sets whether the color wheel is being dragged. */\n setDragging(value: boolean): void,\n /** Returns the color that should be displayed in the color wheel instead of `value`. */\n getDisplayColor(): Color,\n /** The step value of the hue channel, used when incrementing and decrementing. */\n step: number,\n /** The page step value of the hue channel, used when incrementing and decrementing. */\n pageStep: number\n}\n\nconst DEFAULT_COLOR = parseColor('hsl(0, 100%, 50%)');\n\nfunction roundToStep(value: number, step: number): number {\n return Math.round(value / step) * step;\n}\n\nfunction mod(n: number, m: number) {\n return ((n % m) + m) % m;\n}\n\nfunction roundDown(v: number) {\n let r = Math.floor(v);\n if (r === v) {\n return v - 1;\n } else {\n return r;\n }\n}\n\nfunction degToRad(deg: number) {\n return deg * Math.PI / 180;\n}\n\nfunction radToDeg(rad: number) {\n return rad * 180 / Math.PI;\n}\n\n// 0deg = 3 o'clock. increases clockwise\nfunction angleToCartesian(angle: number, radius: number): {x: number, y: number} {\n let rad = degToRad(360 - angle + 90);\n let x = Math.sin(rad) * (radius);\n let y = Math.cos(rad) * (radius);\n return {x, y};\n}\n\nfunction cartesianToAngle(x: number, y: number, radius: number): number {\n let deg = radToDeg(Math.atan2(y / radius, x / radius));\n return (deg + 360) % 360;\n}\n\n/**\n * Provides state management for a color wheel component.\n * Color wheels allow users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport function useColorWheelState(props: ColorWheelProps): ColorWheelState {\n let {defaultValue, onChange, onChangeEnd} = props;\n\n if (!props.value && !defaultValue) {\n defaultValue = DEFAULT_COLOR;\n }\n\n let [value, setValueState] = useControlledState(normalizeColor(props.value), normalizeColor(defaultValue), onChange);\n let valueRef = useRef(value);\n let setValue = (value: Color) => {\n valueRef.current = value;\n setValueState(value);\n };\n\n let channelRange = value.getChannelRange('hue');\n let {minValue: minValueX, maxValue: maxValueX, step: step, pageSize: pageStep} = channelRange;\n let [isDragging, setDragging] = useState(false);\n let isDraggingRef = useRef(false);\n\n let hue = value.getChannelValue('hue');\n function setHue(v: number) {\n if (v > 360) {\n // Make sure you can always get back to 0.\n v = 0;\n }\n v = roundToStep(mod(v, 360), step);\n if (hue !== v) {\n let color = value.withChannelValue('hue', v);\n setValue(color);\n }\n }\n\n return {\n value,\n step,\n pageStep,\n setValue(v) {\n let color = normalizeColor(v);\n setValue(color);\n },\n hue,\n setHue,\n setHueFromPoint(x, y, radius) {\n setHue(cartesianToAngle(x, y, radius));\n },\n getThumbPosition(radius) {\n return angleToCartesian(value.getChannelValue('hue'), radius);\n },\n increment(stepSize = 1) {\n let s = Math.max(stepSize, step);\n let newValue = hue + s;\n if (newValue >= maxValueX) {\n // Make sure you can always get back to 0.\n newValue = minValueX;\n }\n setHue(roundToStep(mod(newValue, 360), s));\n },\n decrement(stepSize = 1) {\n let s = Math.max(stepSize, step);\n if (hue === 0) {\n // We can't just subtract step because this might be the case:\n // |(previous step) - 0| < step size\n setHue(roundDown(360 / s) * s);\n } else {\n setHue(roundToStep(mod(hue - s, 360), s));\n }\n },\n setDragging(isDragging) {\n let wasDragging = isDraggingRef.current;\n isDraggingRef.current = isDragging;\n\n if (onChangeEnd && !isDragging && wasDragging) {\n onChangeEnd(valueRef.current);\n }\n\n setDragging(isDragging);\n },\n isDragging,\n getDisplayColor() {\n return value.toFormat('hsl').withChannelValue('saturation', 100).withChannelValue('lightness', 50).withChannelValue('alpha', 1);\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorFieldProps} from '@react-types/color';\nimport {parseColor} from './Color';\nimport {useColor} from './useColor';\nimport {useControlledState} from '@react-stately/utils';\nimport {useMemo, useState} from 'react';\n\nexport interface ColorFieldState {\n /**\n * The current text value of the input. Updated as the user types,\n * and formatted according to `formatOptions` on blur.\n */\n readonly inputValue: string,\n /**\n * The currently parsed color value, or null if the field is empty.\n * Updated based on the `inputValue` as the user types.\n */\n readonly colorValue: Color,\n /** Sets the current text value of the input. */\n setInputValue(value: string): void,\n /**\n * Updates the input value based on the currently parsed color value.\n * Typically this is called when the field is blurred.\n */\n commit(): void,\n /** Increments the current input value to the next step boundary, and fires `onChange`. */\n increment(): void,\n /** Decrements the current input value to the next step boundary, and fires `onChange`. */\n decrement(): void,\n /** Sets the current value to the maximum color value, and fires `onChange`. */\n incrementToMax(): void,\n /** Sets the current value to the minimum color value, and fires `onChange`. */\n decrementToMin(): void,\n /**\n * Validates a user input string.\n * Values can be partially entered, and may be valid even if they cannot currently be parsed to a color.\n * Can be used to implement validation as a user types.\n */\n validate(value: string): boolean\n}\n\nconst MIN_COLOR = parseColor('#000000');\nconst MAX_COLOR = parseColor('#FFFFFF');\nconst MIN_COLOR_INT = MIN_COLOR.toHexInt();\nconst MAX_COLOR_INT = MAX_COLOR.toHexInt();\n\n/**\n * Provides state management for a color field component. Color fields allow\n * users to enter and adjust a hex color value.\n */\nexport function useColorFieldState(\n props: ColorFieldProps\n): ColorFieldState {\n let {\n value,\n defaultValue,\n onChange\n } = props;\n let {step} = MIN_COLOR.getChannelRange('red');\n\n let initialValue = useColor(value);\n let initialDefaultValue = useColor(defaultValue);\n let [colorValue, setColorValue] = useControlledState<Color>(initialValue, initialDefaultValue, onChange);\n let [inputValue, setInputValue] = useState(() => (value || defaultValue) && colorValue ? colorValue.toString('hex') : '');\n\n let safelySetColorValue = (newColor: Color) => {\n if (!colorValue || !newColor) {\n setColorValue(newColor);\n return;\n }\n if (newColor.toHexInt() !== colorValue.toHexInt()) {\n setColorValue(newColor);\n return;\n }\n };\n\n let [prevValue, setPrevValue] = useState(colorValue);\n if (prevValue !== colorValue) {\n setInputValue(colorValue ? colorValue.toString('hex') : '');\n setPrevValue(colorValue);\n }\n\n let parsedValue = useMemo(() => {\n let color;\n try {\n color = parseColor(inputValue.startsWith('#') ? inputValue : `#${inputValue}`);\n } catch (err) {\n color = null;\n }\n return color;\n }, [inputValue]);\n\n let commit = () => {\n // Set to empty state if input value is empty\n if (!inputValue.length) {\n safelySetColorValue(null);\n setInputValue(value === undefined ? '' : colorValue.toString('hex'));\n return;\n }\n\n // if it failed to parse, then reset input to formatted version of current number\n if (parsedValue == null) {\n setInputValue(colorValue ? colorValue.toString('hex') : '');\n return;\n }\n\n safelySetColorValue(parsedValue);\n // in a controlled state, the numberValue won't change, so we won't go back to our old input without help\n let newColorValue = '';\n if (colorValue) {\n newColorValue = colorValue.toString('hex');\n }\n setInputValue(newColorValue);\n };\n\n let increment = () => {\n let newValue = addColorValue(parsedValue, step);\n // if we've arrived at the same value that was previously in the state, the\n // input value should be updated to match\n // ex type 4, press increment, highlight the number in the input, type 4 again, press increment\n // you'd be at 5, then incrementing to 5 again, so no re-render would happen and 4 would be left in the input\n if (newValue === colorValue) {\n setInputValue(newValue.toString('hex'));\n }\n safelySetColorValue(newValue);\n };\n let decrement = () => {\n let newValue = addColorValue(parsedValue, -step);\n // if we've arrived at the same value that was previously in the state, the\n // input value should be updated to match\n // ex type 4, press increment, highlight the number in the input, type 4 again, press increment\n // you'd be at 5, then incrementing to 5 again, so no re-render would happen and 4 would be left in the input\n if (newValue === colorValue) {\n setInputValue(newValue.toString('hex'));\n }\n safelySetColorValue(newValue);\n };\n let incrementToMax = () => safelySetColorValue(MAX_COLOR);\n let decrementToMin = () => safelySetColorValue(MIN_COLOR);\n\n let validate = (value: string) => value === '' || !!value.match(/^#?[0-9a-f]{0,6}$/i)?.[0];\n\n return {\n validate,\n colorValue,\n inputValue,\n setInputValue,\n commit,\n increment,\n incrementToMax,\n decrement,\n decrementToMin\n };\n}\n\nfunction addColorValue(color: Color, step: number) {\n let newColor = color ? color : MIN_COLOR;\n let colorInt = newColor.toHexInt();\n\n let clampInt = Math.min(Math.max(colorInt + step, MIN_COLOR_INT), MAX_COLOR_INT);\n if (clampInt !== colorInt) {\n let newColorString = `#${clampInt.toString(16).padStart(6, '0').toUpperCase()}`;\n newColor = parseColor(newColorString);\n }\n return newColor;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color} from '@react-types/color';\nimport {parseColor} from './Color';\nimport {useMemo} from 'react';\n\nexport function useColor(value: string | Color | undefined | null) {\n return useMemo(() => {\n if (typeof value === 'string') {\n try {\n return parseColor(value);\n } catch (err) {\n return undefined;\n }\n }\n return value;\n }, [value]);\n}\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;;;AEVD,4BAAiB;IAAG,SAAS,CAAC,IAAI,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC;IACd,cAAc,CAAC,MAAM,CAAC;IACtB,SAAS,CAAC,IAAI,CAAC;IACf,OAAO,CAAC,UAAU,CAAC;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AAoC;QAAlB,OAAA,UAAU,MAAM,CAAC,CAAC,CAAA,CAAA,eAAA,MAAM,MAAM,mCAAZ,0BAAA,KAAA,IAAA,YAAmC,CAAC,EAAE,AAAD;;IAEzF,OAAO;kBACL;oBACA;oBACA;uBACA;gBACA;mBACA;wBACA;mBACA;wBACA;IACF;AACF;AAEA,SAAS,oCAAc,KAAY,EAAE,IAAY;IAC/C,IAAI,WAAW,QAAQ,QAAQ;IAC/B,IAAI,WAAW,SAAS;IAExB,IAAI,WAAW,KAAK,IAAI,KAAK,IAAI,WAAW,MAAM,sCAAgB;IAClE,IAAI,aAAa,UAAU;QACzB,IAAI,iBAAiB,CAAC,CAAC,EAAE,SAAS,SAAS,IAAI,SAAS,GAAG,KAAK,cAAc,CAAC;QAC/E,WAAW,CAAA,GAAA,wCAAS,EAAE;IACxB;IACA,OAAO;AACT;;","sources":["packages/@react-stately/color/src/index.ts","packages/@react-stately/color/src/Color.ts","packages/@react-stately/color/src/*.js","packages/@react-stately/color/intl/ar-AE.json","packages/@react-stately/color/intl/bg-BG.json","packages/@react-stately/color/intl/cs-CZ.json","packages/@react-stately/color/intl/da-DK.json","packages/@react-stately/color/intl/de-DE.json","packages/@react-stately/color/intl/el-GR.json","packages/@react-stately/color/intl/en-US.json","packages/@react-stately/color/intl/es-ES.json","packages/@react-stately/color/intl/et-EE.json","packages/@react-stately/color/intl/fi-FI.json","packages/@react-stately/color/intl/fr-FR.json","packages/@react-stately/color/intl/he-IL.json","packages/@react-stately/color/intl/hr-HR.json","packages/@react-stately/color/intl/hu-HU.json","packages/@react-stately/color/intl/it-IT.json","packages/@react-stately/color/intl/ja-JP.json","packages/@react-stately/color/intl/ko-KR.json","packages/@react-stately/color/intl/lt-LT.json","packages/@react-stately/color/intl/lv-LV.json","packages/@react-stately/color/intl/nb-NO.json","packages/@react-stately/color/intl/nl-NL.json","packages/@react-stately/color/intl/pl-PL.json","packages/@react-stately/color/intl/pt-BR.json","packages/@react-stately/color/intl/pt-PT.json","packages/@react-stately/color/intl/ro-RO.json","packages/@react-stately/color/intl/ru-RU.json","packages/@react-stately/color/intl/sk-SK.json","packages/@react-stately/color/intl/sl-SI.json","packages/@react-stately/color/intl/sr-SP.json","packages/@react-stately/color/intl/sv-SE.json","packages/@react-stately/color/intl/tr-TR.json","packages/@react-stately/color/intl/uk-UA.json","packages/@react-stately/color/intl/zh-CN.json","packages/@react-stately/color/intl/zh-TW.json","packages/@react-stately/color/src/useColorAreaState.ts","packages/@react-stately/color/src/useColorSliderState.ts","packages/@react-stately/color/src/useColorWheelState.ts","packages/@react-stately/color/src/useColorFieldState.ts","packages/@react-stately/color/src/useColor.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport type {ColorAreaState} from './useColorAreaState';\nexport type {ColorSliderState} from './useColorSliderState';\nexport type {ColorWheelState} from './useColorWheelState';\nexport type {ColorFieldState} from './useColorFieldState';\n\nexport {parseColor} from './Color';\nexport {useColorAreaState} from './useColorAreaState';\nexport {useColorSliderState} from './useColorSliderState';\nexport {useColorWheelState} from './useColorWheelState';\nexport {useColorFieldState} from './useColorFieldState';\n\nexport type {Color, ColorAreaProps, ColorFieldProps, ColorWheelProps} from '@react-types/color';\nexport type {ColorSliderStateOptions} from './useColorSliderState';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {clamp, toFixedNumber} from '@react-stately/utils';\nimport {ColorAxes, ColorChannel, ColorChannelRange, ColorFormat, Color as IColor} from '@react-types/color';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {LocalizedStringDictionary} from '@internationalized/string';\nimport {NumberFormatter} from '@internationalized/number';\n\nconst strings = new LocalizedStringDictionary(intlMessages);\n\n/** Parses a color from a string value. Throws an error if the string could not be parsed. */\nexport function parseColor(value: string): IColor {\n let res = RGBColor.parse(value) || HSBColor.parse(value) || HSLColor.parse(value);\n if (res) {\n return res;\n }\n\n throw new Error('Invalid color value: ' + value);\n}\n\nexport function normalizeColor(v: string | IColor) {\n if (typeof v === 'string') {\n return parseColor(v);\n } else {\n return v;\n }\n}\n\nabstract class Color implements IColor {\n abstract toFormat(format: ColorFormat): IColor;\n abstract toString(format: ColorFormat | 'css'): string;\n abstract clone(): IColor;\n abstract getChannelRange(channel: ColorChannel): ColorChannelRange;\n abstract formatChannelValue(channel: ColorChannel, locale: string): string;\n\n toHexInt(): number {\n return this.toFormat('rgb').toHexInt();\n }\n\n getChannelValue(channel: ColorChannel): number {\n if (channel in this) {\n return this[channel];\n }\n\n throw new Error('Unsupported color channel: ' + channel);\n }\n\n withChannelValue(channel: ColorChannel, value: number): IColor {\n if (channel in this) {\n let x = this.clone();\n x[channel] = value;\n return x;\n }\n\n throw new Error('Unsupported color channel: ' + channel);\n }\n\n getChannelName(channel: ColorChannel, locale: string) {\n return strings.getStringForLocale(channel, locale);\n }\n\n abstract getColorSpace(): ColorFormat\n getColorSpaceAxes(xyChannels: {xChannel?: ColorChannel, yChannel?: ColorChannel}): ColorAxes {\n let {xChannel, yChannel} = xyChannels;\n let xCh = xChannel || this.getColorChannels().find(c => c !== yChannel);\n let yCh = yChannel || this.getColorChannels().find(c => c !== xCh);\n let zCh = this.getColorChannels().find(c => c !== xCh && c !== yCh);\n\n return {xChannel: xCh, yChannel: yCh, zChannel: zCh};\n }\n abstract getColorChannels(): [ColorChannel, ColorChannel, ColorChannel]\n}\nclass RGBColor extends Color {\n constructor(private red: number, private green: number, private blue: number, private alpha: number) {\n super();\n }\n\n static parse(value: string) {\n let colors = [];\n // matching #rgb, #rgba, #rrggbb, #rrggbbaa\n if (/^#[\\da-f]+$/i.test(value) && [4, 5, 7, 9].includes(value.length)) {\n const values = (value.length < 6 ? value.replace(/[^#]/gi, '$&$&') : value).slice(1).split('');\n while (values.length > 0) {\n colors.push(parseInt(values.splice(0, 2).join(''), 16));\n }\n colors[3] = colors[3] !== undefined ? colors[3] / 255 : undefined;\n }\n\n // matching rgb(rrr, ggg, bbb), rgba(rrr, ggg, bbb, 0.a)\n const match = value.match(/^rgba?\\((.*)\\)$/);\n if (match?.[1]) {\n colors = match[1].split(',').map(value => Number(value.trim()));\n colors = colors.map((num, i) => clamp(num, 0, i < 3 ? 255 : 1));\n }\n\n return colors.length < 3 ? undefined : new RGBColor(colors[0], colors[1], colors[2], colors[3] ?? 1);\n }\n\n\n toString(format: ColorFormat | 'css') {\n switch (format) {\n case 'hex':\n return '#' + (this.red.toString(16).padStart(2, '0') + this.green.toString(16).padStart(2, '0') + this.blue.toString(16).padStart(2, '0')).toUpperCase();\n case 'hexa':\n return '#' + (this.red.toString(16).padStart(2, '0') + this.green.toString(16).padStart(2, '0') + this.blue.toString(16).padStart(2, '0') + Math.round(this.alpha * 255).toString(16).padStart(2, '0')).toUpperCase();\n case 'rgb':\n return `rgb(${this.red}, ${this.green}, ${this.blue})`;\n case 'css':\n case 'rgba':\n return `rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;\n default:\n return this.toFormat(format).toString(format);\n }\n }\n\n toFormat(format: ColorFormat): IColor {\n switch (format) {\n case 'hex':\n case 'hexa':\n case 'rgb':\n case 'rgba':\n return this;\n case 'hsb':\n case 'hsba':\n return this.toHSB();\n case 'hsl':\n case 'hsla':\n return this.toHSL();\n default:\n throw new Error('Unsupported color conversion: rgb -> ' + format);\n }\n }\n\n toHexInt(): number {\n return this.red << 16 | this.green << 8 | this.blue;\n }\n\n /**\n * Converts an RGB color value to HSB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB.\n * @returns An HSBColor object.\n */\n private toHSB(): IColor {\n const red = this.red / 255;\n const green = this.green / 255;\n const blue = this.blue / 255;\n const min = Math.min(red, green, blue);\n const brightness = Math.max(red, green, blue);\n const chroma = brightness - min;\n const saturation = brightness === 0 ? 0 : chroma / brightness;\n let hue = 0; // achromatic\n\n if (chroma !== 0) {\n switch (brightness) {\n case red:\n hue = (green - blue) / chroma + (green < blue ? 6 : 0);\n break;\n case green:\n hue = (blue - red) / chroma + 2;\n break;\n case blue:\n hue = (red - green) / chroma + 4;\n break;\n }\n\n hue /= 6;\n }\n\n return new HSBColor(\n toFixedNumber(hue * 360, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(brightness * 100, 2),\n this.alpha\n );\n }\n\n /**\n * Converts an RGB color value to HSL.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB.\n * @returns An HSLColor object.\n */\n private toHSL(): IColor {\n const red = this.red / 255;\n const green = this.green / 255;\n const blue = this.blue / 255;\n const min = Math.min(red, green, blue);\n const max = Math.max(red, green, blue);\n const lightness = (max + min) / 2;\n const chroma = max - min;\n let hue: number;\n let saturation: number;\n\n if (chroma === 0) {\n hue = saturation = 0; // achromatic\n } else {\n saturation = chroma / (lightness < .5 ? max + min : 2 - max - min);\n\n switch (max) {\n case red:\n hue = (green - blue) / chroma + (green < blue ? 6 : 0);\n break;\n case green:\n hue = (blue - red) / chroma + 2;\n break;\n case blue:\n hue = (red - green) / chroma + 4;\n break;\n }\n\n hue /= 6;\n }\n\n return new HSLColor(\n toFixedNumber(hue * 360, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(lightness * 100, 2),\n this.alpha);\n }\n\n clone(): IColor {\n return new RGBColor(this.red, this.green, this.blue, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'red':\n case 'green':\n case 'blue':\n return {minValue: 0x0, maxValue: 0xFF, step: 0x1, pageSize: 0x11};\n case 'alpha':\n return {minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1};\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n formatChannelValue(channel: ColorChannel, locale: string) {\n let options: Intl.NumberFormatOptions;\n let value = this.getChannelValue(channel);\n switch (channel) {\n case 'red':\n case 'green':\n case 'blue':\n options = {style: 'decimal'};\n break;\n case 'alpha':\n options = {style: 'percent'};\n break;\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n return new NumberFormatter(locale, options).format(value);\n }\n\n getColorSpace(): ColorFormat {\n return 'rgb';\n }\n\n private static colorChannels: [ColorChannel, ColorChannel, ColorChannel] = ['red', 'green', 'blue'];\n getColorChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return RGBColor.colorChannels;\n }\n}\n\n// X = <negative/positive number with/without decimal places>\n// before/after a comma, 0 or more whitespaces are allowed\n// - hsb(X, X%, X%)\n// - hsba(X, X%, X%, X)\nconst HSB_REGEX = /hsb\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%)\\)|hsba\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d(.\\d+)?)\\)/;\n\nclass HSBColor extends Color {\n constructor(private hue: number, private saturation: number, private brightness: number, private alpha: number) {\n super();\n }\n\n static parse(value: string): HSBColor | void {\n let m: RegExpMatchArray | void;\n if ((m = value.match(HSB_REGEX))) {\n const [h, s, b, a] = (m[1] ?? m[2]).split(',').map(n => Number(n.trim().replace('%', '')));\n return new HSBColor(mod(h, 360), clamp(s, 0, 100), clamp(b, 0, 100), clamp(a ?? 1, 0, 1));\n }\n }\n\n toString(format: ColorFormat | 'css') {\n switch (format) {\n case 'css':\n return this.toHSL().toString('css');\n case 'hex':\n return this.toRGB().toString('hex');\n case 'hexa':\n return this.toRGB().toString('hexa');\n case 'hsb':\n return `hsb(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%)`;\n case 'hsba':\n return `hsba(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%, ${this.alpha})`;\n default:\n return this.toFormat(format).toString(format);\n }\n }\n\n toFormat(format: ColorFormat): IColor {\n switch (format) {\n case 'hsb':\n case 'hsba':\n return this;\n case 'hsl':\n case 'hsla':\n return this.toHSL();\n case 'rgb':\n case 'rgba':\n return this.toRGB();\n default:\n throw new Error('Unsupported color conversion: hsb -> ' + format);\n }\n }\n\n /**\n * Converts a HSB color to HSL.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSV_to_HSL.\n * @returns An HSLColor object.\n */\n private toHSL(): IColor {\n let saturation = this.saturation / 100;\n let brightness = this.brightness / 100;\n let lightness = brightness * (1 - saturation / 2);\n saturation = lightness === 0 || lightness === 1 ? 0 : (brightness - lightness) / Math.min(lightness, 1 - lightness);\n\n return new HSLColor(\n toFixedNumber(this.hue, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(lightness * 100, 2),\n this.alpha\n );\n }\n\n /**\n * Converts a HSV color value to RGB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSV_to_RGB_alternative.\n * @returns An RGBColor object.\n */\n private toRGB(): IColor {\n let hue = this.hue;\n let saturation = this.saturation / 100;\n let brightness = this.brightness / 100;\n let fn = (n: number, k = (n + hue / 60) % 6) => brightness - saturation * brightness * Math.max(Math.min(k, 4 - k, 1), 0);\n return new RGBColor(\n Math.round(fn(5) * 255),\n Math.round(fn(3) * 255),\n Math.round(fn(1) * 255),\n this.alpha\n );\n }\n\n clone(): IColor {\n return new HSBColor(this.hue, this.saturation, this.brightness, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'hue':\n return {minValue: 0, maxValue: 360, step: 1, pageSize: 15};\n case 'saturation':\n case 'brightness':\n return {minValue: 0, maxValue: 100, step: 1, pageSize: 10};\n case 'alpha':\n return {minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1};\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n formatChannelValue(channel: ColorChannel, locale: string) {\n let options: Intl.NumberFormatOptions;\n let value = this.getChannelValue(channel);\n switch (channel) {\n case 'hue':\n options = {style: 'unit', unit: 'degree', unitDisplay: 'narrow'};\n break;\n case 'saturation':\n case 'brightness':\n options = {style: 'percent'};\n value /= 100;\n break;\n case 'alpha':\n options = {style: 'percent'};\n break;\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n return new NumberFormatter(locale, options).format(value);\n }\n\n getColorSpace(): ColorFormat {\n return 'hsb';\n }\n\n private static colorChannels: [ColorChannel, ColorChannel, ColorChannel] = ['hue', 'saturation', 'brightness'];\n getColorChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return HSBColor.colorChannels;\n }\n}\n\n// X = <negative/positive number with/without decimal places>\n// before/after a comma, 0 or more whitespaces are allowed\n// - hsl(X, X%, X%)\n// - hsla(X, X%, X%, X)\nconst HSL_REGEX = /hsl\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%)\\)|hsla\\(([-+]?\\d+(?:.\\d+)?\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d+(?:.\\d+)?%\\s*,\\s*[-+]?\\d(.\\d+)?)\\)/;\n\nfunction mod(n, m) {\n return ((n % m) + m) % m;\n}\n\nclass HSLColor extends Color {\n constructor(private hue: number, private saturation: number, private lightness: number, private alpha: number) {\n super();\n }\n\n static parse(value: string): HSLColor | void {\n let m: RegExpMatchArray | void;\n if ((m = value.match(HSL_REGEX))) {\n const [h, s, l, a] = (m[1] ?? m[2]).split(',').map(n => Number(n.trim().replace('%', '')));\n return new HSLColor(mod(h, 360), clamp(s, 0, 100), clamp(l, 0, 100), clamp(a ?? 1, 0, 1));\n }\n }\n\n toString(format: ColorFormat | 'css') {\n switch (format) {\n case 'hex':\n return this.toRGB().toString('hex');\n case 'hexa':\n return this.toRGB().toString('hexa');\n case 'hsl':\n return `hsl(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.lightness, 2)}%)`;\n case 'css':\n case 'hsla':\n return `hsla(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.lightness, 2)}%, ${this.alpha})`;\n default:\n return this.toFormat(format).toString(format);\n }\n }\n toFormat(format: ColorFormat): IColor {\n switch (format) {\n case 'hsl':\n case 'hsla':\n return this;\n case 'hsb':\n case 'hsba':\n return this.toHSB();\n case 'rgb':\n case 'rgba':\n return this.toRGB();\n default:\n throw new Error('Unsupported color conversion: hsl -> ' + format);\n }\n }\n\n /**\n * Converts a HSL color to HSB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_HSV.\n * @returns An HSBColor object.\n */\n private toHSB(): IColor {\n let saturation = this.saturation / 100;\n let lightness = this.lightness / 100;\n let brightness = lightness + saturation * Math.min(lightness, 1 - lightness);\n saturation = brightness === 0 ? 0 : 2 * (1 - lightness / brightness);\n return new HSBColor(\n toFixedNumber(this.hue, 2),\n toFixedNumber(saturation * 100, 2),\n toFixedNumber(brightness * 100, 2),\n this.alpha\n );\n }\n\n /**\n * Converts a HSL color to RGB.\n * Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB_alternative.\n * @returns An RGBColor object.\n */\n private toRGB(): IColor {\n let hue = this.hue;\n let saturation = this.saturation / 100;\n let lightness = this.lightness / 100;\n let a = saturation * Math.min(lightness, 1 - lightness);\n let fn = (n: number, k = (n + hue / 30) % 12) => lightness - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n return new RGBColor(\n Math.round(fn(0) * 255),\n Math.round(fn(8) * 255),\n Math.round(fn(4) * 255),\n this.alpha\n );\n }\n\n clone(): IColor {\n return new HSLColor(this.hue, this.saturation, this.lightness, this.alpha);\n }\n\n getChannelRange(channel: ColorChannel): ColorChannelRange {\n switch (channel) {\n case 'hue':\n return {minValue: 0, maxValue: 360, step: 1, pageSize: 15};\n case 'saturation':\n case 'lightness':\n return {minValue: 0, maxValue: 100, step: 1, pageSize: 10};\n case 'alpha':\n return {minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1};\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n }\n\n formatChannelValue(channel: ColorChannel, locale: string) {\n let options: Intl.NumberFormatOptions;\n let value = this.getChannelValue(channel);\n switch (channel) {\n case 'hue':\n options = {style: 'unit', unit: 'degree', unitDisplay: 'narrow'};\n break;\n case 'saturation':\n case 'lightness':\n options = {style: 'percent'};\n value /= 100;\n break;\n case 'alpha':\n options = {style: 'percent'};\n break;\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n return new NumberFormatter(locale, options).format(value);\n }\n\n getColorSpace(): ColorFormat {\n return 'hsl';\n }\n\n private static colorChannels: [ColorChannel, ColorChannel, ColorChannel] = ['hue', 'saturation', 'lightness'];\n getColorChannels(): [ColorChannel, ColorChannel, ColorChannel] {\n return HSLColor.colorChannels;\n }\n}\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"alpha\": \"ألفا\",\n \"blue\": \"أزرق\",\n \"brightness\": \"السطوع\",\n \"green\": \"أخضر\",\n \"hue\": \"درجة اللون\",\n \"lightness\": \"الإضاءة\",\n \"red\": \"أحمر\",\n \"saturation\": \"التشبع\"\n}\n","{\n \"alpha\": \"Алфа\",\n \"blue\": \"Синьо\",\n \"brightness\": \"Яркост\",\n \"green\": \"Зелено\",\n \"hue\": \"Оттенък\",\n \"lightness\": \"Лекота\",\n \"red\": \"Червено\",\n \"saturation\": \"Наситеност\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Modrá\",\n \"brightness\": \"Jas\",\n \"green\": \"Zelená\",\n \"hue\": \"Odstín\",\n \"lightness\": \"Světlost\",\n \"red\": \"Červená\",\n \"saturation\": \"Sytost\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blå\",\n \"brightness\": \"Lysstyrke\",\n \"green\": \"Grøn\",\n \"hue\": \"Tone\",\n \"lightness\": \"Lyshed\",\n \"red\": \"Rød\",\n \"saturation\": \"Farvemætning\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Blau\",\n \"brightness\": \"Helligkeit\",\n \"green\": \"Grün\",\n \"hue\": \"Farbton\",\n \"lightness\": \"Leuchtkraft\",\n \"red\": \"Rot\",\n \"saturation\": \"Sättigung\"\n}\n","{\n \"alpha\": \"Άλφα\",\n \"blue\": \"Μπλε\",\n \"brightness\": \"Φωτεινότητα\",\n \"green\": \"Πράσινο\",\n \"hue\": \"Τόνος\",\n \"lightness\": \"Φωτεινότητα\",\n \"red\": \"Κόκκινο\",\n \"saturation\": \"Κορεσμός\"\n}\n","{\n \"hue\": \"Hue\",\n \"saturation\": \"Saturation\",\n \"lightness\": \"Lightness\",\n \"brightness\": \"Brightness\",\n \"red\": \"Red\",\n \"green\": \"Green\",\n \"blue\": \"Blue\",\n \"alpha\": \"Alpha\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Azul\",\n \"brightness\": \"Brillo\",\n \"green\": \"Verde\",\n \"hue\": \"Tono\",\n \"lightness\": \"Luminosidad\",\n \"red\": \"Rojo\",\n \"saturation\": \"Saturación\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Sinine\",\n \"brightness\": \"Heledus\",\n \"green\": \"Roheline\",\n \"hue\": \"Värv\",\n \"lightness\": \"Valgus\",\n \"red\": \"Punane\",\n \"saturation\": \"Küllastus\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Sininen\",\n \"brightness\": \"Kirkkaus\",\n \"green\": \"Vihreä\",\n \"hue\": \"Sävy\",\n \"lightness\": \"Valomäärä\",\n \"red\": \"Punainen\",\n \"saturation\": \"Värikylläisyys\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"Bleu\",\n \"brightness\": \"Luminosité\",\n \"green\": \"Vert\",\n \"hue\": \"Teinte\",\n \"lightness\": \"Luminosité\",\n \"red\": \"Rouge\",\n \"saturation\": \"Saturation\"\n}\n","{\n \"alpha\": \"אלפא\",\n \"blue\": \"כחול\",\n \"brightness\": \"בהירות\",\n \"green\": \"ירוק\",\n \"hue\": \"גוון\",\n \"lightness\": \"כמות אור\",\n \"red\": \"אדום\",\n \"saturation\": \"רוויה\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Plava\",\n \"brightness\": \"Svjetlina\",\n \"green\": \"Zelena\",\n \"hue\": \"Nijansa\",\n \"lightness\": \"Osvijetljenost\",\n \"red\": \"Crvena\",\n \"saturation\": \"Zasićenost\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Kék\",\n \"brightness\": \"Fényesség\",\n \"green\": \"Zöld\",\n \"hue\": \"Színárnyalat\",\n \"lightness\": \"Világosság\",\n \"red\": \"Piros\",\n \"saturation\": \"Telítettség\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blu\",\n \"brightness\": \"Luminosità\",\n \"green\": \"Verde\",\n \"hue\": \"Tonalità\",\n \"lightness\": \"Luminosità\",\n \"red\": \"Rosso\",\n \"saturation\": \"Saturazione\"\n}\n","{\n \"alpha\": \"アルファ\",\n \"blue\": \"青\",\n \"brightness\": \"明るさ\",\n \"green\": \"緑\",\n \"hue\": \"色相\",\n \"lightness\": \"明度\",\n \"red\": \"赤\",\n \"saturation\": \"彩度\"\n}\n","{\n \"alpha\": \"알파\",\n \"blue\": \"파랑\",\n \"brightness\": \"명도\",\n \"green\": \"초록\",\n \"hue\": \"색조\",\n \"lightness\": \"밝기\",\n \"red\": \"빨강\",\n \"saturation\": \"채도\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Mėlyna\",\n \"brightness\": \"Ryškumas\",\n \"green\": \"Žalia\",\n \"hue\": \"Atspalvis\",\n \"lightness\": \"Šviesumas\",\n \"red\": \"Raudona\",\n \"saturation\": \"Įsotinimas\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Zila\",\n \"brightness\": \"Spilgtums\",\n \"green\": \"Zaļa\",\n \"hue\": \"Nokrāsa\",\n \"lightness\": \"Gaišums\",\n \"red\": \"Sarkana\",\n \"saturation\": \"Piesātinājums\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blå\",\n \"brightness\": \"Lysstyrke\",\n \"green\": \"Grønn\",\n \"hue\": \"Fargetone\",\n \"lightness\": \"Lyshet\",\n \"red\": \"Rød\",\n \"saturation\": \"Metning\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blauw\",\n \"brightness\": \"Helderheid\",\n \"green\": \"Groen\",\n \"hue\": \"Kleurtoon\",\n \"lightness\": \"Lichtsterkte\",\n \"red\": \"Rood\",\n \"saturation\": \"Verzadiging\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Niebieski\",\n \"brightness\": \"Jasność\",\n \"green\": \"Zielony\",\n \"hue\": \"Odcień\",\n \"lightness\": \"Jaskrawość\",\n \"red\": \"Czerwony\",\n \"saturation\": \"Nasycenie\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Azul\",\n \"brightness\": \"Brilho\",\n \"green\": \"Verde\",\n \"hue\": \"Matiz\",\n \"lightness\": \"Luminosidade\",\n \"red\": \"Vermelho\",\n \"saturation\": \"Saturação\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Azul\",\n \"brightness\": \"Luminosidade\",\n \"green\": \"Verde\",\n \"hue\": \"Tonalidade\",\n \"lightness\": \"Claridade\",\n \"red\": \"Vermelho\",\n \"saturation\": \"Saturação\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Albastru\",\n \"brightness\": \"Luminozitate\",\n \"green\": \"Verde\",\n \"hue\": \"Nuanță\",\n \"lightness\": \"Luminozitate\",\n \"red\": \"Roșu\",\n \"saturation\": \"Saturație\"\n}\n","{\n \"alpha\": \"Альфа\",\n \"blue\": \"Синий\",\n \"brightness\": \"Яркость\",\n \"green\": \"Зеленый\",\n \"hue\": \"Оттенок\",\n \"lightness\": \"Освещенность\",\n \"red\": \"Красный\",\n \"saturation\": \"Насыщенность\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Modrá\",\n \"brightness\": \"Jas\",\n \"green\": \"Zelená\",\n \"hue\": \"Odtieň\",\n \"lightness\": \"Svetlosť\",\n \"red\": \"Červená\",\n \"saturation\": \"Sýtosť\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Modra\",\n \"brightness\": \"Svetlost\",\n \"green\": \"Zelena\",\n \"hue\": \"Barva\",\n \"lightness\": \"Lahkost\",\n \"red\": \"Rdeča\",\n \"saturation\": \"Nasičenost\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Plava\",\n \"brightness\": \"Osvetljenost\",\n \"green\": \"Zelena\",\n \"hue\": \"Nijansa\",\n \"lightness\": \"Osvetljenje\",\n \"red\": \"Crvena\",\n \"saturation\": \"Zasićenje\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Blått\",\n \"brightness\": \"Ljusstyrka\",\n \"green\": \"Grönt\",\n \"hue\": \"Nyans\",\n \"lightness\": \"Ljushet\",\n \"red\": \"Rött\",\n \"saturation\": \"Mättnad\"\n}\n","{\n \"alpha\": \"Alfa\",\n \"blue\": \"Mavi\",\n \"brightness\": \"Parlaklık\",\n \"green\": \"Yeşil\",\n \"hue\": \"Ton\",\n \"lightness\": \"Canlılık\",\n \"red\": \"Kırmızı\",\n \"saturation\": \"Doygunluk\"\n}\n","{\n \"alpha\": \"Альфа\",\n \"blue\": \"Синій\",\n \"brightness\": \"Яскравість\",\n \"green\": \"Зелений\",\n \"hue\": \"Тон\",\n \"lightness\": \"Освітленість\",\n \"red\": \"Червоний\",\n \"saturation\": \"Насиченість\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"蓝色\",\n \"brightness\": \"亮度\",\n \"green\": \"绿色\",\n \"hue\": \"色相\",\n \"lightness\": \"明亮度\",\n \"red\": \"红色\",\n \"saturation\": \"饱和度\"\n}\n","{\n \"alpha\": \"Alpha\",\n \"blue\": \"藍色\",\n \"brightness\": \"亮度\",\n \"green\": \"綠色\",\n \"hue\": \"色相\",\n \"lightness\": \"明亮\",\n \"red\": \"紅色\",\n \"saturation\": \"飽和度\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {clamp, snapValueToStep, useControlledState} from '@react-stately/utils';\nimport {Color, ColorAreaProps, ColorChannel} from '@react-types/color';\nimport {normalizeColor, parseColor} from './Color';\nimport {useMemo, useRef, useState} from 'react';\n\nexport interface ColorAreaState {\n /** The current color value displayed by the color area. */\n readonly value: Color,\n /** Sets the current color value. If a string is passed, it will be parsed to a Color. */\n setValue(value: string | Color): void,\n\n /** The current value of the horizontal axis channel displayed by the color area. */\n xValue: number,\n /** Sets the value for the horizontal axis channel displayed by the color area, and triggers `onChange`. */\n setXValue(value: number): void,\n\n /** The current value of the vertical axis channel displayed by the color area. */\n yValue: number,\n /** Sets the value for the vertical axis channel displayed by the color area, and triggers `onChange`. */\n setYValue(value: number): void,\n\n /** Sets the x and y channels of the current color value based on a percentage of the width and height of the color area, and triggers `onChange`. */\n setColorFromPoint(x: number, y: number): void,\n /** Returns the coordinates of the thumb relative to the upper left corner of the color area as a percentage. */\n getThumbPosition(): {x: number, y: number},\n\n /** Increments the value of the horizontal axis channel by the channel step or page amount. */\n incrementX(stepSize?: number): void,\n /** Decrements the value of the horizontal axis channel by the channel step or page amount. */\n decrementX(stepSize?: number): void,\n\n /** Increments the value of the vertical axis channel by the channel step or page amount. */\n incrementY(stepSize?: number): void,\n /** Decrements the value of the vertical axis channel by the channel step or page amount. */\n decrementY(stepSize?: number): void,\n\n /** Whether the color area is currently being dragged. */\n readonly isDragging: boolean,\n /** Sets whether the color area is being dragged. */\n setDragging(value: boolean): void,\n\n /** Returns the xChannel, yChannel and zChannel names based on the color value. */\n channels: {xChannel: ColorChannel, yChannel: ColorChannel, zChannel: ColorChannel},\n /** The step value of the xChannel, used when incrementing and decrementing. */\n xChannelStep: number,\n /** The step value of the yChannel, used when incrementing and decrementing. */\n yChannelStep: number,\n /** The page step value of the xChannel, used when incrementing and decrementing. */\n xChannelPageStep: number,\n /** The page step value of the yChannel, used when incrementing and decrementing. */\n yChannelPageStep: number,\n\n /** Returns the color that should be displayed in the color area thumb instead of `value`. */\n getDisplayColor(): Color\n}\n\nconst DEFAULT_COLOR = parseColor('#ffffff');\n/**\n * Provides state management for a color area component.\n * Color area allows users to adjust two channels of an HSL, HSB or RGB color value against a two-dimensional gradient background.\n */\nexport function useColorAreaState(props: ColorAreaProps): ColorAreaState {\n let {\n value,\n defaultValue,\n xChannel,\n yChannel,\n onChange,\n onChangeEnd\n } = props;\n\n if (!value && !defaultValue) {\n defaultValue = DEFAULT_COLOR;\n }\n\n let [color, setColorState] = useControlledState(value && normalizeColor(value), defaultValue && normalizeColor(defaultValue), onChange);\n let valueRef = useRef(color);\n let setColor = (color: Color) => {\n valueRef.current = color;\n setColorState(color);\n };\n\n let channels = useMemo(() =>\n color.getColorSpaceAxes({xChannel, yChannel}),\n [color, xChannel, yChannel]\n );\n\n let xChannelRange = color.getChannelRange(channels.xChannel);\n let yChannelRange = color.getChannelRange(channels.yChannel);\n let {minValue: minValueX, maxValue: maxValueX, step: stepX, pageSize: pageSizeX} = xChannelRange;\n let {minValue: minValueY, maxValue: maxValueY, step: stepY, pageSize: pageSizeY} = yChannelRange;\n\n let [isDragging, setDragging] = useState(false);\n let isDraggingRef = useRef(false);\n\n let xValue = color.getChannelValue(channels.xChannel);\n let yValue = color.getChannelValue(channels.yChannel);\n let setXValue = (v: number) => {\n if (v === xValue) {\n return;\n }\n let newColor = color.withChannelValue(channels.xChannel, v);\n setColor(newColor);\n };\n let setYValue = (v: number) => {\n if (v === yValue) {\n return;\n }\n let newColor = color.withChannelValue(channels.yChannel, v);\n setColor(newColor);\n };\n\n return {\n channels,\n xChannelStep: stepX,\n yChannelStep: stepY,\n xChannelPageStep: pageSizeX,\n yChannelPageStep: pageSizeY,\n value: color,\n setValue(value) {\n setColor(normalizeColor(value));\n },\n xValue,\n setXValue,\n yValue,\n setYValue,\n setColorFromPoint(x: number, y: number) {\n let newXValue = minValueX + clamp(x, 0, 1) * (maxValueX - minValueX);\n let newYValue = minValueY + (1 - clamp(y, 0, 1)) * (maxValueY - minValueY);\n let newColor:Color;\n if (newXValue !== xValue) {\n // Round new value to multiple of step, clamp value between min and max\n newXValue = snapValueToStep(newXValue, minValueX, maxValueX, stepX);\n newColor = color.withChannelValue(channels.xChannel, newXValue);\n }\n if (newYValue !== yValue) {\n // Round new value to multiple of step, clamp value between min and max\n newYValue = snapValueToStep(newYValue, minValueY, maxValueY, stepY);\n newColor = (newColor || color).withChannelValue(channels.yChannel, newYValue);\n }\n if (newColor) {\n setColor(newColor);\n }\n },\n getThumbPosition() {\n let x = (xValue - minValueX) / (maxValueX - minValueX);\n let y = 1 - (yValue - minValueY) / (maxValueY - minValueY);\n return {x, y};\n },\n incrementX(stepSize) {\n setXValue(xValue + stepSize > maxValueX ? maxValueX : snapValueToStep(xValue + stepSize, minValueX, maxValueX, stepX));\n },\n incrementY(stepSize) {\n setYValue(yValue + stepSize > maxValueY ? maxValueY : snapValueToStep(yValue + stepSize, minValueY, maxValueY, stepY));\n },\n decrementX(stepSize) {\n setXValue(snapValueToStep(xValue - stepSize, minValueX, maxValueX, stepX));\n },\n decrementY(stepSize) {\n setYValue(snapValueToStep(yValue - stepSize, minValueY, maxValueY, stepY));\n },\n setDragging(isDragging) {\n let wasDragging = isDraggingRef.current;\n isDraggingRef.current = isDragging;\n\n if (onChangeEnd && !isDragging && wasDragging) {\n onChangeEnd(valueRef.current);\n }\n\n setDragging(isDragging);\n },\n isDragging,\n getDisplayColor() {\n return color.withChannelValue('alpha', 1);\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorSliderProps} from '@react-types/color';\nimport {normalizeColor, parseColor} from './Color';\nimport {SliderState, useSliderState} from '@react-stately/slider';\nimport {useControlledState} from '@react-stately/utils';\n\nexport interface ColorSliderState extends SliderState {\n /** The current color value represented by the color slider. */\n readonly value: Color,\n /** Sets the current color value. If a string is passed, it will be parsed to a Color. */\n setValue(value: string | Color): void,\n /** Returns the color that should be displayed in the slider instead of `value` or the optional parameter. */\n getDisplayColor(): Color\n}\n\n\nexport interface ColorSliderStateOptions extends ColorSliderProps {\n /** The locale to use for formatting the color channel value. */\n locale: string\n}\n\n/**\n * Provides state management for a color slider component.\n * Color sliders allow users to adjust an individual channel of a color value.\n */\nexport function useColorSliderState(props: ColorSliderStateOptions): ColorSliderState {\n let {channel, value, defaultValue, onChange, locale, ...otherProps} = props;\n if (value == null && defaultValue == null) {\n throw new Error('useColorSliderState requires a value or defaultValue');\n }\n\n let [color, setColor] = useControlledState(value && normalizeColor(value), defaultValue && normalizeColor(defaultValue), onChange);\n let sliderState = useSliderState({\n ...color.getChannelRange(channel),\n ...otherProps,\n // Unused except in getThumbValueLabel, which is overridden below. null to appease TypeScript.\n numberFormatter: null,\n value: color.getChannelValue(channel),\n onChange(v) {\n setColor(color.withChannelValue(channel, v));\n },\n onChangeEnd(v) {\n // onChange will have already been called with the right value, this is just to trigger onChangeEnd\n if (props.onChangeEnd) {\n props.onChangeEnd(color.withChannelValue(channel, v));\n }\n }\n });\n\n let {step, pageSize} = color.getChannelRange(channel);\n return {\n ...sliderState,\n value: color,\n setValue(value) {\n setColor(normalizeColor(value));\n },\n getDisplayColor() {\n switch (channel) {\n case 'hue':\n return parseColor(`hsl(${color.getChannelValue('hue')}, 100%, 50%)`);\n case 'lightness':\n case 'brightness':\n case 'saturation':\n case 'red':\n case 'green':\n case 'blue':\n return color.withChannelValue('alpha', 1);\n case 'alpha': {\n return color;\n }\n default:\n throw new Error('Unknown color channel: ' + channel);\n }\n },\n getThumbValueLabel() {\n return color.formatChannelValue(channel, locale);\n },\n step,\n pageSize\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorWheelProps} from '@react-types/color';\nimport {normalizeColor, parseColor} from './Color';\nimport {useControlledState} from '@react-stately/utils';\nimport {useRef, useState} from 'react';\n\nexport interface ColorWheelState {\n /** The current color value represented by the color wheel. */\n readonly value: Color,\n /** Sets the color value represented by the color wheel, and triggers `onChange`. */\n setValue(value: string | Color): void,\n\n /** The current value of the hue channel displayed by the color wheel. */\n readonly hue: number,\n /** Sets the hue channel of the current color value and triggers `onChange`. */\n setHue(value: number): void,\n\n /** Sets the hue channel of the current color value based on the given coordinates and radius of the color wheel, and triggers `onChange`. */\n setHueFromPoint(x: number, y: number, radius: number): void,\n /** Returns the coordinates of the thumb relative to the center point of the color wheel. */\n getThumbPosition(radius: number): {x: number, y: number},\n\n /** Increments the hue by the given amount (defaults to 1). */\n increment(stepSize?: number): void,\n /** Decrements the hue by the given amount (defaults to 1). */\n decrement(stepSize?: number): void,\n\n /** Whether the color wheel is currently being dragged. */\n readonly isDragging: boolean,\n /** Sets whether the color wheel is being dragged. */\n setDragging(value: boolean): void,\n /** Returns the color that should be displayed in the color wheel instead of `value`. */\n getDisplayColor(): Color,\n /** The step value of the hue channel, used when incrementing and decrementing. */\n step: number,\n /** The page step value of the hue channel, used when incrementing and decrementing. */\n pageStep: number\n}\n\nconst DEFAULT_COLOR = parseColor('hsl(0, 100%, 50%)');\n\nfunction roundToStep(value: number, step: number): number {\n return Math.round(value / step) * step;\n}\n\nfunction mod(n: number, m: number) {\n return ((n % m) + m) % m;\n}\n\nfunction roundDown(v: number) {\n let r = Math.floor(v);\n if (r === v) {\n return v - 1;\n } else {\n return r;\n }\n}\n\nfunction degToRad(deg: number) {\n return deg * Math.PI / 180;\n}\n\nfunction radToDeg(rad: number) {\n return rad * 180 / Math.PI;\n}\n\n// 0deg = 3 o'clock. increases clockwise\nfunction angleToCartesian(angle: number, radius: number): {x: number, y: number} {\n let rad = degToRad(360 - angle + 90);\n let x = Math.sin(rad) * (radius);\n let y = Math.cos(rad) * (radius);\n return {x, y};\n}\n\nfunction cartesianToAngle(x: number, y: number, radius: number): number {\n let deg = radToDeg(Math.atan2(y / radius, x / radius));\n return (deg + 360) % 360;\n}\n\n/**\n * Provides state management for a color wheel component.\n * Color wheels allow users to adjust the hue of an HSL or HSB color value on a circular track.\n */\nexport function useColorWheelState(props: ColorWheelProps): ColorWheelState {\n let {defaultValue, onChange, onChangeEnd} = props;\n\n if (!props.value && !defaultValue) {\n defaultValue = DEFAULT_COLOR;\n }\n\n let [value, setValueState] = useControlledState(normalizeColor(props.value), normalizeColor(defaultValue), onChange);\n let valueRef = useRef(value);\n let setValue = (value: Color) => {\n valueRef.current = value;\n setValueState(value);\n };\n\n let channelRange = value.getChannelRange('hue');\n let {minValue: minValueX, maxValue: maxValueX, step: step, pageSize: pageStep} = channelRange;\n let [isDragging, setDragging] = useState(false);\n let isDraggingRef = useRef(false);\n\n let hue = value.getChannelValue('hue');\n function setHue(v: number) {\n if (v > 360) {\n // Make sure you can always get back to 0.\n v = 0;\n }\n v = roundToStep(mod(v, 360), step);\n if (hue !== v) {\n let color = value.withChannelValue('hue', v);\n setValue(color);\n }\n }\n\n return {\n value,\n step,\n pageStep,\n setValue(v) {\n let color = normalizeColor(v);\n setValue(color);\n },\n hue,\n setHue,\n setHueFromPoint(x, y, radius) {\n setHue(cartesianToAngle(x, y, radius));\n },\n getThumbPosition(radius) {\n return angleToCartesian(value.getChannelValue('hue'), radius);\n },\n increment(stepSize = 1) {\n let s = Math.max(stepSize, step);\n let newValue = hue + s;\n if (newValue >= maxValueX) {\n // Make sure you can always get back to 0.\n newValue = minValueX;\n }\n setHue(roundToStep(mod(newValue, 360), s));\n },\n decrement(stepSize = 1) {\n let s = Math.max(stepSize, step);\n if (hue === 0) {\n // We can't just subtract step because this might be the case:\n // |(previous step) - 0| < step size\n setHue(roundDown(360 / s) * s);\n } else {\n setHue(roundToStep(mod(hue - s, 360), s));\n }\n },\n setDragging(isDragging) {\n let wasDragging = isDraggingRef.current;\n isDraggingRef.current = isDragging;\n\n if (onChangeEnd && !isDragging && wasDragging) {\n onChangeEnd(valueRef.current);\n }\n\n setDragging(isDragging);\n },\n isDragging,\n getDisplayColor() {\n return value.toFormat('hsl').withChannelValue('saturation', 100).withChannelValue('lightness', 50).withChannelValue('alpha', 1);\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color, ColorFieldProps} from '@react-types/color';\nimport {parseColor} from './Color';\nimport {useColor} from './useColor';\nimport {useControlledState} from '@react-stately/utils';\nimport {useMemo, useState} from 'react';\n\nexport interface ColorFieldState {\n /**\n * The current text value of the input. Updated as the user types,\n * and formatted according to `formatOptions` on blur.\n */\n readonly inputValue: string,\n /**\n * The currently parsed color value, or null if the field is empty.\n * Updated based on the `inputValue` as the user types.\n */\n readonly colorValue: Color,\n /** Sets the current text value of the input. */\n setInputValue(value: string): void,\n /**\n * Updates the input value based on the currently parsed color value.\n * Typically this is called when the field is blurred.\n */\n commit(): void,\n /** Increments the current input value to the next step boundary, and fires `onChange`. */\n increment(): void,\n /** Decrements the current input value to the next step boundary, and fires `onChange`. */\n decrement(): void,\n /** Sets the current value to the maximum color value, and fires `onChange`. */\n incrementToMax(): void,\n /** Sets the current value to the minimum color value, and fires `onChange`. */\n decrementToMin(): void,\n /**\n * Validates a user input string.\n * Values can be partially entered, and may be valid even if they cannot currently be parsed to a color.\n * Can be used to implement validation as a user types.\n */\n validate(value: string): boolean\n}\n\nconst MIN_COLOR = parseColor('#000000');\nconst MAX_COLOR = parseColor('#FFFFFF');\nconst MIN_COLOR_INT = MIN_COLOR.toHexInt();\nconst MAX_COLOR_INT = MAX_COLOR.toHexInt();\n\n/**\n * Provides state management for a color field component. Color fields allow\n * users to enter and adjust a hex color value.\n */\nexport function useColorFieldState(\n props: ColorFieldProps\n): ColorFieldState {\n let {\n value,\n defaultValue,\n onChange\n } = props;\n let {step} = MIN_COLOR.getChannelRange('red');\n\n let initialValue = useColor(value);\n let initialDefaultValue = useColor(defaultValue);\n let [colorValue, setColorValue] = useControlledState<Color>(initialValue, initialDefaultValue, onChange);\n let [inputValue, setInputValue] = useState(() => (value || defaultValue) && colorValue ? colorValue.toString('hex') : '');\n\n let safelySetColorValue = (newColor: Color) => {\n if (!colorValue || !newColor) {\n setColorValue(newColor);\n return;\n }\n if (newColor.toHexInt() !== colorValue.toHexInt()) {\n setColorValue(newColor);\n return;\n }\n };\n\n let [prevValue, setPrevValue] = useState(colorValue);\n if (prevValue !== colorValue) {\n setInputValue(colorValue ? colorValue.toString('hex') : '');\n setPrevValue(colorValue);\n }\n\n let parsedValue = useMemo(() => {\n let color;\n try {\n color = parseColor(inputValue.startsWith('#') ? inputValue : `#${inputValue}`);\n } catch (err) {\n color = null;\n }\n return color;\n }, [inputValue]);\n\n let commit = () => {\n // Set to empty state if input value is empty\n if (!inputValue.length) {\n safelySetColorValue(null);\n setInputValue(value === undefined ? '' : colorValue.toString('hex'));\n return;\n }\n\n // if it failed to parse, then reset input to formatted version of current number\n if (parsedValue == null) {\n setInputValue(colorValue ? colorValue.toString('hex') : '');\n return;\n }\n\n safelySetColorValue(parsedValue);\n // in a controlled state, the numberValue won't change, so we won't go back to our old input without help\n let newColorValue = '';\n if (colorValue) {\n newColorValue = colorValue.toString('hex');\n }\n setInputValue(newColorValue);\n };\n\n let increment = () => {\n let newValue = addColorValue(parsedValue, step);\n // if we've arrived at the same value that was previously in the state, the\n // input value should be updated to match\n // ex type 4, press increment, highlight the number in the input, type 4 again, press increment\n // you'd be at 5, then incrementing to 5 again, so no re-render would happen and 4 would be left in the input\n if (newValue === colorValue) {\n setInputValue(newValue.toString('hex'));\n }\n safelySetColorValue(newValue);\n };\n let decrement = () => {\n let newValue = addColorValue(parsedValue, -step);\n // if we've arrived at the same value that was previously in the state, the\n // input value should be updated to match\n // ex type 4, press increment, highlight the number in the input, type 4 again, press increment\n // you'd be at 5, then incrementing to 5 again, so no re-render would happen and 4 would be left in the input\n if (newValue === colorValue) {\n setInputValue(newValue.toString('hex'));\n }\n safelySetColorValue(newValue);\n };\n let incrementToMax = () => safelySetColorValue(MAX_COLOR);\n let decrementToMin = () => safelySetColorValue(MIN_COLOR);\n\n let validate = (value: string) => value === '' || !!value.match(/^#?[0-9a-f]{0,6}$/i)?.[0];\n\n return {\n validate,\n colorValue,\n inputValue,\n setInputValue,\n commit,\n increment,\n incrementToMax,\n decrement,\n decrementToMin\n };\n}\n\nfunction addColorValue(color: Color, step: number) {\n let newColor = color ? color : MIN_COLOR;\n let colorInt = newColor.toHexInt();\n\n let clampInt = Math.min(Math.max(colorInt + step, MIN_COLOR_INT), MAX_COLOR_INT);\n if (clampInt !== colorInt) {\n let newColorString = `#${clampInt.toString(16).padStart(6, '0').toUpperCase()}`;\n newColor = parseColor(newColorString);\n }\n return newColor;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Color} from '@react-types/color';\nimport {parseColor} from './Color';\nimport {useMemo} from 'react';\n\nexport function useColor(value: string | Color | undefined | null) {\n return useMemo(() => {\n if (typeof value === 'string') {\n try {\n return parseColor(value);\n } catch (err) {\n return undefined;\n }\n }\n return value;\n }, [value]);\n}\n"],"names":[],"version":3,"file":"module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-stately/color",
3
- "version": "3.4.3-nightly.4149+a399db1e3",
3
+ "version": "3.4.3-nightly.4157+633bb4fb6",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -22,13 +22,13 @@
22
22
  "url": "https://github.com/adobe/react-spectrum"
23
23
  },
24
24
  "dependencies": {
25
- "@internationalized/number": "3.2.2-nightly.4149+a399db1e3",
26
- "@internationalized/string": "3.1.2-nightly.4149+a399db1e3",
27
- "@react-stately/slider": "3.4.3-nightly.4149+a399db1e3",
28
- "@react-stately/utils": "3.0.0-nightly.2440+a399db1e3",
29
- "@react-types/color": "3.0.0-nightly.4149+a399db1e3",
30
- "@react-types/numberfield": "3.6.1-nightly.4149+a399db1e3",
31
- "@react-types/shared": "3.0.0-nightly.2440+a399db1e3",
25
+ "@internationalized/number": "3.2.2-nightly.4157+633bb4fb6",
26
+ "@internationalized/string": "3.1.2-nightly.4157+633bb4fb6",
27
+ "@react-stately/slider": "3.4.3-nightly.4157+633bb4fb6",
28
+ "@react-stately/utils": "3.0.0-nightly.2448+633bb4fb6",
29
+ "@react-types/color": "3.0.0-nightly.4157+633bb4fb6",
30
+ "@react-types/numberfield": "3.6.1-nightly.4157+633bb4fb6",
31
+ "@react-types/shared": "3.0.0-nightly.2448+633bb4fb6",
32
32
  "@swc/helpers": "^0.5.0"
33
33
  },
34
34
  "peerDependencies": {
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "a399db1e314243a023f7b5c95e319eba4496604c"
40
+ "gitHead": "633bb4fb6cc205b9911a21fb81a7a70c662ec0ce"
41
41
  }