@40rty/ams-ui 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/shell.js CHANGED
@@ -1,4 +1,11 @@
1
1
  'use client';
2
+ import {
3
+ SIDE_DOCK_EASE,
4
+ SIDE_DOCK_REVEAL_MS,
5
+ SideDock,
6
+ useDockState,
7
+ useSideDockSpacing
8
+ } from "./chunk-BFZ3YCUY.js";
2
9
  import {
3
10
  DragSheet,
4
11
  Spinner,
@@ -10,7 +17,8 @@ import {
10
17
  AgentPresenceWidget,
11
18
  PresenceBriefRail,
12
19
  useLabels
13
- } from "./chunk-54QPRWEG.js";
20
+ } from "./chunk-OKP7MC72.js";
21
+ import "./chunk-TEPH476O.js";
14
22
  import {
15
23
  AgentCaret,
16
24
  AnimatePresence,
@@ -2609,162 +2617,8 @@ function TypedPlaceholder({ entries, caret = true, className }) {
2609
2617
  ] });
2610
2618
  }
2611
2619
 
2612
- // src/shell/SideDock.tsx
2613
- import * as React18 from "react";
2614
- import { useReducedMotion as useReducedMotion3 } from "framer-motion";
2615
- import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
2616
- var SIDE_DOCK_REVEAL_MS = 400;
2617
- var SIDE_DOCK_EASE = "cubic-bezier(0.22, 1, 0.36, 1)";
2618
- var OFFSCREEN_OVERSHOOT_PX = 40;
2619
- function SideDock({
2620
- open,
2621
- width,
2622
- top,
2623
- zIndex = 40,
2624
- onWidthChange,
2625
- onResizeStart,
2626
- onResizeEnd,
2627
- minWidth = 320,
2628
- maxWidth = 680,
2629
- children
2630
- }) {
2631
- const reduceMotion = useReducedMotion3();
2632
- const dragStart = React18.useRef(null);
2633
- const onHandleDown = (e) => {
2634
- if (onWidthChange === void 0) return;
2635
- e.preventDefault();
2636
- e.currentTarget.setPointerCapture(e.pointerId);
2637
- dragStart.current = { x: e.clientX, w: width };
2638
- if (onResizeStart !== void 0) onResizeStart();
2639
- };
2640
- const onHandleMove = (e) => {
2641
- if (dragStart.current === null || onWidthChange === void 0) return;
2642
- const delta = dragStart.current.x - e.clientX;
2643
- const next = Math.min(maxWidth, Math.max(minWidth, dragStart.current.w + delta));
2644
- onWidthChange(next);
2645
- };
2646
- const onHandleUp = (e) => {
2647
- if (dragStart.current === null) return;
2648
- e.currentTarget.releasePointerCapture(e.pointerId);
2649
- dragStart.current = null;
2650
- if (onResizeEnd !== void 0) onResizeEnd();
2651
- };
2652
- const transition = reduceMotion === true ? void 0 : `transform ${SIDE_DOCK_REVEAL_MS}ms ${SIDE_DOCK_EASE}, visibility 0s linear ${open ? "0s" : `${SIDE_DOCK_REVEAL_MS}ms`}`;
2653
- return (
2654
- // Outer frame — static, never moves, clips the sliding panel. The clip
2655
- // guarantees the closed (off-screen) panel can never create horizontal
2656
- // page overflow or become a scrollIntoView target that drags the
2657
- // document sideways — regardless of the host shell's CSS.
2658
- /* @__PURE__ */ jsx18(
2659
- "div",
2660
- {
2661
- "data-fourty-shell-part": "sideDock",
2662
- style: {
2663
- position: "absolute",
2664
- top,
2665
- right: 0,
2666
- bottom: 0,
2667
- width,
2668
- zIndex,
2669
- overflow: "clip",
2670
- pointerEvents: open ? "auto" : "none"
2671
- },
2672
- children: /* @__PURE__ */ jsxs12(
2673
- "div",
2674
- {
2675
- "aria-hidden": !open,
2676
- inert: !open,
2677
- style: {
2678
- position: "absolute",
2679
- inset: 0,
2680
- transform: open ? "translateX(0)" : `translateX(calc(100% + ${OFFSCREEN_OVERSHOOT_PX}px))`,
2681
- visibility: open ? "visible" : "hidden",
2682
- transition
2683
- },
2684
- children: [
2685
- onWidthChange !== void 0 && // Drag handle — a slim hit-strip pinned to the panel's inner-left
2686
- // edge. `touchAction: none` keeps a touch drag from scrolling.
2687
- /* @__PURE__ */ jsx18(
2688
- "div",
2689
- {
2690
- role: "separator",
2691
- "aria-orientation": "vertical",
2692
- "aria-label": "Resize panel",
2693
- onPointerDown: onHandleDown,
2694
- onPointerMove: onHandleMove,
2695
- onPointerUp: onHandleUp,
2696
- onPointerCancel: onHandleUp,
2697
- style: {
2698
- position: "absolute",
2699
- top: 0,
2700
- bottom: 0,
2701
- left: 0,
2702
- width: 10,
2703
- transform: "translateX(-50%)",
2704
- cursor: "col-resize",
2705
- touchAction: "none",
2706
- zIndex: 2
2707
- }
2708
- }
2709
- ),
2710
- children
2711
- ]
2712
- }
2713
- )
2714
- }
2715
- )
2716
- );
2717
- }
2718
- function useSideDockSpacing(open, width, animate3 = true) {
2719
- const reduceMotion = useReducedMotion3();
2720
- return {
2721
- paddingRight: open ? width : 0,
2722
- // During an active resize drag the host passes `animate: false` so the
2723
- // canvas edge tracks the panel 1:1 instead of easing behind the pointer.
2724
- transition: reduceMotion === true || !animate3 ? void 0 : `padding-right ${SIDE_DOCK_REVEAL_MS}ms ${SIDE_DOCK_EASE}`
2725
- };
2726
- }
2727
-
2728
2620
  // src/shell/ShellScaffold.tsx
2729
- import React31 from "react";
2730
-
2731
- // src/shell/use-dock-state.ts
2732
- import React19 from "react";
2733
- import { useAgentDriven, useDockPersistence, useHasLeftSeedHome, useHydrated as useHydrated2, useOverridableToggle, useSessionId, useSessionMessages } from "@40rty/ams-sdk";
2734
- function useDockState(reopenOnMessage, autoOpen) {
2735
- const { initialOpen, onOpenChange } = useDockPersistence();
2736
- const messages = useSessionMessages();
2737
- const sessionId = useSessionId();
2738
- const hasLeftHome = useHasLeftSeedHome();
2739
- const agentDriven = useAgentDriven();
2740
- const settled = sessionId !== null;
2741
- const settledRef = React19.useRef(false);
2742
- const engagedWhenSettledRef = React19.useRef(false);
2743
- const hasEngagedRef = React19.useRef(initialOpen === true);
2744
- const historyIsAccountedFor = initialOpen !== null;
2745
- const engagementIsNew = historyIsAccountedFor ? settledRef.current && !engagedWhenSettledRef.current : true;
2746
- if (hasLeftHome && engagementIsNew && !agentDriven) hasEngagedRef.current = true;
2747
- const hydrated = useHydrated2();
2748
- const openDefault = agentDriven || !autoOpen ? false : hydrated ? hasEngagedRef.current : initialOpen === true;
2749
- const toggle = useOverridableToggle(openDefault);
2750
- const userTurns = messages.reduce((n, m) => m.role === "user" ? n + 1 : n, 0);
2751
- const prevUserTurns = React19.useRef(userTurns);
2752
- React19.useEffect(() => {
2753
- if (!settledRef.current) {
2754
- if (!settled) return;
2755
- settledRef.current = true;
2756
- engagedWhenSettledRef.current = hasLeftHome;
2757
- prevUserTurns.current = userTurns;
2758
- return;
2759
- }
2760
- if (reopenOnMessage && autoOpen && !agentDriven && userTurns > prevUserTurns.current) toggle.set(true);
2761
- prevUserTurns.current = userTurns;
2762
- }, [userTurns, settled, hasLeftHome, reopenOnMessage, autoOpen, agentDriven, toggle.set]);
2763
- React19.useEffect(() => {
2764
- onOpenChange(toggle.value);
2765
- }, [toggle.value, onOpenChange]);
2766
- return { open: toggle.value, toggle: toggle.toggle };
2767
- }
2621
+ import React29 from "react";
2768
2622
 
2769
2623
  // src/shell/slots.ts
