@qredence/fleet 0.5.11 → 0.6.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.
Files changed (132) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/web/client/assets/action-swap-roll-COzQ86wm.js +1 -0
  3. package/dist/web/client/assets/agent-activity-svETLf_5.js +1 -0
  4. package/dist/web/client/assets/agent-disclosure-DAMuuGcM.js +1 -0
  5. package/dist/web/client/assets/analytics-stub-B6zGMuSV.js +1 -0
  6. package/dist/web/client/assets/{artifacts-panel-CQmFEF_H.js → artifacts-panel-HVjqBMyx.js} +1 -1
  7. package/dist/web/client/assets/button-C5wFDY5_.js +1 -0
  8. package/dist/web/client/assets/card-DA3Vnqay.js +1 -0
  9. package/dist/web/client/assets/{chat-yh02zgA7.js → chat-BhYseKd6.js} +7 -7
  10. package/dist/web/client/assets/{chat-command-palette-CmHTS3rs.js → chat-command-palette-LILDO_vG.js} +1 -1
  11. package/dist/web/client/assets/{citations-C_tPOJE_.js → citations-BPv8HIpf.js} +2 -2
  12. package/dist/web/client/assets/command-PhicLCoO.js +1 -0
  13. package/dist/web/client/assets/dialog-pBGUjAQ7.js +1 -0
  14. package/dist/web/client/assets/fleet-message-queue-fbYYwMj0.js +1 -0
  15. package/dist/web/client/assets/{fleet-pi-tool-renderer-BEDIO3al.js → fleet-pi-tool-renderer-BRgNnmaJ.js} +28 -28
  16. package/dist/web/client/assets/fleet-reasoning-panel-CjA2dwUJ.js +1 -0
  17. package/dist/web/client/assets/{fork-picker-dialog-ByBOGVsa.js → fork-picker-dialog-B7NNpVmW.js} +1 -1
  18. package/dist/web/client/assets/globals-CuIiqOTg.css +2 -0
  19. package/dist/web/client/assets/horizontal-resize-Cp3iHMH7.js +1 -0
  20. package/dist/web/client/assets/index-CSGplyr_.js +12 -0
  21. package/dist/web/client/assets/{input-0wwjWjKq.js → input-PcdubeKn.js} +1 -1
  22. package/dist/web/client/assets/input-group-C2HJEZvl.js +1 -0
  23. package/dist/web/client/assets/ipython-tool-CyuMOxz1.js +3 -0
  24. package/dist/web/client/assets/{markdown-code-CuQcR3UO.js → markdown-code-xNyjdZ4g.js} +1 -1
  25. package/dist/web/client/assets/{markdown-DInPmRUG.js → markdown-lvexwooo.js} +2 -2
  26. package/dist/web/client/assets/{model-selector-list-DsKTuAgS.js → model-selector-list-CoXX358G.js} +1 -1
  27. package/dist/web/client/assets/{notify-DgMKgZZW.js → notify-DxL0VD7Z.js} +1 -1
  28. package/dist/web/client/assets/openui-renderer-TLNe5e_Q.js +378 -0
  29. package/dist/web/client/assets/pencil-DcUwsKLn.js +1 -0
  30. package/dist/web/client/assets/prompt-input-fwP8TsgQ.js +1 -0
  31. package/dist/web/client/assets/{prompt-suggestions-Cc--lSNR.js → prompt-suggestions-BlGXmWS7.js} +1 -1
  32. package/dist/web/client/assets/provider-catalog-DYMFdbKc.js +1 -0
  33. package/dist/web/client/assets/provider-label-B4q5mI65.js +1 -0
  34. package/dist/web/client/assets/{repl-panel-DsPX04Xr.js → repl-panel-C5om8MGU.js} +1 -1
  35. package/dist/web/client/assets/{right-panel-registry-DewpBWHM.js → right-panel-registry-BBlxLxnx.js} +2 -2
  36. package/dist/web/client/assets/routes-XGsAIqBJ.js +16 -0
  37. package/dist/web/client/assets/settings-dialog-BSBasR3o.js +2 -0
  38. package/dist/web/client/assets/{subagent-chat-panel-DkVUumrP.js → subagent-chat-panel-oeLDPDAK.js} +1 -1
  39. package/dist/web/client/assets/{subagent-transcript-D8wmQxXe.js → subagent-transcript-DaVHjNUH.js} +1 -1
  40. package/dist/web/client/assets/{subagents-panel-BMp2Ego0.js → subagents-panel-D_aVgSCi.js} +1 -1
  41. package/dist/web/client/assets/surfaces-BhAXz9So.js +1 -0
  42. package/dist/web/client/assets/{switch-9rTeg6J6.js → switch-WhXeJNNY.js} +1 -1
  43. package/dist/web/client/assets/{toast-Bt9p2OL4.js → toast-D3c9XeGe.js} +1 -1
  44. package/dist/web/client/assets/{tool-result-DfnPN0FQ.js → tool-result-Cki8WUNc.js} +3 -3
  45. package/dist/web/client/assets/virtualized-turn-list-CdMa-ydT.js +6 -0
  46. package/dist/web/client/assets/workspace-panel-77bDbprs.js +1 -0
  47. package/dist/web/client/bundle-budget.json +6 -6
  48. package/dist/web/launcher.mjs +10 -1
  49. package/dist/web/server/{_tanstack-start-manifest_v-po4woX6g-AUGCOEZ2.js → _tanstack-start-manifest_v-0L7fqnH4-KMVGUFE4.js} +25 -24
  50. package/dist/web/server/{agent-activity-CS2rbF_C-A3R26CYH.js → agent-activity-BuEE6iVw-CDZLK4D2.js} +4 -4
  51. package/dist/web/server/{artifacts-panel-8GGUCtOd-X5TNKTY2.js → artifacts-panel-D3ySO--V-XSL53CXL.js} +18 -18
  52. package/dist/web/server/{chat-command-palette-Dgl5tqWn-72LLEWUD.js → chat-command-palette-kAbXhWVg-TJWXH2WW.js} +9 -9
  53. package/dist/web/server/{chunk-O4OTWWPF.js → chunk-2DDWXTVG.js} +5 -5
  54. package/dist/web/server/{chunk-MIW4LJTV.js → chunk-2JHTYWD5.js} +15 -23
  55. package/dist/web/server/{chunk-7MDZVLIY.js → chunk-3TIMGWWI.js} +1 -2
  56. package/dist/web/server/{chunk-AGFRJQZ7.js → chunk-4WBFCB4O.js} +257 -257
  57. package/dist/web/server/{chunk-P6UMR32I.js → chunk-5UCAJBAH.js} +4 -4
  58. package/dist/web/server/{chunk-BXWAUTTH.js → chunk-D27LRYVT.js} +42 -42
  59. package/dist/web/server/{chunk-YXXRP3NS.js → chunk-DLUZFOG3.js} +5 -5
  60. package/dist/web/server/{chunk-K3BXQG3N.js → chunk-EBG3XFGQ.js} +60 -60
  61. package/dist/web/server/{chunk-2ATMSG7U.js → chunk-EJEPDVK6.js} +3 -3
  62. package/dist/web/server/{chunk-IJPCV6DH.js → chunk-FYDQK6UX.js} +1 -1
  63. package/dist/web/server/{chunk-WKV2Z4KO.js → chunk-HF7DG7PC.js} +74 -74
  64. package/dist/web/server/{chunk-WYL2DW5R.js → chunk-JTCCQZLN.js} +2 -2
  65. package/dist/web/server/{chunk-UAPNEWCA.js → chunk-KP2PNDGL.js} +6 -6
  66. package/dist/web/server/chunk-M5RSPNYN.js +22 -0
  67. package/dist/web/server/{chunk-7SR6WDM2.js → chunk-MNBGB2SP.js} +2 -2
  68. package/dist/web/server/{chunk-HSJMLO36.js → chunk-MNPHMZU7.js} +3 -3
  69. package/dist/web/server/{chunk-JQDLJ7KI.js → chunk-NGCQJ33Y.js} +1134 -1134
  70. package/dist/web/server/{chunk-7SD2ZSEA.js → chunk-NIDBN7BQ.js} +1 -1
  71. package/dist/web/server/{chunk-ZJFA4F5X.js → chunk-NIZBFVJF.js} +2 -2
  72. package/dist/web/server/{chunk-P7H2OPKF.js → chunk-NJ4QEZHK.js} +11 -4
  73. package/dist/web/server/{chunk-WM4PUT6M.js → chunk-NNKJTKOQ.js} +234 -234
  74. package/dist/web/server/{chunk-N6NOTURM.js → chunk-NWDI3OWB.js} +4 -4
  75. package/dist/web/server/{chunk-ABBWBBSS.js → chunk-O3HDELZ2.js} +74826 -74825
  76. package/dist/web/server/{chunk-GGT2ZKDB.js → chunk-PLYZ7P2Y.js} +11 -155
  77. package/dist/web/server/chunk-PTCKOR23.js +39 -0
  78. package/dist/web/server/{chunk-RNOJACWQ.js → chunk-QFRCJWQQ.js} +7 -7
  79. package/dist/web/server/{chunk-NXJ32VFR.js → chunk-QIULBRTU.js} +13 -13
  80. package/dist/web/server/{chunk-XKKXXG6N.js → chunk-RIP3PBWT.js} +3 -3
  81. package/dist/web/server/{chunk-YKVGQBZA.js → chunk-S5LFXXDY.js} +625 -622
  82. package/dist/web/server/{chunk-XLNCWZMZ.js → chunk-UCUFC553.js} +3 -1
  83. package/dist/web/server/{chunk-KOUEJ3NU.js → chunk-UL2725KQ.js} +3 -3
  84. package/dist/web/server/{chunk-HFQTI7AX.js → chunk-VPKX7QRU.js} +3 -3
  85. package/dist/web/server/{chunk-LZ4Q5KUJ.js → chunk-WNCAL4HN.js} +133 -133
  86. package/dist/web/server/{chunk-C5X6G26O.js → chunk-XIB6XNUX.js} +436 -436
  87. package/dist/web/server/{chunk-JUROEEWM.js → chunk-YGYOBX7G.js} +82 -4
  88. package/dist/web/server/{chunk-WILCIZYU.js → chunk-ZIFSJ3HQ.js} +626 -626
  89. package/dist/web/server/fleet-message-queue-D_w8lSeY-T3HB7HVQ.js +152 -0
  90. package/dist/web/server/{fleet-pi-tool-renderer-umKunT3K-O4GBH35V.js → fleet-pi-tool-renderer-qwc-qZFq-4U556N5Q.js} +12 -12
  91. package/dist/web/server/{fleet-reasoning-panel-BxC2COxi-GPLMQSTT.js → fleet-reasoning-panel-DG_vuvv0-NCZWEEIT.js} +26 -26
  92. package/dist/web/server/{fleet-subagent-list-CpSYzCIq-JDH2LHSS.js → fleet-subagent-list-BGb0PjhF-2X67FMUV.js} +1 -1
  93. package/dist/web/server/{fleet-tool-timeline-IB36_PB2-XJENTO6I.js → fleet-tool-timeline-D6yM4ZMz-ZSFVRRRI.js} +1 -1
  94. package/dist/web/server/{fork-picker-dialog-DlINz9UQ-UWIXFDJX.js → fork-picker-dialog-Ds6Tgtu3-DIBWN7MV.js} +5 -5
  95. package/dist/web/server/{model-selector-list-OYnzNbyu-HBGCNF2L.js → model-selector-list-DxeGZoD2-P6S6FSJH.js} +9 -9
  96. package/dist/web/server/{openui-renderer-Cj7kfqyL-EKJ6JTTQ.js → openui-renderer-MKFv6LlH-MDRSVFEY.js} +11 -11
  97. package/dist/web/server/{prompt-suggestions-D4AEEY7K-RZSP7PWV.js → prompt-suggestions-BOItmGnD-YQA7RHLG.js} +2 -2
  98. package/dist/web/server/{repl-panel-D5KsoJik-BQKO53JO.js → repl-panel-CuyF8wt5-CHDT2Q3N.js} +2 -2
  99. package/dist/web/server/{router-Ci1wxI7I-E2AYMNON.js → router-Dg72SESP-PCWKLFRG.js} +1239 -470
  100. package/dist/web/server/{routes-CRpm9-Sa-IYK6MUJO.js → routes-BGrVtPYF-SURPAJN6.js} +5781 -5588
  101. package/dist/web/server/server.js +2 -2
  102. package/dist/web/server/{settings-dialog-BvkgNflv-GPJ6COQO.js → settings-dialog-CK0FJlTg-HZRBAXDZ.js} +1577 -1264
  103. package/dist/web/server/{subagent-chat-panel-CMuvW9Sd-M5TEEGQW.js → subagent-chat-panel-gzamnTgK-PQ2TLLJF.js} +21 -21
  104. package/dist/web/server/{subagents-panel-DgfB6_Yy-4INEPE3Y.js → subagents-panel-Berjd7HJ-EI5ZKC6V.js} +20 -20
  105. package/dist/web/server/{workspace-panel-bpwj-Veu-Q2CEJMN4.js → workspace-panel-CBBa_3UO-B4PPFPMA.js} +46 -21
  106. package/package.json +1 -1
  107. package/dist/web/client/assets/action-swap-roll-BB8DFMuf.js +0 -1
  108. package/dist/web/client/assets/agent-activity-CwMDU7aP.js +0 -1
  109. package/dist/web/client/assets/agent-disclosure-B8SnhQXL.js +0 -1
  110. package/dist/web/client/assets/analytics-stub-Cas1He0w.js +0 -1
  111. package/dist/web/client/assets/button-BR2WWrFo.js +0 -1
  112. package/dist/web/client/assets/card-BKl76a3R.js +0 -1
  113. package/dist/web/client/assets/command-DPfiaYUL.js +0 -1
  114. package/dist/web/client/assets/dialog-BEZuZhzk.js +0 -1
  115. package/dist/web/client/assets/fleet-message-queue-DUz6Hfrf.js +0 -1
  116. package/dist/web/client/assets/fleet-reasoning-panel-CbkO7u-v.js +0 -1
  117. package/dist/web/client/assets/globals-B_I1Eq1u.css +0 -2
  118. package/dist/web/client/assets/horizontal-resize-qK6eRhIG.js +0 -1
  119. package/dist/web/client/assets/index-C1zOjrMK.js +0 -12
  120. package/dist/web/client/assets/input-group-BFDsCVS9.js +0 -1
  121. package/dist/web/client/assets/ipython-tool-ldJ9F1Cw.js +0 -3
  122. package/dist/web/client/assets/openui-renderer-J3dhPpL4.js +0 -378
  123. package/dist/web/client/assets/prompt-input-qPIXZ-Rb.js +0 -1
  124. package/dist/web/client/assets/provider-catalog-D8G66gwc.js +0 -1
  125. package/dist/web/client/assets/provider-label-Dpr7djG9.js +0 -1
  126. package/dist/web/client/assets/routes-vNkVToAF.js +0 -16
  127. package/dist/web/client/assets/settings-dialog-B-v4me3Y.js +0 -1
  128. package/dist/web/client/assets/surfaces-DI-U-_2a.js +0 -1
  129. package/dist/web/client/assets/virtualized-turn-list-DMJENRY0.js +0 -6
  130. package/dist/web/client/assets/workspace-panel-G6yMpKJ8.js +0 -1
  131. package/dist/web/server/chunk-QK4CHLVV.js +0 -17
  132. package/dist/web/server/fleet-message-queue-j0DCU5Xy-5HKBHMPV.js +0 -75
