@ai-matrx/records-ui 0.93.29 → 0.93.30

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog — @ai-matrx/records-ui
2
2
 
3
+ ## 0.93.30
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/records-ui/v0.93.29..npm/records-ui/v0.93.30 -- apps/shared/records-ui`).
7
+ No source changes intended and no consumer action required.
8
+
3
9
  ## 0.93.29
4
10
 
5
11
  Automatic changed-only republish (docs/metadata drift since the last tag — see
package/dist/index.cjs CHANGED
@@ -7687,7 +7687,9 @@ function useChoiceOptions(fields, keys) {
7687
7687
  return index;
7688
7688
  }
7689
7689
  function lookOf(option) {
7690
- return { id: String(option.id), key: (0, import_records12.optionKey)(option), label: (0, import_records12.optionLabel)(option) };
7690
+ const raw = option.data?.["color"];
7691
+ const color = typeof raw === "string" && import_data_table7.STYLE_COLORS.includes(raw) ? raw : void 0;
7692
+ return { id: String(option.id), key: (0, import_records12.optionKey)(option), label: (0, import_records12.optionLabel)(option), ...color ? { color } : {} };
7691
7693
  }
7692
7694
  function paintByOption(style, fields, index, lookup) {
7693
7695
  if (index.size === 0) return { style, documentOf: (doc) => doc, choiceColorFor: lookup };
@@ -7711,10 +7713,13 @@ function paintByOption(style, fields, index, lookup) {
7711
7713
  }
7712
7714
  return out ?? doc;
7713
7715
  },
7716
+ // A CHOICE PAINTS IN ITS OWN COLOUR (DATA-V2-BASICS-2 C1b): an option kept in its own Table
7717
+ // carries the colour its owner gave it; coloured by Status, a "Verified" (green) row was tinted
7718
+ // pink by the hash. The option's colour first, then the column's stored colours, then the hash.
7714
7719
  choiceColorFor: (fieldKey, value) => {
7715
7720
  const option = optionFor(index.get(fieldKey), value);
7716
7721
  if (!option) return lookup(fieldKey, value);
7717
- return lookup(fieldKey, option.label) ?? lookup(fieldKey, option.key);
7722
+ return option.color ?? lookup(fieldKey, option.label) ?? lookup(fieldKey, option.key);
7718
7723
  }
7719
7724
  };
7720
7725
  }