@burdenoff/fe-libs 2026.1029.7 → 2026.1029.9

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 (40) hide show
  1. package/dist/shared/assistant/appControls/grammar.js +21 -21
  2. package/dist/shared/assistant/appControls/registry.js +1 -1
  3. package/dist/shared/assistant/commandCompletions.js +87 -86
  4. package/dist/shared/assistant/i18nManifest.d.ts +27 -0
  5. package/dist/shared/assistant/i18nManifest.js +27 -0
  6. package/dist/shared/assistant/index.d.ts +9 -0
  7. package/dist/shared/assistant/localUiCommands.js +106 -112
  8. package/dist/shared/assistant/localeCommands/languageNames.js +13 -13
  9. package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +11 -0
  10. package/dist/shared/assistant/ui/AIAssistantPanel.js +233 -127
  11. package/dist/shared/assistant/ui/AssistantChatArea.d.ts +13 -1
  12. package/dist/shared/assistant/ui/AssistantChatArea.js +1632 -1605
  13. package/dist/shared/assistant/ui/AssistantConversationList.d.ts +17 -1
  14. package/dist/shared/assistant/ui/AssistantConversationList.js +304 -274
  15. package/dist/shared/assistant/ui/AssistantOverlay.d.ts +11 -0
  16. package/dist/shared/assistant/ui/AssistantOverlay.js +106 -90
  17. package/dist/shared/assistant/ui/closeGuard.d.ts +21 -0
  18. package/dist/shared/assistant/ui/closeGuard.js +8 -0
  19. package/dist/shared/assistant/ui/compact/AssistantCompactHeader.d.ts +38 -0
  20. package/dist/shared/assistant/ui/compact/AssistantCompactHeader.js +89 -0
  21. package/dist/shared/assistant/ui/compact/AssistantConversationMenu.d.ts +29 -0
  22. package/dist/shared/assistant/ui/compact/AssistantConversationMenu.js +87 -0
  23. package/dist/shared/assistant/ui/compact/AssistantDiscardDraftDialog.d.ts +19 -0
  24. package/dist/shared/assistant/ui/compact/AssistantDiscardDraftDialog.js +38 -0
  25. package/dist/shared/assistant/ui/compact/AssistantMenuView.d.ts +42 -0
  26. package/dist/shared/assistant/ui/compact/AssistantMenuView.js +285 -0
  27. package/dist/shared/assistant/ui/compact/AssistantVoiceLanguageSettings.d.ts +24 -0
  28. package/dist/shared/assistant/ui/compact/AssistantVoiceLanguageSettings.js +68 -0
  29. package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.d.ts +21 -0
  30. package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.js +34 -0
  31. package/dist/shared/assistant/ui/compact/compactChrome.d.ts +75 -0
  32. package/dist/shared/assistant/ui/compact/compactChrome.js +39 -0
  33. package/dist/shared/assistant/ui/compact/waitingChange.d.ts +49 -0
  34. package/dist/shared/assistant/ui/compact/waitingChange.js +12 -0
  35. package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +19 -18
  36. package/dist/shared/assistant/ui/composer/AssistantComposer.js +261 -224
  37. package/dist/shared/assistant/useAssistantKeyboardShortcuts.d.ts +16 -2
  38. package/dist/shared/assistant/useAssistantKeyboardShortcuts.js +28 -16
  39. package/dist/shared-assistant.js +51 -42
  40. package/package.json +1 -1
@@ -1,19 +1,20 @@
1
1
  import { hasCommandCompletion as e } from "./commandCompletions.js";
2
2
  import { canonical as t } from "./appControls/text.js";
3
3
  import { uiLanguageWords as n } from "./appControls/languages.js";
