@burdenoff/fe-libs 2026.1028.4 → 2026.1028.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.
Files changed (25) hide show
  1. package/dist/shared/assistant/appControls/grammar.d.ts +2 -0
  2. package/dist/shared/assistant/appControls/grammar.js +101 -93
  3. package/dist/shared/assistant/appControls/registry.d.ts +2 -0
  4. package/dist/shared/assistant/appControls/registry.js +20 -12
  5. package/dist/shared/assistant/commandCompletions.d.ts +9 -0
  6. package/dist/shared/assistant/commandCompletions.js +161 -0
  7. package/dist/shared/assistant/index.d.ts +3 -0
  8. package/dist/shared/assistant/localUiCommands.d.ts +16 -0
  9. package/dist/shared/assistant/localUiCommands.js +192 -105
  10. package/dist/shared/assistant/localeCommands/engine.d.ts +6 -0
  11. package/dist/shared/assistant/localeCommands/engine.js +212 -116
  12. package/dist/shared/assistant/ui/AssistantChatArea.js +1491 -1406
  13. package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +8 -0
  14. package/dist/shared/assistant/ui/composer/AssistantComposer.js +142 -131
  15. package/dist/shared/assistant/ui/draftCommandCheck.d.ts +7 -0
  16. package/dist/shared/assistant/ui/draftCommandCheck.js +17 -0
  17. package/dist/shared/assistant/uiActions/backStack.d.ts +1 -0
  18. package/dist/shared/assistant/uiActions/backStack.js +13 -5
  19. package/dist/shared/assistant/uiActions/deixis.d.ts +2 -0
  20. package/dist/shared/assistant/uiActions/deixis.js +12 -1
  21. package/dist/shared/assistant/uiActions/draftPathname.d.ts +13 -0
  22. package/dist/shared/assistant/uiActions/draftPathname.js +31 -0
  23. package/dist/shared/assistant/uiActions/recordNames.js +33 -30
  24. package/dist/shared-assistant.js +329 -326
  25. package/package.json +1 -1
@@ -2,55 +2,58 @@ import { canonical as e } from "../appControls/text.js";
2
2
  import { fillEntityRoute as t } from "./entityRoutes.js";
3
3
  import { ENTITY_TARGET_PREFIX as n } from "./resolveTarget.js";
4
4
  //#region src/shared/assistant/uiActions/recordNames.ts
