@40rty/ams-ui 0.3.2 → 0.4.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.
Files changed (44) hide show
  1. package/dist/agent.js +5 -5
  2. package/dist/{chunk-MHUEIBJ3.js → chunk-GQURT3IR.js} +3 -47
  3. package/dist/{chunk-BFZ3YCUY.js → chunk-H6MSAD5M.js} +1 -40
  4. package/dist/{chunk-ORIOBWTD.js → chunk-PHXP2SKS.js} +5 -1
  5. package/dist/{chunk-OKP7MC72.js → chunk-RKPDCXL4.js} +241 -195
  6. package/dist/{chunk-TEPH476O.js → chunk-RMJDSHLA.js} +6 -36
  7. package/dist/hooks.js +4 -4
  8. package/dist/index.js +172 -338
  9. package/dist/presence.js +3 -4
  10. package/dist/shell.js +411 -537
  11. package/dist/thread-panel.js +3 -3
  12. package/dist/types/agent/presence/AgentAsk.d.ts +13 -0
  13. package/dist/types/agent/presence/index.d.ts +3 -1
  14. package/dist/types/agent/presence/read-data.d.ts +5 -0
  15. package/dist/types/components/ecommerce/cart/CartFoot.d.ts +1 -2
  16. package/dist/types/components/ecommerce/cart/CartLineRow.d.ts +1 -1
  17. package/dist/types/hooks/index.d.ts +1 -1
  18. package/dist/types/index.d.ts +2 -2
  19. package/dist/types/labels.d.ts +6 -0
  20. package/dist/types/shell/Composer.d.ts +1 -1
  21. package/dist/types/shell/ShellScaffold.d.ts +5 -2
  22. package/dist/types/shell/TurnAsk.d.ts +14 -0
  23. package/dist/types/shell/composer/AttachmentStrip.d.ts +1 -1
  24. package/dist/types/shell/dock-context.d.ts +1 -1
  25. package/dist/types/shell/index.d.ts +2 -2
  26. package/dist/types/shell/mobile/DefaultMobileShell.d.ts +4 -0
  27. package/dist/types/shell/mobile/IslandComposeGroup.d.ts +1 -1
  28. package/dist/types/shell/mobile/IslandInputBar.d.ts +1 -1
  29. package/dist/types/shell/mobile/MorphIsland.d.ts +1 -1
  30. package/dist/types/shell/mobile/PageComposerDock.d.ts +13 -0
  31. package/dist/types/shell/mobile/RestIsland.d.ts +1 -1
  32. package/dist/types/shell/slots.d.ts +1 -5
  33. package/package.json +3 -4
  34. package/dist/types/agent/presence/use-forget-fact.d.ts +0 -56
  35. package/dist/types/components/ecommerce/cart/use-cart-view.d.ts +0 -50
  36. package/dist/types/hooks/use-projection.d.ts +0 -24
  37. package/dist/types/shell/composer/heic-convert.d.ts +0 -6
  38. package/dist/types/shell/composer/useComposerAttachments.d.ts +0 -37
  39. package/dist/types/shell/composer/usePromptComposer.d.ts +0 -51
  40. package/dist/types/shell/use-dock-state.d.ts +0 -54
  41. package/dist/types/utils/use-is-seed-home.d.ts +0 -13
  42. package/dist/types/utils/use-safe-cart.d.ts +0 -17
  43. package/dist/types/utils/use-safe-facts.d.ts +0 -9
  44. package/dist/types/utils/use-safe-fourty-session.d.ts +0 -15