@@ -16,7 +16,7 @@ import {
16
16
  __exportAll
17
17
  } from "./chunk-L547YHC4.js";
18
18
 
19
- // web/app/dist/server/assets/fleet-subagent-list-CpSYzCIq.js
19
+ // web/app/dist/server/assets/fleet-subagent-list-BGb0PjhF.js
20
20
  import { useMemo, useState } from "react";
21
21
  import { jsx, jsxs } from "react/jsx-runtime";
22
22
  var fleet_subagent_list_exports = /* @__PURE__ */ __exportAll({ FleetSubagentList: () => FleetSubagentList });
@@ -2,7 +2,7 @@ import {
2
2
  MotionConfigContext,
3
3
  useConstant,
4
4
  useIsomorphicLayoutEffect
5
- } from "./chunk-K3BXQG3N.js";
5
+ } from "./chunk-EBG3XFGQ.js";
6
6
  import {
7
7
  LayoutGroupContext,
8
8
  PresenceContext,
@@ -13,7 +13,7 @@ import {
13
13
  usePresence
14
14
  } from "./chunk-FAGDMGLK.js";
15
15
 
16
- // web/app/dist/server/assets/use-reduced-motion-ewHWHKKI.js
16
+ // web/app/dist/server/assets/use-reduced-motion-C844LbDg.js
17
17
  import * as React$1 from "react";
18
18
  import { Children, isValidElement, useContext, useId, useInsertionEffect, useMemo, useRef, useState } from "react";
19
19
  import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
@@ -1,17 +1,23 @@
1
1
  import {
2
2
  Input
3
- } from "./chunk-P6UMR32I.js";
3
+ } from "./chunk-5UCAJBAH.js";
4
4
  import {
5
5
  Button,
6
6
  cva
7
- } from "./chunk-LZ4Q5KUJ.js";
7
+ } from "./chunk-WNCAL4HN.js";
8
8
  import {
9
9
  cn
10
10
  } from "./chunk-DJMHPJBP.js";
