@vectoriox/iox-ui 5.113.0 → 5.114.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13661,9 +13661,9 @@ function pricesIn(text) {
13661
13661
  const MIN_PHONE_DIGITS = 8;
13662
13662
  /** "2019 – 2024" is two years, not a phone number. */
13663
13663
  const YEAR_RANGE = /^\s*\d{4}\s*[-–]\s*\d{4}\s*$/;
13664
- function ownedKeys(facts) {
13664
+ function ownedKeys(facts, known = []) {
13665
13665
  const keys = new Set();
13666
- for (const value of Object.values(facts)) {
13666
+ for (const value of [...Object.values(facts), ...known]) {
13667
13667
  if (typeof value !== 'string')
13668
13668
  continue;
13669
13669
  for (const shape of FACT_SHAPES)
@@ -13679,7 +13679,7 @@ function ownedKeys(facts) {
13679
13679
  function factIssues(texts, ctx) {
13680
13680
  const issues = [];
13681
13681
  const avoid = [...new Set(ctx.avoidWords.map(w => w.trim()).filter(Boolean))].map(w => ({ word: w, pattern: wordPattern(w) }));
13682
- const owned = ownedKeys(ctx.facts);
13682
+ const owned = ownedKeys(ctx.facts, ctx.known);
13683
13683
  for (const { path, text } of texts) {
13684
13684
  const words = normalise(text);
13685
13685
  for (const a of avoid)