package/dist/shell.js CHANGED
@@ -3,9 +3,8 @@ import {
3
3
  SIDE_DOCK_EASE,
4
4
  SIDE_DOCK_REVEAL_MS,
5
5
  SideDock,
6
- useDockState,
7
6
  useSideDockSpacing
8
- } from "./chunk-BFZ3YCUY.js";
7
+ } from "./chunk-H6MSAD5M.js";
9
8
  import {
10
9
  DragSheet,
11
10
  Spinner,
@@ -17,8 +16,8 @@ import {
17
16
  AgentPresenceWidget,
18
17
  PresenceBriefRail,
19
18
  useLabels
20
- } from "./chunk-OKP7MC72.js";
21
- import "./chunk-TEPH476O.js";
19
+ } from "./chunk-RKPDCXL4.js";
20
+ import "./chunk-RMJDSHLA.js";
22
21
  import {
23
22
  AgentCaret,
24
23
  AnimatePresence,
@@ -36,12 +35,12 @@ import {
36
35
  import {
37
36
  submitOnEnter,
38
37
  useScrollThreshold
39
- } from "./chunk-ORIOBWTD.js";
40
- import "./chunk-MHUEIBJ3.js";
38
+ } from "./chunk-PHXP2SKS.js";
39
+ import "./chunk-GQURT3IR.js";
41
40
 
42
41
  // src/shell/Composer.tsx
43
- import * as React12 from "react";
44
- import { useFourtySession as useFourtySession4, useConversationState, useComposerPlaceholder as useComposerPlaceholder2, useFormFactor as useFormFactor5 } from "@40rty/ams-sdk";
42
+ import * as React10 from "react";
43
+ import { useFourtySession as useFourtySession2, useConversationState, useComposerPlaceholder as useComposerPlaceholder2, useFormFactor as useFormFactor5 } from "@40rty/ams-sdk";
45
44
  import { ThreadHeadroom, useHydrated, useScrollHasMoreBelow, useThreadRows, useThreadJumpMarks, useThreadLanding } from "@40rty/ams-sdk";
46
45
 
47
46
  // src/shell/thread-reland.ts
@@ -572,219 +571,18 @@ function InlineCompletion({
572
571
  );
573
572
  }
574
573
 
575
- // src/shell/composer/usePromptComposer.ts
576
- import * as React5 from "react";
577
- import { useFourtySession as useFourtySession2, useVoiceCapture, useComposerDraft } from "@40rty/ams-sdk";
578
-
579
- // src/shell/composer/useComposerAttachments.ts
580
- import * as React4 from "react";
581
- import { useFourtySession } from "@40rty/ams-sdk";
582
- import { mintId } from "@40rty/ams-sdk";
583
- import { ALLOWED_ATTACHMENT_TYPES, MAX_ATTACHMENT_BYTES, isAllowedAttachmentType, isImageAttachment } from "@40rty/ams-sdk";
584
-
585
- // src/shell/composer/heic-convert.ts
586
- var HEIC_EXT = /\.hei[cf]$/i;
587
- function isHeic(file) {
588
- const type = file.type.toLowerCase();
589
- if (type === "image/heic" || type === "image/heif") return true;
590
- if (type.length === 0) return HEIC_EXT.test(file.name);
591
- return false;
592
- }
593
- async function heicToJpeg(file) {
594
- const { default: heic2any } = await import("heic2any");
595
- const converted = await heic2any({ blob: file, toType: "image/jpeg", quality: 0.9 });
596
- const blob = Array.isArray(converted) ? converted[0] : converted;
597
- const base = file.name.replace(HEIC_EXT, "");
598
- const name = `${base.length > 0 ? base : "image"}.jpg`;
599
- return new File([blob], name, { type: "image/jpeg" });
600
- }
601
-
602
- // src/shell/composer/useComposerAttachments.ts
603
- var ATTACHMENT_ACCEPT = ALLOWED_ATTACHMENT_TYPES.join(",");
604
- var MAX_MB = Math.round(MAX_ATTACHMENT_BYTES / (1024 * 1024));
605
- function validate(file) {
606
- if (file.size === 0) return "File is empty.";
607
- if (!isAllowedAttachmentType(file.type)) {
608
- return file.type.length > 0 ? `${file.type} isn't supported.` : "This file type isn't supported.";
609
- }
610
- if (file.size > MAX_ATTACHMENT_BYTES) return `File is larger than ${MAX_MB}MB.`;
611
- return null;
612
- }
613
- function useComposerAttachments() {
614
- const session = useFourtySession();
615
- const [attachments, setAttachments] = React4.useState([]);
616
- const createdUrls = React4.useRef(/* @__PURE__ */ new Set());
617
- const update = React4.useCallback((localId, patch) => {
618
- setAttachments((prev) => prev.map((a) => a.localId === localId ? { ...a, ...patch } : a));
619
- }, []);
620
- const startUpload = React4.useCallback(
621
- (localId, file) => {
622
- const error = validate(file);
623
- if (error !== null) {
624
- update(localId, { status: "error", error, name: file.name, mimeType: file.type, size: file.size });
625
- return;
626
- }
627
- const previewUrl = isImageAttachment(file.type) ? URL.createObjectURL(file) : null;
628
- if (previewUrl !== null) createdUrls.current.add(previewUrl);
629
- update(localId, {
630
- status: "uploading",
631
- name: file.name,
632
- mimeType: file.type,
633
- size: file.size,
634
- previewUrl,
635
- error: null
636
- });
637
- session.uploadAttachment(file).then(
638
- (ref) => update(localId, { status: "ready", ref }),
639
- (err) => update(localId, {
640
- status: "error",
641
- error: err instanceof Error ? err.message : "Upload failed."
642
- })
643
- );
644
- },
645
- [session, update]
646
- );
647
- const addFiles = React4.useCallback(
648
- (files) => {
649
- const list = Array.from(files);
650
- for (const file of list) {
651
- const localId = mintId("attach");
652
- setAttachments((prev) => [
653
- ...prev,
654
- {
655
- localId,
656
- name: file.name,
657
- mimeType: file.type,
658
- size: file.size,
659
- previewUrl: null,
660
- status: "uploading",
661
- ref: null,
662
- error: null
663
- }
664
- ]);
665
- if (isHeic(file)) {
666
- heicToJpeg(file).then(
667
- (jpeg) => startUpload(localId, jpeg),
668
- (err) => {
669
- console.warn("[attachments] HEIC decode failed; uploading original", err);
670
- startUpload(localId, file);
671
- }
672
- );
673
- continue;
674
- }
675
- startUpload(localId, file);
676
- }
677
- },
678
- [startUpload]
679
- );
680
- const revoke = React4.useCallback((url) => {
681
- if (url !== null && createdUrls.current.has(url)) {
682
- URL.revokeObjectURL(url);
683
- createdUrls.current.delete(url);
684
- }
685
- }, []);
686
- const remove = React4.useCallback(
687
- (localId) => {
688
- setAttachments((prev) => {
689
- const target = prev.find((a) => a.localId === localId);
690
- if (target) revoke(target.previewUrl);
691
- return prev.filter((a) => a.localId !== localId);
692
- });
693
- },
694
- [revoke]
695
- );
696
- const clear = React4.useCallback(() => {
697
- for (const url of createdUrls.current) URL.revokeObjectURL(url);
698
- createdUrls.current.clear();
699
- setAttachments([]);
700
- }, []);
701
- React4.useEffect(
702
- () => () => {
703
- for (const url of createdUrls.current) URL.revokeObjectURL(url);
704
- createdUrls.current.clear();
705
- },
706
- []
707
- );
708
- const hasPending = attachments.some((a) => a.status === "uploading");
709
- const readyRefs = React4.useMemo(
710
- () => attachments.filter((a) => a.ref !== null).map((a) => a.ref),
711
- [attachments]
712
- );
713
- return { attachments, addFiles, remove, clear, hasPending, readyRefs };
714
- }
715
-
716
- // src/shell/composer/usePromptComposer.ts
717
- function usePromptComposer(options = {}) {
718
- const { attachments: attachmentsController } = options;
719
- const session = useFourtySession2();
720
- const internalAttach = useComposerAttachments();
721
- const attach = attachmentsController !== void 0 ? attachmentsController : internalAttach;
722
- const [value, setValue] = useComposerDraft();
723
- const dictationBaseRef = React5.useRef("");
724
- const handleDictationResult = React5.useCallback((transcript) => {
725
- const base = dictationBaseRef.current;
726
- setValue(base.length > 0 ? `${base} ${transcript}` : transcript);
727
- }, [setValue]);
728
- const submitRef = React5.useRef(() => {
729
- });
730
- const voiceCapture = useVoiceCapture({
731
- onResult: handleDictationResult,
732
- onCommit: () => submitRef.current()
733
- });
734
- const valueRef = React5.useRef(value);
735
- valueRef.current = value;
736
- const toggleDictation = React5.useCallback(() => {
737
- if (voiceCapture.state !== "listening") {
738
- dictationBaseRef.current = valueRef.current;
739
- }
740
- voiceCapture.toggle();
741
- }, [voiceCapture]);
742
- const onPaste = React5.useCallback(
743
- (e) => {
744
- const files = e.clipboardData.files;
745
- if (files.length > 0) {
746
- e.preventDefault();
747
- attach.addFiles(files);
748
- }
749
- },
750
- [attach]
751
- );
752
- const canSend = (value.trim().length > 0 || attach.readyRefs.length > 0) && !attach.hasPending;
753
- const submit = React5.useCallback(() => {
754
- if (!((value.trim().length > 0 || attach.readyRefs.length > 0) && !attach.hasPending)) return;
755
- voiceCapture.cancel();
756
- session.sendMessage(
757
- value,
758
- attach.readyRefs.length > 0 ? { attachments: attach.readyRefs } : void 0
759
- );
760
- setValue("");
761
- attach.clear();
762
- }, [session, value, attach, setValue, voiceCapture]);
763
- submitRef.current = submit;
764
- return {
765
- value,
766
- setValue,
767
- attachments: attach,
768
- dictation: {
769
- listening: voiceCapture.state === "listening",
770
- supported: voiceCapture.supported,
771
- toggle: toggleDictation
772
- },
773
- onPaste,
774
- canSend,
775
- submit
776
- };
777
- }
574
+ // src/shell/Composer.tsx
575
+ import { usePromptComposer } from "@40rty/ams-sdk";
778
576
 
779
577
  // src/shell/composer/AttachmentStrip.tsx
780
- import * as React6 from "react";
578
+ import * as React4 from "react";
781
579
  import { X, FileText, AlertCircle, ImageOff } from "lucide-react";
782
- import { isImageAttachment as isImageAttachment2 } from "@40rty/ams-sdk";
580
+ import { isImageAttachment } from "@40rty/ams-sdk";
783
581
  import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
784
582
  var STRIP_CLASS = "fourty-composer-attachments";
785
583
  var THUMB = 52;
786
584
  function Thumb({ a }) {
787
- const [imgFailed, setImgFailed] = React6.useState(false);
585
+ const [imgFailed, setImgFailed] = React4.useState(false);
788
586
  if (a.previewUrl !== null && !imgFailed) {
789
587
  return /* @__PURE__ */ jsx6(
790
588
  "img",
@@ -796,7 +594,7 @@ function Thumb({ a }) {
796
594
  }
797
595
  );
798
596
  }
799
- const Icon = isImageAttachment2(a.mimeType) ? ImageOff : FileText;
597
+ const Icon = isImageAttachment(a.mimeType) ? ImageOff : FileText;
800
598
  return /* @__PURE__ */ jsxs2(
801
599
  "div",
802
600
  {
@@ -925,13 +723,14 @@ function AttachmentStrip({
925
723
  }
926
724
 
927
725
  // src/shell/composer/AttachButton.tsx
928
- import * as React7 from "react";
726
+ import * as React5 from "react";
929
727
  import { Image as ImageIcon } from "lucide-react";
728
+ import { ATTACHMENT_ACCEPT } from "@40rty/ams-sdk";
930
729
  import { Fragment, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
931
730
  var ATTACH_CLASS = "fourty-composer-attach";
932
731
  var ATTACH_COLOR = "var(--fourty-attach-color, var(--color-text-muted))";
933
732
  function AttachButton({ onFiles, className, style }) {
934
- const inputRef = React7.useRef(null);
733
+ const inputRef = React5.useRef(null);
935
734
  return /* @__PURE__ */ jsxs3(Fragment, { children: [
936
735
  /* @__PURE__ */ jsx7(
937
736
  "input",
@@ -1030,7 +829,7 @@ function ClearSessionButton({
1030
829
  }
1031
830
 
1032
831
  // src/shell/composer/ConversationHistoryButton.tsx
1033
- import * as React8 from "react";
832
+ import * as React6 from "react";
1034
833
  import { History, Check } from "lucide-react";
1035
834
  import { useFormFactor as useFormFactor2 } from "@40rty/ams-sdk";
1036
835
  import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
@@ -1047,10 +846,10 @@ function ConversationHistoryButton({
1047
846
  className,
1048
847
  style
1049
848
  }) {
1050
- const [open, setOpen] = React8.useState(false);
1051
- const rootRef = React8.useRef(null);
849
+ const [open, setOpen] = React6.useState(false);
850
+ const rootRef = React6.useRef(null);
1052
851
  const { isMobile } = useFormFactor2();
1053
- React8.useEffect(() => {
852
+ React6.useEffect(() => {
1054
853
  if (!open) return;
1055
854
  const root = rootRef.current;
1056
855
  if (!root) return;
@@ -1185,9 +984,9 @@ function formatRelative(ts) {
1185
984
  }
1186
985
 
1187
986
  // src/shell/composer/ShareCanvasButton.tsx
1188
- import * as React9 from "react";
987
+ import * as React7 from "react";
1189
988
  import { Check as Check2, Share2 } from "lucide-react";
1190
- import { useFormFactor as useFormFactor3, useFourtySession as useFourtySession3 } from "@40rty/ams-sdk";
989
+ import { useFormFactor as useFormFactor3, useFourtySession } from "@40rty/ams-sdk";
1191
990
  import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
1192
991
  var SHARE_CLASS = "fourty-composer-share";
1193
992
  var SHARE_COLOR = "var(--fourty-clear-color, var(--color-text-muted))";
@@ -1198,16 +997,16 @@ var SHARE_HOVER_COLOR = "var(--fourty-clear-hover-color, var(--fourty-clear-colo
1198
997
  var ACK_MS = 2200;
1199
998
  var LINK_DAYS = 30;
1200
999
  function ShareCanvasButton() {
1201
- const { sessionId, shareCanvas } = useFourtySession3();
1000
+ const { sessionId, shareCanvas } = useFourtySession();
1202
1001
  const labels = useLabels();
1203
1002
  const { isMobile } = useFormFactor3();
1204
- const [phase, setPhase] = React9.useState({ kind: "closed" });
1205
- const rootRef = React9.useRef(null);
1206
- const ackRef = React9.useRef(null);
1207
- React9.useEffect(() => () => {
1003
+ const [phase, setPhase] = React7.useState({ kind: "closed" });
1004
+ const rootRef = React7.useRef(null);
1005
+ const ackRef = React7.useRef(null);
1006
+ React7.useEffect(() => () => {
1208
1007
  if (ackRef.current !== null) clearTimeout(ackRef.current);
1209
1008
  }, []);
1210
- React9.useEffect(() => {
1009
+ React7.useEffect(() => {
1211
1010
  if (phase.kind === "closed") return;
1212
1011
  const onDown = (e) => {
1213
1012
  const root = rootRef.current;
@@ -1343,7 +1142,7 @@ function ShareCanvasButton() {
1343
1142
  }
1344
1143
 
1345
1144
  // src/shell/composer/ThreadJumpRail.tsx
1346
- import * as React10 from "react";
1145
+ import * as React8 from "react";
1347
1146
  import { useFormFactor as useFormFactor4 } from "@40rty/ams-sdk";
1348
1147
 
1349
1148
  // src/shell/composer/composer-metrics.ts
@@ -1372,21 +1171,21 @@ var TICK_OPACITY = 0.35;
1372
1171
  var TICK_CURRENT_OPACITY = 0.9;
1373
1172
  function ThreadJumpRail({ marks, className }) {
1374
1173
  const { isMobile } = useFormFactor4();
1375
- const [open, setOpen] = React10.useState(false);
1376
- const [rowHoverKey, setRowHoverKey] = React10.useState(null);
1377
- const rootRef = React10.useRef(null);
1378
- const panelRef = React10.useRef(null);
1379
- const trackRef = React10.useRef(null);
1380
- const openTimer = React10.useRef(null);
1381
- const clearOpenTimer = React10.useCallback(() => {
1174
+ const [open, setOpen] = React8.useState(false);
1175
+ const [rowHoverKey, setRowHoverKey] = React8.useState(null);
1176
+ const rootRef = React8.useRef(null);
1177
+ const panelRef = React8.useRef(null);
1178
+ const trackRef = React8.useRef(null);
1179
+ const openTimer = React8.useRef(null);
1180
+ const clearOpenTimer = React8.useCallback(() => {
1382
1181
  if (openTimer.current !== null) {
1383
1182
  clearTimeout(openTimer.current);
1384
1183
  openTimer.current = null;
1385
1184
  }
1386
1185
  }, []);
1387
- React10.useEffect(() => clearOpenTimer, [clearOpenTimer]);
1388
- const [scrubbing, setScrubbing] = React10.useState(false);
1389
- const scrub = React10.useRef({
1186
+ React8.useEffect(() => clearOpenTimer, [clearOpenTimer]);
1187
+ const [scrubbing, setScrubbing] = React8.useState(false);
1188
+ const scrub = React8.useRef({
1390
1189
  startX: 0,
1391
1190
  startY: 0,
1392
1191
  lastY: 0,
@@ -1394,14 +1193,14 @@ function ThreadJumpRail({ marks, className }) {
1394
1193
  timer: null,
1395
1194
  active: false
1396
1195
  });
1397
- const clearLongPressTimer = React10.useCallback(() => {
1196
+ const clearLongPressTimer = React8.useCallback(() => {
1398
1197
  if (scrub.current.timer !== null) {
1399
1198
  clearTimeout(scrub.current.timer);
1400
1199
  scrub.current.timer = null;
1401
1200
  }
1402
1201
  }, []);
1403
- React10.useEffect(() => clearLongPressTimer, [clearLongPressTimer]);
1404
- const jumpToClientY = React10.useCallback((clientY) => {
1202
+ React8.useEffect(() => clearLongPressTimer, [clearLongPressTimer]);
1203
+ const jumpToClientY = React8.useCallback((clientY) => {
1405
1204
  const track = trackRef.current;
1406
1205
  if (track === null || marks.length === 0) return;
1407
1206
  const rect = track.getBoundingClientRect();
@@ -1451,7 +1250,7 @@ function ThreadJumpRail({ marks, className }) {
1451
1250
  e.stopPropagation();
1452
1251
  }
1453
1252
  };
1454
- React10.useEffect(() => {
1253
+ React8.useEffect(() => {
1455
1254
  if (!isMobile || !open) return;
1456
1255
  const root = rootRef.current;
1457
1256
  if (root === null) return;
@@ -1465,7 +1264,7 @@ function ThreadJumpRail({ marks, className }) {
1465
1264
  const tickCount = Math.min(marks.length, MAX_TICKS);
1466
1265
  const currentIndex = marks.findIndex((m) => m.isCurrent);
1467
1266
  const activeTick = currentIndex < 0 ? -1 : Math.floor(currentIndex / marks.length * tickCount);
1468
- React10.useEffect(() => {
1267
+ React8.useEffect(() => {
1469
1268
  if (!open) return;
1470
1269
  const panel = panelRef.current;
1471
1270
  if (panel === null) return;
@@ -1668,10 +1467,10 @@ function ThreadJumpRail({ marks, className }) {
1668
1467
  }
1669
1468
 
1670
1469
  // src/shell/composer/use-field-autosize.ts
1671
- import * as React11 from "react";
1470
+ import * as React9 from "react";
1672
1471
  function useFieldAutosize(taRef, value, ghostPx, maxLines) {
1673
- const [fieldPx, setFieldPx] = React11.useState(COMPOSER_MIN_FIELD_PX);
1674
- React11.useEffect(() => {
1472
+ const [fieldPx, setFieldPx] = React9.useState(COMPOSER_MIN_FIELD_PX);
1473
+ React9.useEffect(() => {
1675
1474
  const ta = taRef.current;
1676
1475
  if (ta === null) return;
1677
1476
  ta.style.height = "auto";
@@ -1714,7 +1513,7 @@ function Composer({
1714
1513
  shareCanvas = false,
1715
1514
  attachments: attachmentsController
1716
1515
  }) {
1717
- const session = useFourtySession4();
1516
+ const session = useFourtySession2();
1718
1517
  const { isStreaming, hasCommittedTurns } = useConversationState();
1719
1518
  const hydrated = useHydrated();
1720
1519
  const hasConversation = hydrated && hasCommittedTurns;
@@ -1725,14 +1524,14 @@ function Composer({
1725
1524
  const { isMobile } = useFormFactor5();
1726
1525
  const chipOrientation = isMobile ? "row" : "list";
1727
1526
  const chipArea = chipAreaPx(isMobile);
1728
- const onAbort = React12.useCallback(() => session.abortGeneration(), [session]);
1527
+ const onAbort = React10.useCallback(() => session.abortGeneration(), [session]);
1729
1528
  const agentPlaceholder = useComposerPlaceholder2();
1730
1529
  const effectivePlaceholder = agentPlaceholder !== null ? agentPlaceholder : placeholder;
1731
- const [focused, setFocused] = React12.useState(false);
1732
- const taRef = React12.useRef(null);
1733
- const scrollRef = React12.useRef(null);
1734
- const [scrollerEl, setScrollerEl] = React12.useState(null);
1735
- const attachScroller = React12.useCallback((el) => {
1530
+ const [focused, setFocused] = React10.useState(false);
1531
+ const taRef = React10.useRef(null);
1532
+ const scrollRef = React10.useRef(null);
1533
+ const [scrollerEl, setScrollerEl] = React10.useState(null);
1534
+ const attachScroller = React10.useCallback((el) => {
1736
1535
  scrollRef.current = el;
1737
1536
  setScrollerEl(el);
1738
1537
  }, []);
@@ -1750,10 +1549,10 @@ function Composer({
1750
1549
  canSend,
1751
1550
  submit
1752
1551
  } = usePromptComposer({ attachments: attachmentsController });
1753
- const [ghostPx, setGhostPx] = React12.useState(0);
1552
+ const [ghostPx, setGhostPx] = React10.useState(0);
1754
1553
  const fieldPx = useFieldAutosize(taRef, value, ghostPx);
1755
1554
  const expanded = isFieldExpanded(fieldPx);
1756
- React12.useEffect(() => {
1555
+ React10.useEffect(() => {
1757
1556
  if (!typeToFocus) return;
1758
1557
  const ta = taRef.current;
1759
1558
  if (!ta) return;
@@ -2118,17 +1917,17 @@ function Composer({
2118
1917
  }
2119
1918
 
2120
1919
  // src/shell/ConversationTransition.tsx
2121
- import * as React13 from "react";
2122
- import { useFourtySession as useFourtySession5 } from "@40rty/ams-sdk";
1920
+ import * as React11 from "react";
1921
+ import { useFourtySession as useFourtySession3 } from "@40rty/ams-sdk";
2123
1922
  import { jsx as jsx13 } from "react/jsx-runtime";
2124
1923
  function ConversationTransition({
2125
1924
  children,
2126
1925
  className,
2127
1926
  style
2128
1927
  }) {
2129
- const { sessionId } = useFourtySession5();
1928
+ const { sessionId } = useFourtySession3();
2130
1929
  const reduce = useReducedMotion();
2131
- const firstSessionRef = React13.useRef(null);
1930
+ const firstSessionRef = React11.useRef(null);
2132
1931
  if (firstSessionRef.current === null && sessionId !== null) firstSessionRef.current = sessionId;
2133
1932
  const isFirstSession = sessionId === null || sessionId === firstSessionRef.current;
2134
1933
  const conversationKey = isFirstSession ? "\u2205" : sessionId;
@@ -2150,8 +1949,8 @@ function ConversationTransition({
2150
1949
  }
2151
1950
 
2152
1951
  // src/shell/VoiceControl.tsx
2153
- import * as React14 from "react";
2154
- import { useFourtySession as useFourtySession6, useVoiceCapture as useVoiceCapture2 } from "@40rty/ams-sdk";
1952
+ import * as React12 from "react";
1953
+ import { useFourtySession as useFourtySession4, useVoiceCapture } from "@40rty/ams-sdk";
2155
1954
  import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
2156
1955
  var ROOT_CLASS3 = "fourty-voice-control";
2157
1956
  var TRANSCRIPT_CLASS = "fourty-voice-control__transcript";
@@ -2160,12 +1959,12 @@ function VoiceControl({
2160
1959
  className,
2161
1960
  style
2162
1961
  }) {
2163
- const session = useFourtySession6();
2164
- const onCommit = React14.useCallback(
1962
+ const session = useFourtySession4();
1963
+ const onCommit = React12.useCallback(
2165
1964
  (text) => session.sendMessage(text),
2166
1965
  [session]
2167
1966
  );
2168
- const voice = useVoiceCapture2(
1967
+ const voice = useVoiceCapture(
2169
1968
  silenceMs !== void 0 ? { onCommit, silenceMs } : { onCommit }
2170
1969
  );
2171
1970
  if (!voice.supported) return null;
@@ -2217,7 +2016,7 @@ function VoiceControl({
2217
2016
  }
2218
2017
 
2219
2018
  // src/shell/VoiceIsland.tsx
2220
- import * as React15 from "react";
2019
+ import * as React13 from "react";
2221
2020
  import { ArrowUp as ArrowUp2, X as X2 } from "lucide-react";
2222
2021
  import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
2223
2022
  var ROOT_CLASS4 = "fourty-voice-island";
@@ -2230,8 +2029,8 @@ var ISLAND_FG = "var(--fourty-voice-island-fg, var(--color-surface))";
2230
2029
  var WAVE_COLOR = "var(--fourty-voice-wave, var(--fourty-voice-island-fg, var(--color-surface)))";
2231
2030
  function VoiceIsland({ transcript, onStop, onCancel, idleHint = "Listening\u2026" }) {
2232
2031
  const hasText = transcript.trim().length > 0;
2233
- const captionRef = React15.useRef(null);
2234
- React15.useEffect(() => {
2032
+ const captionRef = React13.useRef(null);
2033
+ React13.useEffect(() => {
2235
2034
  const el = captionRef.current;
2236
2035
  if (el === null) return;
2237
2036
  el.scrollTop = el.scrollHeight;
@@ -2352,7 +2151,7 @@ function VoiceIsland({ transcript, onStop, onCancel, idleHint = "Listening\u2026
2352
2151
  }
2353
2152
 
2354
2153
  // src/shell/BottomSheet.tsx
2355
- import * as React16 from "react";
2154
+ import * as React14 from "react";
2356
2155
  import {
2357
2156
  motion as motion2,
2358
2157
  animate as animate2,
@@ -2387,18 +2186,18 @@ function BottomSheet({
2387
2186
  const reduceMotion = useReducedMotion2() === true;
2388
2187
  const [sheetRef, sheetBounds] = useMeasure();
2389
2188
  const dragControls = useDragControls();
2390
- const [detent, setDetent] = React16.useState("peek");
2391
- const [bodyMounted, setBodyMounted] = React16.useState(false);
2189
+ const [detent, setDetent] = React14.useState("peek");
2190
+ const [bodyMounted, setBodyMounted] = React14.useState(false);
2392
2191
  const y = useMotionValue2(2e3);
2393
2192
  const fullPx = sheetBounds.height;
2394
2193
  const collapsedT = fullPx > 0 ? Math.max(0, fullPx - peekHeight) : 0;
2395
- const targetFor = React16.useCallback(
2194
+ const targetFor = React14.useCallback(
2396
2195
  (d) => d === "full" ? 0 : collapsedT,
2397
2196
  [collapsedT]
2398
2197
  );
2399
- const didInit = React16.useRef(false);
2400
- const prevDetent = React16.useRef(detent);
2401
- React16.useEffect(() => {
2198
+ const didInit = React14.useRef(false);
2199
+ const prevDetent = React14.useRef(detent);
2200
+ React14.useEffect(() => {
2402
2201
  if (collapsedT === 0 && fullPx === 0) return;
2403
2202
  const target = targetFor(detent);
2404
2203
  const isTransition = prevDetent.current !== detent;
@@ -2410,14 +2209,14 @@ function BottomSheet({
2410
2209
  y.set(target);
2411
2210
  didInit.current = true;
2412
2211
  }, [detent, targetFor, collapsedT, fullPx, reduceMotion, y]);
2413
- React16.useEffect(() => {
2212
+ React14.useEffect(() => {
2414
2213
  if (detent === "full") setBodyMounted(true);
2415
2214
  }, [detent]);
2416
- React16.useEffect(() => {
2215
+ React14.useEffect(() => {
2417
2216
  if (onDetentChange !== void 0) onDetentChange(detent);
2418
2217
  }, [detent, onDetentChange]);
2419
- const collapseInit = React16.useRef(true);
2420
- React16.useEffect(() => {
2218
+ const collapseInit = React14.useRef(true);
2219
+ React14.useEffect(() => {
2421
2220
  if (collapseInit.current) {
2422
2221
  collapseInit.current = false;
2423
2222
  return;
@@ -2438,7 +2237,7 @@ function BottomSheet({
2438
2237
  }
2439
2238
  dragControls.start(e);
2440
2239
  };
2441
- const dragConstraints = React16.useMemo(() => ({ top: 0, bottom: collapsedT }), [collapsedT]);
2240
+ const dragConstraints = React14.useMemo(() => ({ top: 0, bottom: collapsedT }), [collapsedT]);
2442
2241
  return /* @__PURE__ */ jsxs10(Fragment3, { children: [
2443
2242
  /* @__PURE__ */ jsx16(
2444
2243
  motion2.div,
@@ -2558,25 +2357,65 @@ function BottomSheet({
2558
2357
  ] });
2559
2358
  }
2560
2359
 
2360
+ // src/shell/TurnAsk.tsx
2361
+ import * as React15 from "react";
2362
+ import { turnAskSegments, useTurnAskReply } from "@40rty/ams-sdk";
2363
+ import { jsx as jsx17 } from "react/jsx-runtime";
2364
+ function TurnAsk({ ask, answerable }) {
2365
+ const reply = useTurnAskReply();
2366
+ return /* @__PURE__ */ jsx17("p", { className: "fourty-turn-ask", style: { margin: "0.75em 0 0" }, children: turnAskSegments(ask).map((segment, i) => {
2367
+ if (segment.kind === "text" || !answerable) return /* @__PURE__ */ jsx17(React15.Fragment, { children: segment.text }, i);
2368
+ return /* @__PURE__ */ jsx17(
2369
+ "button",
2370
+ {
2371
+ type: "button",
2372
+ className: "fourty-turn-ask__answer",
2373
+ onClick: (event) => {
2374
+ event.stopPropagation();
2375
+ reply(segment.text);
2376
+ },
2377
+ style: ANSWER_STYLE,
2378
+ children: segment.text
2379
+ },
2380
+ i
2381
+ );
2382
+ }) });
2383
+ }
2384
+ var ANSWER_STYLE = {
2385
+ font: "inherit",
2386
+ color: "inherit",
2387
+ // Buttons do not inherit these from the sentence by default.
2388
+ textTransform: "inherit",
2389
+ letterSpacing: "inherit",
2390
+ fontWeight: 600,
2391
+ background: "none",
2392
+ border: "none",
2393
+ padding: 0,
2394
+ cursor: "pointer",
2395
+ textDecoration: "underline",
2396
+ textDecorationThickness: "1.5px",
2397
+ textUnderlineOffset: "3px"
2398
+ };
2399
+
2561
2400
  // src/shell/TypedPlaceholder.tsx
2562
- import * as React17 from "react";
2563
- import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
2401
+ import * as React16 from "react";
2402
+ import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
2564
2403
  var TYPE_MS = 46;
2565
2404
  var DELETE_MS = 22;
2566
2405
  var HOLD_MS = 1600;
2567
2406
  var RESTART_MS = 420;
2568
2407
  function TypedPlaceholder({ entries, caret = true, className }) {
2569
2408
  const key = entries.join("\0");
2570
- const list = React17.useMemo(
2409
+ const list = React16.useMemo(
2571
2410
  () => entries.filter((e) => e.length > 0),
2572
2411
  // eslint-disable-next-line react-hooks/exhaustive-deps
2573
2412
  [key]
2574
2413
  );
2575
2414
  const reduced = useReducedMotion() === true;
2576
- const [index, setIndex] = React17.useState(0);
2577
- const [count, setCount] = React17.useState(0);
2578
- const [phase, setPhase] = React17.useState("typing");
2579
- const [seen, setSeen] = React17.useState(list);
2415
+ const [index, setIndex] = React16.useState(0);
2416
+ const [count, setCount] = React16.useState(0);
2417
+ const [phase, setPhase] = React16.useState("typing");
2418
+ const [seen, setSeen] = React16.useState(list);
2580
2419
  if (seen !== list) {
2581
2420
  setSeen(list);
2582
2421
  setIndex(0);
@@ -2584,7 +2423,7 @@ function TypedPlaceholder({ entries, caret = true, className }) {
2584
2423
  setPhase("typing");
2585
2424
  }
2586
2425
  const current = list.length > 0 ? list[index % list.length] : void 0;
2587
- React17.useEffect(() => {
2426
+ React16.useEffect(() => {
2588
2427
  if (reduced || current === void 0) return;
2589
2428
  const step = () => {
2590
2429
  if (phase === "typing") {
@@ -2613,12 +2452,18 @@ function TypedPlaceholder({ entries, caret = true, className }) {
2613
2452
  const shown = reduced ? current : current.slice(0, count);
2614
2453
  return /* @__PURE__ */ jsxs11("span", { className, "aria-hidden": "true", children: [
2615
2454
  shown,
2616
- caret && !reduced && /* @__PURE__ */ jsx17(AgentCaret, { inline: true })
2455
+ caret && !reduced && /* @__PURE__ */ jsx18(AgentCaret, { inline: true })
2617
2456
  ] });
2618
2457
  }
2619
2458
 
2459
+ // src/shell/index.ts
2460
+ import {
2461
+ usePromptComposer as usePromptComposer3
2462
+ } from "@40rty/ams-sdk";
2463
+
2620
2464
  // src/shell/ShellScaffold.tsx
2621
2465
  import React29 from "react";
2466
+ import { useDockState } from "@40rty/ams-sdk";
2622
2467
 
2623
2468
  // src/shell/slots.ts
2624
2469
  function resolveShellSlot(slot, dock) {
@@ -2629,15 +2474,15 @@ function resolveShellSlot(slot, dock) {
2629
2474
 
2630
2475
  // src/shell/mobile/DefaultMobileShell.tsx
2631
2476
  import * as React27 from "react";
2632
- import { useSessionState, useFourtySession as useFourtySession9 } from "@40rty/ams-sdk";
2477
+ import { useSessionState, useFourtySession as useFourtySession7 } from "@40rty/ams-sdk";
2633
2478
 
2634
2479
  // src/shell/mobile/MobileChrome.tsx
2635
2480
  import { useScrollContainerRef } from "@40rty/ams-sdk";
2636
2481
 
2637
2482
  // src/shell/ChromeSurface.tsx
2638
- import { jsx as jsx18 } from "react/jsx-runtime";
2483
+ import { jsx as jsx19 } from "react/jsx-runtime";
2639
2484
  function ChromeSurface({ visible, lifted }) {
2640
- return /* @__PURE__ */ jsx18(
2485
+ return /* @__PURE__ */ jsx19(
2641
2486
  "div",
2642
2487
  {
2643
2488
  "aria-hidden": true,
@@ -2679,7 +2524,7 @@ var ISLAND_CLEARANCE_BREATHING = 16 + 16;
2679
2524
  var MOBILE_CANVAS_BOTTOM_CLEARANCE = VOICE_ISLAND_HEIGHT + ISLAND_CLEARANCE_BREATHING;
2680
2525
 
2681
2526
  // src/shell/mobile/MobileChrome.tsx
2682
- import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
2527
+ import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
2683
2528
  function MobileChrome({ logo, launchers }) {
2684
2529
  const scrolled = useScrollThreshold(useScrollContainerRef(), 0);
2685
2530
  return /* @__PURE__ */ jsxs12(
@@ -2696,7 +2541,7 @@ function MobileChrome({ logo, launchers }) {
2696
2541
  zIndex: 50
2697
2542
  },
2698
2543
  children: [
2699
- /* @__PURE__ */ jsx19(ChromeSurface, { visible: true, lifted: scrolled }),
2544
+ /* @__PURE__ */ jsx20(ChromeSurface, { visible: true, lifted: scrolled }),
2700
2545
  /* @__PURE__ */ jsxs12(
2701
2546
  "div",
2702
2547
  {
@@ -2712,8 +2557,8 @@ function MobileChrome({ logo, launchers }) {
2712
2557
  pointerEvents: "none"
2713
2558
  },
2714
2559
  children: [
2715
- /* @__PURE__ */ jsx19("div", { style: { pointerEvents: "auto", minWidth: 0, display: "inline-flex", alignItems: "center", overflow: "hidden" }, children: logo }),
2716
- /* @__PURE__ */ jsx19("div", { style: { pointerEvents: "auto", flexShrink: 0, display: "inline-flex", alignItems: "center", gap: 2 }, children: launchers })
2560
+ /* @__PURE__ */ jsx20("div", { style: { pointerEvents: "auto", minWidth: 0, display: "inline-flex", alignItems: "center", overflow: "hidden" }, children: logo }),
2561
+ /* @__PURE__ */ jsx20("div", { style: { pointerEvents: "auto", flexShrink: 0, display: "inline-flex", alignItems: "center", gap: 2 }, children: launchers })
2717
2562
  ]
2718
2563
  }
2719
2564
  )
@@ -2723,8 +2568,8 @@ function MobileChrome({ logo, launchers }) {
2723
2568
  }
2724
2569
 
2725
2570
  // src/shell/mobile/MobileVoiceConsole.tsx
2726
- import * as React26 from "react";
2727
- import { useCurrentMessageIndex, useDisplayedLayout, useExclusiveOverlay, useFourtySession as useFourtySession8, useVoiceCapture as useVoiceCapture3, useScrollContainerRef as useScrollContainerRef2, useWakeLock } from "@40rty/ams-sdk";
2571
+ import * as React25 from "react";
2572
+ import { useCurrentMessageIndex, useDisplayedLayout, useExclusiveOverlay, useFourtySession as useFourtySession6, useVoiceCapture as useVoiceCapture2, useScrollContainerRef as useScrollContainerRef2, useWakeLock } from "@40rty/ams-sdk";
2728
2573
 
2729
2574
  // src/shell/mobile/turn-end-action.ts
2730
2575
  function turnEndAction(inputs) {
@@ -2737,19 +2582,23 @@ function turnEndAction(inputs) {
2737
2582
  return layoutSignature === startLayoutSignature ? "open" : "close";
2738
2583
  }
2739
2584
 
2585
+ // src/shell/mobile/MobileVoiceConsole.tsx
2586
+ import { useComposerAttachments } from "@40rty/ams-sdk";
2587
+
2740
2588
  // src/shell/mobile/MorphIsland.tsx
2741
- import * as React22 from "react";
2589
+ import * as React21 from "react";
2742
2590
  import { useComposerChipSelect } from "@40rty/ams-sdk";
2743
2591
 
2744
2592
  // src/shell/mobile/RestIsland.tsx
2745
- import * as React20 from "react";
2746
- import { useComposerPlaceholder as useComposerPlaceholder3, useFourtySession as useFourtySession7 } from "@40rty/ams-sdk";
2593
+ import * as React19 from "react";
2594
+ import { useComposerPlaceholder as useComposerPlaceholder3, useFourtySession as useFourtySession5 } from "@40rty/ams-sdk";
2747
2595
 
2748
2596
  // src/shell/mobile/IslandInputBar.tsx
2749
- import * as React19 from "react";
2597
+ import * as React18 from "react";
2598
+ import { usePromptComposer as usePromptComposer2 } from "@40rty/ams-sdk";
2750
2599
 
2751
2600
  // src/shell/mobile/IslandComposeGroup.tsx
2752
- import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
2601
+ import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
2753
2602
  function IslandComposeGroup({
2754
2603
  value,
2755
2604
  onValueChange,
@@ -2762,8 +2611,8 @@ function IslandComposeGroup({
2762
2611
  attachments,
2763
2612
  taRef
2764
2613
  }) {
2765
- return /* @__PURE__ */ jsxs13(Fragment4, { children: [
2766
- /* @__PURE__ */ jsx20(
2614
+ return /* @__PURE__ */ jsxs13(Fragment5, { children: [
2615
+ /* @__PURE__ */ jsx21(
2767
2616
  AttachButton,
2768
2617
  {
2769
2618
  onFiles: attachments.addFiles,
@@ -2772,7 +2621,7 @@ function IslandComposeGroup({
2772
2621
  }
2773
2622
  ),
2774
2623
  /* @__PURE__ */ jsxs13("div", { style: { position: "relative", flex: 1, minWidth: 0 }, children: [
2775
- /* @__PURE__ */ jsx20(
2624
+ /* @__PURE__ */ jsx21(
2776
2625
  "textarea",
2777
2626
  {
2778
2627
  ref: taRef,
@@ -2821,7 +2670,7 @@ function IslandComposeGroup({
2821
2670
  }
2822
2671
  }
2823
2672
  ),
2824
- placeholderAnimated === true && value.length === 0 && /* @__PURE__ */ jsx20(
2673
+ placeholderAnimated === true && value.length === 0 && /* @__PURE__ */ jsx21(
2825
2674
  "span",
2826
2675
  {
2827
2676
  "aria-hidden": "true",
@@ -2837,7 +2686,7 @@ function IslandComposeGroup({
2837
2686
  pointerEvents: "none",
2838
2687
  overflow: "hidden"
2839
2688
  },
2840
- children: /* @__PURE__ */ jsx20(AnimatedPlaceholder, { text: placeholder })
2689
+ children: /* @__PURE__ */ jsx21(AnimatedPlaceholder, { text: placeholder })
2841
2690
  }
2842
2691
  )
2843
2692
  ] })
@@ -2845,10 +2694,10 @@ function IslandComposeGroup({
2845
2694
  }
2846
2695
 
2847
2696
  // src/shell/mobile/use-blur-on-canvas-gesture.ts
2848
- import * as React18 from "react";
2697
+ import * as React17 from "react";
2849
2698
  var SURFACE = ".fourty-morph-surface";
2850
2699
  function useBlurOnCanvasGesture(taRef) {
2851
- React18.useEffect(() => {
2700
+ React17.useEffect(() => {
2852
2701
  const doc = document;
2853
2702
  const onGesture = (e) => {
2854
2703
  const field = taRef.current;
@@ -2872,7 +2721,7 @@ function useBlurOnCanvasGesture(taRef) {
2872
2721
  // src/shell/mobile/IslandNavButtons.tsx
2873
2722
  import { ChevronLeft, ChevronRight } from "lucide-react";
2874
2723
  import { useCanvasBack, useCanvasForward } from "@40rty/ams-sdk";
2875
- import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
2724
+ import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
2876
2725
  var STEP_BUTTON_STYLE = {
2877
2726
  flexShrink: 0,
2878
2727
  height: 40,
@@ -2889,8 +2738,8 @@ function IslandNavButtons() {
2889
2738
  const { canGoBack, goBack } = useCanvasBack();
2890
2739
  const { canGoForward, goForward } = useCanvasForward();
2891
2740
  if (!canGoBack && !canGoForward) return null;
2892
- return /* @__PURE__ */ jsxs14(Fragment5, { children: [
2893
- canGoBack && /* @__PURE__ */ jsx21(
2741
+ return /* @__PURE__ */ jsxs14(Fragment6, { children: [
2742
+ canGoBack && /* @__PURE__ */ jsx22(
2894
2743
  "button",
2895
2744
  {
2896
2745
  type: "button",
@@ -2898,10 +2747,10 @@ function IslandNavButtons() {
2898
2747
  onClick: goBack,
2899
2748
  "aria-label": "Back",
2900
2749
  style: STEP_BUTTON_STYLE,
2901
- children: /* @__PURE__ */ jsx21(ChevronLeft, { size: 19, strokeWidth: 1.8 })
2750
+ children: /* @__PURE__ */ jsx22(ChevronLeft, { size: 19, strokeWidth: 1.8 })
2902
2751
  }
2903
2752
  ),
2904
- canGoForward && /* @__PURE__ */ jsx21(
2753
+ canGoForward && /* @__PURE__ */ jsx22(
2905
2754
  "button",
2906
2755
  {
2907
2756
  type: "button",
@@ -2909,7 +2758,7 @@ function IslandNavButtons() {
2909
2758
  onClick: goForward,
2910
2759
  "aria-label": "Forward",
2911
2760
  style: STEP_BUTTON_STYLE,
2912
- children: /* @__PURE__ */ jsx21(ChevronRight, { size: 19, strokeWidth: 1.8 })
2761
+ children: /* @__PURE__ */ jsx22(ChevronRight, { size: 19, strokeWidth: 1.8 })
2913
2762
  }
2914
2763
  )
2915
2764
  ] });
@@ -2917,7 +2766,7 @@ function IslandNavButtons() {
2917
2766
 
2918
2767
  // src/shell/mobile/IslandTrailingAction.tsx
2919
2768
  import { AudioLines as AudioLines2, ArrowUp as ArrowUp3, Square as Square2 } from "lucide-react";
2920
- import { jsx as jsx22 } from "react/jsx-runtime";
2769
+ import { jsx as jsx23 } from "react/jsx-runtime";
2921
2770
  var STAMP_BUTTON_STYLE = {
2922
2771
  flexShrink: 0,
2923
2772
  marginLeft: 2,
@@ -2933,12 +2782,12 @@ var STAMP_BUTTON_STYLE = {
2933
2782
  };
2934
2783
  function IslandTrailingAction({ state }) {
2935
2784
  if (state.kind === "send") {
2936
- return /* @__PURE__ */ jsx22("button", { type: "button", className: "fourty-island-send", onClick: state.onSend, "aria-label": "Send", style: STAMP_BUTTON_STYLE, children: /* @__PURE__ */ jsx22(ArrowUp3, { size: 18, strokeWidth: 2.2 }) });
2785
+ return /* @__PURE__ */ jsx23("button", { type: "button", className: "fourty-island-send", onClick: state.onSend, "aria-label": "Send", style: STAMP_BUTTON_STYLE, children: /* @__PURE__ */ jsx23(ArrowUp3, { size: 18, strokeWidth: 2.2 }) });
2937
2786
  }
2938
2787
  if (state.kind === "stop") {
2939
- return /* @__PURE__ */ jsx22("button", { type: "button", className: "fourty-island-stop", onClick: state.onStop, "aria-label": "Stop", style: STAMP_BUTTON_STYLE, children: /* @__PURE__ */ jsx22(Square2, { size: 13, strokeWidth: 1.5, fill: "currentColor" }) });
2788
+ return /* @__PURE__ */ jsx23("button", { type: "button", className: "fourty-island-stop", onClick: state.onStop, "aria-label": "Stop", style: STAMP_BUTTON_STYLE, children: /* @__PURE__ */ jsx23(Square2, { size: 13, strokeWidth: 1.5, fill: "currentColor" }) });
2940
2789
  }
2941
- return /* @__PURE__ */ jsx22(
2790
+ return /* @__PURE__ */ jsx23(
2942
2791
  "button",
2943
2792
  {
2944
2793
  type: "button",
@@ -2957,13 +2806,13 @@ function IslandTrailingAction({ state }) {
2957
2806
  alignItems: "center",
2958
2807
  justifyContent: "center"
2959
2808
  },
2960
- children: /* @__PURE__ */ jsx22(AudioLines2, { size: 18, strokeWidth: 1.7 })
2809
+ children: /* @__PURE__ */ jsx23(AudioLines2, { size: 18, strokeWidth: 1.7 })
2961
2810
  }
2962
2811
  );
2963
2812
  }
2964
2813
 
2965
2814
  // src/shell/mobile/IslandInputBar.tsx
2966
- import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
2815
+ import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
2967
2816
  var NOTCH_PAD_LEFT = 8;
2968
2817
  function IslandInputBar({
2969
2818
  onSpeak,
@@ -2980,10 +2829,10 @@ function IslandInputBar({
2980
2829
  notchExpanded
2981
2830
  }) {
2982
2831
  const labels = useLabels();
2983
- const { value, setValue, canSend, submit, onPaste } = usePromptComposer({ attachments });
2832
+ const { value, setValue, canSend, submit, onPaste } = usePromptComposer2({ attachments });
2984
2833
  const showStop = isStreaming && !canSend;
2985
- const taRef = React19.useRef(null);
2986
- const send = React19.useCallback(() => {
2834
+ const taRef = React18.useRef(null);
2835
+ const send = React18.useCallback(() => {
2987
2836
  submit();
2988
2837
  taRef.current?.blur();
2989
2838
  }, [submit]);
@@ -3003,12 +2852,12 @@ function IslandInputBar({
3003
2852
  className: "fourty-island-bar",
3004
2853
  style: { display: "flex", alignItems: expanded ? "flex-end" : "center", gap: 2, minHeight: height, padding: "4px 6px" },
3005
2854
  children: [
3006
- !showStop && /* @__PURE__ */ jsx23(IslandNavButtons, {}),
2855
+ !showStop && /* @__PURE__ */ jsx24(IslandNavButtons, {}),
3007
2856
  showStop ? (
3008
2857
  // Non-scrolling shell: owns the tap; when expanded it carries the
3009
2858
  // bottom scroll-fade so that stays put while the read region below
3010
2859
  // it scrolls.
3011
- /* @__PURE__ */ jsx23(
2860
+ /* @__PURE__ */ jsx24(
3012
2861
  "div",
3013
2862
  {
3014
2863
  role: "button",
@@ -3025,7 +2874,7 @@ function IslandInputBar({
3025
2874
  className: "fourty-island-notch",
3026
2875
  "data-expanded": notchExpanded ? "true" : "false",
3027
2876
  style: { flex: 1, minWidth: 0, cursor: "pointer" },
3028
- children: /* @__PURE__ */ jsx23(
2877
+ children: /* @__PURE__ */ jsx24(
3029
2878
  "div",
3030
2879
  {
3031
2880
  className: "fourty-island-notch__read",
@@ -3035,7 +2884,7 @@ function IslandInputBar({
3035
2884
  )
3036
2885
  }
3037
2886
  )
3038
- ) : /* @__PURE__ */ jsx23(
2887
+ ) : /* @__PURE__ */ jsx24(
3039
2888
  IslandComposeGroup,
3040
2889
  {
3041
2890
  value,
@@ -3050,14 +2899,14 @@ function IslandInputBar({
3050
2899
  taRef
3051
2900
  }
3052
2901
  ),
3053
- /* @__PURE__ */ jsx23(IslandTrailingAction, { state: trailingState })
2902
+ /* @__PURE__ */ jsx24(IslandTrailingAction, { state: trailingState })
3054
2903
  ]
3055
2904
  }
3056
2905
  );
3057
2906
  }
3058
2907
 
3059
2908
  // src/shell/mobile/RestIsland.tsx
3060
- import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
2909
+ import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
3061
2910
  var SETTLE_EASE = [0.22, 1, 0.36, 1];
3062
2911
  var READ_FADE = { duration: 0.24, ease: SETTLE_EASE };
3063
2912
  function RestIsland({
@@ -3070,37 +2919,37 @@ function RestIsland({
3070
2919
  }) {
3071
2920
  const agentHint = useComposerPlaceholder3({ seed: placeholderExamples });
3072
2921
  const hasHint = typeof agentHint === "string" && agentHint.trim().length > 0;
3073
- const session = useFourtySession7();
2922
+ const session = useFourtySession5();
3074
2923
  const isStreaming = session.isSubmitting || session.isRunning;
3075
- const onStop = React20.useCallback(() => session.abortGeneration(), [session]);
3076
- const [notchExpanded, setNotchExpanded] = React20.useState(false);
3077
- React20.useEffect(() => {
2924
+ const onStop = React19.useCallback(() => session.abortGeneration(), [session]);
2925
+ const [notchExpanded, setNotchExpanded] = React19.useState(false);
2926
+ React19.useEffect(() => {
3078
2927
  if (!isStreaming) setNotchExpanded(false);
3079
2928
  }, [isStreaming]);
3080
- const onNotchClick = React20.useCallback(() => setNotchExpanded((v) => !v), []);
3081
- const notch = /* @__PURE__ */ jsx24(AgentPresenceWidget, { expanded: notchExpanded, suppressIdleFallback: true, staticBand: true });
3082
- const [focused, setFocused] = React20.useState(false);
3083
- const blurTimer = React20.useRef(null);
2929
+ const onNotchClick = React19.useCallback(() => setNotchExpanded((v) => !v), []);
2930
+ const notch = /* @__PURE__ */ jsx25(AgentPresenceWidget, { expanded: notchExpanded, suppressIdleFallback: true, staticBand: true });
2931
+ const [focused, setFocused] = React19.useState(false);
2932
+ const blurTimer = React19.useRef(null);
3084
2933
  const clearBlurTimer = () => {
3085
2934
  if (blurTimer.current !== null) {
3086
2935
  clearTimeout(blurTimer.current);
3087
2936
  blurTimer.current = null;
3088
2937
  }
3089
2938
  };
3090
- const onInputFocus = React20.useCallback(() => {
2939
+ const onInputFocus = React19.useCallback(() => {
3091
2940
  clearBlurTimer();
3092
2941
  setFocused(true);
3093
2942
  }, []);
3094
- const onInputBlur = React20.useCallback(() => {
2943
+ const onInputBlur = React19.useCallback(() => {
3095
2944
  clearBlurTimer();
3096
2945
  blurTimer.current = setTimeout(() => setFocused(false), 150);
3097
2946
  }, []);
3098
- React20.useEffect(() => clearBlurTimer, []);
3099
- React20.useEffect(() => {
2947
+ React19.useEffect(() => clearBlurTimer, []);
2948
+ React19.useEffect(() => {
3100
2949
  if (onComposeFocusChange === void 0) return;
3101
2950
  onComposeFocusChange(focused);
3102
2951
  }, [focused, onComposeFocusChange]);
3103
- React20.useEffect(() => {
2952
+ React19.useEffect(() => {
3104
2953
  if (!isStreaming) return;
3105
2954
  if (blurTimer.current !== null) {
3106
2955
  clearTimeout(blurTimer.current);
@@ -3121,7 +2970,7 @@ function RestIsland({
3121
2970
  color: "var(--fourty-island-fg, var(--color-on-dark, #FFFFFF))"
3122
2971
  },
3123
2972
  children: [
3124
- /* @__PURE__ */ jsx24(AnimatePresence, { initial: false, children: showBrief && /* @__PURE__ */ jsx24(
2973
+ /* @__PURE__ */ jsx25(AnimatePresence, { initial: false, children: showBrief && /* @__PURE__ */ jsx25(
3125
2974
  motion.div,
3126
2975
  {
3127
2976
  className: "fourty-island-dossier",
@@ -3129,11 +2978,11 @@ function RestIsland({
3129
2978
  animate: { opacity: 1 },
3130
2979
  exit: { opacity: 0 },
3131
2980
  transition: READ_FADE,
3132
- children: /* @__PURE__ */ jsx24(PresenceBriefRail, {})
2981
+ children: /* @__PURE__ */ jsx25(PresenceBriefRail, {})
3133
2982
  },
3134
2983
  "presence-brief"
3135
2984
  ) }),
3136
- /* @__PURE__ */ jsx24(AnimatePresence, { initial: false, children: focused && /* @__PURE__ */ jsx24(
2985
+ /* @__PURE__ */ jsx25(AnimatePresence, { initial: false, children: focused && /* @__PURE__ */ jsx25(
3137
2986
  motion.div,
3138
2987
  {
3139
2988
  className: "fourty-island-chips",
@@ -3141,7 +2990,7 @@ function RestIsland({
3141
2990
  animate: { opacity: 1 },
3142
2991
  exit: { opacity: 0 },
3143
2992
  transition: READ_FADE,
3144
- children: /* @__PURE__ */ jsx24(
2993
+ children: /* @__PURE__ */ jsx25(
3145
2994
  ComposerChipStrip,
3146
2995
  {
3147
2996
  orientation: "row",
@@ -3154,8 +3003,8 @@ function RestIsland({
3154
3003
  },
3155
3004
  "chips"
3156
3005
  ) }),
3157
- /* @__PURE__ */ jsx24(AttachmentStrip, { attachments: attachments.attachments, onRemove: attachments.remove }),
3158
- /* @__PURE__ */ jsx24(
3006
+ /* @__PURE__ */ jsx25(AttachmentStrip, { attachments: attachments.attachments, onRemove: attachments.remove }),
3007
+ /* @__PURE__ */ jsx25(
3159
3008
  IslandInputBar,
3160
3009
  {
3161
3010
  onSpeak,
@@ -3205,7 +3054,7 @@ function nearestDetent(current, velocityY, travelPx, ladder) {
3205
3054
  }
3206
3055
 
3207
3056
  // src/shell/mobile/use-sheet-fold-gesture.ts
3208
- import * as React21 from "react";
3057
+ import * as React20 from "react";
3209
3058
  function findVerticalScrollerAtTouch(target) {
3210
3059
  let el = target instanceof HTMLElement ? target : null;
3211
3060
  while (el !== null && !el.classList.contains("fourty-morph-surface")) {
@@ -3224,13 +3073,13 @@ function isScrollerAtTop(scroller) {
3224
3073
  return scroller.scrollTop <= 0;
3225
3074
  }
3226
3075
  function useSheetFoldGesture({ sheetFaceRef, atSheet, travel, progress, settle }) {
3227
- const atSheetRef = React21.useRef(atSheet);
3076
+ const atSheetRef = React20.useRef(atSheet);
3228
3077
  atSheetRef.current = atSheet;
3229
- const travelRef = React21.useRef(travel);
3078
+ const travelRef = React20.useRef(travel);
3230
3079
  travelRef.current = travel;
3231
- const settleRef = React21.useRef(settle);
3080
+ const settleRef = React20.useRef(settle);
3232
3081
  settleRef.current = settle;
3233
- React21.useEffect(() => {
3082
+ React20.useEffect(() => {
3234
3083
  const el = sheetFaceRef.current;
3235
3084
  if (el === null) return;
3236
3085
  let tracking = false;
@@ -3319,7 +3168,7 @@ function useSheetFoldGesture({ sheetFaceRef, atSheet, travel, progress, settle }
3319
3168
  }
3320
3169
 
3321
3170
  // src/shell/mobile/MorphIsland.tsx
3322
- import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
3171
+ import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
3323
3172
  var SNAP_SPRING = { type: "spring", stiffness: 380, damping: 40, mass: 0.9 };
3324
3173
  var FLUSH_EASE = [0.22, 1, 0.36, 1];
3325
3174
  var FLUSH_SETTLE = { duration: 0.24, ease: FLUSH_EASE };
@@ -3327,7 +3176,7 @@ var FOLD_SETTLE = { duration: 0.25, ease: FLUSH_EASE };
3327
3176
  var FOLD_CONTENT_OUT = 0.3;
3328
3177
  var FOLD_GLYPH_IN = 0.34;
3329
3178
  var ISLAND_EDGE_LAYER = "var(--fourty-island-edge, 0 0 0 0 transparent)";
3330
- var DEFAULT_COLLAPSED_MARK = /* @__PURE__ */ jsx25("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.75, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx25("rect", { x: "2", y: "9", width: "20", height: "6", rx: "3" }) });
3179
+ var DEFAULT_COLLAPSED_MARK = /* @__PURE__ */ jsx26("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.75, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx26("rect", { x: "2", y: "9", width: "20", height: "6", rx: "3" }) });
3331
3180
  var NACRE_PAINT_ID = "fourty-island-nacre";
3332
3181
  var RING_GAP = 2;
3333
3182
  var NACRE_PERIOD_S = 10;
@@ -3345,7 +3194,7 @@ function NacreDefs({ animate: animated }) {
3345
3194
  treat as having no timeline to run, and this surface's primary target is
3346
3195
  iOS Safari — the one engine with a history of doing so. The element costs
3347
3196
  a pixel nobody will ever see. */
3348
- /* @__PURE__ */ jsx25(
3197
+ /* @__PURE__ */ jsx26(
3349
3198
  "svg",
3350
3199
  {
3351
3200
  width: "1",
@@ -3353,7 +3202,7 @@ function NacreDefs({ animate: animated }) {
3353
3202
  "aria-hidden": true,
3354
3203
  focusable: "false",
3355
3204
  style: { position: "absolute", width: 1, height: 1, overflow: "hidden", pointerEvents: "none" },
3356
- children: /* @__PURE__ */ jsx25("defs", { children: /* @__PURE__ */ jsxs17(
3205
+ children: /* @__PURE__ */ jsx26("defs", { children: /* @__PURE__ */ jsxs17(
3357
3206
  "linearGradient",
3358
3207
  {
3359
3208
  id: NACRE_PAINT_ID,
@@ -3365,21 +3214,21 @@ function NacreDefs({ animate: animated }) {
3365
3214
  spreadMethod: "pad",
3366
3215
  gradientTransform: "translate(-44 0)",
3367
3216
  children: [
3368
- /* @__PURE__ */ jsx25("stop", { offset: "0%", stopColor: "#FFFFFF" }),
3369
- /* @__PURE__ */ jsx25("stop", { offset: "18%", stopColor: "#FFFFFF" }),
3370
- /* @__PURE__ */ jsx25("stop", { offset: "32%", stopColor: "#FFC2E2" }),
3371
- /* @__PURE__ */ jsx25("stop", { offset: "44%", stopColor: "#FFE3AE" }),
3372
- /* @__PURE__ */ jsx25("stop", { offset: "56%", stopColor: "#6FE9D2" }),
3373
- /* @__PURE__ */ jsx25("stop", { offset: "68%", stopColor: "#9FB4FF" }),
3374
- /* @__PURE__ */ jsx25("stop", { offset: "82%", stopColor: "#FFFFFF" }),
3375
- /* @__PURE__ */ jsx25("stop", { offset: "100%", stopColor: "#FFFFFF" }),
3217
+ /* @__PURE__ */ jsx26("stop", { offset: "0%", stopColor: "#FFFFFF" }),
3218
+ /* @__PURE__ */ jsx26("stop", { offset: "18%", stopColor: "#FFFFFF" }),
3219
+ /* @__PURE__ */ jsx26("stop", { offset: "32%", stopColor: "#FFC2E2" }),
3220
+ /* @__PURE__ */ jsx26("stop", { offset: "44%", stopColor: "#FFE3AE" }),
3221
+ /* @__PURE__ */ jsx26("stop", { offset: "56%", stopColor: "#6FE9D2" }),
3222
+ /* @__PURE__ */ jsx26("stop", { offset: "68%", stopColor: "#9FB4FF" }),
3223
+ /* @__PURE__ */ jsx26("stop", { offset: "82%", stopColor: "#FFFFFF" }),
3224
+ /* @__PURE__ */ jsx26("stop", { offset: "100%", stopColor: "#FFFFFF" }),
3376
3225
  animated && /* Off one edge to off the other in the first fifth of the cycle,
3377
3226
  then parked for the remaining eight seconds — the same proportion
3378
3227
  the old border sheen settled on, for the same reason: a light
3379
3228
  that is always moving is one nobody notices. The end positions
3380
3229
  put the coloured span clear of the 0-24 box, so the eight quiet
3381
3230
  seconds are a mark that is exactly plain white. */
3382
- /* @__PURE__ */ jsx25(
3231
+ /* @__PURE__ */ jsx26(
3383
3232
  "animateTransform",
3384
3233
  {
3385
3234
  attributeName: "gradientTransform",
@@ -3398,8 +3247,8 @@ function NacreDefs({ animate: animated }) {
3398
3247
  );
3399
3248
  }
3400
3249
  function usePrefersReducedMotion() {
3401
- const [reduced, setReduced] = React22.useState(false);
3402
- React22.useEffect(() => {
3250
+ const [reduced, setReduced] = React21.useState(false);
3251
+ React21.useEffect(() => {
3403
3252
  const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
3404
3253
  setReduced(mq.matches);
3405
3254
  const onChange = (e) => setReduced(e.matches);
@@ -3412,20 +3261,20 @@ var SHEET_TOP_INSET = MOBILE_TOPBAR_HEIGHT;
3412
3261
  var SHEET_SIDE_INSET = 8;
3413
3262
  var ISLAND_FALLBACK_H = VOICE_ISLAND_HEIGHT + 20;
3414
3263
  var GRIP_H = ISLAND_GRIP_H;
3415
- var MorphIsland = React22.forwardRef(
3264
+ var MorphIsland = React21.forwardRef(
3416
3265
  function MorphIsland2({ placeholder, placeholderExamples, attachments, onSpeak, folded, restGapPx, onSummon, historySheet, bottomOffset, enterFromFloor = false, sheetFlush, onOpenChange, onIslandHeightChange, onComposeFocusChange, collapsedMark }, ref) {
3417
3266
  const onChipSelect = useComposerChipSelect();
3418
3267
  const reducedMotion = usePrefersReducedMotion();
3419
3268
  const progress = useMotionValue(0);
3420
- const dockRef = React22.useRef(null);
3421
- const islandFaceRef = React22.useRef(null);
3422
- const gripRef = React22.useRef(null);
3423
- const sheetFaceRef = React22.useRef(null);
3424
- const [vw, setVw] = React22.useState(0);
3425
- const [vh, setVh] = React22.useState(0);
3426
- const [islandH, setIslandH] = React22.useState(ISLAND_FALLBACK_H);
3427
- const [gripH, setGripH] = React22.useState(GRIP_H);
3428
- React22.useEffect(() => {
3269
+ const dockRef = React21.useRef(null);
3270
+ const islandFaceRef = React21.useRef(null);
3271
+ const gripRef = React21.useRef(null);
3272
+ const sheetFaceRef = React21.useRef(null);
3273
+ const [vw, setVw] = React21.useState(0);
3274
+ const [vh, setVh] = React21.useState(0);
3275
+ const [islandH, setIslandH] = React21.useState(ISLAND_FALLBACK_H);
3276
+ const [gripH, setGripH] = React21.useState(GRIP_H);
3277
+ React21.useEffect(() => {
3429
3278
  const el = dockRef.current;
3430
3279
  if (el === null) return;
3431
3280
  const view = el.ownerDocument.defaultView;
@@ -3437,7 +3286,7 @@ var MorphIsland = React22.forwardRef(
3437
3286
  ro.observe(el);
3438
3287
  return () => ro.disconnect();
3439
3288
  }, []);
3440
- React22.useEffect(() => {
3289
+ React21.useEffect(() => {
3441
3290
  const el = islandFaceRef.current;
3442
3291
  if (el === null) return;
3443
3292
  const view = el.ownerDocument.defaultView;
@@ -3452,7 +3301,7 @@ var MorphIsland = React22.forwardRef(
3452
3301
  ro.observe(el);
3453
3302
  return () => ro.disconnect();
3454
3303
  }, [onIslandHeightChange]);
3455
- React22.useEffect(() => {
3304
+ React21.useEffect(() => {
3456
3305
  const el = gripRef.current;
3457
3306
  if (el === null) return;
3458
3307
  const view = el.ownerDocument.defaultView;
@@ -3464,9 +3313,9 @@ var MorphIsland = React22.forwardRef(
3464
3313
  ro.observe(el);
3465
3314
  return () => ro.disconnect();
3466
3315
  }, []);
3467
- const floorProbeRef = React22.useRef(null);
3468
- const [floorGapPx, setFloorGapPx] = React22.useState(0);
3469
- React22.useEffect(() => {
3316
+ const floorProbeRef = React21.useRef(null);
3317
+ const [floorGapPx, setFloorGapPx] = React21.useState(0);
3318
+ React21.useEffect(() => {
3470
3319
  const el = floorProbeRef.current;
3471
3320
  if (el === null) return;
3472
3321
  const view = el.ownerDocument.defaultView;
@@ -3475,8 +3324,8 @@ var MorphIsland = React22.forwardRef(
3475
3324
  ro.observe(el);
3476
3325
  return () => ro.disconnect();
3477
3326
  }, []);
3478
- const [slabRadius, setSlabRadius] = React22.useState(0);
3479
- React22.useLayoutEffect(() => {
3327
+ const [slabRadius, setSlabRadius] = React21.useState(0);
3328
+ React21.useLayoutEffect(() => {
3480
3329
  const el = floorProbeRef.current;
3481
3330
  if (el === null) return;
3482
3331
  const view = el.ownerDocument.defaultView;
@@ -3484,8 +3333,8 @@ var MorphIsland = React22.forwardRef(
3484
3333
  const r = Number.parseFloat(view.getComputedStyle(el).borderTopLeftRadius);
3485
3334
  if (Number.isFinite(r) && r !== slabRadius) setSlabRadius(r);
3486
3335
  }, [slabRadius, vw]);
3487
- const [collapsedRadius, setCollapsedRadius] = React22.useState(ISLAND_COLLAPSED_H / 2);
3488
- React22.useLayoutEffect(() => {
3336
+ const [collapsedRadius, setCollapsedRadius] = React21.useState(ISLAND_COLLAPSED_H / 2);
3337
+ React21.useLayoutEffect(() => {
3489
3338
  const el = floorProbeRef.current;
3490
3339
  if (el === null) return;
3491
3340
  const view = el.ownerDocument.defaultView;
@@ -3499,23 +3348,23 @@ var MorphIsland = React22.forwardRef(
3499
3348
  const collapsedInset = vw > 0 ? Math.max(0, (vw - ISLAND_COLLAPSED_W) / 2) : sideInset;
3500
3349
  const sheetH = vh > 0 ? Math.max(islandH, vh - SHEET_TOP_INSET) : islandH;
3501
3350
  const collapsedH = islandH + gripH;
3502
- const ladder = React22.useMemo(
3351
+ const ladder = React21.useMemo(
3503
3352
  () => detentLadder(collapsedH, sheetH),
3504
3353
  [collapsedH, sheetH]
3505
3354
  );
3506
3355
  const firstOpen = ladder.length > 1 ? ladder[1] : 1;
3507
- const dim2 = React22.useMemo(() => dimSpan(ladder), [ladder]);
3356
+ const dim2 = React21.useMemo(() => dimSpan(ladder), [ladder]);
3508
3357
  const height = useTransform(progress, [0, 1], [collapsedH, sheetH]);
3509
3358
  const foldT = useMotionValue(folded ? 1 : 0);
3510
- React22.useEffect(() => {
3359
+ React21.useEffect(() => {
3511
3360
  const controls = animate(foldT, folded ? 1 : 0, FOLD_SETTLE);
3512
3361
  return () => controls.stop();
3513
3362
  }, [foldT, folded]);
3514
- const [folding, setFolding] = React22.useState(folded);
3363
+ const [folding, setFolding] = React21.useState(folded);
3515
3364
  useMotionValueEvent(foldT, "change", (v) => setFolding(v > 0));
3516
3365
  const entryTravel = collapsedH + restGapPx;
3517
3366
  const entryT = useMotionValue(enterFromFloor ? 1 : 0);
3518
- React22.useEffect(() => {
3367
+ React21.useEffect(() => {
3519
3368
  if (!enterFromFloor) return;
3520
3369
  const controls = animate(entryT, 0, ISLAND_ENTER_SPRING);
3521
3370
  return () => controls.stop();
@@ -3536,7 +3385,7 @@ var MorphIsland = React22.forwardRef(
3536
3385
  });
3537
3386
  const foldContentOut = useTransform(foldT, (f) => 1 - clamp01(f / FOLD_CONTENT_OUT));
3538
3387
  const flushMax = useMotionValue(sheetFlush ? floorGapPx : 0);
3539
- React22.useEffect(() => {
3388
+ React21.useEffect(() => {
3540
3389
  const controls = animate(flushMax, sheetFlush ? floorGapPx : 0, FLUSH_SETTLE);
3541
3390
  return () => controls.stop();
3542
3391
  }, [flushMax, sheetFlush, floorGapPx]);
@@ -3570,9 +3419,9 @@ var MorphIsland = React22.forwardRef(
3570
3419
  ([o, f]) => (1 - clamp01(o / 0.34)) * clamp01((clamp01(f) - FOLD_GLYPH_IN) / (1 - FOLD_GLYPH_IN))
3571
3420
  );
3572
3421
  const scrimOpacity = useTransform(progress, [dim2.from, dim2.to], [0, 0.42], { clamp: true });
3573
- const [atSheet, setAtSheet] = React22.useState(false);
3574
- const [modal, setModal] = React22.useState(false);
3575
- const [active, setActive] = React22.useState(false);
3422
+ const [atSheet, setAtSheet] = React21.useState(false);
3423
+ const [modal, setModal] = React21.useState(false);
3424
+ const [active, setActive] = React21.useState(false);
3576
3425
  useMotionValueEvent(progress, "change", (v) => {
3577
3426
  setAtSheet((prev) => {
3578
3427
  const n = v > firstOpen * 0.5;
@@ -3587,10 +3436,10 @@ var MorphIsland = React22.forwardRef(
3587
3436
  return prev === n ? prev : n;
3588
3437
  });
3589
3438
  });
3590
- React22.useEffect(() => {
3439
+ React21.useEffect(() => {
3591
3440
  onOpenChange?.(atSheet);
3592
3441
  }, [atSheet, onOpenChange]);
3593
- React22.useLayoutEffect(() => {
3442
+ React21.useLayoutEffect(() => {
3594
3443
  if (active) return;
3595
3444
  const face = islandFaceRef.current;
3596
3445
  if (face !== null && face.offsetHeight > 0 && face.offsetHeight !== islandH) {
@@ -3603,7 +3452,7 @@ var MorphIsland = React22.forwardRef(
3603
3452
  }
3604
3453
  });
3605
3454
  useScrollLock(modal, dockRef);
3606
- const snapTo = React22.useCallback((target) => {
3455
+ const snapTo = React21.useCallback((target) => {
3607
3456
  if (target === 0) {
3608
3457
  const face = sheetFaceRef.current;
3609
3458
  if (face !== null) {
@@ -3613,11 +3462,11 @@ var MorphIsland = React22.forwardRef(
3613
3462
  }
3614
3463
  animate(progress, target, SNAP_SPRING);
3615
3464
  }, [progress]);
3616
- React22.useImperativeHandle(ref, () => ({
3465
+ React21.useImperativeHandle(ref, () => ({
3617
3466
  open: () => snapTo(1),
3618
3467
  close: () => snapTo(0)
3619
3468
  }), [snapTo]);
3620
- const panStart = React22.useRef(0);
3469
+ const panStart = React21.useRef(0);
3621
3470
  const travel = Math.max(1, sheetH - islandH);
3622
3471
  const onPanStart = () => {
3623
3472
  panStart.current = progress.get();
@@ -3626,13 +3475,13 @@ var MorphIsland = React22.forwardRef(
3626
3475
  const next = panStart.current + -info.offset.y / travel;
3627
3476
  progress.set(Math.min(1, Math.max(0, next)));
3628
3477
  };
3629
- const settle = React22.useCallback((velocityY) => {
3478
+ const settle = React21.useCallback((velocityY) => {
3630
3479
  snapTo(nearestDetent(progress.get(), velocityY, travel, ladder));
3631
3480
  }, [snapTo, progress, travel, ladder]);
3632
3481
  const onPanEnd = (_e, info) => {
3633
3482
  settle(info.velocity.y);
3634
3483
  };
3635
- const islandFacePanEngaged = React22.useRef(false);
3484
+ const islandFacePanEngaged = React21.useRef(false);
3636
3485
  const onIslandFacePanStart = (e) => {
3637
3486
  const target = e.target instanceof HTMLElement ? e.target : null;
3638
3487
  const onControl = target !== null && target.closest(
@@ -3661,7 +3510,7 @@ var MorphIsland = React22.forwardRef(
3661
3510
  transition: { duration: 0.18, ease: [0.22, 1, 0.36, 1] },
3662
3511
  style: { position: "fixed", inset: 0, pointerEvents: "none", zIndex: 60 },
3663
3512
  children: [
3664
- /* @__PURE__ */ jsx25(
3513
+ /* @__PURE__ */ jsx26(
3665
3514
  "div",
3666
3515
  {
3667
3516
  ref: floorProbeRef,
@@ -3678,7 +3527,7 @@ var MorphIsland = React22.forwardRef(
3678
3527
  }
3679
3528
  }
3680
3529
  ),
3681
- /* @__PURE__ */ jsx25(
3530
+ /* @__PURE__ */ jsx26(
3682
3531
  motion.div,
3683
3532
  {
3684
3533
  "aria-hidden": true,
@@ -3692,7 +3541,7 @@ var MorphIsland = React22.forwardRef(
3692
3541
  }
3693
3542
  }
3694
3543
  ),
3695
- /* @__PURE__ */ jsx25(
3544
+ /* @__PURE__ */ jsx26(
3696
3545
  motion.div,
3697
3546
  {
3698
3547
  className: "fourty-island-aura",
@@ -3712,7 +3561,7 @@ var MorphIsland = React22.forwardRef(
3712
3561
  }
3713
3562
  }
3714
3563
  ),
3715
- /* @__PURE__ */ jsx25(
3564
+ /* @__PURE__ */ jsx26(
3716
3565
  motion.div,
3717
3566
  {
3718
3567
  className: "fourty-island-ring",
@@ -3794,7 +3643,7 @@ var MorphIsland = React22.forwardRef(
3794
3643
  flexDirection: "column"
3795
3644
  },
3796
3645
  children: [
3797
- /* @__PURE__ */ jsx25(
3646
+ /* @__PURE__ */ jsx26(
3798
3647
  motion.div,
3799
3648
  {
3800
3649
  "aria-hidden": true,
@@ -3808,7 +3657,7 @@ var MorphIsland = React22.forwardRef(
3808
3657
  }
3809
3658
  }
3810
3659
  ),
3811
- /* @__PURE__ */ jsx25(
3660
+ /* @__PURE__ */ jsx26(
3812
3661
  motion.div,
3813
3662
  {
3814
3663
  "aria-hidden": true,
@@ -3822,7 +3671,7 @@ var MorphIsland = React22.forwardRef(
3822
3671
  }
3823
3672
  }
3824
3673
  ),
3825
- /* @__PURE__ */ jsx25(
3674
+ /* @__PURE__ */ jsx26(
3826
3675
  motion.div,
3827
3676
  {
3828
3677
  ref: gripRef,
@@ -3857,7 +3706,7 @@ var MorphIsland = React22.forwardRef(
3857
3706
  pointerEvents: folded ? "none" : "auto"
3858
3707
  },
3859
3708
  "aria-hidden": folded ? true : void 0,
3860
- children: /* @__PURE__ */ jsx25(
3709
+ children: /* @__PURE__ */ jsx26(
3861
3710
  "svg",
3862
3711
  {
3863
3712
  "aria-hidden": true,
@@ -3865,7 +3714,7 @@ var MorphIsland = React22.forwardRef(
3865
3714
  viewBox: "0 0 32 5",
3866
3715
  fill: "none",
3867
3716
  preserveAspectRatio: "none",
3868
- children: /* @__PURE__ */ jsx25(
3717
+ children: /* @__PURE__ */ jsx26(
3869
3718
  "polyline",
3870
3719
  {
3871
3720
  points: "1,4 16,1 31,4",
@@ -3880,7 +3729,7 @@ var MorphIsland = React22.forwardRef(
3880
3729
  )
3881
3730
  }
3882
3731
  ),
3883
- /* @__PURE__ */ jsx25(
3732
+ /* @__PURE__ */ jsx26(
3884
3733
  motion.div,
3885
3734
  {
3886
3735
  ref: sheetFaceRef,
@@ -3903,7 +3752,7 @@ var MorphIsland = React22.forwardRef(
3903
3752
  children: historySheet(() => snapTo(0))
3904
3753
  }
3905
3754
  ),
3906
- /* @__PURE__ */ jsx25(
3755
+ /* @__PURE__ */ jsx26(
3907
3756
  motion.div,
3908
3757
  {
3909
3758
  ref: islandFaceRef,
@@ -3930,7 +3779,7 @@ var MorphIsland = React22.forwardRef(
3930
3779
  touchAction: "pan-x",
3931
3780
  zIndex: 1
3932
3781
  },
3933
- children: /* @__PURE__ */ jsx25(
3782
+ children: /* @__PURE__ */ jsx26(
3934
3783
  RestIsland,
3935
3784
  {
3936
3785
  placeholder,
@@ -3961,7 +3810,7 @@ var MorphIsland = React22.forwardRef(
3961
3810
  },
3962
3811
  "data-folded": folded ? "true" : "false",
3963
3812
  children: [
3964
- /* @__PURE__ */ jsx25(NacreDefs, { animate: !reducedMotion }),
3813
+ /* @__PURE__ */ jsx26(NacreDefs, { animate: !reducedMotion }),
3965
3814
  collapsedMark !== void 0 ? collapsedMark : DEFAULT_COLLAPSED_MARK
3966
3815
  ]
3967
3816
  }
@@ -3976,25 +3825,25 @@ var MorphIsland = React22.forwardRef(
3976
3825
  );
3977
3826
 
3978
3827
  // src/shell/mobile/hero-entry-point.tsx
3979
- import * as React23 from "react";
3980
- import { jsx as jsx26 } from "react/jsx-runtime";
3981
- var HeroEntryPointContext = React23.createContext(null);
3828
+ import * as React22 from "react";
3829
+ import { jsx as jsx27 } from "react/jsx-runtime";
3830
+ var HeroEntryPointContext = React22.createContext(null);
3982
3831
  function HeroEntryPointProvider({
3983
3832
  claim,
3984
3833
  claimed,
3985
3834
  children
3986
3835
  }) {
3987
- const value = React23.useMemo(() => ({ claim, claimed }), [claim, claimed]);
3988
- return /* @__PURE__ */ jsx26(HeroEntryPointContext.Provider, { value, children });
3836
+ const value = React22.useMemo(() => ({ claim, claimed }), [claim, claimed]);
3837
+ return /* @__PURE__ */ jsx27(HeroEntryPointContext.Provider, { value, children });
3989
3838
  }
3990
3839
  function useHeroEntryPointVisible() {
3991
- const ctx = React23.useContext(HeroEntryPointContext);
3840
+ const ctx = React22.useContext(HeroEntryPointContext);
3992
3841
  return ctx !== null && ctx.claimed;
3993
3842
  }
3994
3843
  function useClaimHeroEntryPoint(active) {
3995
- const ctx = React23.useContext(HeroEntryPointContext);
3844
+ const ctx = React22.useContext(HeroEntryPointContext);
3996
3845
  const claim = ctx === null ? null : ctx.claim;
3997
- React23.useEffect(() => {
3846
+ React22.useEffect(() => {
3998
3847
  if (claim === null || !active) return;
3999
3848
  claim(1);
4000
3849
  return () => claim(-1);
@@ -4003,8 +3852,8 @@ function useClaimHeroEntryPoint(active) {
4003
3852
  function useOnScreen(ref, opts) {
4004
3853
  const enter = opts !== void 0 && opts.enter !== void 0 ? opts.enter : 0.9;
4005
3854
  const exit = opts !== void 0 && opts.exit !== void 0 ? opts.exit : 0.25;
4006
- const [on, setOn] = React23.useState(true);
4007
- React23.useEffect(() => {
3855
+ const [on, setOn] = React22.useState(true);
3856
+ React22.useEffect(() => {
4008
3857
  const el = ref.current;
4009
3858
  if (el === null || typeof IntersectionObserver === "undefined") return;
4010
3859
  const observer = new IntersectionObserver(
@@ -4023,12 +3872,12 @@ function useOnScreen(ref, opts) {
4023
3872
  }
4024
3873
 
4025
3874
  // src/shell/mobile/use-island-fold-scroll.ts
4026
- import * as React24 from "react";
3875
+ import * as React23 from "react";
4027
3876
  import { isNavScrollActive } from "@40rty/ams-sdk";
4028
3877
  var SCROLL_IDLE_MS = 240;
4029
3878
  function useIslandFoldScroll(scrollRef) {
4030
- const [scrolling, setScrolling] = React24.useState(false);
4031
- React24.useEffect(() => {
3879
+ const [scrolling, setScrolling] = React23.useState(false);
3880
+ React23.useEffect(() => {
4032
3881
  const el = scrollRef.current;
4033
3882
  if (el === null) return;
4034
3883
  let timer = null;
@@ -4049,10 +3898,10 @@ function useIslandFoldScroll(scrollRef) {
4049
3898
  }
4050
3899
 
4051
3900
  // src/shell/mobile/use-keyboard-inset.ts
4052
- import * as React25 from "react";
3901
+ import * as React24 from "react";
4053
3902
  function useKeyboardInset(ref) {
4054
- const [inset, setInset] = React25.useState(0);
4055
- React25.useEffect(() => {
3903
+ const [inset, setInset] = React24.useState(0);
3904
+ React24.useEffect(() => {
4056
3905
  const el = ref.current;
4057
3906
  if (el === null) return;
4058
3907
  const doc = el.ownerDocument;
@@ -4077,21 +3926,21 @@ function useKeyboardInset(ref) {
4077
3926
  }
4078
3927
 
4079
3928
  // src/shell/mobile/MobileVoiceConsole.tsx
4080
- import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
3929
+ import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
4081
3930
  function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, onIslandHeightChange, enterFromFloor, collapsedMark }) {
4082
- const session = useFourtySession8();
3931
+ const session = useFourtySession6();
4083
3932
  const layout = useDisplayedLayout();
4084
- const [mode, setMode] = React26.useState("rest");
3933
+ const [mode, setMode] = React25.useState("rest");
4085
3934
  const attach = useComposerAttachments();
4086
- const morphRef = React26.useRef(null);
4087
- const [threadRelandKey, setThreadRelandKey] = React26.useState(0);
4088
- const [sheetOpen, setSheetOpen] = React26.useState(false);
3935
+ const morphRef = React25.useRef(null);
3936
+ const [threadRelandKey, setThreadRelandKey] = React25.useState(0);
3937
+ const [sheetOpen, setSheetOpen] = React25.useState(false);
4089
3938
  useExclusiveOverlay(
4090
3939
  "conversation-sheet",
4091
3940
  sheetOpen,
4092
- React26.useCallback(() => morphRef.current?.close(), [])
3941
+ React25.useCallback(() => morphRef.current?.close(), [])
4093
3942
  );
4094
- const anchorRef = React26.useRef(null);
3943
+ const anchorRef = React25.useRef(null);
4095
3944
  const chromeInset = useKeyboardInset(anchorRef);
4096
3945
  const keyboardLikely = chromeInset > KEYBOARD_LIKELY_MIN_PX;
4097
3946
  const restGap = keyboardLikely ? ISLAND_KEYBOARD_GAP : ISLAND_BOTTOM_GAP;
@@ -4099,20 +3948,20 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4099
3948
  const scrollRef = useScrollContainerRef2();
4100
3949
  const { atTop, collapsed } = useScrollDirection({ container: scrollRef });
4101
3950
  const { scrolling } = useIslandFoldScroll(scrollRef);
4102
- const handleIslandHeightChange = React26.useCallback(
3951
+ const handleIslandHeightChange = React25.useCallback(
4103
3952
  (height) => {
4104
3953
  onIslandHeightChange?.(height);
4105
3954
  },
4106
3955
  [onIslandHeightChange]
4107
3956
  );
4108
3957
  const working = session.isRunning || session.isSubmitting;
4109
- const [summoned, setSummoned] = React26.useState(enterFromFloor === true);
4110
- const summonArmed = React26.useRef(false);
4111
- const onSummon = React26.useCallback(() => {
3958
+ const [summoned, setSummoned] = React25.useState(enterFromFloor === true);
3959
+ const summonArmed = React25.useRef(false);
3960
+ const onSummon = React25.useCallback(() => {
4112
3961
  setSummoned(true);
4113
3962
  summonArmed.current = false;
4114
3963
  }, []);
4115
- React26.useEffect(() => {
3964
+ React25.useEffect(() => {
4116
3965
  if (!summoned) return;
4117
3966
  if (!scrolling) {
4118
3967
  summonArmed.current = true;
@@ -4120,23 +3969,23 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4120
3969
  }
4121
3970
  if (summonArmed.current) setSummoned(false);
4122
3971
  }, [scrolling, summoned]);
4123
- const [composing, setComposing] = React26.useState(false);
3972
+ const [composing, setComposing] = React25.useState(false);
4124
3973
  const heroEntryVisible = useHeroEntryPointVisible();
4125
- const heroWasVisible = React26.useRef(heroEntryVisible);
4126
- React26.useEffect(() => {
3974
+ const heroWasVisible = React25.useRef(heroEntryVisible);
3975
+ React25.useEffect(() => {
4127
3976
  const was = heroWasVisible.current;
4128
3977
  heroWasVisible.current = heroEntryVisible;
4129
3978
  if (was && !heroEntryVisible) onSummon();
4130
3979
  }, [heroEntryVisible, onSummon]);
4131
3980
  const folded = mode === "rest" && !working && !sheetOpen && !summoned && !composing && (heroEntryVisible || !atTop && collapsed);
4132
3981
  const currentMessageIndex = useCurrentMessageIndex();
4133
- const prevMessageIndex = React26.useRef(currentMessageIndex);
4134
- React26.useEffect(() => {
3982
+ const prevMessageIndex = React25.useRef(currentMessageIndex);
3983
+ React25.useEffect(() => {
4135
3984
  const changed = currentMessageIndex !== prevMessageIndex.current;
4136
3985
  prevMessageIndex.current = currentMessageIndex;
4137
3986
  if (changed && sheetOpen) morphRef.current?.close();
4138
3987
  }, [currentMessageIndex, sheetOpen]);
4139
- const voice = useVoiceCapture3({
3988
+ const voice = useVoiceCapture2({
4140
3989
  onCommit: (text) => {
4141
3990
  session.sendMessage(text);
4142
3991
  setMode("rest");
@@ -4148,7 +3997,7 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4148
3997
  silenceMs: 2e3
4149
3998
  });
4150
3999
  useWakeLock(voice.state === "listening" || working);
4151
- const [micDeniedNotice, setMicDeniedNotice] = React26.useState(false);
4000
+ const [micDeniedNotice, setMicDeniedNotice] = React25.useState(false);
4152
4001
  const startVoice = () => {
4153
4002
  if (!voice.supported) {
4154
4003
  morphRef.current?.open();
@@ -4166,7 +4015,7 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4166
4015
  voice.cancel();
4167
4016
  setMode("rest");
4168
4017
  };
4169
- React26.useEffect(() => {
4018
+ React25.useEffect(() => {
4170
4019
  if (mode !== "listening" || voice.state !== "idle") return;
4171
4020
  setMode("rest");
4172
4021
  if (voice.permissionDenied) {
@@ -4175,11 +4024,11 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4175
4024
  return () => clearTimeout(timer);
4176
4025
  }
4177
4026
  }, [mode, voice.state, voice.permissionDenied]);
4178
- const wasRunning = React26.useRef(false);
4179
- const turnStartLayoutSig = React26.useRef("");
4180
- const turnStartMsgCount = React26.useRef(0);
4181
- const answerHandled = React26.useRef(true);
4182
- React26.useEffect(() => {
4027
+ const wasRunning = React25.useRef(false);
4028
+ const turnStartLayoutSig = React25.useRef("");
4029
+ const turnStartMsgCount = React25.useRef(0);
4030
+ const answerHandled = React25.useRef(true);
4031
+ React25.useEffect(() => {
4183
4032
  if (session.isRunning && !wasRunning.current) {
4184
4033
  setMode("rest");
4185
4034
  morphRef.current?.close();
@@ -4205,7 +4054,7 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4205
4054
  }
4206
4055
  }, [session.isRunning, layout, session.messages]);
4207
4056
  return /* @__PURE__ */ jsxs18(ThreadRelandContext.Provider, { value: threadRelandKey, children: [
4208
- /* @__PURE__ */ jsx27(AnimatePresence, { initial: false, children: mode === "rest" && /* @__PURE__ */ jsx27(
4057
+ /* @__PURE__ */ jsx28(AnimatePresence, { initial: false, children: mode === "rest" && /* @__PURE__ */ jsx28(
4209
4058
  MorphIsland,
4210
4059
  {
4211
4060
  ref: morphRef,
@@ -4227,7 +4076,7 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4227
4076
  },
4228
4077
  "morph"
4229
4078
  ) }),
4230
- /* @__PURE__ */ jsx27(
4079
+ /* @__PURE__ */ jsx28(
4231
4080
  "div",
4232
4081
  {
4233
4082
  ref: anchorRef,
@@ -4243,12 +4092,33 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4243
4092
  pointerEvents: "none",
4244
4093
  zIndex: 60
4245
4094
  },
4246
- children: /* @__PURE__ */ jsx27("div", { style: { pointerEvents: "auto", display: "flex", justifyContent: "center", maxWidth: "100%" }, children: /* @__PURE__ */ jsx27(AnimatePresence, { mode: "wait", initial: false, children: mode === "listening" ? /* @__PURE__ */ jsx27(VoiceIsland, { transcript: voice.transcript, onStop: stopVoice, onCancel: cancelVoice }, "listening") : null }) })
4095
+ children: /* @__PURE__ */ jsx28("div", { style: { pointerEvents: "auto", display: "flex", justifyContent: "center", maxWidth: "100%" }, children: /* @__PURE__ */ jsx28(AnimatePresence, { mode: "wait", initial: false, children: mode === "listening" ? /* @__PURE__ */ jsx28(VoiceIsland, { transcript: voice.transcript, onStop: stopVoice, onCancel: cancelVoice }, "listening") : null }) })
4247
4096
  }
4248
4097
  )
4249
4098
  ] });
4250
4099
  }
4251
4100
 
4101
+ // src/shell/mobile/PageComposerDock.tsx
4102
+ import * as React26 from "react";
4103
+ import { jsx as jsx29 } from "react/jsx-runtime";
4104
+ function PageComposerDock({
4105
+ bottom,
4106
+ onHeightChange,
4107
+ children
4108
+ }) {
4109
+ const ref = React26.useRef(null);
4110
+ React26.useLayoutEffect(() => {
4111
+ const node = ref.current;
4112
+ if (node === null) return;
4113
+ const report = () => onHeightChange(node.getBoundingClientRect().height);
4114
+ report();
4115
+ const observer = new ResizeObserver(report);
4116
+ observer.observe(node);
4117
+ return () => observer.disconnect();
4118
+ }, [onHeightChange]);
4119
+ return /* @__PURE__ */ jsx29("div", { ref, "data-fourty-shell-part": "canvasComposer", style: { position: "fixed", left: 0, right: 0, bottom, zIndex: 40 }, children });
4120
+ }
4121
+
4252
4122
  // src/shell/mobile/document-scroll-ref.ts
4253
4123
  function assignRef(ref, value) {
4254
4124
  if (ref === void 0 || ref === null) return;
@@ -4270,7 +4140,7 @@ function documentScrollRef(forwarded) {
4270
4140
  }
4271
4141
 
4272
4142
  // src/shell/mobile/DefaultMobileShell.tsx
4273
- import { Fragment as Fragment6, jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
4143
+ import { Fragment as Fragment7, jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
4274
4144
  var MOBILE_GUTTER_MAX = 16;
4275
4145
  function scrollToTop() {
4276
4146
  if (typeof document === "undefined") return;
@@ -4280,7 +4150,7 @@ function scrollToTop() {
4280
4150
  var DEFAULT_PLACEHOLDER = "Ask for anything\u2026";
4281
4151
  function DefaultMobileShell(props) {
4282
4152
  const { messages } = useSessionState();
4283
- const { isSubmitting, isRunning } = useFourtySession9();
4153
+ const { isSubmitting, isRunning } = useFourtySession7();
4284
4154
  const working = isSubmitting || isRunning;
4285
4155
  const [open, setOpen] = React27.useState(false);
4286
4156
  const toggle = React27.useCallback(() => setOpen((v) => !v), []);
@@ -4308,7 +4178,9 @@ function DefaultMobileShell(props) {
4308
4178
  React27.useEffect(() => {
4309
4179
  wasWithheld.current = withholdIsland;
4310
4180
  }, [withholdIsland]);
4311
- const canvasBottomClearance = withholdIsland ? 0 : islandFaceHeight === null ? MOBILE_CANVAS_BOTTOM_CLEARANCE : islandFaceHeight + ISLAND_CLEARANCE_BREATHING;
4181
+ const pageComposes = props.canvasComposer !== void 0;
4182
+ const measuredClearance = islandFaceHeight === null ? MOBILE_CANVAS_BOTTOM_CLEARANCE : islandFaceHeight + ISLAND_CLEARANCE_BREATHING;
4183
+ const canvasBottomClearance = withholdIsland && !pageComposes ? 0 : measuredClearance;
4312
4184
  const shellRef = React27.useRef(null);
4313
4185
  const chromeInset = useKeyboardInset(shellRef);
4314
4186
  const restingChromeInset = chromeInset > KEYBOARD_LIKELY_MIN_PX ? 0 : chromeInset;
@@ -4374,28 +4246,29 @@ function DefaultMobileShell(props) {
4374
4246
  background: "var(--fourty-color-bg)"
4375
4247
  },
4376
4248
  children: [
4377
- /* @__PURE__ */ jsx28(MobileChrome, { logo: resolveShellSlot(props.logo, dock), launchers: resolveShellSlot(props.launchers, dock) }),
4249
+ /* @__PURE__ */ jsx30(MobileChrome, { logo: resolveShellSlot(props.logo, dock), launchers: resolveShellSlot(props.launchers, dock) }),
4378
4250
  /* @__PURE__ */ jsxs19(HeroEntryPointProvider, { claim: claimHeroEntry, claimed: heroOwnsEntry, children: [
4379
- /* @__PURE__ */ jsx28(
4251
+ /* @__PURE__ */ jsx30(
4380
4252
  "main",
4381
4253
  {
4382
4254
  style: {
4383
4255
  paddingBottom: `${canvasBottomClearance + restingChromeInset + ISLAND_BOTTOM_GAP}px`
4384
4256
  },
4385
4257
  children: /* @__PURE__ */ jsxs19("div", { style: canvasGutterStyle, children: [
4386
- /* @__PURE__ */ jsx28(ConversationTransition, { children: props.canvas }),
4258
+ /* @__PURE__ */ jsx30(ConversationTransition, { children: props.canvas }),
4387
4259
  props.footer
4388
4260
  ] })
4389
4261
  }
4390
4262
  ),
4391
- !withholdIsland && /* @__PURE__ */ jsx28(
4263
+ pageComposes && /* @__PURE__ */ jsx30(PageComposerDock, { bottom: chromeInset, onHeightChange: setIslandFaceHeight, children: resolveShellSlot(props.canvasComposer, dock) }),
4264
+ !pageComposes && !withholdIsland && /* @__PURE__ */ jsx30(
4392
4265
  MobileVoiceConsole,
4393
4266
  {
4394
4267
  enterFromFloor,
4395
4268
  placeholder,
4396
4269
  placeholderExamples: props.placeholderExamples,
4397
4270
  collapsedMark: props.collapsedMark,
4398
- historySheet: (close) => /* @__PURE__ */ jsxs19(Fragment6, { children: [
4271
+ historySheet: (close) => /* @__PURE__ */ jsxs19(Fragment7, { children: [
4399
4272
  props.presenceNotch !== void 0 && // Bleeds the notch's OWN background up UNDER the grip's row
4400
4273
  // (negative `marginTop` pulls the box up by the grip's exact
4401
4274
  // height; `paddingTop` pushes the notch's real CONTENT back
@@ -4405,8 +4278,8 @@ function DefaultMobileShell(props) {
4405
4278
  // opacity once `atSheet`) — a visible seam between the grip
4406
4279
  // and the notch's own color, right where they should read as
4407
4280
  // one continuous surface.
4408
- /* @__PURE__ */ jsx28("div", { style: { marginTop: -ISLAND_GRIP_H, paddingTop: ISLAND_GRIP_H }, children: props.presenceNotch }),
4409
- /* @__PURE__ */ jsx28("div", { style: { position: "relative", flex: 1, minHeight: 0 }, children: resolveShellSlot(props.composer, { open: true, toggle: close }) })
4281
+ /* @__PURE__ */ jsx30("div", { style: { marginTop: -ISLAND_GRIP_H, paddingTop: ISLAND_GRIP_H }, children: props.presenceNotch }),
4282
+ /* @__PURE__ */ jsx30("div", { style: { position: "relative", flex: 1, minHeight: 0 }, children: resolveShellSlot(props.composer, { open: true, toggle: close }) })
4410
4283
  ] }),
4411
4284
  onIslandHeightChange: setIslandFaceHeight
4412
4285
  }
@@ -4420,10 +4293,10 @@ function DefaultMobileShell(props) {
4420
4293
 
4421
4294
  // src/shell/dock-context.tsx
4422
4295
  import * as React28 from "react";
4423
- import { jsx as jsx29 } from "react/jsx-runtime";
4296
+ import { jsx as jsx31 } from "react/jsx-runtime";
4424
4297
  var ShellDockContext = React28.createContext(null);
4425
4298
  function ShellDockProvider({ value, children }) {
4426
- return /* @__PURE__ */ jsx29(ShellDockContext.Provider, { value, children });
4299
+ return /* @__PURE__ */ jsx31(ShellDockContext.Provider, { value, children });
4427
4300
  }
4428
4301
  function useShellDock() {
4429
4302
  const dock = React28.useContext(ShellDockContext);
@@ -4434,7 +4307,7 @@ function useShellDock() {
4434
4307
  }
4435
4308
 
4436
4309
  // src/shell/ShellScaffold.tsx
4437
- import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
4310
+ import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
4438
4311
  var DEFAULTS = {
4439
4312
  dockWidth: 420,
4440
4313
  dockTop: 0,
@@ -4467,16 +4340,17 @@ function ShellScaffold(props) {
4467
4340
  const effectiveWidth = resizable ? liveWidth : dockWidth;
4468
4341
  const canvasSpacing = useSideDockSpacing(dock.open, effectiveWidth, !resizing);
4469
4342
  if (props.mobile !== void 0 && isMobile) {
4470
- return /* @__PURE__ */ jsx30(ShellDockProvider, { value: dock, children: props.mobile });
4343
+ return /* @__PURE__ */ jsx32(ShellDockProvider, { value: dock, children: props.mobile });
4471
4344
  }
4472
4345
  if (isMobile) {
4473
- return /* @__PURE__ */ jsx30(ShellDockProvider, { value: dock, children: /* @__PURE__ */ jsx30(
4346
+ return /* @__PURE__ */ jsx32(ShellDockProvider, { value: dock, children: /* @__PURE__ */ jsx32(
4474
4347
  DefaultMobileShell,
4475
4348
  {
4476
4349
  canvas: props.canvas,
4477
4350
  footer: props.footer,
4478
4351
  composer: props.composer,
4479
4352
  presenceNotch: props.presenceNotch,
4353
+ canvasComposer: props.canvasComposer,
4480
4354
  launchers: props.launchers,
4481
4355
  drawers: props.drawers,
4482
4356
  logo: props.logo !== void 0 ? props.logo : props.header,
@@ -4488,11 +4362,11 @@ function ShellScaffold(props) {
4488
4362
  }
4489
4363
  ) });
4490
4364
  }
4491
- const canvasContent = /* @__PURE__ */ jsx30(ShellDockProvider, { value: dock, children: wrapTransition ? /* @__PURE__ */ jsx30(ConversationTransition, { children: props.canvas }) : props.canvas });
4365
+ const canvasContent = /* @__PURE__ */ jsx32(ShellDockProvider, { value: dock, children: wrapTransition ? /* @__PURE__ */ jsx32(ConversationTransition, { children: props.canvas }) : props.canvas });
4492
4366
  return /* @__PURE__ */ jsxs20("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0, background: "var(--fourty-color-bg)" }, children: [
4493
4367
  props.presenceNotch,
4494
4368
  /* @__PURE__ */ jsxs20("div", { style: { position: "relative", flex: 1, minHeight: 0, background: "var(--fourty-color-bg)" }, children: [
4495
- /* @__PURE__ */ jsx30(
4369
+ /* @__PURE__ */ jsx32(
4496
4370
  "main",
4497
4371
  {
4498
4372
  ref: props.scrollRef,
@@ -4507,14 +4381,14 @@ function ShellScaffold(props) {
4507
4381
  ...canvasSpacing
4508
4382
  },
4509
4383
  children: /* @__PURE__ */ jsxs20("div", { "data-fourty-canvas": "", style: canvasGutterStyle, children: [
4510
- /* @__PURE__ */ jsx30("div", { style: { flex: 1, minHeight: 0 }, children: canvasContent }),
4511
- props.canvasComposer !== void 0 && /* @__PURE__ */ jsx30("div", { "data-fourty-shell-part": "composer", style: { position: "sticky", bottom: 0, zIndex: dockZIndex }, children: resolveShellSlot(props.canvasComposer, dock) }),
4384
+ /* @__PURE__ */ jsx32("div", { style: { flex: 1, minHeight: 0 }, children: canvasContent }),
4385
+ props.canvasComposer !== void 0 && /* @__PURE__ */ jsx32("div", { "data-fourty-shell-part": "composer", style: { position: "sticky", bottom: 0, zIndex: dockZIndex }, children: resolveShellSlot(props.canvasComposer, dock) }),
4512
4386
  props.footer
4513
4387
  ] })
4514
4388
  }
4515
4389
  ),
4516
4390
  resolveShellSlot(props.header, dock),
4517
- /* @__PURE__ */ jsx30(
4391
+ /* @__PURE__ */ jsx32(
4518
4392
  SideDock,
4519
4393
  {
4520
4394
  open: dock.open,
@@ -4540,13 +4414,13 @@ import * as React31 from "react";
4540
4414
  import { useFormFactor as useFormFactor6 } from "@40rty/ams-sdk";
4541
4415
 
4542
4416
  // src/shell/menu-columns.tsx
4543
- import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
4417
+ import { jsx as jsx33, jsxs as jsxs21 } from "react/jsx-runtime";
4544
4418
  function MenuColumn({
4545
4419
  column,
4546
4420
  onPick
4547
4421
  }) {
4548
4422
  return /* @__PURE__ */ jsxs21("div", { style: { minWidth: 132, display: "flex", flexDirection: "column" }, children: [
4549
- /* @__PURE__ */ jsx31(
4423
+ /* @__PURE__ */ jsx33(
4550
4424
  "div",
4551
4425
  {
4552
4426
  style: {
@@ -4560,7 +4434,7 @@ function MenuColumn({
4560
4434
  children: column.title
4561
4435
  }
4562
4436
  ),
4563
- column.links.map((l) => /* @__PURE__ */ jsx31(
4437
+ column.links.map((l) => /* @__PURE__ */ jsx33(
4564
4438
  motion.button,
4565
4439
  {
4566
4440
  type: "button",
@@ -4588,14 +4462,14 @@ function MenuColumn({
4588
4462
  }
4589
4463
 
4590
4464
  // src/shell/MenuFlyout.tsx
4591
- import { jsx as jsx32 } from "react/jsx-runtime";
4465
+ import { jsx as jsx34 } from "react/jsx-runtime";
4592
4466
  function MenuFlyout({
4593
4467
  item,
4594
4468
  onPick
4595
4469
  }) {
4596
4470
  const columns = item.megaMenu?.columns;
4597
4471
  if (columns === void 0 || columns.length === 0) return null;
4598
- return /* @__PURE__ */ jsx32(
4472
+ return /* @__PURE__ */ jsx34(
4599
4473
  motion.div,
4600
4474
  {
4601
4475
  initial: { opacity: 0, x: -10 },
@@ -4615,7 +4489,7 @@ function MenuFlyout({
4615
4489
  flexWrap: "wrap",
4616
4490
  alignContent: "flex-start"
4617
4491
  },
4618
- children: columns.map((col) => /* @__PURE__ */ jsx32(MenuColumn, { column: col, onPick }, col.title))
4492
+ children: columns.map((col) => /* @__PURE__ */ jsx34(MenuColumn, { column: col, onPick }, col.title))
4619
4493
  }
4620
4494
  );
4621
4495
  }
@@ -4624,7 +4498,7 @@ function MenuFlyout({
4624
4498
  import * as React30 from "react";
4625
4499
 
4626
4500
  // src/shell/MenuAccordionPanel.tsx
4627
- import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
4501
+ import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
4628
4502
  function MenuAccordionPanel({
4629
4503
  item,
4630
4504
  onPick
@@ -4633,7 +4507,7 @@ function MenuAccordionPanel({
4633
4507
  const columns = item.megaMenu?.columns;
4634
4508
  if (columns === void 0 || columns.length === 0) return null;
4635
4509
  const action = item.action;
4636
- return /* @__PURE__ */ jsx33(
4510
+ return /* @__PURE__ */ jsx35(
4637
4511
  motion.div,
4638
4512
  {
4639
4513
  role: "menu",
@@ -4683,12 +4557,12 @@ function MenuAccordionPanel({
4683
4557
  color: "var(--color-text)"
4684
4558
  },
4685
4559
  children: [
4686
- /* @__PURE__ */ jsx33("span", { children: labels.menu.shopAll(item.label) }),
4687
- /* @__PURE__ */ jsx33("span", { "aria-hidden": "true", style: { opacity: 0.5 }, children: "\u2192" })
4560
+ /* @__PURE__ */ jsx35("span", { children: labels.menu.shopAll(item.label) }),
4561
+ /* @__PURE__ */ jsx35("span", { "aria-hidden": "true", style: { opacity: 0.5 }, children: "\u2192" })
4688
4562
  ]
4689
4563
  }
4690
4564
  ),
4691
- columns.map((col) => /* @__PURE__ */ jsx33(MenuColumn, { column: col, onPick }, col.title))
4565
+ columns.map((col) => /* @__PURE__ */ jsx35(MenuColumn, { column: col, onPick }, col.title))
4692
4566
  ]
4693
4567
  }
4694
4568
  )
@@ -4697,7 +4571,7 @@ function MenuAccordionPanel({
4697
4571
  }
4698
4572
 
4699
4573
  // src/shell/MenuNav.tsx
4700
- import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
4574
+ import { jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
4701
4575
  function MenuNav({
4702
4576
  items,
4703
4577
  mode,
@@ -4705,7 +4579,7 @@ function MenuNav({
4705
4579
  onOpenChange,
4706
4580
  onPick
4707
4581
  }) {
4708
- return /* @__PURE__ */ jsx34("nav", { style: { display: "flex", flexDirection: "column", paddingBottom: 24 }, children: items.map((item, i) => {
4582
+ return /* @__PURE__ */ jsx36("nav", { style: { display: "flex", flexDirection: "column", paddingBottom: 24 }, children: items.map((item, i) => {
4709
4583
  const hasMega = item.megaMenu !== void 0 && item.megaMenu.columns.length > 0;
4710
4584
  const isOpen = openIndex === i;
4711
4585
  const inverted = mode === "hover" && isOpen;
@@ -4747,8 +4621,8 @@ function MenuNav({
4747
4621
  textAlign: "left"
4748
4622
  },
4749
4623
  children: [
4750
- /* @__PURE__ */ jsx34("span", { children: item.label }),
4751
- /* @__PURE__ */ jsx34(
4624
+ /* @__PURE__ */ jsx36("span", { children: item.label }),
4625
+ /* @__PURE__ */ jsx36(
4752
4626
  "span",
4753
4627
  {
4754
4628
  "aria-hidden": "true",
@@ -4766,13 +4640,13 @@ function MenuNav({
4766
4640
  ]
4767
4641
  }
4768
4642
  ),
4769
- mode === "accordion" && /* @__PURE__ */ jsx34(AnimatePresence, { initial: false, children: isOpen && hasMega && /* @__PURE__ */ jsx34(MenuAccordionPanel, { item, onPick }) })
4643
+ mode === "accordion" && /* @__PURE__ */ jsx36(AnimatePresence, { initial: false, children: isOpen && hasMega && /* @__PURE__ */ jsx36(MenuAccordionPanel, { item, onPick }) })
4770
4644
  ] }, item.label);
4771
4645
  }) });
4772
4646
  }
4773
4647
 
4774
4648
  // src/shell/MenuDrawer.tsx
4775
- import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
4649
+ import { Fragment as Fragment9, jsx as jsx37, jsxs as jsxs24 } from "react/jsx-runtime";
4776
4650
  function MenuTrigger({
4777
4651
  onClick,
4778
4652
  icon,
@@ -4804,7 +4678,7 @@ function MenuTrigger({
4804
4678
  },
4805
4679
  children: [
4806
4680
  icon,
4807
- label !== void 0 && /* @__PURE__ */ jsx35("span", { children: label })
4681
+ label !== void 0 && /* @__PURE__ */ jsx37("span", { children: label })
4808
4682
  ]
4809
4683
  }
4810
4684
  );
@@ -4833,8 +4707,8 @@ function MenuDrawer({
4833
4707
  if (!open) setOpenIndex(null);
4834
4708
  }, [open]);
4835
4709
  const openItem = openIndex === null ? null : items[openIndex];
4836
- return /* @__PURE__ */ jsx35(AnimatePresence, { children: open && /* @__PURE__ */ jsxs24(Fragment8, { children: [
4837
- /* @__PURE__ */ jsx35(
4710
+ return /* @__PURE__ */ jsx37(AnimatePresence, { children: open && /* @__PURE__ */ jsxs24(Fragment9, { children: [
4711
+ /* @__PURE__ */ jsx37(
4838
4712
  motion.div,
4839
4713
  {
4840
4714
  initial: { opacity: 0 },
@@ -4898,7 +4772,7 @@ function MenuDrawer({
4898
4772
  overflowY: "auto"
4899
4773
  },
4900
4774
  children: [
4901
- /* @__PURE__ */ jsx35(
4775
+ /* @__PURE__ */ jsx37(
4902
4776
  "div",
4903
4777
  {
4904
4778
  style: {
@@ -4909,7 +4783,7 @@ function MenuDrawer({
4909
4783
  justifyContent: "flex-end",
4910
4784
  padding: "0 16px"
4911
4785
  },
4912
- children: /* @__PURE__ */ jsx35(
4786
+ children: /* @__PURE__ */ jsx37(
4913
4787
  motion.button,
4914
4788
  {
4915
4789
  type: "button",
@@ -4931,7 +4805,7 @@ function MenuDrawer({
4931
4805
  justifyContent: "center",
4932
4806
  color: "var(--color-text)"
4933
4807
  },
4934
- children: /* @__PURE__ */ jsx35("svg", { viewBox: "0 0 24 24", width: 13, height: 13, fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx35(
4808
+ children: /* @__PURE__ */ jsx37("svg", { viewBox: "0 0 24 24", width: 13, height: 13, fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx37(
4935
4809
  "path",
4936
4810
  {
4937
4811
  d: "M18 6 6 18M6 6l12 12",
@@ -4945,7 +4819,7 @@ function MenuDrawer({
4945
4819
  )
4946
4820
  }
4947
4821
  ),
4948
- /* @__PURE__ */ jsx35(
4822
+ /* @__PURE__ */ jsx37(
4949
4823
  MenuNav,
4950
4824
  {
4951
4825
  items,
@@ -4958,7 +4832,7 @@ function MenuDrawer({
4958
4832
  ]
4959
4833
  }
4960
4834
  ),
4961
- mode === "hover" && /* @__PURE__ */ jsx35(AnimatePresence, { children: openItem !== null && openItem !== void 0 && openItem.megaMenu !== void 0 && /* @__PURE__ */ jsx35(MenuFlyout, { item: openItem, onPick: pick }) })
4835
+ mode === "hover" && /* @__PURE__ */ jsx37(AnimatePresence, { children: openItem !== null && openItem !== void 0 && openItem.megaMenu !== void 0 && /* @__PURE__ */ jsx37(MenuFlyout, { item: openItem, onPick: pick }) })
4962
4836
  ]
4963
4837
  }
4964
4838
  )
@@ -4967,7 +4841,7 @@ function MenuDrawer({
4967
4841
 
4968
4842
  // src/shell/MenuNavBar.tsx
4969
4843
  import * as React32 from "react";
4970
- import { jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
4844
+ import { jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
4971
4845
  function MenuNavBar({
4972
4846
  items,
4973
4847
  onSelectItem,
@@ -4981,7 +4855,7 @@ function MenuNavBar({
4981
4855
  },
4982
4856
  [onSelectItem]
4983
4857
  );
4984
- return /* @__PURE__ */ jsx36(
4858
+ return /* @__PURE__ */ jsx38(
4985
4859
  "nav",
4986
4860
  {
4987
4861
  "aria-label": "Site menu",
@@ -5001,7 +4875,7 @@ function MenuNavBar({
5001
4875
  // THIS label instead of the row's first item regardless of which
5002
4876
  // one is hovered.
5003
4877
  /* @__PURE__ */ jsxs25("div", { style: { position: "relative" }, children: [
5004
- /* @__PURE__ */ jsx36(
4878
+ /* @__PURE__ */ jsx38(
5005
4879
  motion.button,
5006
4880
  {
5007
4881
  type: "button",
@@ -5031,7 +4905,7 @@ function MenuNavBar({
5031
4905
  children: item.label
5032
4906
  }
5033
4907
  ),
5034
- /* @__PURE__ */ jsx36(AnimatePresence, { children: isOpen && item.megaMenu !== void 0 && /* @__PURE__ */ jsx36(
4908
+ /* @__PURE__ */ jsx38(AnimatePresence, { children: isOpen && item.megaMenu !== void 0 && /* @__PURE__ */ jsx38(
5035
4909
  motion.div,
5036
4910
  {
5037
4911
  initial: { opacity: 0, y: -6 },
@@ -5047,7 +4921,7 @@ function MenuNavBar({
5047
4921
  paddingTop: 14,
5048
4922
  zIndex: 55
5049
4923
  },
5050
- children: /* @__PURE__ */ jsx36(
4924
+ children: /* @__PURE__ */ jsx38(
5051
4925
  "div",
5052
4926
  {
5053
4927
  style: {
@@ -5057,7 +4931,7 @@ function MenuNavBar({
5057
4931
  display: "flex",
5058
4932
  gap: 30
5059
4933
  },
5060
- children: item.megaMenu.columns.map((col) => /* @__PURE__ */ jsx36(MenuColumn, { column: col, onPick: pick }, col.title))
4934
+ children: item.megaMenu.columns.map((col) => /* @__PURE__ */ jsx38(MenuColumn, { column: col, onPick: pick }, col.title))
5061
4935
  }
5062
4936
  )
5063
4937
  }
@@ -5072,7 +4946,7 @@ function MenuNavBar({
5072
4946
  // src/shell/ShellMenuChrome.tsx
5073
4947
  import * as React33 from "react";
5074
4948
  import { useExclusiveOverlay as useExclusiveOverlay2, useFormFactor as useFormFactor7, useScrollContainerRef as useScrollContainerRef3 } from "@40rty/ams-sdk";
5075
- import { Fragment as Fragment9, jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
4949
+ import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs26 } from "react/jsx-runtime";
5076
4950
  function ShellMenuChrome({
5077
4951
  logo,
5078
4952
  menuIcon,
@@ -5088,7 +4962,7 @@ function ShellMenuChrome({
5088
4962
  useExclusiveOverlay2("menu", open, React33.useCallback(() => setOpen(false), []));
5089
4963
  const { isMobile } = useFormFactor7();
5090
4964
  const scrolled = useScrollThreshold(useScrollContainerRef3(), 0);
5091
- return /* @__PURE__ */ jsxs26(Fragment9, { children: [
4965
+ return /* @__PURE__ */ jsxs26(Fragment10, { children: [
5092
4966
  isMobile ? /* @__PURE__ */ jsxs26(
5093
4967
  "div",
5094
4968
  {
@@ -5114,9 +4988,9 @@ function ShellMenuChrome({
5114
4988
  zIndex: 50
5115
4989
  },
5116
4990
  children: [
5117
- /* @__PURE__ */ jsx37("span", { style: { justifySelf: "start", display: "inline-flex", alignItems: "center" }, children: items.length > 0 && /* @__PURE__ */ jsx37(MenuTrigger, { onClick: () => setOpen(true), icon: menuIcon }) }),
5118
- /* @__PURE__ */ jsx37("span", { style: { display: "inline-flex", alignItems: "center", minWidth: 0 }, children: logo }),
5119
- /* @__PURE__ */ jsx37("span", { "aria-hidden": true })
4991
+ /* @__PURE__ */ jsx39("span", { style: { justifySelf: "start", display: "inline-flex", alignItems: "center" }, children: items.length > 0 && /* @__PURE__ */ jsx39(MenuTrigger, { onClick: () => setOpen(true), icon: menuIcon }) }),
4992
+ /* @__PURE__ */ jsx39("span", { style: { display: "inline-flex", alignItems: "center", minWidth: 0 }, children: logo }),
4993
+ /* @__PURE__ */ jsx39("span", { "aria-hidden": true })
5120
4994
  ]
5121
4995
  }
5122
4996
  ) : /* @__PURE__ */ jsxs26(
@@ -5141,15 +5015,15 @@ function ShellMenuChrome({
5141
5015
  zIndex: 50
5142
5016
  },
5143
5017
  children: [
5144
- /* @__PURE__ */ jsx37(ChromeSurface, { visible: scrolled, lifted: scrolled }),
5018
+ /* @__PURE__ */ jsx39(ChromeSurface, { visible: scrolled, lifted: scrolled }),
5145
5019
  /* @__PURE__ */ jsxs26("div", { style: { position: "relative", display: "flex", alignItems: "center", gap, minWidth: 0 }, children: [
5146
5020
  logo,
5147
- items.length > 0 && /* @__PURE__ */ jsx37(MenuNavBar, { items, onSelectItem })
5021
+ items.length > 0 && /* @__PURE__ */ jsx39(MenuNavBar, { items, onSelectItem })
5148
5022
  ] })
5149
5023
  ]
5150
5024
  }
5151
5025
  ),
5152
- isMobile && /* @__PURE__ */ jsx37(
5026
+ isMobile && /* @__PURE__ */ jsx39(
5153
5027
  MenuDrawer,
5154
5028
  {
5155
5029
  open,
@@ -5164,7 +5038,7 @@ function ShellMenuChrome({
5164
5038
 
5165
5039
  // src/shell/LauncherDock.tsx
5166
5040
  import { useFormFactor as useFormFactor8 } from "@40rty/ams-sdk";
5167
- import { jsx as jsx38 } from "react/jsx-runtime";
5041
+ import { jsx as jsx40 } from "react/jsx-runtime";
5168
5042
  function LauncherDock({
5169
5043
  children,
5170
5044
  top = 12,
@@ -5175,7 +5049,7 @@ function LauncherDock({
5175
5049
  }) {
5176
5050
  const { isMobile } = useFormFactor8();
5177
5051
  if (isMobile) {
5178
- return /* @__PURE__ */ jsx38(
5052
+ return /* @__PURE__ */ jsx40(
5179
5053
  "div",
5180
5054
  {
5181
5055
  "data-fourty-shell-part": "launchers",
@@ -5185,7 +5059,7 @@ function LauncherDock({
5185
5059
  }
5186
5060
  );
5187
5061
  }
5188
- return /* @__PURE__ */ jsx38(
5062
+ return /* @__PURE__ */ jsx40(
5189
5063
  "div",
5190
5064
  {
5191
5065
  "data-fourty-shell-part": "launchers",
@@ -5209,7 +5083,7 @@ function LauncherDock({
5209
5083
  }
5210
5084
 
5211
5085
  // src/shell/Button.tsx
5212
- import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs27 } from "react/jsx-runtime";
5086
+ import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
5213
5087
  var SIZE_SPEC = {
5214
5088
  sm: { padding: "8px 14px", fontSize: 11, iconSize: 14, height: 32 },
5215
5089
  md: { padding: "12px 24px", fontSize: 13.3333, iconSize: 16, height: 42 },
@@ -5362,7 +5236,7 @@ function Button({
5362
5236
  };
5363
5237
  const labelText = children !== void 0 ? children : label;
5364
5238
  const computedAriaLabel = ariaLabel !== void 0 ? ariaLabel : isIconOnly && label !== void 0 ? label : void 0;
5365
- return /* @__PURE__ */ jsx39(
5239
+ return /* @__PURE__ */ jsx41(
5366
5240
  "button",
5367
5241
  {
5368
5242
  type,
@@ -5372,11 +5246,11 @@ function Button({
5372
5246
  style: baseStyle,
5373
5247
  onMouseEnter,
5374
5248
  onMouseLeave,
5375
- children: loading ? /* @__PURE__ */ jsx39(Spinner, { size: s.iconSize - 2 }) : /* @__PURE__ */ jsxs27(Fragment10, { children: [
5376
- Icon && iconPosition === "left" && !isIconOnly && /* @__PURE__ */ jsx39(Icon, { size: s.iconSize, strokeWidth: 1.5 }),
5377
- Icon && isIconOnly && /* @__PURE__ */ jsx39(Icon, { size: s.iconSize + 2, strokeWidth: 1.5 }),
5249
+ children: loading ? /* @__PURE__ */ jsx41(Spinner, { size: s.iconSize - 2 }) : /* @__PURE__ */ jsxs27(Fragment11, { children: [
5250
+ Icon && iconPosition === "left" && !isIconOnly && /* @__PURE__ */ jsx41(Icon, { size: s.iconSize, strokeWidth: 1.5 }),
5251
+ Icon && isIconOnly && /* @__PURE__ */ jsx41(Icon, { size: s.iconSize + 2, strokeWidth: 1.5 }),
5378
5252
  !isIconOnly && labelText,
5379
- Icon && iconPosition === "right" && !isIconOnly && /* @__PURE__ */ jsx39(Icon, { size: s.iconSize, strokeWidth: 1.5 })
5253
+ Icon && iconPosition === "right" && !isIconOnly && /* @__PURE__ */ jsx41(Icon, { size: s.iconSize, strokeWidth: 1.5 })
5380
5254
  ] })
5381
5255
  }
5382
5256
  );
@@ -5384,7 +5258,7 @@ function Button({
5384
5258
 
5385
5259
  // src/shell/Skeleton.tsx
5386
5260
  import { motion as motion3 } from "framer-motion";
5387
- import { jsx as jsx40 } from "react/jsx-runtime";
5261
+ import { jsx as jsx42 } from "react/jsx-runtime";
5388
5262
  var BASE_STYLE = {
5389
5263
  display: "inline-block",
5390
5264
  backgroundColor: "var(--color-surface-alt, #f3f3f3)",
@@ -5408,13 +5282,13 @@ function Skeleton({
5408
5282
  style
5409
5283
  }) {
5410
5284
  const variantStyle = variant === "text" ? { width: dim(width, "100%"), height: dim(height, "1em") } : variant === "pill" ? { width: dim(width, 48), height: dim(height, 18) } : { width: dim(width, "100%"), height: dim(height, "100%") };
5411
- return /* @__PURE__ */ jsx40(
5285
+ return /* @__PURE__ */ jsx42(
5412
5286
  "span",
5413
5287
  {
5414
5288
  className,
5415
5289
  "aria-hidden": "true",
5416
5290
  style: { ...BASE_STYLE, ...variantStyle, ...style },
5417
- children: /* @__PURE__ */ jsx40(
5291
+ children: /* @__PURE__ */ jsx42(
5418
5292
  motion3.span,
5419
5293
  {
5420
5294
  style: SHIMMER_OVERLAY_STYLE,
@@ -5461,15 +5335,15 @@ export {
5461
5335
  SideDock,
5462
5336
  Skeleton,
5463
5337
  Spinner,
5338
+ TurnAsk,
5464
5339
  TypedPlaceholder,
5465
5340
  VOICE_ISLAND_HEIGHT,
5466
5341
  VoiceControl,
5467
5342
  VoiceIsland,
5468
5343
  resolveShellSlot,
5469
5344
  useClaimHeroEntryPoint,
5470
- useComposerAttachments,
5471
5345
  useOnScreen,
5472
- usePromptComposer,
5346
+ usePromptComposer3 as usePromptComposer,
5473
5347
  useShellDock,
5474
5348
  useSideDockSpacing
5475
5349
  };