@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.
- package/assist-core/index.d.ts +234 -7
- package/fesm2022/vectoriox-iox-ui-assist-core.mjs +480 -75
- package/fesm2022/vectoriox-iox-ui-assist-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +3 -3
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/generation-core/index.d.ts +5 -0
- package/package.json +1 -1
- package/src/assist-core/assist-facts.ts +36 -0
- package/src/assist-core/assist-turn.ts +28 -6
- package/src/assist-core/brief.ts +4 -0
- package/src/assist-core/field-edits.ts +14 -0
- package/src/assist-core/page-words.ts +503 -0
- package/src/assist-core/public-api.ts +5 -3
- package/src/assist-core/rich-text.ts +3 -0
- package/src/assist-core/surfaces.ts +4 -2
- package/src/generation-core/plan-words.ts +8 -3
|
@@ -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)
|