2770
2624
  function resolveShellSlot(slot, dock) {
@@ -2774,16 +2628,16 @@ function resolveShellSlot(slot, dock) {
2774
2628
  }
2775
2629
 
2776
2630
  // src/shell/mobile/DefaultMobileShell.tsx
2777
- import * as React29 from "react";
2631
+ import * as React27 from "react";
2778
2632
  import { useSessionState, useFourtySession as useFourtySession9 } from "@40rty/ams-sdk";
2779
2633
 
2780
2634
  // src/shell/mobile/MobileChrome.tsx
2781
2635
  import { useScrollContainerRef } from "@40rty/ams-sdk";
2782
2636
 
2783
2637
  // src/shell/ChromeSurface.tsx
2784
- import { jsx as jsx19 } from "react/jsx-runtime";
2638
+ import { jsx as jsx18 } from "react/jsx-runtime";
2785
2639
  function ChromeSurface({ visible, lifted }) {
2786
- return /* @__PURE__ */ jsx19(
2640
+ return /* @__PURE__ */ jsx18(
2787
2641
  "div",
2788
2642
  {
2789
2643
  "aria-hidden": true,
@@ -2825,10 +2679,10 @@ var ISLAND_CLEARANCE_BREATHING = 16 + 16;
2825
2679
  var MOBILE_CANVAS_BOTTOM_CLEARANCE = VOICE_ISLAND_HEIGHT + ISLAND_CLEARANCE_BREATHING;
2826
2680
 
2827
2681
  // src/shell/mobile/MobileChrome.tsx
2828
- import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
2682
+ import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
2829
2683
  function MobileChrome({ logo, launchers }) {
2830
2684
  const scrolled = useScrollThreshold(useScrollContainerRef(), 0);
2831
- return /* @__PURE__ */ jsxs13(
2685
+ return /* @__PURE__ */ jsxs12(
2832
2686
  "div",
2833
2687
  {
2834
2688
  "data-fourty-shell-part": "topbar",
@@ -2842,8 +2696,8 @@ function MobileChrome({ logo, launchers }) {
2842
2696
  zIndex: 50
2843
2697
  },
2844
2698
  children: [
2845
- /* @__PURE__ */ jsx20(ChromeSurface, { visible: true, lifted: scrolled }),
2846
- /* @__PURE__ */ jsxs13(
2699
+ /* @__PURE__ */ jsx19(ChromeSurface, { visible: true, lifted: scrolled }),
2700
+ /* @__PURE__ */ jsxs12(
2847
2701
  "div",
2848
2702
  {
2849
2703
  style: {
@@ -2858,8 +2712,8 @@ function MobileChrome({ logo, launchers }) {
2858
2712
  pointerEvents: "none"
2859
2713
  },
2860
2714
  children: [
2861
- /* @__PURE__ */ jsx20("div", { style: { pointerEvents: "auto", minWidth: 0, display: "inline-flex", alignItems: "center", overflow: "hidden" }, children: logo }),
2862
- /* @__PURE__ */ jsx20("div", { style: { pointerEvents: "auto", flexShrink: 0, display: "inline-flex", alignItems: "center", gap: 2 }, children: launchers })
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 })
2863
2717
  ]
2864
2718
  }
2865
2719
  )
@@ -2869,7 +2723,7 @@ function MobileChrome({ logo, launchers }) {
2869
2723
  }
2870
2724
 
2871
2725
  // src/shell/mobile/MobileVoiceConsole.tsx
2872
- import * as React28 from "react";
2726
+ import * as React26 from "react";
2873
2727
  import { useCurrentMessageIndex, useDisplayedLayout, useExclusiveOverlay, useFourtySession as useFourtySession8, useVoiceCapture as useVoiceCapture3, useScrollContainerRef as useScrollContainerRef2, useWakeLock } from "@40rty/ams-sdk";
2874
2728
 
2875
2729
  // src/shell/mobile/turn-end-action.ts
@@ -2884,18 +2738,18 @@ function turnEndAction(inputs) {
2884
2738
  }
2885
2739
 
2886
2740
  // src/shell/mobile/MorphIsland.tsx
2887
- import * as React24 from "react";
2741
+ import * as React22 from "react";
2888
2742
  import { useComposerChipSelect } from "@40rty/ams-sdk";
2889
2743
 
2890
2744
  // src/shell/mobile/RestIsland.tsx
2891
- import * as React22 from "react";
2745
+ import * as React20 from "react";
2892
2746
  import { useComposerPlaceholder as useComposerPlaceholder3, useFourtySession as useFourtySession7 } from "@40rty/ams-sdk";
2893
2747
 
2894
2748
  // src/shell/mobile/IslandInputBar.tsx
2895
- import * as React21 from "react";
2749
+ import * as React19 from "react";
2896
2750
 
2897
2751
  // src/shell/mobile/IslandComposeGroup.tsx
2898
- import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
2752
+ import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
2899
2753
  function IslandComposeGroup({
2900
2754
  value,
2901
2755
  onValueChange,
@@ -2908,8 +2762,8 @@ function IslandComposeGroup({
2908
2762
  attachments,
2909
2763
  taRef
2910
2764
  }) {
2911
- return /* @__PURE__ */ jsxs14(Fragment4, { children: [
2912
- /* @__PURE__ */ jsx21(
2765
+ return /* @__PURE__ */ jsxs13(Fragment4, { children: [
2766
+ /* @__PURE__ */ jsx20(
2913
2767
  AttachButton,
2914
2768
  {
2915
2769
  onFiles: attachments.addFiles,
@@ -2917,8 +2771,8 @@ function IslandComposeGroup({
2917
2771
  style: { color: "inherit", flex: "0 0 34px", width: 34, height: 34, alignSelf: "auto" }
2918
2772
  }
2919
2773
  ),
2920
- /* @__PURE__ */ jsxs14("div", { style: { position: "relative", flex: 1, minWidth: 0 }, children: [
2921
- /* @__PURE__ */ jsx21(
2774
+ /* @__PURE__ */ jsxs13("div", { style: { position: "relative", flex: 1, minWidth: 0 }, children: [
2775
+ /* @__PURE__ */ jsx20(
2922
2776
  "textarea",
2923
2777
  {
2924
2778
  ref: taRef,
@@ -2967,7 +2821,7 @@ function IslandComposeGroup({
2967
2821
  }
2968
2822
  }
2969
2823
  ),
2970
- placeholderAnimated === true && value.length === 0 && /* @__PURE__ */ jsx21(
2824
+ placeholderAnimated === true && value.length === 0 && /* @__PURE__ */ jsx20(
2971
2825
  "span",
2972
2826
  {
2973
2827
  "aria-hidden": "true",
@@ -2983,7 +2837,7 @@ function IslandComposeGroup({
2983
2837
  pointerEvents: "none",
2984
2838
  overflow: "hidden"
2985
2839
  },
2986
- children: /* @__PURE__ */ jsx21(AnimatedPlaceholder, { text: placeholder })
2840
+ children: /* @__PURE__ */ jsx20(AnimatedPlaceholder, { text: placeholder })
2987
2841
  }
2988
2842
  )
2989
2843
  ] })
@@ -2991,10 +2845,10 @@ function IslandComposeGroup({
2991
2845
  }
2992
2846
 
2993
2847
  // src/shell/mobile/use-blur-on-canvas-gesture.ts
2994
- import * as React20 from "react";
2848
+ import * as React18 from "react";
2995
2849
  var SURFACE = ".fourty-morph-surface";
2996
2850
  function useBlurOnCanvasGesture(taRef) {
2997
- React20.useEffect(() => {
2851
+ React18.useEffect(() => {
2998
2852
  const doc = document;
2999
2853
  const onGesture = (e) => {
3000
2854
  const field = taRef.current;
@@ -3018,7 +2872,7 @@ function useBlurOnCanvasGesture(taRef) {
3018
2872
  // src/shell/mobile/IslandNavButtons.tsx
3019
2873
  import { ChevronLeft, ChevronRight } from "lucide-react";
3020
2874
  import { useCanvasBack, useCanvasForward } from "@40rty/ams-sdk";
3021
- import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
2875
+ import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
3022
2876
  var STEP_BUTTON_STYLE = {
3023
2877
  flexShrink: 0,
3024
2878
  height: 40,
@@ -3035,8 +2889,8 @@ function IslandNavButtons() {
3035
2889
  const { canGoBack, goBack } = useCanvasBack();
3036
2890
  const { canGoForward, goForward } = useCanvasForward();
3037
2891
  if (!canGoBack && !canGoForward) return null;
3038
- return /* @__PURE__ */ jsxs15(Fragment5, { children: [
3039
- canGoBack && /* @__PURE__ */ jsx22(
2892
+ return /* @__PURE__ */ jsxs14(Fragment5, { children: [
2893
+ canGoBack && /* @__PURE__ */ jsx21(
3040
2894
  "button",
3041
2895
  {
3042
2896
  type: "button",
@@ -3044,10 +2898,10 @@ function IslandNavButtons() {
3044
2898
  onClick: goBack,
3045
2899
  "aria-label": "Back",
3046
2900
  style: STEP_BUTTON_STYLE,
3047
- children: /* @__PURE__ */ jsx22(ChevronLeft, { size: 19, strokeWidth: 1.8 })
2901
+ children: /* @__PURE__ */ jsx21(ChevronLeft, { size: 19, strokeWidth: 1.8 })
3048
2902
  }
3049
2903
  ),
3050
- canGoForward && /* @__PURE__ */ jsx22(
2904
+ canGoForward && /* @__PURE__ */ jsx21(
3051
2905
  "button",
3052
2906
  {
3053
2907
  type: "button",
@@ -3055,7 +2909,7 @@ function IslandNavButtons() {
3055
2909
  onClick: goForward,
3056
2910
  "aria-label": "Forward",
3057
2911
  style: STEP_BUTTON_STYLE,
3058
- children: /* @__PURE__ */ jsx22(ChevronRight, { size: 19, strokeWidth: 1.8 })
2912
+ children: /* @__PURE__ */ jsx21(ChevronRight, { size: 19, strokeWidth: 1.8 })
3059
2913
  }
3060
2914
  )
3061
2915
  ] });
@@ -3063,7 +2917,7 @@ function IslandNavButtons() {
3063
2917
 
3064
2918
  // src/shell/mobile/IslandTrailingAction.tsx
3065
2919
  import { AudioLines as AudioLines2, ArrowUp as ArrowUp3, Square as Square2 } from "lucide-react";
3066
- import { jsx as jsx23 } from "react/jsx-runtime";
2920
+ import { jsx as jsx22 } from "react/jsx-runtime";
3067
2921
  var STAMP_BUTTON_STYLE = {
3068
2922
  flexShrink: 0,
3069
2923
  marginLeft: 2,
@@ -3079,12 +2933,12 @@ var STAMP_BUTTON_STYLE = {
3079
2933
  };
3080
2934
  function IslandTrailingAction({ state }) {
3081
2935
  if (state.kind === "send") {
3082
- 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 }) });
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 }) });
3083
2937
  }
3084
2938
  if (state.kind === "stop") {
3085
- 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" }) });
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" }) });
3086
2940
  }
3087
- return /* @__PURE__ */ jsx23(
2941
+ return /* @__PURE__ */ jsx22(
3088
2942
  "button",
3089
2943
  {
3090
2944
  type: "button",
@@ -3103,13 +2957,13 @@ function IslandTrailingAction({ state }) {
3103
2957
  alignItems: "center",
3104
2958
  justifyContent: "center"
3105
2959
  },
3106
- children: /* @__PURE__ */ jsx23(AudioLines2, { size: 18, strokeWidth: 1.7 })
2960
+ children: /* @__PURE__ */ jsx22(AudioLines2, { size: 18, strokeWidth: 1.7 })
3107
2961
  }
3108
2962
  );
3109
2963
  }
3110
2964
 
3111
2965
  // src/shell/mobile/IslandInputBar.tsx
3112
- import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
2966
+ import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
3113
2967
  var NOTCH_PAD_LEFT = 8;
3114
2968
  function IslandInputBar({
3115
2969
  onSpeak,
@@ -3128,8 +2982,8 @@ function IslandInputBar({
3128
2982
  const labels = useLabels();
3129
2983
  const { value, setValue, canSend, submit, onPaste } = usePromptComposer({ attachments });
3130
2984
  const showStop = isStreaming && !canSend;
3131
- const taRef = React21.useRef(null);
3132
- const send = React21.useCallback(() => {
2985
+ const taRef = React19.useRef(null);
2986
+ const send = React19.useCallback(() => {
3133
2987
  submit();
3134
2988
  taRef.current?.blur();
3135
2989
  }, [submit]);
@@ -3143,18 +2997,18 @@ function IslandInputBar({
3143
2997
  const fieldPx = useFieldAutosize(taRef, value, 0, ISLAND_FIELD_MAX_LINES);
3144
2998
  useBlurOnCanvasGesture(taRef);
3145
2999
  const expanded = value.length > 0 && fieldPx > ISLAND_FIELD_LINE_PX * 1.5;
3146
- return /* @__PURE__ */ jsxs16(
3000
+ return /* @__PURE__ */ jsxs15(
3147
3001
  "div",
3148
3002
  {
3149
3003
  className: "fourty-island-bar",
3150
3004
  style: { display: "flex", alignItems: expanded ? "flex-end" : "center", gap: 2, minHeight: height, padding: "4px 6px" },
3151
3005
  children: [
3152
- !showStop && /* @__PURE__ */ jsx24(IslandNavButtons, {}),
3006
+ !showStop && /* @__PURE__ */ jsx23(IslandNavButtons, {}),
3153
3007
  showStop ? (
3154
3008
  // Non-scrolling shell: owns the tap; when expanded it carries the
3155
3009
  // bottom scroll-fade so that stays put while the read region below
3156
3010
  // it scrolls.
3157
- /* @__PURE__ */ jsx24(
3011
+ /* @__PURE__ */ jsx23(
3158
3012
  "div",
3159
3013
  {
3160
3014
  role: "button",
@@ -3171,7 +3025,7 @@ function IslandInputBar({
3171
3025
  className: "fourty-island-notch",
3172
3026
  "data-expanded": notchExpanded ? "true" : "false",
3173
3027
  style: { flex: 1, minWidth: 0, cursor: "pointer" },
3174
- children: /* @__PURE__ */ jsx24(
3028
+ children: /* @__PURE__ */ jsx23(
3175
3029
  "div",
3176
3030
  {
3177
3031
  className: "fourty-island-notch__read",
@@ -3181,7 +3035,7 @@ function IslandInputBar({
3181
3035
  )
3182
3036
  }
3183
3037
  )
3184
- ) : /* @__PURE__ */ jsx24(
3038
+ ) : /* @__PURE__ */ jsx23(
3185
3039
  IslandComposeGroup,
3186
3040
  {
3187
3041
  value,
@@ -3196,14 +3050,14 @@ function IslandInputBar({
3196
3050
  taRef
3197
3051
  }
3198
3052
  ),
3199
- /* @__PURE__ */ jsx24(IslandTrailingAction, { state: trailingState })
3053
+ /* @__PURE__ */ jsx23(IslandTrailingAction, { state: trailingState })
3200
3054
  ]
3201
3055
  }
3202
3056
  );
3203
3057
  }
3204
3058
 
3205
3059
  // src/shell/mobile/RestIsland.tsx
3206
- import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
3060
+ import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
3207
3061
  var SETTLE_EASE = [0.22, 1, 0.36, 1];
3208
3062
  var READ_FADE = { duration: 0.24, ease: SETTLE_EASE };
3209
3063
  function RestIsland({
@@ -3218,35 +3072,35 @@ function RestIsland({
3218
3072
  const hasHint = typeof agentHint === "string" && agentHint.trim().length > 0;
3219
3073
  const session = useFourtySession7();
3220
3074
  const isStreaming = session.isSubmitting || session.isRunning;
3221
- const onStop = React22.useCallback(() => session.abortGeneration(), [session]);
3222
- const [notchExpanded, setNotchExpanded] = React22.useState(false);
3223
- React22.useEffect(() => {
3075
+ const onStop = React20.useCallback(() => session.abortGeneration(), [session]);
3076
+ const [notchExpanded, setNotchExpanded] = React20.useState(false);
3077
+ React20.useEffect(() => {
3224
3078
  if (!isStreaming) setNotchExpanded(false);
3225
3079
  }, [isStreaming]);
3226
- const onNotchClick = React22.useCallback(() => setNotchExpanded((v) => !v), []);
3227
- const notch = /* @__PURE__ */ jsx25(AgentPresenceWidget, { expanded: notchExpanded, suppressIdleFallback: true, staticBand: true });
3228
- const [focused, setFocused] = React22.useState(false);
3229
- const blurTimer = React22.useRef(null);
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);
3230
3084
  const clearBlurTimer = () => {
3231
3085
  if (blurTimer.current !== null) {
3232
3086
  clearTimeout(blurTimer.current);
3233
3087
  blurTimer.current = null;
3234
3088
  }
3235
3089
  };
3236
- const onInputFocus = React22.useCallback(() => {
3090
+ const onInputFocus = React20.useCallback(() => {
3237
3091
  clearBlurTimer();
3238
3092
  setFocused(true);
3239
3093
  }, []);
3240
- const onInputBlur = React22.useCallback(() => {
3094
+ const onInputBlur = React20.useCallback(() => {
3241
3095
  clearBlurTimer();
3242
3096
  blurTimer.current = setTimeout(() => setFocused(false), 150);
3243
3097
  }, []);
3244
- React22.useEffect(() => clearBlurTimer, []);
3245
- React22.useEffect(() => {
3098
+ React20.useEffect(() => clearBlurTimer, []);
3099
+ React20.useEffect(() => {
3246
3100
  if (onComposeFocusChange === void 0) return;
3247
3101
  onComposeFocusChange(focused);
3248
3102
  }, [focused, onComposeFocusChange]);
3249
- React22.useEffect(() => {
3103
+ React20.useEffect(() => {
3250
3104
  if (!isStreaming) return;
3251
3105
  if (blurTimer.current !== null) {
3252
3106
  clearTimeout(blurTimer.current);
@@ -3255,7 +3109,7 @@ function RestIsland({
3255
3109
  setFocused(false);
3256
3110
  }, [isStreaming]);
3257
3111
  const showBrief = !isStreaming && !focused;
3258
- return /* @__PURE__ */ jsxs17(
3112
+ return /* @__PURE__ */ jsxs16(
3259
3113
  "div",
3260
3114
  {
3261
3115
  className: "fourty-island-rest",
@@ -3267,7 +3121,7 @@ function RestIsland({
3267
3121
  color: "var(--fourty-island-fg, var(--color-on-dark, #FFFFFF))"
3268
3122
  },
3269
3123
  children: [
3270
- /* @__PURE__ */ jsx25(AnimatePresence, { initial: false, children: showBrief && /* @__PURE__ */ jsx25(
3124
+ /* @__PURE__ */ jsx24(AnimatePresence, { initial: false, children: showBrief && /* @__PURE__ */ jsx24(
3271
3125
  motion.div,
3272
3126
  {
3273
3127
  className: "fourty-island-dossier",
@@ -3275,11 +3129,11 @@ function RestIsland({
3275
3129
  animate: { opacity: 1 },
3276
3130
  exit: { opacity: 0 },
3277
3131
  transition: READ_FADE,
3278
- children: /* @__PURE__ */ jsx25(PresenceBriefRail, {})
3132
+ children: /* @__PURE__ */ jsx24(PresenceBriefRail, {})
3279
3133
  },
3280
3134
  "presence-brief"
3281
3135
  ) }),
3282
- /* @__PURE__ */ jsx25(AnimatePresence, { initial: false, children: focused && /* @__PURE__ */ jsx25(
3136
+ /* @__PURE__ */ jsx24(AnimatePresence, { initial: false, children: focused && /* @__PURE__ */ jsx24(
3283
3137
  motion.div,
3284
3138
  {
3285
3139
  className: "fourty-island-chips",
@@ -3287,7 +3141,7 @@ function RestIsland({
3287
3141
  animate: { opacity: 1 },
3288
3142
  exit: { opacity: 0 },
3289
3143
  transition: READ_FADE,
3290
- children: /* @__PURE__ */ jsx25(
3144
+ children: /* @__PURE__ */ jsx24(
3291
3145
  ComposerChipStrip,
3292
3146
  {
3293
3147
  orientation: "row",
@@ -3300,8 +3154,8 @@ function RestIsland({
3300
3154
  },
3301
3155
  "chips"
3302
3156
  ) }),
3303
- /* @__PURE__ */ jsx25(AttachmentStrip, { attachments: attachments.attachments, onRemove: attachments.remove }),
3304
- /* @__PURE__ */ jsx25(
3157
+ /* @__PURE__ */ jsx24(AttachmentStrip, { attachments: attachments.attachments, onRemove: attachments.remove }),
3158
+ /* @__PURE__ */ jsx24(
3305
3159
  IslandInputBar,
3306
3160
  {
3307
3161
  onSpeak,
@@ -3351,7 +3205,7 @@ function nearestDetent(current, velocityY, travelPx, ladder) {
3351
3205
  }
3352
3206
 
3353
3207
  // src/shell/mobile/use-sheet-fold-gesture.ts
3354
- import * as React23 from "react";
3208
+ import * as React21 from "react";
3355
3209
  function findVerticalScrollerAtTouch(target) {
3356
3210
  let el = target instanceof HTMLElement ? target : null;
3357
3211
  while (el !== null && !el.classList.contains("fourty-morph-surface")) {
@@ -3370,13 +3224,13 @@ function isScrollerAtTop(scroller) {
3370
3224
  return scroller.scrollTop <= 0;
3371
3225
  }
3372
3226
  function useSheetFoldGesture({ sheetFaceRef, atSheet, travel, progress, settle }) {
3373
- const atSheetRef = React23.useRef(atSheet);
3227
+ const atSheetRef = React21.useRef(atSheet);
3374
3228
  atSheetRef.current = atSheet;
3375
- const travelRef = React23.useRef(travel);
3229
+ const travelRef = React21.useRef(travel);
3376
3230
  travelRef.current = travel;
3377
- const settleRef = React23.useRef(settle);
3231
+ const settleRef = React21.useRef(settle);
3378
3232
  settleRef.current = settle;
3379
- React23.useEffect(() => {
3233
+ React21.useEffect(() => {
3380
3234
  const el = sheetFaceRef.current;
3381
3235
  if (el === null) return;
3382
3236
  let tracking = false;
@@ -3465,7 +3319,7 @@ function useSheetFoldGesture({ sheetFaceRef, atSheet, travel, progress, settle }
3465
3319
  }
3466
3320
 
3467
3321
  // src/shell/mobile/MorphIsland.tsx
3468
- import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
3322
+ import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
3469
3323
  var SNAP_SPRING = { type: "spring", stiffness: 380, damping: 40, mass: 0.9 };
3470
3324
  var FLUSH_EASE = [0.22, 1, 0.36, 1];
3471
3325
  var FLUSH_SETTLE = { duration: 0.24, ease: FLUSH_EASE };
@@ -3473,7 +3327,7 @@ var FOLD_SETTLE = { duration: 0.25, ease: FLUSH_EASE };
3473
3327
  var FOLD_CONTENT_OUT = 0.3;
3474
3328
  var FOLD_GLYPH_IN = 0.34;
3475
3329
  var ISLAND_EDGE_LAYER = "var(--fourty-island-edge, 0 0 0 0 transparent)";
3476
- 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" }) });
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" }) });
3477
3331
  var NACRE_PAINT_ID = "fourty-island-nacre";
3478
3332
  var RING_GAP = 2;
3479
3333
  var NACRE_PERIOD_S = 10;
@@ -3491,7 +3345,7 @@ function NacreDefs({ animate: animated }) {
3491
3345
  treat as having no timeline to run, and this surface's primary target is
3492
3346
  iOS Safari — the one engine with a history of doing so. The element costs
3493
3347
  a pixel nobody will ever see. */
3494
- /* @__PURE__ */ jsx26(
3348
+ /* @__PURE__ */ jsx25(
3495
3349
  "svg",
3496
3350
  {
3497
3351
  width: "1",
@@ -3499,7 +3353,7 @@ function NacreDefs({ animate: animated }) {
3499
3353
  "aria-hidden": true,
3500
3354
  focusable: "false",
3501
3355
  style: { position: "absolute", width: 1, height: 1, overflow: "hidden", pointerEvents: "none" },
3502
- children: /* @__PURE__ */ jsx26("defs", { children: /* @__PURE__ */ jsxs18(
3356
+ children: /* @__PURE__ */ jsx25("defs", { children: /* @__PURE__ */ jsxs17(
3503
3357
  "linearGradient",
3504
3358
  {
3505
3359
  id: NACRE_PAINT_ID,
@@ -3511,21 +3365,21 @@ function NacreDefs({ animate: animated }) {
3511
3365
  spreadMethod: "pad",
3512
3366
  gradientTransform: "translate(-44 0)",
3513
3367
  children: [
3514
- /* @__PURE__ */ jsx26("stop", { offset: "0%", stopColor: "#FFFFFF" }),
3515
- /* @__PURE__ */ jsx26("stop", { offset: "18%", stopColor: "#FFFFFF" }),
3516
- /* @__PURE__ */ jsx26("stop", { offset: "32%", stopColor: "#FFC2E2" }),
3517
- /* @__PURE__ */ jsx26("stop", { offset: "44%", stopColor: "#FFE3AE" }),
3518
- /* @__PURE__ */ jsx26("stop", { offset: "56%", stopColor: "#6FE9D2" }),
3519
- /* @__PURE__ */ jsx26("stop", { offset: "68%", stopColor: "#9FB4FF" }),
3520
- /* @__PURE__ */ jsx26("stop", { offset: "82%", stopColor: "#FFFFFF" }),
3521
- /* @__PURE__ */ jsx26("stop", { offset: "100%", stopColor: "#FFFFFF" }),
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" }),
3522
3376
  animated && /* Off one edge to off the other in the first fifth of the cycle,
3523
3377
  then parked for the remaining eight seconds — the same proportion
3524
3378
  the old border sheen settled on, for the same reason: a light
3525
3379
  that is always moving is one nobody notices. The end positions
3526
3380
  put the coloured span clear of the 0-24 box, so the eight quiet
3527
3381
  seconds are a mark that is exactly plain white. */
3528
- /* @__PURE__ */ jsx26(
3382
+ /* @__PURE__ */ jsx25(
3529
3383
  "animateTransform",
3530
3384
  {
3531
3385
  attributeName: "gradientTransform",
@@ -3544,8 +3398,8 @@ function NacreDefs({ animate: animated }) {
3544
3398
  );
3545
3399
  }
3546
3400
  function usePrefersReducedMotion() {
3547
- const [reduced, setReduced] = React24.useState(false);
3548
- React24.useEffect(() => {
3401
+ const [reduced, setReduced] = React22.useState(false);
3402
+ React22.useEffect(() => {
3549
3403
  const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
3550
3404
  setReduced(mq.matches);
3551
3405
  const onChange = (e) => setReduced(e.matches);
@@ -3558,20 +3412,20 @@ var SHEET_TOP_INSET = MOBILE_TOPBAR_HEIGHT;
3558
3412
  var SHEET_SIDE_INSET = 8;
3559
3413
  var ISLAND_FALLBACK_H = VOICE_ISLAND_HEIGHT + 20;
3560
3414
  var GRIP_H = ISLAND_GRIP_H;
3561
- var MorphIsland = React24.forwardRef(
3415
+ var MorphIsland = React22.forwardRef(
3562
3416
  function MorphIsland2({ placeholder, placeholderExamples, attachments, onSpeak, folded, restGapPx, onSummon, historySheet, bottomOffset, enterFromFloor = false, sheetFlush, onOpenChange, onIslandHeightChange, onComposeFocusChange, collapsedMark }, ref) {
3563
3417
  const onChipSelect = useComposerChipSelect();
3564
3418
  const reducedMotion = usePrefersReducedMotion();
3565
3419
  const progress = useMotionValue(0);
3566
- const dockRef = React24.useRef(null);
3567
- const islandFaceRef = React24.useRef(null);
3568
- const gripRef = React24.useRef(null);
3569
- const sheetFaceRef = React24.useRef(null);
3570
- const [vw, setVw] = React24.useState(0);
3571
- const [vh, setVh] = React24.useState(0);
3572
- const [islandH, setIslandH] = React24.useState(ISLAND_FALLBACK_H);
3573
- const [gripH, setGripH] = React24.useState(GRIP_H);
3574
- React24.useEffect(() => {
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(() => {
3575
3429
  const el = dockRef.current;
3576
3430
  if (el === null) return;
3577
3431
  const view = el.ownerDocument.defaultView;
@@ -3583,7 +3437,7 @@ var MorphIsland = React24.forwardRef(
3583
3437
  ro.observe(el);
3584
3438
  return () => ro.disconnect();
3585
3439
  }, []);
3586
- React24.useEffect(() => {
3440
+ React22.useEffect(() => {
3587
3441
  const el = islandFaceRef.current;
3588
3442
  if (el === null) return;
3589
3443
  const view = el.ownerDocument.defaultView;
@@ -3598,7 +3452,7 @@ var MorphIsland = React24.forwardRef(
3598
3452
  ro.observe(el);
3599
3453
  return () => ro.disconnect();
3600
3454
  }, [onIslandHeightChange]);
3601
- React24.useEffect(() => {
3455
+ React22.useEffect(() => {
3602
3456
  const el = gripRef.current;
3603
3457
  if (el === null) return;
3604
3458
  const view = el.ownerDocument.defaultView;
@@ -3610,9 +3464,9 @@ var MorphIsland = React24.forwardRef(
3610
3464
  ro.observe(el);
3611
3465
  return () => ro.disconnect();
3612
3466
  }, []);
3613
- const floorProbeRef = React24.useRef(null);
3614
- const [floorGapPx, setFloorGapPx] = React24.useState(0);
3615
- React24.useEffect(() => {
3467
+ const floorProbeRef = React22.useRef(null);
3468
+ const [floorGapPx, setFloorGapPx] = React22.useState(0);
3469
+ React22.useEffect(() => {
3616
3470
  const el = floorProbeRef.current;
3617
3471
  if (el === null) return;
3618
3472
  const view = el.ownerDocument.defaultView;
@@ -3621,8 +3475,8 @@ var MorphIsland = React24.forwardRef(
3621
3475
  ro.observe(el);
3622
3476
  return () => ro.disconnect();
3623
3477
  }, []);
3624
- const [slabRadius, setSlabRadius] = React24.useState(0);
3625
- React24.useLayoutEffect(() => {
3478
+ const [slabRadius, setSlabRadius] = React22.useState(0);
3479
+ React22.useLayoutEffect(() => {
3626
3480
  const el = floorProbeRef.current;
3627
3481
  if (el === null) return;
3628
3482
  const view = el.ownerDocument.defaultView;
@@ -3630,8 +3484,8 @@ var MorphIsland = React24.forwardRef(
3630
3484
  const r = Number.parseFloat(view.getComputedStyle(el).borderTopLeftRadius);
3631
3485
  if (Number.isFinite(r) && r !== slabRadius) setSlabRadius(r);
3632
3486
  }, [slabRadius, vw]);
3633
- const [collapsedRadius, setCollapsedRadius] = React24.useState(ISLAND_COLLAPSED_H / 2);
3634
- React24.useLayoutEffect(() => {
3487
+ const [collapsedRadius, setCollapsedRadius] = React22.useState(ISLAND_COLLAPSED_H / 2);
3488
+ React22.useLayoutEffect(() => {
3635
3489
  const el = floorProbeRef.current;
3636
3490
  if (el === null) return;
3637
3491
  const view = el.ownerDocument.defaultView;
@@ -3645,23 +3499,23 @@ var MorphIsland = React24.forwardRef(
3645
3499
  const collapsedInset = vw > 0 ? Math.max(0, (vw - ISLAND_COLLAPSED_W) / 2) : sideInset;
3646
3500
  const sheetH = vh > 0 ? Math.max(islandH, vh - SHEET_TOP_INSET) : islandH;
3647
3501
  const collapsedH = islandH + gripH;
3648
- const ladder = React24.useMemo(
3502
+ const ladder = React22.useMemo(
3649
3503
  () => detentLadder(collapsedH, sheetH),
3650
3504
  [collapsedH, sheetH]
3651
3505
  );
3652
3506
  const firstOpen = ladder.length > 1 ? ladder[1] : 1;
3653
- const dim2 = React24.useMemo(() => dimSpan(ladder), [ladder]);
3507
+ const dim2 = React22.useMemo(() => dimSpan(ladder), [ladder]);
3654
3508
  const height = useTransform(progress, [0, 1], [collapsedH, sheetH]);
3655
3509
  const foldT = useMotionValue(folded ? 1 : 0);
3656
- React24.useEffect(() => {
3510
+ React22.useEffect(() => {
3657
3511
  const controls = animate(foldT, folded ? 1 : 0, FOLD_SETTLE);
3658
3512
  return () => controls.stop();
3659
3513
  }, [foldT, folded]);
3660
- const [folding, setFolding] = React24.useState(folded);
3514
+ const [folding, setFolding] = React22.useState(folded);
3661
3515
  useMotionValueEvent(foldT, "change", (v) => setFolding(v > 0));
3662
3516
  const entryTravel = collapsedH + restGapPx;
3663
3517
  const entryT = useMotionValue(enterFromFloor ? 1 : 0);
3664
- React24.useEffect(() => {
3518
+ React22.useEffect(() => {
3665
3519
  if (!enterFromFloor) return;
3666
3520
  const controls = animate(entryT, 0, ISLAND_ENTER_SPRING);
3667
3521
  return () => controls.stop();
@@ -3682,7 +3536,7 @@ var MorphIsland = React24.forwardRef(
3682
3536
  });
3683
3537
  const foldContentOut = useTransform(foldT, (f) => 1 - clamp01(f / FOLD_CONTENT_OUT));
3684
3538
  const flushMax = useMotionValue(sheetFlush ? floorGapPx : 0);
3685
- React24.useEffect(() => {
3539
+ React22.useEffect(() => {
3686
3540
  const controls = animate(flushMax, sheetFlush ? floorGapPx : 0, FLUSH_SETTLE);
3687
3541
  return () => controls.stop();
3688
3542
  }, [flushMax, sheetFlush, floorGapPx]);
@@ -3716,9 +3570,9 @@ var MorphIsland = React24.forwardRef(
3716
3570
  ([o, f]) => (1 - clamp01(o / 0.34)) * clamp01((clamp01(f) - FOLD_GLYPH_IN) / (1 - FOLD_GLYPH_IN))
3717
3571
  );
3718
3572
  const scrimOpacity = useTransform(progress, [dim2.from, dim2.to], [0, 0.42], { clamp: true });
3719
- const [atSheet, setAtSheet] = React24.useState(false);
3720
- const [modal, setModal] = React24.useState(false);
3721
- const [active, setActive] = React24.useState(false);
3573
+ const [atSheet, setAtSheet] = React22.useState(false);
3574
+ const [modal, setModal] = React22.useState(false);
3575
+ const [active, setActive] = React22.useState(false);
3722
3576
  useMotionValueEvent(progress, "change", (v) => {
3723
3577
  setAtSheet((prev) => {
3724
3578
  const n = v > firstOpen * 0.5;
@@ -3733,10 +3587,10 @@ var MorphIsland = React24.forwardRef(
3733
3587
  return prev === n ? prev : n;
3734
3588
  });
3735
3589
  });
3736
- React24.useEffect(() => {
3590
+ React22.useEffect(() => {
3737
3591
  onOpenChange?.(atSheet);
3738
3592
  }, [atSheet, onOpenChange]);
3739
- React24.useLayoutEffect(() => {
3593
+ React22.useLayoutEffect(() => {
3740
3594
  if (active) return;
3741
3595
  const face = islandFaceRef.current;
3742
3596
  if (face !== null && face.offsetHeight > 0 && face.offsetHeight !== islandH) {
@@ -3749,7 +3603,7 @@ var MorphIsland = React24.forwardRef(
3749
3603
  }
3750
3604
  });
3751
3605
  useScrollLock(modal, dockRef);
3752
- const snapTo = React24.useCallback((target) => {
3606
+ const snapTo = React22.useCallback((target) => {
3753
3607
  if (target === 0) {
3754
3608
  const face = sheetFaceRef.current;
3755
3609
  if (face !== null) {
@@ -3759,11 +3613,11 @@ var MorphIsland = React24.forwardRef(
3759
3613
  }
3760
3614
  animate(progress, target, SNAP_SPRING);
3761
3615
  }, [progress]);
3762
- React24.useImperativeHandle(ref, () => ({
3616
+ React22.useImperativeHandle(ref, () => ({
3763
3617
  open: () => snapTo(1),
3764
3618
  close: () => snapTo(0)
3765
3619
  }), [snapTo]);
3766
- const panStart = React24.useRef(0);
3620
+ const panStart = React22.useRef(0);
3767
3621
  const travel = Math.max(1, sheetH - islandH);
3768
3622
  const onPanStart = () => {
3769
3623
  panStart.current = progress.get();
@@ -3772,13 +3626,13 @@ var MorphIsland = React24.forwardRef(
3772
3626
  const next = panStart.current + -info.offset.y / travel;
3773
3627
  progress.set(Math.min(1, Math.max(0, next)));
3774
3628
  };
3775
- const settle = React24.useCallback((velocityY) => {
3629
+ const settle = React22.useCallback((velocityY) => {
3776
3630
  snapTo(nearestDetent(progress.get(), velocityY, travel, ladder));
3777
3631
  }, [snapTo, progress, travel, ladder]);
3778
3632
  const onPanEnd = (_e, info) => {
3779
3633
  settle(info.velocity.y);
3780
3634
  };
3781
- const islandFacePanEngaged = React24.useRef(false);
3635
+ const islandFacePanEngaged = React22.useRef(false);
3782
3636
  const onIslandFacePanStart = (e) => {
3783
3637
  const target = e.target instanceof HTMLElement ? e.target : null;
3784
3638
  const onControl = target !== null && target.closest(
@@ -3796,7 +3650,7 @@ var MorphIsland = React24.forwardRef(
3796
3650
  onPanEnd(e, info);
3797
3651
  };
3798
3652
  useSheetFoldGesture({ sheetFaceRef, atSheet, travel, progress, settle });
3799
- return /* @__PURE__ */ jsxs18(
3653
+ return /* @__PURE__ */ jsxs17(
3800
3654
  motion.div,
3801
3655
  {
3802
3656
  ref: dockRef,
@@ -3807,7 +3661,7 @@ var MorphIsland = React24.forwardRef(
3807
3661
  transition: { duration: 0.18, ease: [0.22, 1, 0.36, 1] },
3808
3662
  style: { position: "fixed", inset: 0, pointerEvents: "none", zIndex: 60 },
3809
3663
  children: [
3810
- /* @__PURE__ */ jsx26(
3664
+ /* @__PURE__ */ jsx25(
3811
3665
  "div",
3812
3666
  {
3813
3667
  ref: floorProbeRef,
@@ -3824,7 +3678,7 @@ var MorphIsland = React24.forwardRef(
3824
3678
  }
3825
3679
  }
3826
3680
  ),
3827
- /* @__PURE__ */ jsx26(
3681
+ /* @__PURE__ */ jsx25(
3828
3682
  motion.div,
3829
3683
  {
3830
3684
  "aria-hidden": true,
@@ -3838,7 +3692,7 @@ var MorphIsland = React24.forwardRef(
3838
3692
  }
3839
3693
  }
3840
3694
  ),
3841
- /* @__PURE__ */ jsx26(
3695
+ /* @__PURE__ */ jsx25(
3842
3696
  motion.div,
3843
3697
  {
3844
3698
  className: "fourty-island-aura",
@@ -3858,7 +3712,7 @@ var MorphIsland = React24.forwardRef(
3858
3712
  }
3859
3713
  }
3860
3714
  ),
3861
- /* @__PURE__ */ jsx26(
3715
+ /* @__PURE__ */ jsx25(
3862
3716
  motion.div,
3863
3717
  {
3864
3718
  className: "fourty-island-ring",
@@ -3878,7 +3732,7 @@ var MorphIsland = React24.forwardRef(
3878
3732
  }
3879
3733
  }
3880
3734
  ),
3881
- /* @__PURE__ */ jsxs18(
3735
+ /* @__PURE__ */ jsxs17(
3882
3736
  motion.div,
3883
3737
  {
3884
3738
  className: "fourty-morph-surface",
@@ -3940,7 +3794,7 @@ var MorphIsland = React24.forwardRef(
3940
3794
  flexDirection: "column"
3941
3795
  },
3942
3796
  children: [
3943
- /* @__PURE__ */ jsx26(
3797
+ /* @__PURE__ */ jsx25(
3944
3798
  motion.div,
3945
3799
  {
3946
3800
  "aria-hidden": true,
@@ -3954,7 +3808,7 @@ var MorphIsland = React24.forwardRef(
3954
3808
  }
3955
3809
  }
3956
3810
  ),
3957
- /* @__PURE__ */ jsx26(
3811
+ /* @__PURE__ */ jsx25(
3958
3812
  motion.div,
3959
3813
  {
3960
3814
  "aria-hidden": true,
@@ -3968,7 +3822,7 @@ var MorphIsland = React24.forwardRef(
3968
3822
  }
3969
3823
  }
3970
3824
  ),
3971
- /* @__PURE__ */ jsx26(
3825
+ /* @__PURE__ */ jsx25(
3972
3826
  motion.div,
3973
3827
  {
3974
3828
  ref: gripRef,
@@ -4003,7 +3857,7 @@ var MorphIsland = React24.forwardRef(
4003
3857
  pointerEvents: folded ? "none" : "auto"
4004
3858
  },
4005
3859
  "aria-hidden": folded ? true : void 0,
4006
- children: /* @__PURE__ */ jsx26(
3860
+ children: /* @__PURE__ */ jsx25(
4007
3861
  "svg",
4008
3862
  {
4009
3863
  "aria-hidden": true,
@@ -4011,7 +3865,7 @@ var MorphIsland = React24.forwardRef(
4011
3865
  viewBox: "0 0 32 5",
4012
3866
  fill: "none",
4013
3867
  preserveAspectRatio: "none",
4014
- children: /* @__PURE__ */ jsx26(
3868
+ children: /* @__PURE__ */ jsx25(
4015
3869
  "polyline",
4016
3870
  {
4017
3871
  points: "1,4 16,1 31,4",
@@ -4026,7 +3880,7 @@ var MorphIsland = React24.forwardRef(
4026
3880
  )
4027
3881
  }
4028
3882
  ),
4029
- /* @__PURE__ */ jsx26(
3883
+ /* @__PURE__ */ jsx25(
4030
3884
  motion.div,
4031
3885
  {
4032
3886
  ref: sheetFaceRef,
@@ -4049,7 +3903,7 @@ var MorphIsland = React24.forwardRef(
4049
3903
  children: historySheet(() => snapTo(0))
4050
3904
  }
4051
3905
  ),
4052
- /* @__PURE__ */ jsx26(
3906
+ /* @__PURE__ */ jsx25(
4053
3907
  motion.div,
4054
3908
  {
4055
3909
  ref: islandFaceRef,
@@ -4076,7 +3930,7 @@ var MorphIsland = React24.forwardRef(
4076
3930
  touchAction: "pan-x",
4077
3931
  zIndex: 1
4078
3932
  },
4079
- children: /* @__PURE__ */ jsx26(
3933
+ children: /* @__PURE__ */ jsx25(
4080
3934
  RestIsland,
4081
3935
  {
4082
3936
  placeholder,
@@ -4089,7 +3943,7 @@ var MorphIsland = React24.forwardRef(
4089
3943
  )
4090
3944
  }
4091
3945
  ),
4092
- /* @__PURE__ */ jsxs18(
3946
+ /* @__PURE__ */ jsxs17(
4093
3947
  motion.div,
4094
3948
  {
4095
3949
  className: "fourty-island-collapsed",
@@ -4107,7 +3961,7 @@ var MorphIsland = React24.forwardRef(
4107
3961
  },
4108
3962
  "data-folded": folded ? "true" : "false",
4109
3963
  children: [
4110
- /* @__PURE__ */ jsx26(NacreDefs, { animate: !reducedMotion }),
3964
+ /* @__PURE__ */ jsx25(NacreDefs, { animate: !reducedMotion }),
4111
3965
  collapsedMark !== void 0 ? collapsedMark : DEFAULT_COLLAPSED_MARK
4112
3966
  ]
4113
3967
  }
@@ -4122,25 +3976,25 @@ var MorphIsland = React24.forwardRef(
4122
3976
  );
4123
3977
 
4124
3978
  // src/shell/mobile/hero-entry-point.tsx
4125
- import * as React25 from "react";
4126
- import { jsx as jsx27 } from "react/jsx-runtime";
4127
- var HeroEntryPointContext = React25.createContext(null);
3979
+ import * as React23 from "react";
3980
+ import { jsx as jsx26 } from "react/jsx-runtime";
3981
+ var HeroEntryPointContext = React23.createContext(null);
4128
3982
  function HeroEntryPointProvider({
4129
3983
  claim,
4130
3984
  claimed,
4131
3985
  children
4132
3986
  }) {
4133
- const value = React25.useMemo(() => ({ claim, claimed }), [claim, claimed]);
4134
- return /* @__PURE__ */ jsx27(HeroEntryPointContext.Provider, { value, children });
3987
+ const value = React23.useMemo(() => ({ claim, claimed }), [claim, claimed]);
3988
+ return /* @__PURE__ */ jsx26(HeroEntryPointContext.Provider, { value, children });
4135
3989
  }
4136
3990
  function useHeroEntryPointVisible() {
4137
- const ctx = React25.useContext(HeroEntryPointContext);
3991
+ const ctx = React23.useContext(HeroEntryPointContext);
4138
3992
  return ctx !== null && ctx.claimed;
4139
3993
  }
4140
3994
  function useClaimHeroEntryPoint(active) {
4141
- const ctx = React25.useContext(HeroEntryPointContext);
3995
+ const ctx = React23.useContext(HeroEntryPointContext);
4142
3996
  const claim = ctx === null ? null : ctx.claim;
4143
- React25.useEffect(() => {
3997
+ React23.useEffect(() => {
4144
3998
  if (claim === null || !active) return;
4145
3999
  claim(1);
4146
4000
  return () => claim(-1);
@@ -4149,8 +4003,8 @@ function useClaimHeroEntryPoint(active) {
4149
4003
  function useOnScreen(ref, opts) {
4150
4004
  const enter = opts !== void 0 && opts.enter !== void 0 ? opts.enter : 0.9;
4151
4005
  const exit = opts !== void 0 && opts.exit !== void 0 ? opts.exit : 0.25;
4152
- const [on, setOn] = React25.useState(true);
4153
- React25.useEffect(() => {
4006
+ const [on, setOn] = React23.useState(true);
4007
+ React23.useEffect(() => {
4154
4008
  const el = ref.current;
4155
4009
  if (el === null || typeof IntersectionObserver === "undefined") return;
4156
4010
  const observer = new IntersectionObserver(
@@ -4169,12 +4023,12 @@ function useOnScreen(ref, opts) {
4169
4023
  }
4170
4024
 
4171
4025
  // src/shell/mobile/use-island-fold-scroll.ts
4172
- import * as React26 from "react";
4026
+ import * as React24 from "react";
4173
4027
  import { isNavScrollActive } from "@40rty/ams-sdk";
4174
4028
  var SCROLL_IDLE_MS = 240;
4175
4029
  function useIslandFoldScroll(scrollRef) {
4176
- const [scrolling, setScrolling] = React26.useState(false);
4177
- React26.useEffect(() => {
4030
+ const [scrolling, setScrolling] = React24.useState(false);
4031
+ React24.useEffect(() => {
4178
4032
  const el = scrollRef.current;
4179
4033
  if (el === null) return;
4180
4034
  let timer = null;
@@ -4195,10 +4049,10 @@ function useIslandFoldScroll(scrollRef) {
4195
4049
  }
4196
4050
 
4197
4051
  // src/shell/mobile/use-keyboard-inset.ts
4198
- import * as React27 from "react";
4052
+ import * as React25 from "react";
4199
4053
  function useKeyboardInset(ref) {
4200
- const [inset, setInset] = React27.useState(0);
4201
- React27.useEffect(() => {
4054
+ const [inset, setInset] = React25.useState(0);
4055
+ React25.useEffect(() => {
4202
4056
  const el = ref.current;
4203
4057
  if (el === null) return;
4204
4058
  const doc = el.ownerDocument;
@@ -4223,21 +4077,21 @@ function useKeyboardInset(ref) {
4223
4077
  }
4224
4078
 
4225
4079
  // src/shell/mobile/MobileVoiceConsole.tsx
4226
- import { jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
4080
+ import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
4227
4081
  function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, onIslandHeightChange, enterFromFloor, collapsedMark }) {
4228
4082
  const session = useFourtySession8();
4229
4083
  const layout = useDisplayedLayout();
4230
- const [mode, setMode] = React28.useState("rest");
4084
+ const [mode, setMode] = React26.useState("rest");
4231
4085
  const attach = useComposerAttachments();
4232
- const morphRef = React28.useRef(null);
4233
- const [threadRelandKey, setThreadRelandKey] = React28.useState(0);
4234
- const [sheetOpen, setSheetOpen] = React28.useState(false);
4086
+ const morphRef = React26.useRef(null);
4087
+ const [threadRelandKey, setThreadRelandKey] = React26.useState(0);
4088
+ const [sheetOpen, setSheetOpen] = React26.useState(false);
4235
4089
  useExclusiveOverlay(
4236
4090
  "conversation-sheet",
4237
4091
  sheetOpen,
4238
- React28.useCallback(() => morphRef.current?.close(), [])
4092
+ React26.useCallback(() => morphRef.current?.close(), [])
4239
4093
  );
4240
- const anchorRef = React28.useRef(null);
4094
+ const anchorRef = React26.useRef(null);
4241
4095
  const chromeInset = useKeyboardInset(anchorRef);
4242
4096
  const keyboardLikely = chromeInset > KEYBOARD_LIKELY_MIN_PX;
4243
4097
  const restGap = keyboardLikely ? ISLAND_KEYBOARD_GAP : ISLAND_BOTTOM_GAP;
@@ -4245,20 +4099,20 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4245
4099
  const scrollRef = useScrollContainerRef2();
4246
4100
  const { atTop, collapsed } = useScrollDirection({ container: scrollRef });
4247
4101
  const { scrolling } = useIslandFoldScroll(scrollRef);
4248
- const handleIslandHeightChange = React28.useCallback(
4102
+ const handleIslandHeightChange = React26.useCallback(
4249
4103
  (height) => {
4250
4104
  onIslandHeightChange?.(height);
4251
4105
  },
4252
4106
  [onIslandHeightChange]
4253
4107
  );
4254
4108
  const working = session.isRunning || session.isSubmitting;
4255
- const [summoned, setSummoned] = React28.useState(enterFromFloor === true);
4256
- const summonArmed = React28.useRef(false);
4257
- const onSummon = React28.useCallback(() => {
4109
+ const [summoned, setSummoned] = React26.useState(enterFromFloor === true);
4110
+ const summonArmed = React26.useRef(false);
4111
+ const onSummon = React26.useCallback(() => {
4258
4112
  setSummoned(true);
4259
4113
  summonArmed.current = false;
4260
4114
  }, []);
4261
- React28.useEffect(() => {
4115
+ React26.useEffect(() => {
4262
4116
  if (!summoned) return;
4263
4117
  if (!scrolling) {
4264
4118
  summonArmed.current = true;
@@ -4266,18 +4120,18 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4266
4120
  }
4267
4121
  if (summonArmed.current) setSummoned(false);
4268
4122
  }, [scrolling, summoned]);
4269
- const [composing, setComposing] = React28.useState(false);
4123
+ const [composing, setComposing] = React26.useState(false);
4270
4124
  const heroEntryVisible = useHeroEntryPointVisible();
4271
- const heroWasVisible = React28.useRef(heroEntryVisible);
4272
- React28.useEffect(() => {
4125
+ const heroWasVisible = React26.useRef(heroEntryVisible);
4126
+ React26.useEffect(() => {
4273
4127
  const was = heroWasVisible.current;
4274
4128
  heroWasVisible.current = heroEntryVisible;
4275
4129
  if (was && !heroEntryVisible) onSummon();
4276
4130
  }, [heroEntryVisible, onSummon]);
4277
4131
  const folded = mode === "rest" && !working && !sheetOpen && !summoned && !composing && (heroEntryVisible || !atTop && collapsed);
4278
4132
  const currentMessageIndex = useCurrentMessageIndex();
4279
- const prevMessageIndex = React28.useRef(currentMessageIndex);
4280
- React28.useEffect(() => {
4133
+ const prevMessageIndex = React26.useRef(currentMessageIndex);
4134
+ React26.useEffect(() => {
4281
4135
  const changed = currentMessageIndex !== prevMessageIndex.current;
4282
4136
  prevMessageIndex.current = currentMessageIndex;
4283
4137
  if (changed && sheetOpen) morphRef.current?.close();
@@ -4294,7 +4148,7 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4294
4148
  silenceMs: 2e3
4295
4149
  });
4296
4150
  useWakeLock(voice.state === "listening" || working);
4297
- const [micDeniedNotice, setMicDeniedNotice] = React28.useState(false);
4151
+ const [micDeniedNotice, setMicDeniedNotice] = React26.useState(false);
4298
4152
  const startVoice = () => {
4299
4153
  if (!voice.supported) {
4300
4154
  morphRef.current?.open();
@@ -4312,7 +4166,7 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4312
4166
  voice.cancel();
4313
4167
  setMode("rest");
4314
4168
  };
4315
- React28.useEffect(() => {
4169
+ React26.useEffect(() => {
4316
4170
  if (mode !== "listening" || voice.state !== "idle") return;
4317
4171
  setMode("rest");
4318
4172
  if (voice.permissionDenied) {
@@ -4321,11 +4175,11 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4321
4175
  return () => clearTimeout(timer);
4322
4176
  }
4323
4177
  }, [mode, voice.state, voice.permissionDenied]);
4324
- const wasRunning = React28.useRef(false);
4325
- const turnStartLayoutSig = React28.useRef("");
4326
- const turnStartMsgCount = React28.useRef(0);
4327
- const answerHandled = React28.useRef(true);
4328
- React28.useEffect(() => {
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(() => {
4329
4183
  if (session.isRunning && !wasRunning.current) {
4330
4184
  setMode("rest");
4331
4185
  morphRef.current?.close();
@@ -4350,8 +4204,8 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4350
4204
  }
4351
4205
  }
4352
4206
  }, [session.isRunning, layout, session.messages]);
4353
- return /* @__PURE__ */ jsxs19(ThreadRelandContext.Provider, { value: threadRelandKey, children: [
4354
- /* @__PURE__ */ jsx28(AnimatePresence, { initial: false, children: mode === "rest" && /* @__PURE__ */ jsx28(
4207
+ return /* @__PURE__ */ jsxs18(ThreadRelandContext.Provider, { value: threadRelandKey, children: [
4208
+ /* @__PURE__ */ jsx27(AnimatePresence, { initial: false, children: mode === "rest" && /* @__PURE__ */ jsx27(
4355
4209
  MorphIsland,
4356
4210
  {
4357
4211
  ref: morphRef,
@@ -4373,7 +4227,7 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4373
4227
  },
4374
4228
  "morph"
4375
4229
  ) }),
4376
- /* @__PURE__ */ jsx28(
4230
+ /* @__PURE__ */ jsx27(
4377
4231
  "div",
4378
4232
  {
4379
4233
  ref: anchorRef,
@@ -4389,7 +4243,7 @@ function MobileVoiceConsole({ placeholder, placeholderExamples, historySheet, on
4389
4243
  pointerEvents: "none",
4390
4244
  zIndex: 60
4391
4245
  },
4392
- 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 }) })
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 }) })
4393
4247
  }
4394
4248
  )
4395
4249
  ] });
@@ -4416,7 +4270,7 @@ function documentScrollRef(forwarded) {
4416
4270
  }
4417
4271
 
4418
4272
  // src/shell/mobile/DefaultMobileShell.tsx
4419
- import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
4273
+ import { Fragment as Fragment6, jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
4420
4274
  var MOBILE_GUTTER_MAX = 16;
4421
4275
  function scrollToTop() {
4422
4276
  if (typeof document === "undefined") return;
@@ -4428,42 +4282,42 @@ function DefaultMobileShell(props) {
4428
4282
  const { messages } = useSessionState();
4429
4283
  const { isSubmitting, isRunning } = useFourtySession9();
4430
4284
  const working = isSubmitting || isRunning;
4431
- const [open, setOpen] = React29.useState(false);
4432
- const toggle = React29.useCallback(() => setOpen((v) => !v), []);
4433
- const dock = React29.useMemo(() => ({ open, toggle }), [open, toggle]);
4285
+ const [open, setOpen] = React27.useState(false);
4286
+ const toggle = React27.useCallback(() => setOpen((v) => !v), []);
4287
+ const dock = React27.useMemo(() => ({ open, toggle }), [open, toggle]);
4434
4288
  const gutter = Math.min(props.gutter === void 0 ? MOBILE_GUTTER_MAX : props.gutter, MOBILE_GUTTER_MAX);
4435
4289
  const placeholder = props.placeholder === void 0 ? DEFAULT_PLACEHOLDER : props.placeholder;
4436
4290
  const canvasGutterStyle = { paddingLeft: gutter, paddingRight: gutter, "--fourty-canvas-gutter": `${gutter}px` };
4437
- const [islandFaceHeight, setIslandFaceHeight] = React29.useState(null);
4438
- const [heroEntryClaims, setHeroEntryClaims] = React29.useState(0);
4439
- const claimHeroEntry = React29.useCallback((delta) => {
4291
+ const [islandFaceHeight, setIslandFaceHeight] = React27.useState(null);
4292
+ const [heroEntryClaims, setHeroEntryClaims] = React27.useState(0);
4293
+ const claimHeroEntry = React27.useCallback((delta) => {
4440
4294
  setHeroEntryClaims((n) => Math.max(0, n + delta));
4441
4295
  }, []);
4442
4296
  const heroOwnsEntry = heroEntryClaims > 0;
4443
4297
  const withholdIsland = heroOwnsEntry && !working;
4444
4298
  const hasAsked = messages.some((m) => m.role === "user");
4445
- const hadAsked = React29.useRef(hasAsked);
4446
- React29.useEffect(() => {
4299
+ const hadAsked = React27.useRef(hasAsked);
4300
+ React27.useEffect(() => {
4447
4301
  const was = hadAsked.current;
4448
4302
  hadAsked.current = hasAsked;
4449
4303
  if (!was || hasAsked) return;
4450
4304
  scrollToTop();
4451
4305
  }, [hasAsked]);
4452
- const wasWithheld = React29.useRef(false);
4306
+ const wasWithheld = React27.useRef(false);
4453
4307
  const enterFromFloor = wasWithheld.current && !withholdIsland;
4454
- React29.useEffect(() => {
4308
+ React27.useEffect(() => {
4455
4309
  wasWithheld.current = withholdIsland;
4456
4310
  }, [withholdIsland]);
4457
4311
  const canvasBottomClearance = withholdIsland ? 0 : islandFaceHeight === null ? MOBILE_CANVAS_BOTTOM_CLEARANCE : islandFaceHeight + ISLAND_CLEARANCE_BREATHING;
4458
- const shellRef = React29.useRef(null);
4312
+ const shellRef = React27.useRef(null);
4459
4313
  const chromeInset = useKeyboardInset(shellRef);
4460
4314
  const restingChromeInset = chromeInset > KEYBOARD_LIKELY_MIN_PX ? 0 : chromeInset;
4461
4315
  const resolveScrollRef = documentScrollRef(props.scrollRef);
4462
- const rootRef = React29.useCallback((node) => {
4316
+ const rootRef = React27.useCallback((node) => {
4463
4317
  shellRef.current = node;
4464
4318
  resolveScrollRef(node);
4465
4319
  }, [props.scrollRef]);
4466
- React29.useLayoutEffect(() => {
4320
+ React27.useLayoutEffect(() => {
4467
4321
  if (typeof window === "undefined") return;
4468
4322
  const nav = window.performance.getEntriesByType("navigation")[0];
4469
4323
  const isReload = nav !== void 0 && nav.type === "reload";
@@ -4475,7 +4329,7 @@ function DefaultMobileShell(props) {
4475
4329
  window.history.scrollRestoration = previous;
4476
4330
  };
4477
4331
  }, []);
4478
- React29.useEffect(() => {
4332
+ React27.useEffect(() => {
4479
4333
  const target = document.scrollingElement;
4480
4334
  if (!(target instanceof HTMLElement)) return;
4481
4335
  const previous = target.style.scrollPaddingTop;
@@ -4484,7 +4338,7 @@ function DefaultMobileShell(props) {
4484
4338
  target.style.scrollPaddingTop = previous;
4485
4339
  };
4486
4340
  }, []);
4487
- return /* @__PURE__ */ jsxs20(
4341
+ return /* @__PURE__ */ jsxs19(
4488
4342
  "div",
4489
4343
  {
4490
4344
  ref: rootRef,
@@ -4520,28 +4374,28 @@ function DefaultMobileShell(props) {
4520
4374
  background: "var(--fourty-color-bg)"
4521
4375
  },
4522
4376
  children: [
4523
- /* @__PURE__ */ jsx29(MobileChrome, { logo: resolveShellSlot(props.logo, dock), launchers: resolveShellSlot(props.launchers, dock) }),
4524
- /* @__PURE__ */ jsxs20(HeroEntryPointProvider, { claim: claimHeroEntry, claimed: heroOwnsEntry, children: [
4525
- /* @__PURE__ */ jsx29(
4377
+ /* @__PURE__ */ jsx28(MobileChrome, { logo: resolveShellSlot(props.logo, dock), launchers: resolveShellSlot(props.launchers, dock) }),
4378
+ /* @__PURE__ */ jsxs19(HeroEntryPointProvider, { claim: claimHeroEntry, claimed: heroOwnsEntry, children: [
4379
+ /* @__PURE__ */ jsx28(
4526
4380
  "main",
4527
4381
  {
4528
4382
  style: {
4529
4383
  paddingBottom: `${canvasBottomClearance + restingChromeInset + ISLAND_BOTTOM_GAP}px`
4530
4384
  },
4531
- children: /* @__PURE__ */ jsxs20("div", { style: canvasGutterStyle, children: [
4532
- /* @__PURE__ */ jsx29(ConversationTransition, { children: props.canvas }),
4385
+ children: /* @__PURE__ */ jsxs19("div", { style: canvasGutterStyle, children: [
4386
+ /* @__PURE__ */ jsx28(ConversationTransition, { children: props.canvas }),
4533
4387
  props.footer
4534
4388
  ] })
4535
4389
  }
4536
4390
  ),
4537
- !withholdIsland && /* @__PURE__ */ jsx29(
4391
+ !withholdIsland && /* @__PURE__ */ jsx28(
4538
4392
  MobileVoiceConsole,
4539
4393
  {
4540
4394
  enterFromFloor,
4541
4395
  placeholder,
4542
4396
  placeholderExamples: props.placeholderExamples,
4543
4397
  collapsedMark: props.collapsedMark,
4544
- historySheet: (close) => /* @__PURE__ */ jsxs20(Fragment6, { children: [
4398
+ historySheet: (close) => /* @__PURE__ */ jsxs19(Fragment6, { children: [
4545
4399
  props.presenceNotch !== void 0 && // Bleeds the notch's OWN background up UNDER the grip's row
4546
4400
  // (negative `marginTop` pulls the box up by the grip's exact
4547
4401
  // height; `paddingTop` pushes the notch's real CONTENT back
@@ -4551,8 +4405,8 @@ function DefaultMobileShell(props) {
4551
4405
  // opacity once `atSheet`) — a visible seam between the grip
4552
4406
  // and the notch's own color, right where they should read as
4553
4407
  // one continuous surface.
4554
- /* @__PURE__ */ jsx29("div", { style: { marginTop: -ISLAND_GRIP_H, paddingTop: ISLAND_GRIP_H }, children: props.presenceNotch }),
4555
- /* @__PURE__ */ jsx29("div", { style: { position: "relative", flex: 1, minHeight: 0 }, children: resolveShellSlot(props.composer, { open: true, toggle: close }) })
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 }) })
4556
4410
  ] }),
4557
4411
  onIslandHeightChange: setIslandFaceHeight
4558
4412
  }
@@ -4565,14 +4419,14 @@ function DefaultMobileShell(props) {
4565
4419
  }
4566
4420
 
4567
4421
  // src/shell/dock-context.tsx
4568
- import * as React30 from "react";
4569
- import { jsx as jsx30 } from "react/jsx-runtime";
4570
- var ShellDockContext = React30.createContext(null);
4422
+ import * as React28 from "react";
4423
+ import { jsx as jsx29 } from "react/jsx-runtime";
4424
+ var ShellDockContext = React28.createContext(null);
4571
4425
  function ShellDockProvider({ value, children }) {
4572
- return /* @__PURE__ */ jsx30(ShellDockContext.Provider, { value, children });
4426
+ return /* @__PURE__ */ jsx29(ShellDockContext.Provider, { value, children });
4573
4427
  }
4574
4428
  function useShellDock() {
4575
- const dock = React30.useContext(ShellDockContext);
4429
+ const dock = React28.useContext(ShellDockContext);
4576
4430
  if (dock === null) {
4577
4431
  throw new Error("useShellDock: no ShellDockProvider in the tree \u2014 this component must render inside a ShellScaffold canvas.");
4578
4432
  }
@@ -4580,7 +4434,7 @@ function useShellDock() {
4580
4434
  }
4581
4435
 
4582
4436
  // src/shell/ShellScaffold.tsx
4583
- import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
4437
+ import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
4584
4438
  var DEFAULTS = {
4585
4439
  dockWidth: 420,
4586
4440
  dockTop: 0,
@@ -4608,15 +4462,15 @@ function ShellScaffold(props) {
4608
4462
  const isMobile = useMediaQuery(mq);
4609
4463
  const dock = useDockState(props.reopenDockOnMessage === true, props.canvasComposer === void 0);
4610
4464
  const resizable = props.resizableDock === true;
4611
- const [liveWidth, setLiveWidth] = React31.useState(dockWidth);
4612
- const [resizing, setResizing] = React31.useState(false);
4465
+ const [liveWidth, setLiveWidth] = React29.useState(dockWidth);
4466
+ const [resizing, setResizing] = React29.useState(false);
4613
4467
  const effectiveWidth = resizable ? liveWidth : dockWidth;
4614
4468
  const canvasSpacing = useSideDockSpacing(dock.open, effectiveWidth, !resizing);
4615
4469
  if (props.mobile !== void 0 && isMobile) {
4616
- return /* @__PURE__ */ jsx31(ShellDockProvider, { value: dock, children: props.mobile });
4470
+ return /* @__PURE__ */ jsx30(ShellDockProvider, { value: dock, children: props.mobile });
4617
4471
  }
4618
4472
  if (isMobile) {
4619
- return /* @__PURE__ */ jsx31(ShellDockProvider, { value: dock, children: /* @__PURE__ */ jsx31(
4473
+ return /* @__PURE__ */ jsx30(ShellDockProvider, { value: dock, children: /* @__PURE__ */ jsx30(
4620
4474
  DefaultMobileShell,
4621
4475
  {
4622
4476
  canvas: props.canvas,
@@ -4634,11 +4488,11 @@ function ShellScaffold(props) {
4634
4488
  }
4635
4489
  ) });
4636
4490
  }
4637
- const canvasContent = /* @__PURE__ */ jsx31(ShellDockProvider, { value: dock, children: wrapTransition ? /* @__PURE__ */ jsx31(ConversationTransition, { children: props.canvas }) : props.canvas });
4638
- return /* @__PURE__ */ jsxs21("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0, background: "var(--fourty-color-bg)" }, children: [
4491
+ const canvasContent = /* @__PURE__ */ jsx30(ShellDockProvider, { value: dock, children: wrapTransition ? /* @__PURE__ */ jsx30(ConversationTransition, { children: props.canvas }) : props.canvas });
4492
+ return /* @__PURE__ */ jsxs20("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0, background: "var(--fourty-color-bg)" }, children: [
4639
4493
  props.presenceNotch,
4640
- /* @__PURE__ */ jsxs21("div", { style: { position: "relative", flex: 1, minHeight: 0, background: "var(--fourty-color-bg)" }, children: [
4641
- /* @__PURE__ */ jsx31(
4494
+ /* @__PURE__ */ jsxs20("div", { style: { position: "relative", flex: 1, minHeight: 0, background: "var(--fourty-color-bg)" }, children: [
4495
+ /* @__PURE__ */ jsx30(
4642
4496
  "main",
4643
4497
  {
4644
4498
  ref: props.scrollRef,
@@ -4652,15 +4506,15 @@ function ShellScaffold(props) {
4652
4506
  scrollPaddingTop: paddingTop,
4653
4507
  ...canvasSpacing
4654
4508
  },
4655
- children: /* @__PURE__ */ jsxs21("div", { "data-fourty-canvas": "", style: canvasGutterStyle, children: [
4656
- /* @__PURE__ */ jsx31("div", { style: { flex: 1, minHeight: 0 }, children: canvasContent }),
4657
- props.canvasComposer !== void 0 && /* @__PURE__ */ jsx31("div", { "data-fourty-shell-part": "composer", style: { position: "sticky", bottom: 0, zIndex: dockZIndex }, children: resolveShellSlot(props.canvasComposer, dock) }),
4509
+ 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) }),
4658
4512
  props.footer
4659
4513
  ] })
4660
4514
  }
4661
4515
  ),
4662
4516
  resolveShellSlot(props.header, dock),
4663
- /* @__PURE__ */ jsx31(
4517
+ /* @__PURE__ */ jsx30(
4664
4518
  SideDock,
4665
4519
  {
4666
4520
  open: dock.open,
@@ -4682,17 +4536,17 @@ function ShellScaffold(props) {
4682
4536
  }
4683
4537
 
4684
4538
  // src/shell/MenuDrawer.tsx
4685
- import * as React33 from "react";
4539
+ import * as React31 from "react";
4686
4540
  import { useFormFactor as useFormFactor6 } from "@40rty/ams-sdk";
4687
4541
 
4688
4542
  // src/shell/menu-columns.tsx
4689
- import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
4543
+ import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
4690
4544
  function MenuColumn({
4691
4545
  column,
4692
4546
  onPick
4693
4547
  }) {
4694
- return /* @__PURE__ */ jsxs22("div", { style: { minWidth: 132, display: "flex", flexDirection: "column" }, children: [
4695
- /* @__PURE__ */ jsx32(
4548
+ return /* @__PURE__ */ jsxs21("div", { style: { minWidth: 132, display: "flex", flexDirection: "column" }, children: [
4549
+ /* @__PURE__ */ jsx31(
4696
4550
  "div",
4697
4551
  {
4698
4552
  style: {
@@ -4706,7 +4560,7 @@ function MenuColumn({
4706
4560
  children: column.title
4707
4561
  }
4708
4562
  ),
4709
- column.links.map((l) => /* @__PURE__ */ jsx32(
4563
+ column.links.map((l) => /* @__PURE__ */ jsx31(
4710
4564
  motion.button,
4711
4565
  {
4712
4566
  type: "button",
@@ -4734,14 +4588,14 @@ function MenuColumn({
4734
4588
  }
4735
4589
 
4736
4590
  // src/shell/MenuFlyout.tsx
4737
- import { jsx as jsx33 } from "react/jsx-runtime";
4591
+ import { jsx as jsx32 } from "react/jsx-runtime";
4738
4592
  function MenuFlyout({
4739
4593
  item,
4740
4594
  onPick
4741
4595
  }) {
4742
4596
  const columns = item.megaMenu?.columns;
4743
4597
  if (columns === void 0 || columns.length === 0) return null;
4744
- return /* @__PURE__ */ jsx33(
4598
+ return /* @__PURE__ */ jsx32(
4745
4599
  motion.div,
4746
4600
  {
4747
4601
  initial: { opacity: 0, x: -10 },
@@ -4761,16 +4615,16 @@ function MenuFlyout({
4761
4615
  flexWrap: "wrap",
4762
4616
  alignContent: "flex-start"
4763
4617
  },
4764
- children: columns.map((col) => /* @__PURE__ */ jsx33(MenuColumn, { column: col, onPick }, col.title))
4618
+ children: columns.map((col) => /* @__PURE__ */ jsx32(MenuColumn, { column: col, onPick }, col.title))
4765
4619
  }
4766
4620
  );
4767
4621
  }
4768
4622
 
4769
4623
  // src/shell/MenuNav.tsx
4770
- import * as React32 from "react";
4624
+ import * as React30 from "react";
4771
4625
 
4772
4626
  // src/shell/MenuAccordionPanel.tsx
4773
- import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
4627
+ import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
4774
4628
  function MenuAccordionPanel({
4775
4629
  item,
4776
4630
  onPick
@@ -4779,7 +4633,7 @@ function MenuAccordionPanel({
4779
4633
  const columns = item.megaMenu?.columns;
4780
4634
  if (columns === void 0 || columns.length === 0) return null;
4781
4635
  const action = item.action;
4782
- return /* @__PURE__ */ jsx34(
4636
+ return /* @__PURE__ */ jsx33(
4783
4637
  motion.div,
4784
4638
  {
4785
4639
  role: "menu",
@@ -4794,7 +4648,7 @@ function MenuAccordionPanel({
4794
4648
  // UNDER its department row rather than as another top-level section.
4795
4649
  background: "color-mix(in srgb, var(--color-text) 4%, transparent)"
4796
4650
  },
4797
- children: /* @__PURE__ */ jsxs23(
4651
+ children: /* @__PURE__ */ jsxs22(
4798
4652
  "div",
4799
4653
  {
4800
4654
  style: {
@@ -4804,7 +4658,7 @@ function MenuAccordionPanel({
4804
4658
  padding: "4px 24px 22px 24px"
4805
4659
  },
4806
4660
  children: [
4807
- action !== void 0 && /* @__PURE__ */ jsxs23(
4661
+ action !== void 0 && /* @__PURE__ */ jsxs22(
4808
4662
  motion.button,
4809
4663
  {
4810
4664
  type: "button",
@@ -4829,12 +4683,12 @@ function MenuAccordionPanel({
4829
4683
  color: "var(--color-text)"
4830
4684
  },
4831
4685
  children: [
4832
- /* @__PURE__ */ jsx34("span", { children: labels.menu.shopAll(item.label) }),
4833
- /* @__PURE__ */ jsx34("span", { "aria-hidden": "true", style: { opacity: 0.5 }, children: "\u2192" })
4686
+ /* @__PURE__ */ jsx33("span", { children: labels.menu.shopAll(item.label) }),
4687
+ /* @__PURE__ */ jsx33("span", { "aria-hidden": "true", style: { opacity: 0.5 }, children: "\u2192" })
4834
4688
  ]
4835
4689
  }
4836
4690
  ),
4837
- columns.map((col) => /* @__PURE__ */ jsx34(MenuColumn, { column: col, onPick }, col.title))
4691
+ columns.map((col) => /* @__PURE__ */ jsx33(MenuColumn, { column: col, onPick }, col.title))
4838
4692
  ]
4839
4693
  }
4840
4694
  )
@@ -4843,7 +4697,7 @@ function MenuAccordionPanel({
4843
4697
  }
4844
4698
 
4845
4699
  // src/shell/MenuNav.tsx
4846
- import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
4700
+ import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
4847
4701
  function MenuNav({
4848
4702
  items,
4849
4703
  mode,
@@ -4851,12 +4705,12 @@ function MenuNav({
4851
4705
  onOpenChange,
4852
4706
  onPick
4853
4707
  }) {
4854
- return /* @__PURE__ */ jsx35("nav", { style: { display: "flex", flexDirection: "column", paddingBottom: 24 }, children: items.map((item, i) => {
4708
+ return /* @__PURE__ */ jsx34("nav", { style: { display: "flex", flexDirection: "column", paddingBottom: 24 }, children: items.map((item, i) => {
4855
4709
  const hasMega = item.megaMenu !== void 0 && item.megaMenu.columns.length > 0;
4856
4710
  const isOpen = openIndex === i;
4857
4711
  const inverted = mode === "hover" && isOpen;
4858
- return /* @__PURE__ */ jsxs24(React32.Fragment, { children: [
4859
- /* @__PURE__ */ jsxs24(
4712
+ return /* @__PURE__ */ jsxs23(React30.Fragment, { children: [
4713
+ /* @__PURE__ */ jsxs23(
4860
4714
  motion.button,
4861
4715
  {
4862
4716
  type: "button",
@@ -4893,8 +4747,8 @@ function MenuNav({
4893
4747
  textAlign: "left"
4894
4748
  },
4895
4749
  children: [
4896
- /* @__PURE__ */ jsx35("span", { children: item.label }),
4897
- /* @__PURE__ */ jsx35(
4750
+ /* @__PURE__ */ jsx34("span", { children: item.label }),
4751
+ /* @__PURE__ */ jsx34(
4898
4752
  "span",
4899
4753
  {
4900
4754
  "aria-hidden": "true",
@@ -4912,19 +4766,19 @@ function MenuNav({
4912
4766
  ]
4913
4767
  }
4914
4768
  ),
4915
- mode === "accordion" && /* @__PURE__ */ jsx35(AnimatePresence, { initial: false, children: isOpen && hasMega && /* @__PURE__ */ jsx35(MenuAccordionPanel, { item, onPick }) })
4769
+ mode === "accordion" && /* @__PURE__ */ jsx34(AnimatePresence, { initial: false, children: isOpen && hasMega && /* @__PURE__ */ jsx34(MenuAccordionPanel, { item, onPick }) })
4916
4770
  ] }, item.label);
4917
4771
  }) });
4918
4772
  }
4919
4773
 
4920
4774
  // src/shell/MenuDrawer.tsx
4921
- import { Fragment as Fragment8, jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
4775
+ import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
4922
4776
  function MenuTrigger({
4923
4777
  onClick,
4924
4778
  icon,
4925
4779
  label
4926
4780
  }) {
4927
- return /* @__PURE__ */ jsxs25(
4781
+ return /* @__PURE__ */ jsxs24(
4928
4782
  motion.button,
4929
4783
  {
4930
4784
  type: "button",
@@ -4950,7 +4804,7 @@ function MenuTrigger({
4950
4804
  },
4951
4805
  children: [
4952
4806
  icon,
4953
- label !== void 0 && /* @__PURE__ */ jsx36("span", { children: label })
4807
+ label !== void 0 && /* @__PURE__ */ jsx35("span", { children: label })
4954
4808
  ]
4955
4809
  }
4956
4810
  );
@@ -4963,7 +4817,7 @@ function MenuDrawer({
4963
4817
  onSelectItem,
4964
4818
  panelWidth = DEFAULT_PANEL_WIDTH
4965
4819
  }) {
4966
- const pick = React33.useCallback(
4820
+ const pick = React31.useCallback(
4967
4821
  (item) => {
4968
4822
  onClose();
4969
4823
  onSelectItem(item);
@@ -4972,15 +4826,15 @@ function MenuDrawer({
4972
4826
  );
4973
4827
  const { isMobile, isTouch } = useFormFactor6();
4974
4828
  const mode = isTouch || isMobile ? "accordion" : "hover";
4975
- const panelRef = React33.useRef(null);
4829
+ const panelRef = React31.useRef(null);
4976
4830
  useScrollLock(open, panelRef);
4977
- const [openIndex, setOpenIndex] = React33.useState(null);
4978
- React33.useEffect(() => {
4831
+ const [openIndex, setOpenIndex] = React31.useState(null);
4832
+ React31.useEffect(() => {
4979
4833
  if (!open) setOpenIndex(null);
4980
4834
  }, [open]);
4981
4835
  const openItem = openIndex === null ? null : items[openIndex];
4982
- return /* @__PURE__ */ jsx36(AnimatePresence, { children: open && /* @__PURE__ */ jsxs25(Fragment8, { children: [
4983
- /* @__PURE__ */ jsx36(
4836
+ return /* @__PURE__ */ jsx35(AnimatePresence, { children: open && /* @__PURE__ */ jsxs24(Fragment8, { children: [
4837
+ /* @__PURE__ */ jsx35(
4984
4838
  motion.div,
4985
4839
  {
4986
4840
  initial: { opacity: 0 },
@@ -4996,7 +4850,7 @@ function MenuDrawer({
4996
4850
  }
4997
4851
  }
4998
4852
  ),
4999
- /* @__PURE__ */ jsxs25(
4853
+ /* @__PURE__ */ jsxs24(
5000
4854
  "div",
5001
4855
  {
5002
4856
  ref: panelRef,
@@ -5015,7 +4869,7 @@ function MenuDrawer({
5015
4869
  alignItems: "stretch"
5016
4870
  },
5017
4871
  children: [
5018
- /* @__PURE__ */ jsxs25(
4872
+ /* @__PURE__ */ jsxs24(
5019
4873
  motion.aside,
5020
4874
  {
5021
4875
  initial: { x: "-100%" },
@@ -5044,7 +4898,7 @@ function MenuDrawer({
5044
4898
  overflowY: "auto"
5045
4899
  },
5046
4900
  children: [
5047
- /* @__PURE__ */ jsx36(
4901
+ /* @__PURE__ */ jsx35(
5048
4902
  "div",
5049
4903
  {
5050
4904
  style: {
@@ -5055,7 +4909,7 @@ function MenuDrawer({
5055
4909
  justifyContent: "flex-end",
5056
4910
  padding: "0 16px"
5057
4911
  },
5058
- children: /* @__PURE__ */ jsx36(
4912
+ children: /* @__PURE__ */ jsx35(
5059
4913
  motion.button,
5060
4914
  {
5061
4915
  type: "button",
@@ -5077,7 +4931,7 @@ function MenuDrawer({
5077
4931
  justifyContent: "center",
5078
4932
  color: "var(--color-text)"
5079
4933
  },
5080
- children: /* @__PURE__ */ jsx36("svg", { viewBox: "0 0 24 24", width: 13, height: 13, fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx36(
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(
5081
4935
  "path",
5082
4936
  {
5083
4937
  d: "M18 6 6 18M6 6l12 12",
@@ -5091,7 +4945,7 @@ function MenuDrawer({
5091
4945
  )
5092
4946
  }
5093
4947
  ),
5094
- /* @__PURE__ */ jsx36(
4948
+ /* @__PURE__ */ jsx35(
5095
4949
  MenuNav,
5096
4950
  {
5097
4951
  items,
@@ -5104,7 +4958,7 @@ function MenuDrawer({
5104
4958
  ]
5105
4959
  }
5106
4960
  ),
5107
- mode === "hover" && /* @__PURE__ */ jsx36(AnimatePresence, { children: openItem !== null && openItem !== void 0 && openItem.megaMenu !== void 0 && /* @__PURE__ */ jsx36(MenuFlyout, { item: openItem, onPick: pick }) })
4961
+ mode === "hover" && /* @__PURE__ */ jsx35(AnimatePresence, { children: openItem !== null && openItem !== void 0 && openItem.megaMenu !== void 0 && /* @__PURE__ */ jsx35(MenuFlyout, { item: openItem, onPick: pick }) })
5108
4962
  ]
5109
4963
  }
5110
4964
  )
@@ -5112,22 +4966,22 @@ function MenuDrawer({
5112
4966
  }
5113
4967
 
5114
4968
  // src/shell/MenuNavBar.tsx
5115
- import * as React34 from "react";
5116
- import { jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
4969
+ import * as React32 from "react";
4970
+ import { jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
5117
4971
  function MenuNavBar({
5118
4972
  items,
5119
4973
  onSelectItem,
5120
4974
  gap = 26
5121
4975
  }) {
5122
- const [openIndex, setOpenIndex] = React34.useState(null);
5123
- const pick = React34.useCallback(
4976
+ const [openIndex, setOpenIndex] = React32.useState(null);
4977
+ const pick = React32.useCallback(
5124
4978
  (item) => {
5125
4979
  setOpenIndex(null);
5126
4980
  onSelectItem(item);
5127
4981
  },
5128
4982
  [onSelectItem]
5129
4983
  );
5130
- return /* @__PURE__ */ jsx37(
4984
+ return /* @__PURE__ */ jsx36(
5131
4985
  "nav",
5132
4986
  {
5133
4987
  "aria-label": "Site menu",
@@ -5146,8 +5000,8 @@ function MenuNavBar({
5146
5000
  // not on the shared `nav`, so the panel's `left: 0` lands under
5147
5001
  // THIS label instead of the row's first item regardless of which
5148
5002
  // one is hovered.
5149
- /* @__PURE__ */ jsxs26("div", { style: { position: "relative" }, children: [
5150
- /* @__PURE__ */ jsx37(
5003
+ /* @__PURE__ */ jsxs25("div", { style: { position: "relative" }, children: [
5004
+ /* @__PURE__ */ jsx36(
5151
5005
  motion.button,
5152
5006
  {
5153
5007
  type: "button",
@@ -5177,7 +5031,7 @@ function MenuNavBar({
5177
5031
  children: item.label
5178
5032
  }
5179
5033
  ),
5180
- /* @__PURE__ */ jsx37(AnimatePresence, { children: isOpen && item.megaMenu !== void 0 && /* @__PURE__ */ jsx37(
5034
+ /* @__PURE__ */ jsx36(AnimatePresence, { children: isOpen && item.megaMenu !== void 0 && /* @__PURE__ */ jsx36(
5181
5035
  motion.div,
5182
5036
  {
5183
5037
  initial: { opacity: 0, y: -6 },
@@ -5193,7 +5047,7 @@ function MenuNavBar({
5193
5047
  paddingTop: 14,
5194
5048
  zIndex: 55
5195
5049
  },
5196
- children: /* @__PURE__ */ jsx37(
5050
+ children: /* @__PURE__ */ jsx36(
5197
5051
  "div",
5198
5052
  {
5199
5053
  style: {
@@ -5203,7 +5057,7 @@ function MenuNavBar({
5203
5057
  display: "flex",
5204
5058
  gap: 30
5205
5059
  },
5206
- children: item.megaMenu.columns.map((col) => /* @__PURE__ */ jsx37(MenuColumn, { column: col, onPick: pick }, col.title))
5060
+ children: item.megaMenu.columns.map((col) => /* @__PURE__ */ jsx36(MenuColumn, { column: col, onPick: pick }, col.title))
5207
5061
  }
5208
5062
  )
5209
5063
  }
@@ -5216,9 +5070,9 @@ function MenuNavBar({
5216
5070
  }
5217
5071
 
5218
5072
  // src/shell/ShellMenuChrome.tsx
5219
- import * as React35 from "react";
5073
+ import * as React33 from "react";
5220
5074
  import { useExclusiveOverlay as useExclusiveOverlay2, useFormFactor as useFormFactor7, useScrollContainerRef as useScrollContainerRef3 } from "@40rty/ams-sdk";
5221
- import { Fragment as Fragment9, jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
5075
+ import { Fragment as Fragment9, jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
5222
5076
  function ShellMenuChrome({
5223
5077
  logo,
5224
5078
  menuIcon,
@@ -5230,12 +5084,12 @@ function ShellMenuChrome({
5230
5084
  panelWidth,
5231
5085
  className
5232
5086
  }) {
5233
- const [open, setOpen] = React35.useState(false);
5234
- useExclusiveOverlay2("menu", open, React35.useCallback(() => setOpen(false), []));
5087
+ const [open, setOpen] = React33.useState(false);
5088
+ useExclusiveOverlay2("menu", open, React33.useCallback(() => setOpen(false), []));
5235
5089
  const { isMobile } = useFormFactor7();
5236
5090
  const scrolled = useScrollThreshold(useScrollContainerRef3(), 0);
5237
- return /* @__PURE__ */ jsxs27(Fragment9, { children: [
5238
- isMobile ? /* @__PURE__ */ jsxs27(
5091
+ return /* @__PURE__ */ jsxs26(Fragment9, { children: [
5092
+ isMobile ? /* @__PURE__ */ jsxs26(
5239
5093
  "div",
5240
5094
  {
5241
5095
  "data-fourty-shell-part": "menuChrome",
@@ -5260,12 +5114,12 @@ function ShellMenuChrome({
5260
5114
  zIndex: 50
5261
5115
  },
5262
5116
  children: [
5263
- /* @__PURE__ */ jsx38("span", { style: { justifySelf: "start", display: "inline-flex", alignItems: "center" }, children: items.length > 0 && /* @__PURE__ */ jsx38(MenuTrigger, { onClick: () => setOpen(true), icon: menuIcon }) }),
5264
- /* @__PURE__ */ jsx38("span", { style: { display: "inline-flex", alignItems: "center", minWidth: 0 }, children: logo }),
5265
- /* @__PURE__ */ jsx38("span", { "aria-hidden": true })
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 })
5266
5120
  ]
5267
5121
  }
5268
- ) : /* @__PURE__ */ jsxs27(
5122
+ ) : /* @__PURE__ */ jsxs26(
5269
5123
  "div",
5270
5124
  {
5271
5125
  "data-fourty-shell-part": "menuChrome",
@@ -5287,15 +5141,15 @@ function ShellMenuChrome({
5287
5141
  zIndex: 50
5288
5142
  },
5289
5143
  children: [
5290
- /* @__PURE__ */ jsx38(ChromeSurface, { visible: scrolled, lifted: scrolled }),
5291
- /* @__PURE__ */ jsxs27("div", { style: { position: "relative", display: "flex", alignItems: "center", gap, minWidth: 0 }, children: [
5144
+ /* @__PURE__ */ jsx37(ChromeSurface, { visible: scrolled, lifted: scrolled }),
5145
+ /* @__PURE__ */ jsxs26("div", { style: { position: "relative", display: "flex", alignItems: "center", gap, minWidth: 0 }, children: [
5292
5146
  logo,
5293
- items.length > 0 && /* @__PURE__ */ jsx38(MenuNavBar, { items, onSelectItem })
5147
+ items.length > 0 && /* @__PURE__ */ jsx37(MenuNavBar, { items, onSelectItem })
5294
5148
  ] })
5295
5149
  ]
5296
5150
  }
5297
5151
  ),
5298
- isMobile && /* @__PURE__ */ jsx38(
5152
+ isMobile && /* @__PURE__ */ jsx37(
5299
5153
  MenuDrawer,
5300
5154
  {
5301
5155
  open,
@@ -5310,7 +5164,7 @@ function ShellMenuChrome({
5310
5164
 
5311
5165
  // src/shell/LauncherDock.tsx
5312
5166
  import { useFormFactor as useFormFactor8 } from "@40rty/ams-sdk";
5313
- import { jsx as jsx39 } from "react/jsx-runtime";
5167
+ import { jsx as jsx38 } from "react/jsx-runtime";
5314
5168
  function LauncherDock({
5315
5169
  children,
5316
5170
  top = 12,
@@ -5321,7 +5175,7 @@ function LauncherDock({
5321
5175
  }) {
5322
5176
  const { isMobile } = useFormFactor8();
5323
5177
  if (isMobile) {
5324
- return /* @__PURE__ */ jsx39(
5178
+ return /* @__PURE__ */ jsx38(
5325
5179
  "div",
5326
5180
  {
5327
5181
  "data-fourty-shell-part": "launchers",
@@ -5331,7 +5185,7 @@ function LauncherDock({
5331
5185
  }
5332
5186
  );
5333
5187
  }
5334
- return /* @__PURE__ */ jsx39(
5188
+ return /* @__PURE__ */ jsx38(
5335
5189
  "div",
5336
5190
  {
5337
5191
  "data-fourty-shell-part": "launchers",
@@ -5355,7 +5209,7 @@ function LauncherDock({
5355
5209
  }
5356
5210
 
5357
5211
  // src/shell/Button.tsx
5358
- import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
5212
+ import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs27 } from "react/jsx-runtime";
5359
5213
  var SIZE_SPEC = {
5360
5214
  sm: { padding: "8px 14px", fontSize: 11, iconSize: 14, height: 32 },
5361
5215
  md: { padding: "12px 24px", fontSize: 13.3333, iconSize: 16, height: 42 },
@@ -5508,7 +5362,7 @@ function Button({
5508
5362
  };
5509
5363
  const labelText = children !== void 0 ? children : label;
5510
5364
  const computedAriaLabel = ariaLabel !== void 0 ? ariaLabel : isIconOnly && label !== void 0 ? label : void 0;
5511
- return /* @__PURE__ */ jsx40(
5365
+ return /* @__PURE__ */ jsx39(
5512
5366
  "button",
5513
5367
  {
5514
5368
  type,
@@ -5518,11 +5372,11 @@ function Button({
5518
5372
  style: baseStyle,
5519
5373
  onMouseEnter,
5520
5374
  onMouseLeave,
5521
- children: loading ? /* @__PURE__ */ jsx40(Spinner, { size: s.iconSize - 2 }) : /* @__PURE__ */ jsxs28(Fragment10, { children: [
5522
- Icon && iconPosition === "left" && !isIconOnly && /* @__PURE__ */ jsx40(Icon, { size: s.iconSize, strokeWidth: 1.5 }),
5523
- Icon && isIconOnly && /* @__PURE__ */ jsx40(Icon, { size: s.iconSize + 2, strokeWidth: 1.5 }),
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 }),
5524
5378
  !isIconOnly && labelText,
5525
- Icon && iconPosition === "right" && !isIconOnly && /* @__PURE__ */ jsx40(Icon, { size: s.iconSize, strokeWidth: 1.5 })
5379
+ Icon && iconPosition === "right" && !isIconOnly && /* @__PURE__ */ jsx39(Icon, { size: s.iconSize, strokeWidth: 1.5 })
5526
5380
  ] })
5527
5381
  }
5528
5382
  );
@@ -5530,7 +5384,7 @@ function Button({
5530
5384
 
5531
5385
  // src/shell/Skeleton.tsx
5532
5386
  import { motion as motion3 } from "framer-motion";
5533
- import { jsx as jsx41 } from "react/jsx-runtime";
5387
+ import { jsx as jsx40 } from "react/jsx-runtime";
5534
5388
  var BASE_STYLE = {
5535
5389
  display: "inline-block",
5536
5390
  backgroundColor: "var(--color-surface-alt, #f3f3f3)",
@@ -5554,13 +5408,13 @@ function Skeleton({
5554
5408
  style
5555
5409
  }) {
5556
5410
  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%") };
5557
- return /* @__PURE__ */ jsx41(
5411
+ return /* @__PURE__ */ jsx40(
5558
5412
  "span",
5559
5413
  {
5560
5414
  className,
5561
5415
  "aria-hidden": "true",
5562
5416
  style: { ...BASE_STYLE, ...variantStyle, ...style },
5563
- children: /* @__PURE__ */ jsx41(
5417
+ children: /* @__PURE__ */ jsx40(
5564
5418
  motion3.span,
5565
5419
  {
5566
5420
  style: SHIMMER_OVERLAY_STYLE,