5
- var r = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), i = new Set(/* @__PURE__ */ "it.that.this.there.here.back.them.those.one.link.page.screen.list.tab.section.view.all.my.the.new.first.second.third.fourth.last.next.previous.settings".split(".")), a = /(?:^| )(?:page|screen|list|tab|section|view|settings|menu)$/, o = 60, s = "(?:open|go to|take me to|pull up|bring up|navigate to|switch to|show me)", c = "(?:open|go to|take me to|pull up|bring up|navigate to)";
6
- function l(e, t) {
5
+ var r = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), i = new Set(/* @__PURE__ */ "it.that.this.there.here.back.them.those.one.link.page.screen.list.tab.section.view.all.my.the.new.first.second.third.fourth.last.next.previous.settings".split(".")), a = /(?:^| )(?:page|screen|list|tab|section|view|settings|menu)$/, o = 60, s = "(?:open|go to|take me to|pull up|bring up|navigate to|switch to|show me)", c = /* @__PURE__ */ RegExp("^(?:open|go to|take me to|pull up|bring up|navigate to) (?:the |my )?(.+)$");
6
+ function l(e) {
7
+ return [RegExp(`^${s} (?:the |my )?(${e}) (?:(?:called|named) )?(.+)$`), RegExp(`^${s} (?:the |my )?(.+?) (${e})$`)];
8
+ }
9
+ function u(e, t) {
7
10
  if (t.length === 0) return null;
8
- let n = (e) => t.filter((t) => t.nouns.includes(e)).map((e) => e.id), l = [...new Set(t.flatMap((e) => e.nouns))].sort((e, t) => t.length - e.length), u = (e) => {
11
+ let n = (e) => t.filter((t) => t.nouns.includes(e)).map((e) => e.id), s = [...new Set(t.flatMap((e) => e.nouns))].sort((e, t) => t.length - e.length), u = (e) => {
9
12
  let t = e.trim();
10
13
  return t.length >= 2 && t.length <= o && !i.has(t) && !a.test(t);
11
14
  };
12
- if (l.length > 0) {
13
- let t = l.map((e) => r(e)).join("|"), i = RegExp(`^${s} (?:the |my )?(${t}) (?:(?:called|named) )?(.+)$`).exec(e);
14
- if (i && u(i[2] ?? "")) {
15
- let e = n(i[1] ?? "");
15
+ if (s.length > 0) {
16
+ let [t, i] = l(s.map((e) => r(e)).join("|")), a = t.exec(e);
17
+ if (a && u(a[2] ?? "")) {
18
+ let e = n(a[1] ?? "");
16
19
  if (e.length > 0) return {
17
- name: (i[2] ?? "").trim(),
20
+ name: (a[2] ?? "").trim(),
18
21
  adapterIds: e
19
22
  };
20
23
  }
21
- let a = RegExp(`^${s} (?:the |my )?(.+?) (${t})$`).exec(e);
22
- if (a && u(a[1] ?? "")) {
23
- let e = n(a[2] ?? "");
24
+ let o = i.exec(e);
25
+ if (o && u(o[1] ?? "")) {
26
+ let e = n(o[2] ?? "");
24
27
  if (e.length > 0) return {
25
- name: (a[1] ?? "").trim(),
28
+ name: (o[1] ?? "").trim(),
26
29
  adapterIds: e
27
30
  };
28
31
  }
29
32
  }
30
- let d = RegExp(`^${c} (?:the |my )?(.+)$`).exec(e);
33
+ let d = c.exec(e);
31
34
  return d && u(d[1] ?? "") && (d[1] ?? "").length >= 3 ? {
32
35
  name: (d[1] ?? "").trim(),
33
36
  adapterIds: []
34
37
  } : null;
35
38
  }
36
- var u = 4;
37
- function d(t) {
39
+ var d = 4;
40
+ function f(t) {
38
41
  return e(t);
39
42
  }
40
- var f = d;
41
- function p(e, t) {
43
+ var p = f;
44
+ function m(e, t) {
42
45
  let n = t.split(" ");
43
46
  return e.split(" ").every((e) => n.some((t) => t.startsWith(e)));
44
47
  }
45
- function m(e, r) {
46
- let i = f(e);
48
+ function h(e, r) {
49
+ let i = p(e);
47
50
  if (!i) return { kind: "none" };
48
51
  let a = [];
49
52
  for (let e of r) for (let r of e.matches) {
50
53
  let o = t(e.route, r.params);
51
54
  if (o === null) continue;
52
- let s = f(r.name), c = s === i;
53
- !c && !p(i, s) || a.some((e) => e.destination.path === o) || a.push({
55
+ let s = p(r.name), c = s === i;
56
+ !c && !m(i, s) || a.some((e) => e.destination.path === o) || a.push({
54
57
  adapterId: e.adapter.id,
55
58
  noun: e.noun,
56
59
  exact: c,
@@ -76,23 +79,23 @@ function m(e, r) {
76
79
  nouns: [...new Set(l.map((e) => e.noun))]
77
80
  };
78
81
  }
79
- var h = 2500, g = 50, _ = 200;
80
- function v(e) {
82
+ var g = 2500, _ = 50, v = 200;
83
+ function y(e) {
81
84
  if (typeof e != "object" || !e) return !1;
82
85
  let { name: t, params: n } = e;
83
86
  if (typeof t != "string") return !1;
84
87
  let r = t.trim();
85
- if (r.length === 0 || r.length > _ || typeof n != "object" || !n || Array.isArray(n)) return !1;
88
+ if (r.length === 0 || r.length > v || typeof n != "object" || !n || Array.isArray(n)) return !1;
86
89
  let i = Object.values(n);
87
90
  return i.length > 0 && i.every((e) => typeof e == "string");
88
91
  }
89
- function y(e) {
92
+ function b(e) {
90
93
  if (!Array.isArray(e)) return [];
91
94
  let t = [];
92
- for (let n of e) if (v(n) && t.push(n), t.length >= 50) break;
95
+ for (let n of e) if (y(n) && t.push(n), t.length >= 50) break;
93
96
  return t;
94
97
  }
95
- async function b(e) {
98
+ async function x(e) {
96
99
  let t = new AbortController(), n, r = new Promise((r) => {
97
100
  n = setTimeout(() => {
98
101
  t.abort(), r(null);
@@ -116,10 +119,10 @@ async function b(e) {
116
119
  adapter: n,
117
120
  route: i,
118
121
  noun: s,
119
- matches: y(o)
122
+ matches: b(o)
120
123
  };
121
124
  }));
122
- return m(e.name, n);
125
+ return h(e.name, n);
123
126
  } catch {
124
127
  return { kind: "none" };
125
128
  } finally {
@@ -127,4 +130,4 @@ async function b(e) {
127
130
  }
128
131
  }
129
132
  //#endregion
130
- export { u as RECORD_CHOICE_MAX, h as RECORD_LOOKUP_TIMEOUT_MS, g as RECORD_MATCHES_MAX, v as isRecordMatch, b as lookupNamedRecords, d as normaliseRecordName, l as parseRecordRequest, m as planRecordResolution, y as sanitizeRecordMatches };
133
+ export { d as RECORD_CHOICE_MAX, g as RECORD_LOOKUP_TIMEOUT_MS, _ as RECORD_MATCHES_MAX, y as isRecordMatch, x as lookupNamedRecords, f as normaliseRecordName, u as parseRecordRequest, h as planRecordResolution, b as sanitizeRecordMatches };