@burdenoff/fe-libs 2026.930.1 → 2026.930.3
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/dist/shared/assistant/i18nManifest.d.ts +1 -1
- package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
- package/dist/shared/assistant/i18nManifest.js +1 -1
- package/dist/shared/assistant/preview/AssistantPreviewOverlay.d.ts.map +1 -1
- package/dist/shared/assistant/preview/AssistantPreviewOverlay.js +26 -25
- package/dist/shared/assistant/preview/types.d.ts +34 -4
- package/dist/shared/assistant/preview/types.d.ts.map +1 -1
- package/dist/shared/assistant/preview/types.js +6 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +5 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AIAssistantPanel.js +67 -66
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +1 -0
- package/dist/shared/assistant/ui/AssistantEmptyState.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantEmptyState.js +24 -18
- package/dist/shared/assistant/ui/AssistantHeader.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantHeader.js +45 -44
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts +14 -1
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantOverlay.js +105 -90
- package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.d.ts +2 -0
- package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.js +104 -104
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.d.ts +7 -0
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.js +91 -87
- package/dist/shared/assistant/ui/AssistantWriteProposalSlot.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantWriteProposalSlot.js +3 -2
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts +38 -0
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts.map +1 -1
- package/dist/shared/assistant/ui/assistantOverlayState.js +14 -10
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.d.ts +9 -0
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.js +37 -33
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +2 -1
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts +16 -0
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.js +27 -24
- package/dist/shared/assistant/ui/useWriteProposalConfirm.d.ts +2 -2
- package/dist/shared/assistant/ui/useWriteProposals.d.ts +6 -0
- package/dist/shared/assistant/ui/useWriteProposals.d.ts.map +1 -1
- package/dist/shared/assistant/ui/useWriteProposals.js +11 -3
- package/dist/shared/assistant/ui/writeProposalPresentation.d.ts +26 -6
- package/dist/shared/assistant/ui/writeProposalPresentation.d.ts.map +1 -1
- package/dist/shared/assistant/ui/writeProposalPresentation.js +23 -16
- package/dist/shared-assistant.js +93 -92
- package/package.json +1 -1
|
@@ -8,81 +8,85 @@ import { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState a
|
|
|
8
8
|
import { Camera as f, FileText as p, FolderOpen as m, ImageIcon as h, Plus as g } from "lucide-react";
|
|
9
9
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
10
10
|
//#region src/shared/assistant/ui/composer/AssistantAttachmentButton.tsx
|
|
11
|
-
var y = {
|
|
11
|
+
var y = "flex size-9 items-center justify-center rounded-full border border-border-subtle bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:cursor-not-allowed disabled:text-text-muted disabled:hover:bg-bg-elevated", b = `${y} sm:w-auto sm:gap-1.5 sm:px-3`, x = {
|
|
12
12
|
camera: f,
|
|
13
13
|
gallery: h,
|
|
14
14
|
documents: p,
|
|
15
15
|
files: m
|
|
16
|
-
},
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
let
|
|
20
|
-
o(
|
|
21
|
-
if (!
|
|
16
|
+
}, S = ({ onFiles: f, onPickerOpen: p, direction: m = "up", canAddMore: h, disabled: S = !1, showLabel: C = !1 }) => {
|
|
17
|
+
let w = e(), T = u(null), E = u(null), D = u(null), [O, k] = d(!1), A = u(p);
|
|
18
|
+
A.current = p;
|
|
19
|
+
let j = l(() => t(n()), []), M = r(i()), N = h || M, P = h ? M ? `${w("composer.attach", "Attach files or photos")} · ${w("composer.connectSource", "Connect a source")}` : w("composer.attach", "Attach files or photos") : w("composer.attachFull", "Attachment limit reached ({{max}})", { max: 5 }), F = C && h && M ? w("composer.connectSource", "Connect a source") : null;
|
|
20
|
+
o(O, E, D, () => k(!1)), c(() => {
|
|
21
|
+
if (!O) return;
|
|
22
22
|
let e = (e) => {
|
|
23
23
|
let t = e.target;
|
|
24
|
-
|
|
24
|
+
E.current?.contains(t) || D.current?.contains(t) || k(!1);
|
|
25
25
|
};
|
|
26
26
|
return window.addEventListener("mousedown", e), () => {
|
|
27
27
|
window.removeEventListener("mousedown", e);
|
|
28
28
|
};
|
|
29
|
-
}, [
|
|
30
|
-
let
|
|
29
|
+
}, [O]);
|
|
30
|
+
let I = s((e) => {
|
|
31
31
|
f(e.target.files), e.target.value = "";
|
|
32
|
-
}, [f]),
|
|
33
|
-
let t =
|
|
34
|
-
t && (t.accept = e.accept, t.multiple = e.multiple, e.capture ? t.setAttribute("capture", e.capture) : t.removeAttribute("capture"),
|
|
32
|
+
}, [f]), L = s((e) => {
|
|
33
|
+
let t = T.current;
|
|
34
|
+
t && (t.accept = e.accept, t.multiple = e.multiple, e.capture ? t.setAttribute("capture", e.capture) : t.removeAttribute("capture"), k(!1), A.current?.(), t.click());
|
|
35
35
|
}, []);
|
|
36
36
|
return /* @__PURE__ */ v("div", {
|
|
37
37
|
className: "relative flex-shrink-0",
|
|
38
38
|
children: [
|
|
39
39
|
/* @__PURE__ */ _("input", {
|
|
40
|
-
ref:
|
|
40
|
+
ref: T,
|
|
41
41
|
type: "file",
|
|
42
42
|
multiple: !0,
|
|
43
43
|
className: "hidden",
|
|
44
|
-
onChange:
|
|
44
|
+
onChange: I,
|
|
45
45
|
tabIndex: -1,
|
|
46
46
|
"aria-hidden": "true",
|
|
47
47
|
"data-testid": "assistant-attach-input"
|
|
48
48
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
ref:
|
|
49
|
+
/* @__PURE__ */ v("button", {
|
|
50
|
+
ref: D,
|
|
51
51
|
type: "button",
|
|
52
|
-
onClick: () =>
|
|
53
|
-
disabled:
|
|
54
|
-
title:
|
|
55
|
-
"aria-label":
|
|
52
|
+
onClick: () => k((e) => !e),
|
|
53
|
+
disabled: S || !N,
|
|
54
|
+
title: P,
|
|
55
|
+
"aria-label": P,
|
|
56
56
|
"aria-haspopup": "menu",
|
|
57
|
-
"aria-expanded":
|
|
58
|
-
className:
|
|
57
|
+
"aria-expanded": O,
|
|
58
|
+
className: F ? b : y,
|
|
59
59
|
"data-testid": "assistant-attach",
|
|
60
|
-
children: /* @__PURE__ */ _(g, { className: "size-4" })
|
|
60
|
+
children: [/* @__PURE__ */ _(g, { className: "size-4" }), F ? /* @__PURE__ */ _("span", {
|
|
61
|
+
className: "hidden max-w-[10rem] truncate text-[13px] font-medium leading-tight sm:block",
|
|
62
|
+
"data-testid": "assistant-attach-label",
|
|
63
|
+
children: F
|
|
64
|
+
}) : null]
|
|
61
65
|
}),
|
|
62
|
-
|
|
63
|
-
ref:
|
|
66
|
+
O ? /* @__PURE__ */ v("div", {
|
|
67
|
+
ref: E,
|
|
64
68
|
role: "menu",
|
|
65
|
-
"aria-label":
|
|
69
|
+
"aria-label": w("composer.attachSource", "Attach from"),
|
|
66
70
|
className: `absolute ${m === "up" ? "bottom-full mb-2" : "top-full mt-2"} left-0 z-30 min-w-44 overflow-hidden rounded-xl border border-border-default bg-bg-elevated py-1 shadow-lg`,
|
|
67
71
|
"data-testid": "assistant-attach-menu",
|
|
68
|
-
children: [
|
|
69
|
-
let t =
|
|
72
|
+
children: [j.map((e) => {
|
|
73
|
+
let t = x[e.id];
|
|
70
74
|
return /* @__PURE__ */ v("button", {
|
|
71
75
|
type: "button",
|
|
72
76
|
role: "menuitem",
|
|
73
77
|
disabled: !h,
|
|
74
|
-
onClick: () =>
|
|
78
|
+
onClick: () => L(e),
|
|
75
79
|
className: "flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm text-text-primary transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:bg-bg-sunken disabled:cursor-not-allowed disabled:text-text-muted disabled:hover:bg-transparent",
|
|
76
80
|
"data-testid": `assistant-attach-source-${e.id}`,
|
|
77
81
|
children: [/* @__PURE__ */ _(t, {
|
|
78
82
|
className: "size-4 flex-shrink-0 text-text-secondary",
|
|
79
83
|
"aria-hidden": "true"
|
|
80
|
-
}),
|
|
84
|
+
}), w(e.labelKey, e.labelFallback)]
|
|
81
85
|
}, e.id);
|
|
82
|
-
}), /* @__PURE__ */ _(a, { onActivate: () =>
|
|
86
|
+
}), /* @__PURE__ */ _(a, { onActivate: () => k(!1) })]
|
|
83
87
|
}) : null
|
|
84
88
|
]
|
|
85
89
|
});
|
|
86
90
|
};
|
|
87
91
|
//#endregion
|
|
88
|
-
export {
|
|
92
|
+
export { S as AssistantAttachmentButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantComposer.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,UAAU,KAAK;IACb;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAC;IACtE,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,qDAAqD;IACrD,cAAc,EAAE,mBAAmB,EAAE,CAAC;IACtC;;;;;;;;;;OAUG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,qFAAqF;IACrF,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"AssistantComposer.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,UAAU,KAAK;IACb;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAC;IACtE,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,qDAAqD;IACrD,cAAc,EAAE,mBAAmB,EAAE,CAAC;IACtC;;;;;;;;;;OAUG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,qFAAqF;IACrF,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,CAgbvC,CAAC"}
|
|
@@ -15,9 +15,25 @@ import { FC } from 'react';
|
|
|
15
15
|
* back off the dialog the user just asked for.
|
|
16
16
|
*/
|
|
17
17
|
export declare function connectSourceActivation(open: () => void, onActivate?: () => void): () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Where the entry point is drawn.
|
|
20
|
+
*
|
|
21
|
+
* - `menuitem`: the attach menu's last item, as it always was.
|
|
22
|
+
* - `action`: a standalone, visibly labelled button, for the empty
|
|
23
|
+
* conversation (BOFF-8158). Not a `menuitem`, because there is no menu
|
|
24
|
+
* around it, and a role that promises one misleads a screen reader.
|
|
25
|
+
*
|
|
26
|
+
* ★★ ONE COMPONENT FOR BOTH, not a second copy. Everything that decides
|
|
27
|
+
* whether the entry exists and what a click does (the shared availability
|
|
28
|
+
* predicate, a product's own `open` winning over its href, the router getting
|
|
29
|
+
* the resolved path, the browser winning a modified click) lives here once.
|
|
30
|
+
*/
|
|
31
|
+
export type AssistantConnectSourcePresentation = "menuitem" | "action";
|
|
18
32
|
export interface AssistantConnectSourceItemProps {
|
|
19
33
|
/** Close the surrounding menu. Fired only when this item actually acts. */
|
|
20
34
|
onActivate?: () => void;
|
|
35
|
+
/** Where it is drawn. Defaults to the attach menu's item. */
|
|
36
|
+
presentation?: AssistantConnectSourcePresentation;
|
|
21
37
|
}
|
|
22
38
|
export declare const AssistantConnectSourceItem: FC<AssistantConnectSourceItemProps>;
|
|
23
39
|
//# sourceMappingURL=AssistantConnectSourceItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantConnectSourceItem.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantConnectSourceItem.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"AssistantConnectSourceItem.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantConnectSourceItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAAe,KAAK,EAAE,EAAmB,MAAM,OAAO,CAAC;AAc9D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,IAAI,EAChB,UAAU,CAAC,EAAE,MAAM,IAAI,GACtB,MAAM,IAAI,CAKZ;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,kCAAkC,GAAG,UAAU,GAAG,QAAQ,CAAC;AAoBvE,MAAM,WAAW,+BAA+B;IAC9C,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,kCAAkC,CAAC;CACnD;AAED,eAAO,MAAM,0BAA0B,EAAE,EAAE,CAAC,+BAA+B,CA6F1E,CAAC"}
|
|
@@ -10,39 +10,42 @@ function u(e, t) {
|
|
|
10
10
|
t?.(), e();
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
var d =
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
var d = "flex w-full items-center gap-2.5 border-t border-border-subtle px-3 py-2 text-left text-sm text-text-primary transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:bg-bg-sunken", f = "inline-flex items-center gap-2 rounded-lg border border-border-default bg-bg-surface px-3.5 py-2 text-[13px] font-medium leading-tight text-text-primary shadow-sm transition-[color,background-color,border-color] hover:border-action-primary-bg/40 hover:bg-bg-elevated focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong", p = {
|
|
14
|
+
menuitem: "assistant-connect-source",
|
|
15
|
+
action: "assistant-connect-source-action"
|
|
16
|
+
}, m = ({ onActivate: m, presentation: h = "menuitem" }) => {
|
|
17
|
+
let g = e(), { href: _, open: v } = a(), y = r(), b = n(_), x = b === "internal" ? t(_) : null, S = o((e) => {
|
|
18
|
+
e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (m?.(), !(!y || !x) && (e.preventDefault(), y(x)));
|
|
16
19
|
}, [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
]),
|
|
21
|
-
return
|
|
20
|
+
y,
|
|
21
|
+
x,
|
|
22
|
+
m
|
|
23
|
+
]), C = g("composer.connectSource", "Connect a source"), w = h === "menuitem", T = w ? "menuitem" : void 0, E = w ? d : f, D = w ? "size-4 flex-shrink-0 text-text-secondary" : "size-4 flex-shrink-0 text-action-primary-bg", O = p[h];
|
|
24
|
+
return v ? /* @__PURE__ */ l("button", {
|
|
22
25
|
type: "button",
|
|
23
|
-
role:
|
|
24
|
-
onClick: u(
|
|
25
|
-
className:
|
|
26
|
-
"data-testid":
|
|
26
|
+
role: T,
|
|
27
|
+
onClick: u(v, m),
|
|
28
|
+
className: E,
|
|
29
|
+
"data-testid": O,
|
|
27
30
|
children: [/* @__PURE__ */ c(s, {
|
|
28
|
-
className:
|
|
31
|
+
className: D,
|
|
29
32
|
"aria-hidden": "true"
|
|
30
|
-
}),
|
|
31
|
-
}) : i(
|
|
32
|
-
href:
|
|
33
|
-
role:
|
|
34
|
-
onClick:
|
|
35
|
-
...
|
|
33
|
+
}), C]
|
|
34
|
+
}) : i(_) ? /* @__PURE__ */ l("a", {
|
|
35
|
+
href: _,
|
|
36
|
+
role: T,
|
|
37
|
+
onClick: S,
|
|
38
|
+
...b === "external" ? {
|
|
36
39
|
target: "_blank",
|
|
37
40
|
rel: "noopener noreferrer"
|
|
38
41
|
} : {},
|
|
39
|
-
className:
|
|
40
|
-
"data-testid":
|
|
42
|
+
className: E,
|
|
43
|
+
"data-testid": O,
|
|
41
44
|
children: [/* @__PURE__ */ c(s, {
|
|
42
|
-
className:
|
|
45
|
+
className: D,
|
|
43
46
|
"aria-hidden": "true"
|
|
44
|
-
}),
|
|
47
|
+
}), C]
|
|
45
48
|
}) : null;
|
|
46
49
|
};
|
|
47
50
|
//#endregion
|
|
48
|
-
export {
|
|
51
|
+
export { m as AssistantConnectSourceItem, u as connectSourceActivation };
|
|
@@ -20,8 +20,8 @@ import { AssistantWriteConfirmDialogProps } from './AssistantWriteConfirmDialog'
|
|
|
20
20
|
*
|
|
21
21
|
* const confirm = useWriteProposalConfirm(actions);
|
|
22
22
|
* <AssistantWriteProposalCard … onReview={() => confirm.review(view)} />
|
|
23
|
-
* <AssistantWriteConfirmDialog {...confirm.dialog} serverNow=…
|
|
24
|
-
* turnInFlight=… tr=… />
|
|
23
|
+
* <AssistantWriteConfirmDialog {...confirm.dialog} serverNow=… arrivedAt=…
|
|
24
|
+
* capabilities=… turnInFlight=… tr=… />
|
|
25
25
|
*
|
|
26
26
|
* Call `dismiss()` when the proposal can no longer be confirmed here (it was
|
|
27
27
|
* replaced, the conversation or mode changed): that closes the default dialog
|
|
@@ -62,6 +62,12 @@ export interface WriteProposalEntry {
|
|
|
62
62
|
view: WriteProposalView;
|
|
63
63
|
/** That sandbox's clock at the read the view came from (`list().serverNow`). */
|
|
64
64
|
serverNow: number;
|
|
65
|
+
/**
|
|
66
|
+
* This device's clock when that read arrived: with `serverNow`, one sample
|
|
67
|
+
* of the sandbox's clock, which stays true however long after it a card is
|
|
68
|
+
* drawn (BOFF-8163).
|
|
69
|
+
*/
|
|
70
|
+
arrivedAt: number;
|
|
65
71
|
/** Where the proposal lives: its issuing sandbox, session and conversation. */
|
|
66
72
|
session: WriteProposalSession;
|
|
67
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWriteProposals.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/useWriteProposals.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG3C,OAAO,EAML,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAEhC,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,gCAAgC,EACrC,KAAK,iBAAiB,EACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC5B,MAAM,mBAAmB,CAAC;AAG3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,UAAU,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;IAC9D;;;;OAIG;IACH,OAAO,EAAE,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,KAAK,mBAAmB,CAAC;IAC5E;;;;;;;OAOG;IACH,eAAe,EAAE,CACf,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,sBAAsB,KAC3B,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,mFAAmF;IACnF,QAAQ,EAAE,CACR,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,4BAA4B,KACjC,IAAI,CAAC;IACV;;;OAGG;IACH,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AA+FD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,EAAE,EAAE,WAAW,CAAC;IAChB;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,iBAAiB,CAAC;CAC1C,GAAG;IACF,KAAK,EAAE,kBAAkB,CAAC;IAC1B,OAAO,EAAE,oBAAoB,CAAC;IAC9B,4DAA4D;IAC5D,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACvC,CA2YA"}
|
|
@@ -103,16 +103,24 @@ function D(i) {
|
|
|
103
103
|
capabilitiesOf: (e) => t.getState().sandboxWriteCapabilities[e],
|
|
104
104
|
actorOf: () => A.current.userId,
|
|
105
105
|
onList: (e, t, r) => {
|
|
106
|
-
|
|
107
|
-
view: n,
|
|
106
|
+
let a = {
|
|
108
107
|
serverNow: t.serverNow,
|
|
108
|
+
arrivedAt: Date.now()
|
|
109
|
+
};
|
|
110
|
+
P.current.set(x(e), a), n(t.proposals.map((t) => ({
|
|
111
|
+
view: t,
|
|
112
|
+
...a,
|
|
109
113
|
session: e
|
|
110
114
|
}))), i(e, t.proposals, r.turnMessageId);
|
|
111
115
|
},
|
|
112
116
|
onView: (e, t) => {
|
|
117
|
+
let r = N.current[t.proposalId];
|
|
113
118
|
n([{
|
|
114
119
|
view: t,
|
|
115
|
-
|
|
120
|
+
...P.current.get(x(e)) ?? {
|
|
121
|
+
serverNow: r?.serverNow ?? NaN,
|
|
122
|
+
arrivedAt: r?.arrivedAt ?? NaN
|
|
123
|
+
},
|
|
116
124
|
session: e
|
|
117
125
|
}]);
|
|
118
126
|
},
|
|
@@ -47,14 +47,34 @@ export declare function writeProposalVariableValues(view: WriteProposalView): Wr
|
|
|
47
47
|
/** "Expires in 4:59", or, under reduced motion, words that move once a minute. */
|
|
48
48
|
export declare function writeProposalCountdownText(remainingMs: number, reducedMotion: boolean, tr: AssistantTr): string;
|
|
49
49
|
/**
|
|
50
|
-
* How long until `expiresAt`, on the ISSUING sandbox's clock
|
|
50
|
+
* How long until `expiresAt`, on the ISSUING sandbox's clock, when this
|
|
51
|
+
* device's clock reads `localNow`.
|
|
51
52
|
*
|
|
52
|
-
* `serverNow` is that sandbox's clock
|
|
53
|
-
* (`list().serverNow`)
|
|
54
|
-
*
|
|
55
|
-
*
|
|
53
|
+
* `serverNow` is that sandbox's clock at the read the record came from
|
|
54
|
+
* (`list().serverNow`), and `arrivedAt` is this device's clock when that read
|
|
55
|
+
* arrived. Together they are one sample of the sandbox's clock, so what has
|
|
56
|
+
* passed since is `localNow - arrivedAt` whenever the question is asked.
|
|
57
|
+
*
|
|
58
|
+
* ★★ BOFF-8163: the sample is taken when the read ARRIVES, never when a card
|
|
59
|
+
* mounts. A card first drawn minutes after the read (the voice tray, a
|
|
60
|
+
* conversation reopened before its fresh read lands, a dialog opened late)
|
|
61
|
+
* used to count those minutes as time still left, and kept its confirm
|
|
62
|
+
* enabled past the record's expiry.
|
|
63
|
+
*
|
|
64
|
+
* An unreadable sample (either value not finite) leaves this device's clock
|
|
65
|
+
* as the only one there is.
|
|
66
|
+
*/
|
|
67
|
+
export declare function writeProposalRemainingMs(expiresAt: number, serverNow: number, arrivedAt: number, localNow: number): number;
|
|
68
|
+
/**
|
|
69
|
+
* `writeProposalRemainingMs` for a surface, kept current while `ticking`.
|
|
70
|
+
*
|
|
71
|
+
* It ticks on the countdown's own whole seconds, so it reaches 0 at the
|
|
72
|
+
* moment the record expires rather than up to a second later, and stops
|
|
73
|
+
* there: nothing changes after that until a fresh read does. Each time
|
|
74
|
+
* ticking starts (a dialog opening) this device's clock is read at once, so a
|
|
75
|
+
* surface that was idle never shows a stale figure.
|
|
56
76
|
*/
|
|
57
|
-
export declare function useWriteProposalRemainingMs(expiresAt: number, serverNow: number, ticking: boolean): number;
|
|
77
|
+
export declare function useWriteProposalRemainingMs(expiresAt: number, serverNow: number, arrivedAt: number, ticking: boolean): number;
|
|
58
78
|
/** Whether a proposal's controls, and its confirm, may be offered. */
|
|
59
79
|
export interface WriteProposalConfirmState {
|
|
60
80
|
/** The issuing sandbox speaks the v1 protocol and enforces it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeProposalPresentation.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/writeProposalPresentation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;GASG;AAEH,sCAAsC;AACtC,eAAO,MAAM,mBAAmB,yCAAW,CAAC;AAY5C,4EAA4E;AAC5E,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQ/D;AAkBD;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,EAAE,CAW7E;AAqBD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,MAAM,CAUR;AAED,mFAAmF;AACnF,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,qBAAqB,EAC3B,EAAE,EAAE,WAAW,GACd,MAAM,GAAG,IAAI,CAkBf;AAED,+CAA+C;AAC/C,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,iBAAiB,EACvB,EAAE,EAAE,WAAW,GACd,MAAM,CAIR;AAED,8EAA8E;AAC9E,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,2EAA2E;AAC3E,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,OAAO,GAAG,OAAO,CAAC,GACrD,MAAM,CAER;AAED,iEAAiE;AACjE,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,sBAAsB,GAC5B,uBAAuB,EAAE,CAQ3B;AAED,kEAAkE;AAClE,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,iBAAiB,GACtB,uBAAuB,EAAE,CAO3B;AAED,kFAAkF;AAClF,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,OAAO,EACtB,EAAE,EAAE,WAAW,GACd,MAAM,CAeR;AAED
|
|
1
|
+
{"version":3,"file":"writeProposalPresentation.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/writeProposalPresentation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;GASG;AAEH,sCAAsC;AACtC,eAAO,MAAM,mBAAmB,yCAAW,CAAC;AAY5C,4EAA4E;AAC5E,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQ/D;AAkBD;;;;GAIG;AACH,wBAAgB,2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,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,GACf,MAAM,CAwBR;AAED,sEAAsE;AACtE,MAAM,WAAW,yBAAyB;IACxC,kEAAkE;IAClE,SAAS,EAAE,OAAO,CAAC;IACnB,6EAA6E;IAC7E,MAAM,EAAE,OAAO,CAAC;IAChB,+EAA+E;IAC/E,YAAY,EAAE,OAAO,CAAC;IACtB,6CAA6C;IAC7C,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,iBAAiB,EACvB,YAAY,EAAE,wBAAwB,GAAG,IAAI,GAAG,SAAS,GACxD,yBAAyB,CAY3B"}
|
|
@@ -81,23 +81,30 @@ function h(e, t, n) {
|
|
|
81
81
|
let r = Math.ceil(e / 1e3);
|
|
82
82
|
return n("writeProposal.expiresIn", "Expires in {{time}}", { time: `${Math.floor(r / 60)}:${String(r % 60).padStart(2, "0")}` });
|
|
83
83
|
}
|
|
84
|
-
function g(n, r
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Object.is(a.serverNow, r) || (s = Number.isFinite(r) ? r - Date.now() : 0, o({
|
|
90
|
-
serverNow: r,
|
|
91
|
-
offset: s
|
|
92
|
-
}));
|
|
93
|
-
let [c, l] = t(() => Date.now());
|
|
84
|
+
function g(e, t, n, r) {
|
|
85
|
+
return !Number.isFinite(t) || !Number.isFinite(n) ? e - r : e - (t + (r - n));
|
|
86
|
+
}
|
|
87
|
+
function _(n, r, i, a) {
|
|
88
|
+
let [o, s] = t(() => Date.now());
|
|
94
89
|
return e(() => {
|
|
95
|
-
if (!
|
|
96
|
-
let e =
|
|
97
|
-
|
|
98
|
-
|
|
90
|
+
if (!a) return;
|
|
91
|
+
let e = null, t = () => {
|
|
92
|
+
let a = Date.now();
|
|
93
|
+
s(a);
|
|
94
|
+
let o = g(n, r, i, a);
|
|
95
|
+
o <= 0 || (e = setTimeout(t, (o - 1) % 1e3 + 1));
|
|
96
|
+
};
|
|
97
|
+
return t(), () => {
|
|
98
|
+
e !== null && clearTimeout(e);
|
|
99
|
+
};
|
|
100
|
+
}, [
|
|
101
|
+
a,
|
|
102
|
+
n,
|
|
103
|
+
r,
|
|
104
|
+
i
|
|
105
|
+
]), g(n, r, i, o);
|
|
99
106
|
}
|
|
100
|
-
function
|
|
107
|
+
function v(e, t) {
|
|
101
108
|
let n = t?.proposals === !0 && t.writeApprovalMode === "proposal-v1", r = e.execution.enabled !== !0 || t?.writeExecution !== "enabled", i = e.status === "pending" && e.approvable && n;
|
|
102
109
|
return {
|
|
103
110
|
available: n,
|
|
@@ -107,4 +114,4 @@ function _(e, t) {
|
|
|
107
114
|
};
|
|
108
115
|
}
|
|
109
116
|
//#endregion
|
|
110
|
-
export { n as WRITE_PROPOSAL_MASK, a as formatWriteProposalValue, l as redactWriteProposalText,
|
|
117
|
+
export { n as WRITE_PROPOSAL_MASK, a as formatWriteProposalValue, l as redactWriteProposalText, _ as useWriteProposalRemainingMs, p as writeProposalArgumentValues, v as writeProposalConfirmState, h as writeProposalCountdownText, d as writeProposalGatewayText, u as writeProposalKindText, g as writeProposalRemainingMs, f as writeProposalRootFieldName, s as writeProposalSensitiveTexts, m as writeProposalVariableValues };
|