4
- import { navTargetPath as r } from "../navigation/navTargetPath.js";
5
- import { appControlPrefixPatterns as i, matchAppControl as a } from "./appControls/grammar.js";
6
- import { effectiveManifest as o, isEnabled as s } from "./localeCommands/gate.js";
7
- import { carriesSymbolOrEmoticon as c } from "./localeCommands/symbols.js";
8
- import { couldBeLocaleCommandPrefix as l, matchLocaleIntents as u, mayBeThereOrPick as d } from "./localeCommands/engine.js";
9
- import { isBackRequest as f, isThereRequest as p, navigationPrefixPatterns as m, parseChoice as h } from "./uiActions/deixis.js";
10
- import { parseRecordRequest as g } from "./uiActions/recordNames.js";
4
+ import { UI_LANGUAGE_CODES as r } from "./appControls/types.js";
5
+ import { navTargetPath as i } from "../navigation/navTargetPath.js";
6
+ import { appControlPrefixPatterns as a, matchAppControl as o } from "./appControls/grammar.js";
7
+ import { effectiveManifest as s, isEnabled as c } from "./localeCommands/gate.js";
8
+ import { carriesSymbolOrEmoticon as l } from "./localeCommands/symbols.js";
9
+ import { couldBeLocaleCommandPrefix as u, matchLocaleIntents as d, mayBeThereOrPick as f } from "./localeCommands/engine.js";
10
+ import { isBackRequest as p, isThereRequest as m, navigationPrefixPatterns as h, parseChoice as g } from "./uiActions/deixis.js";
11
+ import { parseRecordRequest as _ } from "./uiActions/recordNames.js";
11
12
  //#region src/shared/assistant/localUiCommands.ts
12
- var _ = /^(?:(?:hey|hi|so|now|and|then|you know|just|actually|basically)\b ?|(?:please|pls|kindly)\b ?|(?:can|could|would|will) (?:you|u)\b(?: please)? ?|i (?:want|would like|d like)(?: you)?(?: to)?\b ?|let s\b ?)/, v = /^(?:(?:hey|hi|so|ok|okay)\W+)*(?:please\W+)?(?:can|could|would|will) (?:you|u)\b/i, y = (e) => /[?¿؟][^\p{L}\p{N}]*$/u.test(e), b = (e) => y(e) && !v.test(e), x = /\b(?:um+|uh+|erm|er|hmm+)\b/g, S = RegExp(`^(?:${x.source})$`), C = / (?:please|pls|for me|now|thanks|thank you|right now)$/;
13
+ var v = /^(?:(?:hey|hi|so|now|and|then|you know|just|actually|basically)\b ?|(?:please|pls|kindly)\b ?|(?:can|could|would|will) (?:you|u)\b(?: please)? ?|i (?:want|would like|d like)(?: you)?(?: to)?\b ?|let s\b ?)/, y = /^(?:(?:hey|hi|so|ok|okay)\W+)*(?:please\W+)?(?:can|could|would|will) (?:you|u)\b/i, b = (e) => /[?¿؟][^\p{L}\p{N}]*$/u.test(e), x = (e) => b(e) && !y.test(e), S = /\b(?:um+|uh+|erm|er|hmm+)\b/g, ee = RegExp(`^(?:${S.source})$`), C = / (?:please|pls|for me|now|thanks|thank you|right now)$/;
13
14
  function w(e, n = {}) {
14
- let r = t(e).replace(x, " ").replace(/\s+/g, " ").replace(/\b(\w+)(?: \1\b)+/g, "$1").trim();
15
+ let r = t(e).replace(S, " ").replace(/\s+/g, " ").replace(/\b(\w+)(?: \1\b)+/g, "$1").trim();
15
16
  for (;;) {
16
- let e = r.replace(_, "");
17
+ let e = r.replace(v, "");
17
18
  if (n.keepEnding || (e = e.replace(C, "")), e = e.trim(), e === r) return r;
18
19
  r = e;
19
20
  }
@@ -87,8 +88,8 @@ function j(e) {
87
88
  }
88
89
  return null;
89
90
  }
