@teselagen/ui 0.8.6-beta.3 → 0.8.6-beta.5

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/index.cjs.js CHANGED
@@ -19798,7 +19798,7 @@ function initializeHasuraWhereAndFilter(additionalFilter, where = {}, currentPar
19798
19798
  if (typeof additionalFilter === "function") {
19799
19799
  const newWhere = additionalFilter(where, currentParams);
19800
19800
  if (newWhere) {
19801
- where = __spreadValues(__spreadValues({}, where), newWhere);
19801
+ Object.assign(where, newWhere);
19802
19802
  }
19803
19803
  } else if (typeof additionalFilter === "object")
19804
19804
  where._and.push(additionalFilter);
@@ -31881,7 +31881,15 @@ function requireColor() {
31881
31881
  __name(requireColor, "requireColor");
31882
31882
  var colorExports = requireColor();
31883
31883
  const Color = /* @__PURE__ */ getDefaultExportFromCjs(colorExports);
31884
- const determineBlackOrWhiteTextColor = /* @__PURE__ */ __name((c2) => Color(c2).isLight() ? "#000000" : "#FFFFFF", "determineBlackOrWhiteTextColor");
31884
+ function determineBlackOrWhiteTextColor(c2) {
31885
+ try {
31886
+ return Color(c2).isLight() ? "#000000" : "#FFFFFF";
31887
+ } catch (e) {
31888
+ console.error("Error in color parsing:", e);
31889
+ return "#000000";
31890
+ }
31891
+ }
31892
+ __name(determineBlackOrWhiteTextColor, "determineBlackOrWhiteTextColor");
31885
31893
  function getTagsAndTagOptions(allTags) {
31886
31894
  return flatMap(allTags, (tag) => {
31887
31895
  if (tag.tagOptions && tag.tagOptions.length) {
@@ -77970,6 +77978,7 @@ exports.createDynamicBarMenu = createDynamicBarMenu;
77970
77978
  exports.createDynamicMenu = createDynamicMenu;
77971
77979
  exports.createMenu = createMenu;
77972
77980
  exports.designIcon = designIcon;
77981
+ exports.determineBlackOrWhiteTextColor = determineBlackOrWhiteTextColor;
77973
77982
  exports.dnaIcon = dnaIcon;
77974
77983
  exports.doesSearchValMatchText = doesSearchValMatchText;
77975
77984
  exports.driveIcon = driveIcon;
package/index.d.ts CHANGED
@@ -33,6 +33,7 @@ export { default as IntentText } from './IntentText';
33
33
  export { default as popoverOverflowModifiers } from './utils/popoverOverflowModifiers';
34
34
  export { default as tgFormValues } from './utils/tgFormValues';
35
35
  export { default as withStore } from './utils/withStore';
36
+ export { default as determineBlackOrWhiteTextColor } from './utils/determineBlackOrWhiteTextColor';
36
37
  export { default as InfoHelper } from './InfoHelper';
37
38
  export { default as showConfirmationDialog } from './showConfirmationDialog';
38
39
  export { default as showAppSpinner } from './showAppSpinner';
package/index.es.js CHANGED
@@ -19780,7 +19780,7 @@ function initializeHasuraWhereAndFilter(additionalFilter, where = {}, currentPar
19780
19780
  if (typeof additionalFilter === "function") {
19781
19781
  const newWhere = additionalFilter(where, currentParams);
19782
19782
  if (newWhere) {
19783
- where = __spreadValues(__spreadValues({}, where), newWhere);
19783
+ Object.assign(where, newWhere);
19784
19784
  }
19785
19785
  } else if (typeof additionalFilter === "object")
19786
19786
  where._and.push(additionalFilter);
@@ -31863,7 +31863,15 @@ function requireColor() {
31863
31863
  __name(requireColor, "requireColor");
31864
31864
  var colorExports = requireColor();
31865
31865
  const Color = /* @__PURE__ */ getDefaultExportFromCjs(colorExports);
31866
- const determineBlackOrWhiteTextColor = /* @__PURE__ */ __name((c2) => Color(c2).isLight() ? "#000000" : "#FFFFFF", "determineBlackOrWhiteTextColor");
31866
+ function determineBlackOrWhiteTextColor(c2) {
31867
+ try {
31868
+ return Color(c2).isLight() ? "#000000" : "#FFFFFF";
31869
+ } catch (e) {
31870
+ console.error("Error in color parsing:", e);
31871
+ return "#000000";
31872
+ }
31873
+ }
31874
+ __name(determineBlackOrWhiteTextColor, "determineBlackOrWhiteTextColor");
31867
31875
  function getTagsAndTagOptions(allTags) {
31868
31876
  return flatMap(allTags, (tag) => {
31869
31877
  if (tag.tagOptions && tag.tagOptions.length) {
@@ -77953,6 +77961,7 @@ export {
77953
77961
  createDynamicMenu,
77954
77962
  createMenu,
77955
77963
  designIcon,
77964
+ determineBlackOrWhiteTextColor,
77956
77965
  dnaIcon,
77957
77966
  doesSearchValMatchText,
77958
77967
  driveIcon,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ui",
3
- "version": "0.8.6-beta.3",
3
+ "version": "0.8.6-beta.5",
4
4
  "main": "./src/index.js",
5
5
  "type": "module",
6
6
  "exports": {
@@ -8,10 +8,7 @@ export function initializeHasuraWhereAndFilter(
8
8
  if (typeof additionalFilter === "function") {
9
9
  const newWhere = additionalFilter(where, currentParams);
10
10
  if (newWhere) {
11
- where = {
12
- ...where,
13
- ...newWhere
14
- };
11
+ Object.assign(where, newWhere);
15
12
  }
16
13
  } else if (typeof additionalFilter === "object")
17
14
  where._and.push(additionalFilter);
package/src/index.js CHANGED
@@ -41,6 +41,7 @@ export { default as popoverOverflowModifiers } from "./utils/popoverOverflowModi
41
41
  export * from "./utils/tgFormValues";
42
42
  export { default as tgFormValues } from "./utils/tgFormValues";
43
43
  export { default as withStore } from "./utils/withStore";
44
+ export { default as determineBlackOrWhiteTextColor } from "./utils/determineBlackOrWhiteTextColor";
44
45
  export {
45
46
  default as withTableParams,
46
47
  useTableParams
@@ -1,4 +1,11 @@
1
1
  /* Copyright (C) 2018 TeselaGen Biotechnology, Inc. */
2
2
  import Color from "color";
3
3
 
4
- export default c => (Color(c).isLight() ? "#000000" : "#FFFFFF");
4
+ export default function determineBlackOrWhiteTextColor(c) {
5
+ try {
6
+ return Color(c).isLight() ? "#000000" : "#FFFFFF";
7
+ } catch (e) {
8
+ console.error("Error in color parsing:", e);
9
+ return "#000000"; // Fallback to black if color parsing fails
10
+ }
11
+ }
@@ -1,2 +1 @@
1
- declare function _default(c: any): "#000000" | "#FFFFFF";
2
- export default _default;
1
+ export default function determineBlackOrWhiteTextColor(c: any): "#000000" | "#FFFFFF";