11
11
 
12
- // web/app/dist/server/assets/input-group-BcYuKbrc.js
13
- import "react";
12
+ // web/app/dist/server/assets/input-group-Dqtntpi-.js
14
13
  import { jsx } from "react/jsx-runtime";
14
+ function Textarea({ className, ...props }) {
15
+ return /* @__PURE__ */ jsx("textarea", {
16
+ "data-slot": "textarea",
17
+ className: cn("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
18
+ ...props
19
+ });
20
+ }
15
21
  function InputGroup({ className, ...props }) {
16
22
  return /* @__PURE__ */ jsx("div", {
17
23
  "data-slot": "input-group",
@@ -69,6 +75,7 @@ function InputGroupInput({ className, ...props }) {
69
75
  }
70
76
 
71
77
  export {
78
+ Textarea,
72
79
  InputGroup,
73
80
  InputGroupAddon,
74
81
  InputGroupButton,
@@ -8,7 +8,7 @@ import {
8
8
  useLabelableContext,
9
9
  useLabelableId,
10
10
  useRegisterFieldControl
11
- } from "./chunk-P6UMR32I.js";
11
+ } from "./chunk-5UCAJBAH.js";
12
12
  import {
13
13
  COMPOSITE_KEYS,
14
14
  FOCUSABLE_POPUP_PROPS,
@@ -31,7 +31,7 @@ import {
31
31
  useFloatingTree,
32
32
  useScrollLock,
33
33
  useSurface
34
- } from "./chunk-AGFRJQZ7.js";
34
+ } from "./chunk-4WBFCB4O.js";
35
35
  import {
36
36
  ARROW_DOWN,
37
37
  ARROW_LEFT,
@@ -62,7 +62,7 @@ import {
62
62
  visuallyHidden,
63
63
  visuallyHiddenInput,
64
64
  webkit
65
- } from "./chunk-LZ4Q5KUJ.js";
65
+ } from "./chunk-WNCAL4HN.js";
66
66
  import {
67
67
  Check
68
68
  } from "./chunk-4QD4PCVP.js";
@@ -72,7 +72,7 @@ import {
72
72
  import {
73
73
  useTransitionStatus,
74
74
  useValueAsRef
75
- } from "./chunk-7SR6WDM2.js";
75
+ } from "./chunk-MNBGB2SP.js";
76
76
  import {
77
77
  EMPTY_ARRAY,
78
78
  EMPTY_OBJECT,
@@ -114,12 +114,12 @@ import {
114
114
  useRenderElement,
115
115
  useStableCallback,
116
116
  windowResize
117
- } from "./chunk-C5X6G26O.js";
117
+ } from "./chunk-XIB6XNUX.js";
118
118
  import {
119
119
  cn
120
120
  } from "./chunk-DJMHPJBP.js";
121
121
 
122
- // web/app/dist/server/assets/useRender-CtIKH5Iu.js
122
+ // web/app/dist/server/assets/useRender-C0Ot31pO.js
123
123
  import * as React$1 from "react";
124
124
  import { useLayoutEffect } from "react";
125
125
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -2655,231 +2655,6 @@ function usePositioner(componentProps, state, { styles, transitionStatus, props,
2655
2655
  stateAttributesMapping: popupStateMapping
2656
2656
  });
2657
2657
  }
2658
- var CompositeListContext = /* @__PURE__ */ React$1.createContext({
2659
- register: () => {
2660
- },
2661
- unregister: () => {
2662
- },
2663
- subscribeMapChange: () => () => {
2664
- },
2665
- nextIndexRef: { current: 0 }
2666
- });
2667
- function useCompositeListContext() {
2668
- return React$1.useContext(CompositeListContext);
2669
- }
2670
- function CompositeList(props) {
2671
- const { children, elementsRef, labelsRef, onMapChange: onMapChangeProp } = props;
2672
- const onMapChange = useStableCallback(onMapChangeProp);
2673
- const [, setMapTick] = React$1.useState(false);
2674
- const listeners = useRefWithInit(createListeners).current;
2675
- const map = useRefWithInit(createMap).current;
2676
- const nextIndexRef = React$1.useRef(0);
2677
- const isDirtyRef = React$1.useRef(true);
2678
- const itemsRef = React$1.useRef([]);
2679
- const mutationObserverRef = React$1.useRef(null);
2680
- const scheduleMapUpdate = useStableCallback(() => {
2681
- if (isDirtyRef.current) return;
2682
- isDirtyRef.current = true;
2683
- setMapTick((tick) => !tick);
2684
- });
2685
- const register = useStableCallback((node, registration) => {
2686
- map.set(node, registration);
2687
- scheduleMapUpdate();
2688
- });
2689
- const unregister = useStableCallback((node) => {
2690
- map.delete(node);
2691
- scheduleMapUpdate();
2692
- });
2693
- const syncRefs = useStableCallback((items) => {
2694
- const nextMap = /* @__PURE__ */ new Map();
2695
- elementsRef.current.length = 0;
2696
- if (labelsRef) labelsRef.current.length = 0;
2697
- items.forEach((item) => {
2698
- nextMap.set(item.element, {
2699
- ...item.registration.metadata ?? {},
2700
- index: item.index
2701
- });
2702
- elementsRef.current[item.index] = item.element;
2703
- if (labelsRef) labelsRef.current[item.index] = item.registration.label !== void 0 ? item.registration.label : item.registration.textRef?.current?.textContent ?? item.element.textContent;
2704
- });
2705
- nextIndexRef.current = elementsRef.current.length;
2706
- return nextMap;
2707
- });
2708
- function observe(sortedNodes) {
2709
- mutationObserverRef.current?.disconnect();
2710
- mutationObserverRef.current = null;
2711
- if (typeof MutationObserver !== "function" || sortedNodes.length < 2) return;
2712
- const mutationObserver = new MutationObserver((entries) => {
2713
- if (!hasMovedNode(entries)) return;
2714
- let previousConnectedNode = null;
2715
- for (const node of sortedNodes) {
2716
- if (!node.isConnected) continue;
2717
- if (previousConnectedNode && sortByDocumentPosition(previousConnectedNode, node) > 0) {
2718
- mutationObserver.disconnect();
2719
- scheduleMapUpdate();
2720
- return;
2721
- }
2722
- previousConnectedNode = node;
2723
- }
2724
- });
2725
- mutationObserverRef.current = mutationObserver;
2726
- const roots = /* @__PURE__ */ new Set();
2727
- for (let i = 1; i < sortedNodes.length; i += 1) {
2728
- const root = getCommonAncestor(sortedNodes[i - 1], sortedNodes[i]);
2729
- if (root) roots.add(root);
2730
- }
2731
- roots.forEach((root) => mutationObserver.observe(root, { childList: true }));
2732
- }
2733
- const flush = useStableCallback(() => {
2734
- const [items, automaticNodes] = getCompositeListSnapshot(map);
2735
- const nextMap = syncRefs(items);
2736
- observe(automaticNodes);
2737
- itemsRef.current = items;
2738
- isDirtyRef.current = false;
2739
- listeners.forEach((listener) => listener(nextMap));
2740
- onMapChange(nextMap);
2741
- });
2742
- useIsoLayoutEffect(() => {
2743
- if (!isDirtyRef.current) syncRefs(itemsRef.current);
2744
- return () => {
2745
- elementsRef.current = [];
2746
- if (labelsRef) labelsRef.current = [];
2747
- };
2748
- }, [
2749
- elementsRef,
2750
- labelsRef,
2751
- syncRefs
2752
- ]);
2753
- useIsoLayoutEffect(() => {
2754
- if (isDirtyRef.current) flush();
2755
- });
2756
- useIsoLayoutEffect(() => {
2757
- return () => {
2758
- mutationObserverRef.current?.disconnect();
2759
- isDirtyRef.current = true;
2760
- };
2761
- }, []);
2762
- const subscribeMapChange = useStableCallback((fn) => {
2763
- listeners.add(fn);
2764
- return () => {
2765
- listeners.delete(fn);
2766
- };
2767
- });
2768
- const contextValue = React$1.useMemo(() => ({
2769
- register,
2770
- unregister,
2771
- subscribeMapChange,
2772
- nextIndexRef
2773
- }), [
2774
- register,
2775
- unregister,
2776
- subscribeMapChange,
2777
- nextIndexRef
2778
- ]);
2779
- return /* @__PURE__ */ jsx(CompositeListContext.Provider, {
2780
- value: contextValue,
2781
- children
2782
- });
2783
- }
2784
- function createMap() {
2785
- return /* @__PURE__ */ new Map();
2786
- }
2787
- function createListeners() {
2788
- return /* @__PURE__ */ new Set();
2789
- }
2790
- function getCompositeListSnapshot(map) {
2791
- const reservedIndices = /* @__PURE__ */ new Set();
2792
- const items = [];
2793
- const automaticItems = [];
2794
- map.forEach((registration, node) => {
2795
- if (!node.isConnected) return;
2796
- const index2 = registration.index;
2797
- const item = {
2798
- index: index2 ?? -1,
2799
- element: node,
2800
- registration
2801
- };
2802
- if (index2 === null) automaticItems.push(item);
2803
- else if (index2 >= 0) {
2804
- reservedIndices.add(index2);
2805
- items.push(item);
2806
- }
2807
- });
2808
- let nextAutomaticIndex = 0;
2809
- automaticItems.sort((a, b) => sortByDocumentPosition(a.element, b.element));
2810
- automaticItems.forEach((item) => {
2811
- while (reservedIndices.has(nextAutomaticIndex)) nextAutomaticIndex += 1;
2812
- item.index = nextAutomaticIndex;
2813
- items.push(item);
2814
- nextAutomaticIndex += 1;
2815
- });
2816
- if (reservedIndices.size > 0) items.sort((a, b) => a.index - b.index);
2817
- return [items, automaticItems.map((item) => item.element)];
2818
- }
2819
- function getCommonAncestor(firstNode, lastNode) {
2820
- let ancestor = firstNode.parentElement;
2821
- while (ancestor && !ancestor.contains(lastNode)) ancestor = ancestor.parentElement;
2822
- return ancestor;
2823
- }
2824
- function hasMovedNode(entries) {
2825
- for (const entry of entries) for (let i = 0; i < entry.removedNodes.length; i += 1) if (entry.removedNodes[i].isConnected) return true;
2826
- return false;
2827
- }
2828
- function sortByDocumentPosition(a, b) {
2829
- return a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
2830
- }
2831
- function useCompositeListItem(params = {}) {
2832
- const { guess, label, metadata, textRef, index: externalIndex } = params;
2833
- const { register, unregister, subscribeMapChange, nextIndexRef } = useCompositeListContext();
2834
- const indexRef = React$1.useRef(-1);
2835
- const [internalIndex, setInternalIndex] = React$1.useState(externalIndex == null && guess ? () => {
2836
- if (indexRef.current === -1) {
2837
- const newIndex = nextIndexRef.current;
2838
- nextIndexRef.current += 1;
2839
- indexRef.current = newIndex;
2840
- }
2841
- return indexRef.current;
2842
- } : -1);
2843
- const index2 = externalIndex ?? internalIndex;
2844
- const componentRef = React$1.useRef(null);
2845
- const ref = React$1.useCallback((node) => {
2846
- const previousNode = componentRef.current;
2847
- if (previousNode) unregister(previousNode);
2848
- componentRef.current = node;
2849
- if (node) register(node, {
2850
- metadata: metadata ?? null,
2851
- index: externalIndex ?? null,
2852
- label,
2853
- textRef
2854
- });
2855
- }, [
2856
- externalIndex,
2857
- register,
2858
- unregister,
2859
- metadata,
2860
- label,
2861
- textRef
2862
- ]);
2863
- useIsoLayoutEffect(() => {
2864
- if (externalIndex != null) return;
2865
- return subscribeMapChange((map) => {
2866
- const i = componentRef.current ? map.get(componentRef.current)?.index : null;
2867
- if (i != null) setInternalIndex(i);
2868
- });
2869
- }, [externalIndex, subscribeMapChange]);
2870
- return {
2871
- ref,
2872
- index: index2
2873
- };
2874
- }
2875
- var CSPContext = /* @__PURE__ */ React$1.createContext(void 0);
2876
- var DEFAULT_CSP_CONTEXT_VALUE = { disableStyleElements: false };
2877
- function useCSPContext() {
2878
- return React$1.useContext(CSPContext) ?? DEFAULT_CSP_CONTEXT_VALUE;
2879
- }
2880
- function isElementDisabled(element) {
2881
- return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
2882
- }
2883
2658
  function useOnFirstRender(fn) {
2884
2659
  const ref = React$1.useRef(true);
2885
2660
  if (ref.current) {
@@ -2898,6 +2673,9 @@ function usePreviousValue(value) {
2898
2673
  });
2899
2674
  return state.previous;
2900
2675
  }
2676
+ function isElementDisabled(element) {
2677
+ return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
2678
+ }
2901
2679
  var SelectRootContext = /* @__PURE__ */ React$1.createContext(null);
2902
2680
  function useSelectRootContext() {
2903
2681
  const context = React$1.useContext(SelectRootContext);
@@ -3644,6 +3422,179 @@ var SelectPortal = /* @__PURE__ */ React$1.forwardRef(function SelectPortal2(por
3644
3422
  ...portalProps
3645
3423
  });
3646
3424
  });
3425
+ var CompositeListContext = /* @__PURE__ */ React$1.createContext({
3426
+ register: () => {
3427
+ },
3428
+ unregister: () => {
3429
+ },
3430
+ subscribeMapChange: () => () => {
3431
+ },
3432
+ nextIndexRef: { current: 0 }
3433
+ });
3434
+ function useCompositeListContext() {
3435
+ return React$1.useContext(CompositeListContext);
3436
+ }
3437
+ function CompositeList(props) {
3438
+ const { children, elementsRef, labelsRef, onMapChange: onMapChangeProp } = props;
3439
+ const onMapChange = useStableCallback(onMapChangeProp);
3440
+ const [, setMapTick] = React$1.useState(false);
3441
+ const listeners = useRefWithInit(createListeners).current;
3442
+ const map = useRefWithInit(createMap).current;
3443
+ const nextIndexRef = React$1.useRef(0);
3444
+ const isDirtyRef = React$1.useRef(true);
3445
+ const itemsRef = React$1.useRef([]);
3446
+ const mutationObserverRef = React$1.useRef(null);
3447
+ const scheduleMapUpdate = useStableCallback(() => {
3448
+ if (isDirtyRef.current) return;
3449
+ isDirtyRef.current = true;
3450
+ setMapTick((tick) => !tick);
3451
+ });
3452
+ const register = useStableCallback((node, registration) => {
3453
+ map.set(node, registration);
3454
+ scheduleMapUpdate();
3455
+ });
3456
+ const unregister = useStableCallback((node) => {
3457
+ map.delete(node);
3458
+ scheduleMapUpdate();
3459
+ });
3460
+ const syncRefs = useStableCallback((items) => {
3461
+ const nextMap = /* @__PURE__ */ new Map();
3462
+ elementsRef.current.length = 0;
3463
+ if (labelsRef) labelsRef.current.length = 0;
3464
+ items.forEach((item) => {
3465
+ nextMap.set(item.element, {
3466
+ ...item.registration.metadata ?? {},
3467
+ index: item.index
3468
+ });
3469
+ elementsRef.current[item.index] = item.element;
3470
+ if (labelsRef) labelsRef.current[item.index] = item.registration.label !== void 0 ? item.registration.label : item.registration.textRef?.current?.textContent ?? item.element.textContent;
3471
+ });
3472
+ nextIndexRef.current = elementsRef.current.length;
3473
+ return nextMap;
3474
+ });
3475
+ function observe(sortedNodes) {
3476
+ mutationObserverRef.current?.disconnect();
3477
+ mutationObserverRef.current = null;
3478
+ if (typeof MutationObserver !== "function" || sortedNodes.length < 2) return;
3479
+ const mutationObserver = new MutationObserver((entries) => {
3480
+ if (!hasMovedNode(entries)) return;
3481
+ let previousConnectedNode = null;
3482
+ for (const node of sortedNodes) {
3483
+ if (!node.isConnected) continue;
3484
+ if (previousConnectedNode && sortByDocumentPosition(previousConnectedNode, node) > 0) {
3485
+ mutationObserver.disconnect();
3486
+ scheduleMapUpdate();
3487
+ return;
3488
+ }
3489
+ previousConnectedNode = node;
3490
+ }
3491
+ });
3492
+ mutationObserverRef.current = mutationObserver;
3493
+ const roots = /* @__PURE__ */ new Set();
3494
+ for (let i = 1; i < sortedNodes.length; i += 1) {
3495
+ const root = getCommonAncestor(sortedNodes[i - 1], sortedNodes[i]);
3496
+ if (root) roots.add(root);
3497
+ }
3498
+ roots.forEach((root) => mutationObserver.observe(root, { childList: true }));
3499
+ }
3500
+ const flush = useStableCallback(() => {
3501
+ const [items, automaticNodes] = getCompositeListSnapshot(map);
3502
+ const nextMap = syncRefs(items);
3503
+ observe(automaticNodes);
3504
+ itemsRef.current = items;
3505
+ isDirtyRef.current = false;
3506
+ listeners.forEach((listener) => listener(nextMap));
3507
+ onMapChange(nextMap);
3508
+ });
3509
+ useIsoLayoutEffect(() => {
3510
+ if (!isDirtyRef.current) syncRefs(itemsRef.current);
3511
+ return () => {
3512
+ elementsRef.current = [];
3513
+ if (labelsRef) labelsRef.current = [];
3514
+ };
3515
+ }, [
3516
+ elementsRef,
3517
+ labelsRef,
3518
+ syncRefs
3519
+ ]);
3520
+ useIsoLayoutEffect(() => {
3521
+ if (isDirtyRef.current) flush();
3522
+ });
3523
+ useIsoLayoutEffect(() => {
3524
+ return () => {
3525
+ mutationObserverRef.current?.disconnect();
3526
+ isDirtyRef.current = true;
3527
+ };
3528
+ }, []);
3529
+ const subscribeMapChange = useStableCallback((fn) => {
3530
+ listeners.add(fn);
3531
+ return () => {
3532
+ listeners.delete(fn);
3533
+ };
3534
+ });
3535
+ const contextValue = React$1.useMemo(() => ({
3536
+ register,
3537
+ unregister,
3538
+ subscribeMapChange,
3539
+ nextIndexRef
3540
+ }), [
3541
+ register,
3542
+ unregister,
3543
+ subscribeMapChange,
3544
+ nextIndexRef
3545
+ ]);
3546
+ return /* @__PURE__ */ jsx(CompositeListContext.Provider, {
3547
+ value: contextValue,
3548
+ children
3549
+ });
3550
+ }
3551
+ function createMap() {
3552
+ return /* @__PURE__ */ new Map();
3553
+ }
3554
+ function createListeners() {
3555
+ return /* @__PURE__ */ new Set();
3556
+ }
3557
+ function getCompositeListSnapshot(map) {
3558
+ const reservedIndices = /* @__PURE__ */ new Set();
3559
+ const items = [];
3560
+ const automaticItems = [];
3561
+ map.forEach((registration, node) => {
3562
+ if (!node.isConnected) return;
3563
+ const index2 = registration.index;
3564
+ const item = {
3565
+ index: index2 ?? -1,
3566
+ element: node,
3567
+ registration
3568
+ };
3569
+ if (index2 === null) automaticItems.push(item);
3570
+ else if (index2 >= 0) {
3571
+ reservedIndices.add(index2);
3572
+ items.push(item);
3573
+ }
3574
+ });
3575
+ let nextAutomaticIndex = 0;
3576
+ automaticItems.sort((a, b) => sortByDocumentPosition(a.element, b.element));
3577
+ automaticItems.forEach((item) => {
3578
+ while (reservedIndices.has(nextAutomaticIndex)) nextAutomaticIndex += 1;
3579
+ item.index = nextAutomaticIndex;
3580
+ items.push(item);
3581
+ nextAutomaticIndex += 1;
3582
+ });
3583
+ if (reservedIndices.size > 0) items.sort((a, b) => a.index - b.index);
3584
+ return [items, automaticItems.map((item) => item.element)];
3585
+ }
3586
+ function getCommonAncestor(firstNode, lastNode) {
3587
+ let ancestor = firstNode.parentElement;
3588
+ while (ancestor && !ancestor.contains(lastNode)) ancestor = ancestor.parentElement;
3589
+ return ancestor;
3590
+ }
3591
+ function hasMovedNode(entries) {
3592
+ for (const entry of entries) for (let i = 0; i < entry.removedNodes.length; i += 1) if (entry.removedNodes[i].isConnected) return true;
3593
+ return false;
3594
+ }
3595
+ function sortByDocumentPosition(a, b) {
3596
+ return a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
3597
+ }
3647
3598
  var SelectPositionerContext = /* @__PURE__ */ React$1.createContext(void 0);
3648
3599
  function useSelectPositionerContext() {
3649
3600
  const context = React$1.useContext(SelectPositionerContext);
@@ -3815,6 +3766,11 @@ function useToolbarRootContext(optional) {
3815
3766
  if (context === void 0 && !optional) throw new Error(formatErrorMessage(69));
3816
3767
  return context;
3817
3768
  }
3769
+ var CSPContext = /* @__PURE__ */ React$1.createContext(void 0);
3770
+ var DEFAULT_CSP_CONTEXT_VALUE = { disableStyleElements: false };
3771
+ function useCSPContext() {
3772
+ return React$1.useContext(CSPContext) ?? DEFAULT_CSP_CONTEXT_VALUE;
3773
+ }
3818
3774
  var stateAttributesMapping = {
3819
3775
  ...popupStateMapping,
3820
3776
  ...transitionStatusMapping
@@ -4146,6 +4102,50 @@ var SelectList = /* @__PURE__ */ React$1.forwardRef(function SelectList2(compone
4146
4102
  props: [defaultProps, elementProps]
4147
4103
  });
4148
4104
  });
4105
+ function useCompositeListItem(params = {}) {
4106
+ const { guess, label, metadata, textRef, index: externalIndex } = params;
4107
+ const { register, unregister, subscribeMapChange, nextIndexRef } = useCompositeListContext();
4108
+ const indexRef = React$1.useRef(-1);
4109
+ const [internalIndex, setInternalIndex] = React$1.useState(externalIndex == null && guess ? () => {
4110
+ if (indexRef.current === -1) {
4111
+ const newIndex = nextIndexRef.current;
4112
+ nextIndexRef.current += 1;
4113
+ indexRef.current = newIndex;
4114
+ }
4115
+ return indexRef.current;
4116
+ } : -1);
4117
+ const index2 = externalIndex ?? internalIndex;
4118
+ const componentRef = React$1.useRef(null);
4119
+ const ref = React$1.useCallback((node) => {
4120
+ const previousNode = componentRef.current;
4121
+ if (previousNode) unregister(previousNode);
4122
+ componentRef.current = node;
4123
+ if (node) register(node, {
4124
+ metadata: metadata ?? null,
4125
+ index: externalIndex ?? null,
4126
+ label,
4127
+ textRef
4128
+ });
4129
+ }, [
4130
+ externalIndex,
4131
+ register,
4132
+ unregister,
4133
+ metadata,
4134
+ label,
4135
+ textRef
4136
+ ]);
4137
+ useIsoLayoutEffect(() => {
4138
+ if (externalIndex != null) return;
4139
+ return subscribeMapChange((map) => {
4140
+ const i = componentRef.current ? map.get(componentRef.current)?.index : null;
4141
+ if (i != null) setInternalIndex(i);
4142
+ });
4143
+ }, [externalIndex, subscribeMapChange]);
4144
+ return {
4145
+ ref,
4146
+ index: index2
4147
+ };
4148
+ }
4149
4149
  var SelectItemContext = /* @__PURE__ */ React$1.createContext(void 0);
4150
4150
  function useSelectItemContext() {
4151
4151
  const context = React$1.useContext(SelectItemContext);
@@ -4435,16 +4435,16 @@ export {
4435
4435
  useAnchorPositioning,
4436
4436
  getDisabledMountTransitionStyles,
4437
4437
  usePositioner,
4438
- CompositeList,
4439
- useCompositeListItem,
4440
- useCSPContext,
4441
4438
  isElementDisabled,
4442
4439
  useValueChanged,
4443
4440
  useOpenMethodTriggerProps,
4444
4441
  normalizeScrollOffset,
4442
+ CompositeList,
4445
4443
  useAnchoredPopupScrollLock,
4446
4444
  styleDisableScrollbar,
4447
4445
  useToolbarRootContext,
4446
+ useCSPContext,
4447
+ useCompositeListItem,
4448
4448
  Select,
4449
4449
  useRender
4450
4450
  };
@@ -6,17 +6,17 @@ import {
6
6
  } from "./chunk-BLSX7WHW.js";
7
7
  import {
8
8
  AgentDisclosure
9
- } from "./chunk-HFQTI7AX.js";
9
+ } from "./chunk-VPKX7QRU.js";
10
10
  import {
11
11
  AnimatePresence,
12
12
  useReducedMotion
13
- } from "./chunk-ZJFA4F5X.js";
13
+ } from "./chunk-NIZBFVJF.js";
14
14
  import {
15
15
  EASE_OUT,
16
16
  SPRING_LAYOUT,
17
17
  SPRING_SWAP,
18
18
  m
19
- } from "./chunk-K3BXQG3N.js";
19
+ } from "./chunk-EBG3XFGQ.js";
20
20
  import {
21
21
  isSafeExternalUrl
22
22
  } from "./chunk-L46H6IDX.js";
@@ -30,7 +30,7 @@ import {
30
30
  cn
31
31
  } from "./chunk-DJMHPJBP.js";
32
32
 
33
- // web/app/dist/server/assets/citations-CYHZanjq.js
33
+ // web/app/dist/server/assets/citations-C9jxvMoi.js
34
34
  import { Suspense, lazy, useCallback, useEffect, useId, useState } from "react";
35
35
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
36
36
  var BookOpenText = createLucideIcon("book-open-text", [