90
- var M = /^(?:delete|remove|erase) (?:this|the|my|the current) conversation$/, N = /^(?:(?:(?:go|navigate|take me|bring me|jump|head|get me|move|switch)(?: back| over)?|back) (?:to|too)|open(?: up)?|(?:pull|bring) up|visit|show me)\s+(.+)$/, P = /^(?:the )?(.+) (?:page|screen)$/, F = /(?:^| )(?:tasks?|issues?|tickets?|orders?|invoices?|alerts?|requests?|jobs?|incidents?|bugs?|cases?|deals?|items?|questions?|sessions?|positions?|pull requests?|prs?|work orders?|approvals?|actions?|applications?)$/, I = /^(?:ai|a i|api|a p i|id|data|source|access|banking|graph|search|telemetry|stack|house|field|fields|space|market|mic)$/, L = / (?:page|screen|section|tab)$/;
91
- function R(e) {
91
+ var M = /^(?:delete|remove|erase) (?:this|the|my|the current) conversation$/, N = /^(?:(?:(?:go|navigate|take me|bring me|jump|head|get me|move|switch)(?: back| over)?|back) (?:to|too)|open(?: up)?|(?:pull|bring) up|visit|show me)\s+(.+)$/, P = /^(?:the )?(.+) (?:page|screen)$/, F = /(?:^| )(?:tasks?|issues?|tickets?|orders?|invoices?|alerts?|requests?|jobs?|incidents?|bugs?|cases?|deals?|items?|questions?|sessions?|positions?|pull requests?|prs?|work orders?|approvals?|actions?|applications?)$/, I = /^(?:ai|a i|api|a p i|id|data|source|access|banking|graph|search|telemetry|stack|house|field|fields|space|market|mic)$/, te = / (?:page|screen|section|tab)$/;
92
+ function L(e) {
92
93
  let n = /* @__PURE__ */ new Map(), r = (e, t) => {
93
94
  if (!e) return;
94
95
  let r = n.get(e) ?? [];
@@ -101,7 +102,7 @@ function R(e) {
101
102
  for (let [e, t] of [...n]) for (let n of t) r(`\u0000${e.replace(/ /g, "")}`, n);
102
103
  return n;
103
104
  }
104
- var z = new Set([
105
+ var R = new Set([
105
106
  "news",
106
107
  "series",
107
108
  "species",
@@ -120,18 +121,18 @@ var z = new Set([
120
121
  "process",
121
122
  "progress"
122
123
  ]);
123
- function B(e) {
124
+ function z(e) {
124
125
  let t = e.split(" "), n = t.pop() ?? "";
125
126
  if (n.length < 3) return [];
126
127
  let r = /* @__PURE__ */ new Set();
127
- return z.has(n) || (/[^aeiou]ies$/.test(n) && n.length > 4 ? r.add(`${n.slice(0, -3)}y`) : /(?:sses|shes|ches|xes|zes)$/.test(n) ? r.add(n.slice(0, -2)) : n.length >= 4 && /s$/.test(n) && !/(?:ss|us|is)$/.test(n) && r.add(n.slice(0, -1))), [...r].map((e) => [...t, e].join(" "));
128
+ return R.has(n) || (/[^aeiou]ies$/.test(n) && n.length > 4 ? r.add(`${n.slice(0, -3)}y`) : /(?:sses|shes|ches|xes|zes)$/.test(n) ? r.add(n.slice(0, -2)) : n.length >= 4 && /s$/.test(n) && !/(?:ss|us|is)$/.test(n) && r.add(n.slice(0, -1))), [...r].map((e) => [...t, e].join(" "));
128
129
  }
129
- function V(e, t, n) {
130
+ function B(e, t, n) {
130
131
  let r = N.exec(e) ?? P.exec(e);
131
132
  if (!r) return null;
132
- let i = r[1] ?? "", a = e.startsWith("show me "), o = /^open /.test(e), s = i.replace(/^(?:the|my|our) /, ""), c = s.replace(L, ""), l = c !== s || P.test(e);
133
+ let i = r[1] ?? "", a = e.startsWith("show me "), o = /^open /.test(e), s = i.replace(/^(?:the|my|our) /, ""), c = s.replace(te, ""), l = c !== s || P.test(e);
133
134
  if (a && !l || o && s === i && !l && (F.test(s) || I.test(s) || /^\w{1,3}$/.test(s))) return null;
134
- let u = R(t), d = (e) => {
135
+ let u = L(t), d = (e) => {
135
136
  let t = u.get(e);
136
137
  if (t) return {
137
138
  key: e,
@@ -143,7 +144,7 @@ function V(e, t, n) {
143
144
  list: r
144
145
  } : void 0;
145
146
  }, f = c === s ? [s] : [s, c], p = f.reduce((e, t) => e ?? d(t), void 0);
146
- if (!p && n && (p = f.flatMap(B).reduce((e, t) => e ?? d(t), void 0)), !p || p.list.length === 0) return null;
147
+ if (!p && n && (p = f.flatMap(z).reduce((e, t) => e ?? d(t), void 0)), !p || p.list.length === 0) return null;
147
148
  let m = p.list;
148
149
  return m.length === 1 ? {
149
150
  kind: "navigate",
@@ -154,64 +155,57 @@ function V(e, t, n) {
154
155
  candidates: m
155
156
  };
156
157
  }
157
- var H = (e) => e === void 0 || /^en(?:[-_]|$)/i.test(e.trim());
158
- function U(e, t, n = {}, r = {}) {
159
- let i = o(n.commandManifest);
160
- return G(e, t, n, r, s(i, "en", "frames")) || q(e, t, n, r, i);
158
+ var V = (e) => e === void 0 || /^en(?:[-_]|$)/i.test(e.trim());
159
+ function H(e, t, n = {}, r = {}) {
160
+ let i = s(n.commandManifest);
161
+ return re(e, t, n, r, c(i, "en", "frames")) || W(e, t, n, r, i);
161
162
  }
162
- function W(r, a, u = {}, d = {}) {
163
- if (!r.trim()) return !0;
164
- if (c(r.normalize("NFKC"))) return !1;
165
- let f = /* @__PURE__ */ new Map(), p = (e) => {
166
- let t = f.get(e);
163
+ function ne(i, o, d = {}, f = {}) {
164
+ if (!i.trim()) return !0;
165
+ if (l(i.normalize("NFKC"))) return !1;
166
+ let p = /* @__PURE__ */ new Map(), m = (e) => {
167
+ let t = p.get(e);
167
168
  if (t !== void 0) return t;
168
- let n = U(e, a, u, d), r = n !== null && n.kind !== "open-record" && (n.kind === "theme" ? d.executors?.theme !== !1 : n.kind === "app-control" ? d.executors?.appControl?.(n.request) !== !1 : n.kind === "conversation-delete" ? d.executors?.conversationDelete !== !1 : d.executors?.navigation !== !1);
169
- return f.set(e, r), r;
169
+ let n = H(e, o, d, f), r = n !== null && n.kind !== "open-record" && (n.kind === "theme" ? f.executors?.theme !== !1 : n.kind === "app-control" ? f.executors?.appControl?.(n.request) !== !1 : n.kind === "conversation-delete" ? f.executors?.conversationDelete !== !1 : f.executors?.navigation !== !1);
170
+ return p.set(e, r), r;
170
171
  };
171
- if (p(r)) return !0;
172
- if (y(r.normalize("NFKC").trim())) return !1;
173
- let h = o(u.commandManifest), g = H(u.locale) || s(h, "en", "frames"), v = [
172
+ if (m(i)) return !0;
173
+ if (b(i.normalize("NFKC").trim())) return !1;
174
+ let g = s(d.commandManifest), _ = V(d.locale) || c(g, "en", "frames"), y = [
174
175
  ...A.map((e) => e.pattern),
175
176
  M,
176
177
  N,
177
178
  P,
178
- ...m(d.backRunnable === !0, g && d.navigation != null, g && d.navigation?.pendingChoice != null),
179
- ...g && d.controls ? i(d.controls) : []
180
- ], b = new Set([...R(a).keys()].map((e) => e.startsWith("\0") ? e.slice(1) : e));
181
- if (H(u.locale)) for (let e of [...b]) for (let t of [
179
+ ...h(f.backRunnable === !0, _ && f.navigation != null, _ && f.navigation?.pendingChoice != null),
180
+ ..._ && f.controls ? a(f.controls) : []
181
+ ], x = new Set([...L(o).keys()].map((e) => e.startsWith("\0") ? e.slice(1) : e));
182
+ if (V(d.locale)) for (let e of [...x]) for (let t of [
182
183
  e + "s",
183
184
  e + "es",
184
185
  e.replace(/y$/, "ies")
185
- ]) B(t).includes(e) && b.add(t);
186
- for (let e of [...b]) for (let t of [
186
+ ]) new Set(z(t)).has(e) && x.add(t);
187
+ for (let e of [...x]) for (let t of [
187
188
  "",
188
189
  "the ",
189
190
  "my ",
190
191
  "our "
191
192
  ]) {
192
- b.add(t + e);
193
+ x.add(t + e);
193
194
  for (let n of [
194
195
  "page",
195
196
  "screen",
196
197
  "section",
197
198
  "tab"
198
- ]) b.add(`${t}${e} ${n}`);
199
+ ]) x.add(`${t}${e} ${n}`);
199
200
  }
200
- let x = d.controls, T = x?.page;
201
+ let S = f.controls, T = S?.page;
201
202
  for (let e of [
202
- ...(x?.sidebarEntries ?? []).map((e) => e.label),
203
+ ...(S?.sidebarEntries ?? []).map((e) => e.label),
203
204
  ...(T?.tabs ?? []).map((e) => e.label),
204
205
  ...(T?.openers ?? []).map((e) => e.label),
205
206
  ...(T?.sorts ?? []).map((e) => e.label),
206
207
  ...(T?.filters ?? []).flatMap((e) => [e.label, ...e.options.map((e) => e.label)]),
207
- ...[
208
- "en",
209
- "hi",
210
- "ta",
211
- "es",
212
- "ar",
213
- "zh"
214
- ].flatMap((e) => n(e).flatMap((e) => [
208
+ ...r.flatMap((e) => n(e).flatMap((e) => [
215
209
  e,
216
210
  `${e} language`,
217
211
  `the ${e}`,
@@ -219,54 +213,54 @@ function W(r, a, u = {}, d = {}) {
219
213
  `a ${e}`,
220
214
  `a ${e} language`
221
215
  ]))
222
- ]) b.add(t(e));
223
- let E = [...b].sort((e, t) => e.length - t.length), D = (t) => v.some((n) => e(n, t, {
216
+ ]) x.add(t(e));
217
+ let E = [...x].sort((e, t) => e.length - t.length), D = (t) => y.some((n) => e(n, t, {
224
218
  maxLength: 80,
225
219
  names: E
226
- }, p)), O = w(r);
220
+ }, m)), O = w(i);
227
221
  if (D(O)) return !0;
228
222
  let k = O.split(" "), j = k.pop();
229
- if (j && (k.at(-1)?.startsWith(j) || e(S, j, { maxLength: 80 }, () => !0)) && D(k.join(" ")) || e(_, O, { maxLength: 80 }, () => D(""))) return !0;
223
+ if (j && (k.at(-1)?.startsWith(j) || e(ee, j, { maxLength: 80 }, () => !0)) && D(k.join(" ")) || e(v, O, { maxLength: 80 }, () => D(""))) return !0;
230
224
  for (let t = O.lastIndexOf(" "); t >= 0; t = O.lastIndexOf(" ", t - 1)) {
231
- if (e(C, O.slice(t), { maxLength: 80 }, () => p(O.slice(0, t)))) return !0;
225
+ if (e(C, O.slice(t), { maxLength: 80 }, () => m(O.slice(0, t)))) return !0;
232
226
  if (t === 0) break;
233
227
  }
234
- return l({
235
- said: r.normalize("NFKC").trim(),
236
- destinations: a,
237
- uiLocale: u.uiLocale ?? u.locale,
238
- inputLocale: u.inputLocale ?? u.locale,
239
- commandLocales: u.commandLocales,
240
- manifest: h,
241
- themeWords: u.themeWords,
242
- navigation: d.navigation != null,
243
- backRunnable: d.backRunnable === !0,
244
- controls: d.controls
245
- }, p);
228
+ return u({
229
+ said: i.normalize("NFKC").trim(),
230
+ destinations: o,
231
+ uiLocale: d.uiLocale ?? d.locale,
232
+ inputLocale: d.inputLocale ?? d.locale,
233
+ commandLocales: d.commandLocales,
234
+ manifest: g,
235
+ themeWords: d.themeWords,
236
+ navigation: f.navigation != null,
237
+ backRunnable: f.backRunnable === !0,
238
+ controls: f.controls
239
+ }, m);
246
240
  }
247
- function G(e, t, n, r, i) {
248
- let o = e.normalize("NFKC").trim();
249
- if (c(o) || b(o)) return null;
241
+ function re(e, t, n, r, i) {
242
+ let a = e.normalize("NFKC").trim();
243
+ if (l(a) || x(a)) return null;
250
244
  let s = w(e);
251
245
  if (!s || s.length > 80) return null;
252
246
  if (M.test(s)) return { kind: "conversation-delete" };
253
- let l = j(s);
254
- if (l) return n.themeWords === "mode-only" && /\b(?:theme|appearance|colou?r scheme)\b/.test(s) && !/\b(?:app|ui|interface)\b/.test(s) ? null : {
247
+ let c = j(s);
248
+ if (c) return n.themeWords === "mode-only" && /\b(?:theme|appearance|colou?r scheme)\b/.test(s) && !/\b(?:app|ui|interface)\b/.test(s) ? null : {
255
249
  kind: "theme",
256
- request: l
250
+ request: c
257
251
  };
258
- if (r.backRunnable && f(s)) return { kind: "back" };
259
- let u = H(n.locale), d = u || i, p = d ? r.navigation ?? null : null, m = p ? ne(s, p) : null;
252
+ if (r.backRunnable && p(s)) return { kind: "back" };
253
+ let u = V(n.locale), d = u || i, f = d ? r.navigation ?? null : null, m = f ? J(s, f) : null;
260
254
  if (m) return m;
261
- let h = d && r.controls ? a(s, o, r.controls) : null;
255
+ let h = d && r.controls ? o(s, a, r.controls) : null;
262
256
  if (h && !h.weak) return {
263
257
  kind: "app-control",
264
258
  request: h.request
265
259
  };
266
- let _ = V(w(e, { keepEnding: !0 }), t, u) ?? V(s, t, u), v = p ? re(s, p) : null;
267
- if (v && _) return Z(v, _);
260
+ let g = B(w(e, { keepEnding: !0 }), t, u) ?? B(s, t, u), v = f ? ie(s, f) : null;
261
+ if (v && g) return Z(v, g);
268
262
  if (v) return v;
269
- if (_) return _;
263
+ if (g) return g;
270
264
  if (h) return {
271
265
  kind: "app-control",
272
266
  request: h.request
@@ -274,7 +268,7 @@ function G(e, t, n, r, i) {
274
268
  if (!r.skipRecords && d && n.records?.length) {
275
269
  let e;
276
270
  try {
277
- e = g(s, n.records);
271
+ e = _(s, n.records);
278
272
  } catch {
279
273
  e = null;
280
274
  }
@@ -285,7 +279,7 @@ function G(e, t, n, r, i) {
285
279
  }
286
280
  return null;
287
281
  }
288
- function K(e, t, n) {
282
+ function U(e, t, n) {
289
283
  if (e.theme) return {
290
284
  kind: "theme",
291
285
  request: e.theme
@@ -311,10 +305,10 @@ function K(e, t, n) {
311
305
  request: i.request
312
306
  } : null);
313
307
  }
314
- function q(e, t, n, r, i) {
308
+ function W(e, t, n, r, i) {
315
309
  let a = e.normalize("NFKC").trim();
316
- if (!a || c(a)) return null;
317
- let o = u({
310
+ if (!a || l(a)) return null;
311
+ let o = d({
318
312
  said: a,
319
313
  destinations: t,
320
314
  uiLocale: n.uiLocale ?? n.locale,
@@ -325,16 +319,16 @@ function q(e, t, n, r, i) {
325
319
  navigation: r.navigation != null,
326
320
  backRunnable: r.backRunnable === !0,
327
321
  controls: r.controls
328
- }).map((e) => K(e.intents, r.navigation ?? null, r.backRunnable === !0)).filter((e) => e !== null), [s] = o;
322
+ }).map((e) => U(e.intents, r.navigation ?? null, r.backRunnable === !0)).filter((e) => e !== null), [s] = o;
329
323
  if (!s) return null;
330
- let l = JSON.stringify(s);
331
- return o.every((e) => JSON.stringify(e) === l) ? s : null;
324
+ let c = JSON.stringify(s);
325
+ return o.every((e) => JSON.stringify(e) === c) ? s : null;
332
326
  }
333
- function ee(e, t = {}) {
327
+ function G(e, t = {}) {
334
328
  let n = w(e);
335
- if (p(n) || h(n) !== null) return !0;
336
- let r = o(t.commandManifest), i = e.normalize("NFKC").trim();
337
- return !i || c(i) ? !1 : d({
329
+ if (m(n) || g(n) !== null) return !0;
330
+ let r = s(t.commandManifest), i = e.normalize("NFKC").trim();
331
+ return !i || l(i) ? !1 : f({
338
332
  said: i,
339
333
  uiLocale: t.uiLocale ?? t.locale,
340
334
  inputLocale: t.inputLocale ?? t.locale,
@@ -345,9 +339,9 @@ function ee(e, t = {}) {
345
339
  backRunnable: !1
346
340
  });
347
341
  }
348
- var te = 4, J = (e) => ` ${t(e)} `;
349
- function ne(e, t) {
350
- let n = h(e);
342
+ var K = 4, q = (e) => ` ${t(e)} `;
343
+ function J(e, t) {
344
+ let n = g(e);
351
345
  return n ? Y(n, t) : null;
352
346
  }
353
347
  function Y(e, t) {
@@ -363,7 +357,7 @@ function Y(e, t) {
363
357
  if (e.kind === "ordinal") i = r[e.position - 1];
364
358
  else if (e.kind === "last") i = r[r.length - 1];
365
359
  else {
366
- let t = J(e.context), n = r.filter((e) => e !== null && [e.context, e.group].some((e) => e !== void 0 && J(e).includes(t)));
360
+ let t = q(e.context), n = r.filter((e) => e !== null && [e.context, e.group].some((e) => e !== void 0 && q(e).includes(t)));
367
361
  i = n.length === 1 ? n[0] : void 0;
368
362
  }
369
363
  return i === void 0 ? {
@@ -376,8 +370,8 @@ function Y(e, t) {
376
370
  via: "choice"
377
371
  };
378
372
  }
379
- function re(e, t) {
380
- return p(e) ? X(t) : null;
373
+ function ie(e, t) {
374
+ return m(e) ? X(t) : null;
381
375
  }
382
376
  function X(e) {
383
377
  if (e.pendingChoice) return {
@@ -421,23 +415,23 @@ function Z(e, t) {
421
415
  candidates: a.slice(0, 4)
422
416
  };
423
417
  }
424
- var ie = /^__nav_more__:/;
418
+ var ae = /^__nav_more__:/;
425
419
  function Q(e, t) {
426
420
  let n = [];
427
- for (let i of e) {
428
- let e = ie.test(i.id), a = r(i);
429
- !e && i.path.startsWith("/") && !i.path.startsWith("//") && a.startsWith("/") && !a.startsWith("//") && i.label.trim() && n.push({
430
- id: i.id,
431
- label: i.label,
421
+ for (let r of e) {
422
+ let e = ae.test(r.id), a = i(r);
423
+ !e && r.path.startsWith("/") && !r.path.startsWith("//") && a.startsWith("/") && !a.startsWith("//") && r.label.trim() && n.push({
424
+ id: r.id,
425
+ label: r.label,
432
426
  path: a,
433
- ...a === i.path ? {} : { aliases: [i.path] },
427
+ ...a === r.path ? {} : { aliases: [r.path] },
434
428
  ...t ? { context: t } : {},
435
- ...i.group ? { group: i.group } : {}
436
- }), i.children?.length && n.push(...Q(i.children, e ? t : i.label));
429
+ ...r.group ? { group: r.group } : {}
430
+ }), r.children?.length && n.push(...Q(r.children, e ? t : r.label));
437
431
  }
438
432
  return n;
439
433
  }
440
- function ae(e, t) {
434
+ function oe(e, t) {
441
435
  return e.kind === "family" ? {
442
436
  alreadyApplied: t.resolvedTheme === e.family,
443
437
  mode: e.family
@@ -456,11 +450,11 @@ function $(e, t) {
456
450
  }, r = n(e), i = n(t);
457
451
  return r.pathname === i.pathname ? r.query === "" || r.query === i.query : !1;
458
452
  }
459
- function oe(e, t, n) {
453
+ function se(e, t, n) {
460
454
  let r = [e.path, ...e.aliases ?? []].find((e) => $(e, t));
461
- return r === void 0 ? !1 : r.includes("?") ? !0 : !n.some((e) => e.path !== r && e.path.includes("?") && se(e.path, t));
455
+ return r === void 0 ? !1 : r.includes("?") ? !0 : !n.some((e) => e.path !== r && e.path.includes("?") && ce(e.path, t));
462
456
  }
463
- function se(e, t) {
457
+ function ce(e, t) {
464
458
  let n = (e) => {
465
459
  let [t = ""] = e.split("#"), [n = "", r = ""] = t.split("?");
466
460
  return {
@@ -473,4 +467,4 @@ function se(e, t) {
473
467
  return !0;
474
468
  }
475
469
  //#endregion
476
- export { te as LINKED_CHOICE_MAX, W as couldBeLocalUiCommand, oe as isAlreadyThere, $ as isCurrentPath, U as matchLocalUiCommand, ee as mayBeNavigationFollowUp, Q as navDestinations, w as normaliseUtterance, ae as planThemeChange, B as singularVariants };
470
+ export { K as LINKED_CHOICE_MAX, ne as couldBeLocalUiCommand, se as isAlreadyThere, $ as isCurrentPath, H as matchLocalUiCommand, G as mayBeNavigationFollowUp, Q as navDestinations, w as normaliseUtterance, oe as planThemeChange, z as singularVariants };
@@ -1,6 +1,6 @@
1
1
  import { uiLanguageWords as e } from "../appControls/languages.js";
2
- import { foldText as t } from "./fold.js";
3
- import { UI_LANGUAGE_CODES as n } from "../appControls/types.js";
2
+ import { UI_LANGUAGE_CODES as t } from "../appControls/types.js";
3
+ import { foldText as n } from "./fold.js";
4
4
  //#region src/shared/assistant/localeCommands/languageNames.ts
5
5
  var r = {
6
6
  en: "en",
@@ -11,27 +11,27 @@ var r = {
11
11
  zh: "zh"
12
12
  }, i = /* @__PURE__ */ new Map();
13
13
  function a(e) {
14
- let t = i.get(e);
15
- if (t) return t;
14
+ let n = i.get(e);
15
+ if (n) return n;
16
16
  let a = [];
17
17
  try {
18
- let t = new Intl.DisplayNames([e], { type: "language" });
19
- for (let e of n) {
20
- let n = t.of(r[e]);
21
- n && a.push(`${e}\u0000${n}`);
18
+ let n = new Intl.DisplayNames([e], { type: "language" });
19
+ for (let e of t) {
20
+ let t = n.of(r[e]);
21
+ t && a.push(`${e}\u0000${t}`);
22
22
  }
23
23
  } catch {}
24
24
  return i.set(e, a), a;
25
25
  }
26
- var o = (e) => n.includes(e);
26
+ var o = (e) => t.includes(e);
27
27
  function s(r) {
28
- let i = /* @__PURE__ */ new Map(), s = (e, n) => {
29
- let a = t(e, r.fold);
28
+ let i = /* @__PURE__ */ new Map(), s = (e, t) => {
29
+ let a = n(e, r.fold);
30
30
  if (!a) return;
31
31
  let o = i.get(a) ?? /* @__PURE__ */ new Set();
32
- o.add(n), i.set(a, o);
32
+ o.add(t), i.set(a, o);
33
33
  };
34
- for (let t of n) for (let n of e(t)) s(n, t);
34
+ for (let n of t) for (let t of e(n)) s(t, n);
35
35
  for (let e of r.appLanguages) {
36
36
  let t = e.code.toLowerCase().split(/[-_]/)[0] ?? "";
37
37
  o(t) && s(e.label, t);
@@ -113,6 +113,17 @@ export type AIAssistantPanelProps = PanelProps & {
113
113
  * `panelProps`, behind its own flag.
114
114
  */
115
115
  presentation?: AssistantPresentation;
116
+ /**
117
+ * BOFF-10177 (compact only): told when the person presses Expand or Restore,
118
+ * and when the expansion ends under them (the viewport fell under the width
119
+ * that offers it, or the panel unmounted). The panel itself changes no width:
120
+ * that is the host's geometry (N2: a fixed 760 px), which reads this and the
121
+ * root's `data-assistant-expanded`.
122
+ *
123
+ * ★ Expand/Restore is OFFERED only while this is given, and only from 1536 px:
124
+ * without a host that honours it the control would do nothing.
125
+ */
126
+ onExpandedChange?: (expanded: boolean) => void;
116
127
  };
117
128
  /**
118
129
  * The panel.