@assistant-ui/react 0.15.31 → 0.15.33
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/_virtual/_rolldown/runtime.js +1 -2
- package/dist/adapters/GeminiLiveVoiceAdapter.d.ts +26 -0
- package/dist/adapters/GeminiLiveVoiceAdapter.d.ts.map +1 -0
- package/dist/adapters/GeminiLiveVoiceAdapter.js +346 -0
- package/dist/adapters/GeminiLiveVoiceAdapter.js.map +1 -0
- package/dist/adapters/OpenAIRealtimeVoiceAdapter.js +1 -2
- package/dist/adapters/gemini-live/audio.d.ts +27 -0
- package/dist/adapters/gemini-live/audio.d.ts.map +1 -0
- package/dist/adapters/gemini-live/audio.js +291 -0
- package/dist/adapters/gemini-live/audio.js.map +1 -0
- package/dist/assistant-transport.js +1 -2
- package/dist/cloud-renderer/CloudRendererHost.js +1 -2
- package/dist/context/ReadonlyStore.js +1 -2
- package/dist/context/providers/MessageProvider.js +1 -2
- package/dist/context/providers/ThreadViewportProvider.js +1 -2
- package/dist/context/react/ThreadViewportContext.js +1 -2
- package/dist/context/react/utils/createContextHook.js +1 -2
- package/dist/context/react/utils/createContextStoreHook.js +1 -2
- package/dist/context/stores/ThreadViewport.js +2 -3
- package/dist/devtools/DevToolsHooks.js +1 -2
- package/dist/hooks/useMessageQuote.js +1 -2
- package/dist/hooks/useMessageTiming.js +1 -2
- package/dist/hooks/useToolCallElapsed.js +1 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/internal.js +2 -3
- package/dist/legacy-runtime/AssistantRuntimeProvider.js +1 -2
- package/dist/mcp-apps/McpAppRenderer.d.ts.map +1 -1
- package/dist/mcp-apps/McpAppRenderer.js +4 -4
- package/dist/mcp-apps/McpAppRenderer.js.map +1 -1
- package/dist/mcp-apps/McpAppsRemoteHost.js +1 -2
- package/dist/mcp-apps/app-frame.js +2 -3
- package/dist/mcp-apps/bridge.js +1 -2
- package/dist/mcp-apps/csp.js +1 -2
- package/dist/mcp-apps/types.js +1 -2
- package/dist/mcp-apps/utils.js +1 -2
- package/dist/model-context/frame/useAssistantFrameHost.js +1 -2
- package/dist/model-context/makeAssistantVisible.js +1 -2
- package/dist/primitives/actionBar/ActionBarCopy.js +1 -2
- package/dist/primitives/actionBar/ActionBarEdit.js +1 -2
- package/dist/primitives/actionBar/ActionBarExportMarkdown.js +1 -2
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.js +1 -2
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.js +1 -2
- package/dist/primitives/actionBar/ActionBarInteractionContext.js +1 -2
- package/dist/primitives/actionBar/ActionBarReload.js +1 -2
- package/dist/primitives/actionBar/ActionBarRoot.js +1 -2
- package/dist/primitives/actionBar/ActionBarSpeak.js +1 -2
- package/dist/primitives/actionBar/ActionBarStopSpeaking.js +1 -2
- package/dist/primitives/actionBar/useActionBarFloatStatus.js +1 -2
- package/dist/primitives/actionBar.js +1 -2
- package/dist/primitives/actionBarMore/ActionBarMoreContent.js +1 -2
- package/dist/primitives/actionBarMore/ActionBarMoreItem.js +1 -2
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.js +1 -2
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.js +1 -2
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.js +1 -2
- package/dist/primitives/actionBarMore/scope.js +1 -2
- package/dist/primitives/actionBarMore.js +1 -2
- package/dist/primitives/assistantModal/AssistantModalAnchor.js +1 -2
- package/dist/primitives/assistantModal/AssistantModalContent.js +1 -2
- package/dist/primitives/assistantModal/AssistantModalRoot.js +1 -2
- package/dist/primitives/assistantModal/AssistantModalTrigger.js +1 -2
- package/dist/primitives/assistantModal/popoverRenderPrimitives.js +1 -2
- package/dist/primitives/assistantModal/scope.js +1 -2
- package/dist/primitives/assistantModal.js +1 -2
- package/dist/primitives/attachment/AttachmentName.js +1 -2
- package/dist/primitives/attachment/AttachmentRemove.js +1 -2
- package/dist/primitives/attachment/AttachmentRoot.js +1 -2
- package/dist/primitives/attachment/AttachmentThumb.js +1 -2
- package/dist/primitives/attachment.js +1 -2
- package/dist/primitives/branchPicker/BranchPickerCount.js +1 -2
- package/dist/primitives/branchPicker/BranchPickerNext.js +1 -2
- package/dist/primitives/branchPicker/BranchPickerNumber.js +1 -2
- package/dist/primitives/branchPicker/BranchPickerPrevious.js +1 -2
- package/dist/primitives/branchPicker/BranchPickerRoot.js +1 -2
- package/dist/primitives/branchPicker.js +1 -2
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts +5 -4
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.js +57 -20
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.js.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtRoot.js +1 -2
- package/dist/primitives/chainOfThought.js +1 -2
- package/dist/primitives/composer/ComposerAddAttachment.js +1 -2
- package/dist/primitives/composer/ComposerAttachmentDropzone.js +1 -2
- package/dist/primitives/composer/ComposerCancel.js +1 -2
- package/dist/primitives/composer/ComposerCompactContext.js +1 -2
- package/dist/primitives/composer/ComposerDictate.js +1 -2
- package/dist/primitives/composer/ComposerDictationTranscript.js +1 -2
- package/dist/primitives/composer/ComposerInput.js +1 -2
- package/dist/primitives/composer/ComposerInputPluginContext.js +1 -2
- package/dist/primitives/composer/ComposerQuote.js +1 -2
- package/dist/primitives/composer/ComposerResume.js +1 -2
- package/dist/primitives/composer/ComposerRoot.js +1 -2
- package/dist/primitives/composer/ComposerSend.js +1 -2
- package/dist/primitives/composer/ComposerStopDictation.js +1 -2
- package/dist/primitives/composer/composerInputSelector.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopover.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverAction.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverBack.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverCategories.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverDirective.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverItems.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverResource.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverRootContext.js +1 -2
- package/dist/primitives/composer/trigger/detectTrigger.js +1 -2
- package/dist/primitives/composer/trigger/index.js +1 -2
- package/dist/primitives/composer/trigger/matchesTriggerItemQuery.js +1 -2
- package/dist/primitives/composer/trigger/triggerDetectionResource.js +1 -2
- package/dist/primitives/composer/trigger/triggerKeyboardResource.js +1 -2
- package/dist/primitives/composer/trigger/triggerNavigationResource.js +1 -2
- package/dist/primitives/composer/trigger/triggerSelectionResource.js +1 -2
- package/dist/primitives/composer/useComposerCancelWithFocus.js +1 -2
- package/dist/primitives/composer/useComposerInputState.js +1 -2
- package/dist/primitives/composer.js +1 -2
- package/dist/primitives/dropdownMenuRenderPrimitives.js +1 -2
- package/dist/primitives/error/ErrorMessage.js +1 -2
- package/dist/primitives/error/ErrorRoot.js +1 -2
- package/dist/primitives/error.js +1 -2
- package/dist/primitives/message/MessageError.js +1 -2
- package/dist/primitives/message/MessageIf.js +1 -2
- package/dist/primitives/message/MessageParts.js +1 -2
- package/dist/primitives/message/MessagePartsGrouped.js +2 -3
- package/dist/primitives/message/MessageRoot.js +1 -2
- package/dist/primitives/message.js +1 -2
- package/dist/primitives/messagePart/MessagePartImage.js +1 -2
- package/dist/primitives/messagePart/MessagePartText.js +1 -2
- package/dist/primitives/messagePart/useMessagePartData.js +1 -2
- package/dist/primitives/messagePart/useMessagePartFile.js +1 -2
- package/dist/primitives/messagePart/useMessagePartImage.js +1 -2
- package/dist/primitives/messagePart/useMessagePartReasoning.js +1 -2
- package/dist/primitives/messagePart/useMessagePartSource.js +1 -2
- package/dist/primitives/messagePart/useMessagePartText.js +1 -2
- package/dist/primitives/messagePart.js +1 -2
- package/dist/primitives/queueItem/QueueItemRemove.js +1 -2
- package/dist/primitives/queueItem/QueueItemSteer.js +1 -2
- package/dist/primitives/queueItem/QueueItemText.js +1 -2
- package/dist/primitives/queueItem.js +1 -2
- package/dist/primitives/reasoning/useScrollLock.d.ts.map +1 -1
- package/dist/primitives/reasoning/useScrollLock.js +41 -25
- package/dist/primitives/reasoning/useScrollLock.js.map +1 -1
- package/dist/primitives/selectionToolbar/SelectionToolbarQuote.js +1 -2
- package/dist/primitives/selectionToolbar/SelectionToolbarRoot.js +1 -2
- package/dist/primitives/selectionToolbar.js +1 -2
- package/dist/primitives/suggestion/SuggestionDescription.js +1 -2
- package/dist/primitives/suggestion/SuggestionTitle.js +1 -2
- package/dist/primitives/suggestion/SuggestionTrigger.js +1 -2
- package/dist/primitives/suggestion.js +1 -2
- package/dist/primitives/thread/ThreadEmpty.js +1 -2
- package/dist/primitives/thread/ThreadIf.js +1 -2
- package/dist/primitives/thread/ThreadLoadEarlier.js +1 -2
- package/dist/primitives/thread/ThreadRoot.js +1 -2
- package/dist/primitives/thread/ThreadRootElementContext.js +1 -2
- package/dist/primitives/thread/ThreadScrollToBottom.js +1 -2
- package/dist/primitives/thread/ThreadSuggestion.js +1 -2
- package/dist/primitives/thread/ThreadViewport.js +1 -2
- package/dist/primitives/thread/ThreadViewportFooter.js +1 -2
- package/dist/primitives/thread/topAnchor/computeTopAnchorSlack.js +1 -2
- package/dist/primitives/thread/topAnchor/createReserveObservers.js +1 -2
- package/dist/primitives/thread/topAnchor/mountTopAnchorReserve.js +1 -2
- package/dist/primitives/thread/topAnchor/topAnchorTurn.js +1 -2
- package/dist/primitives/thread/topAnchor/topAnchorUtils.js +1 -2
- package/dist/primitives/thread/topAnchor/useTopAnchorReserve.js +1 -2
- package/dist/primitives/thread/useThreadViewportAutoScroll.js +1 -2
- package/dist/primitives/thread.js +1 -2
- package/dist/primitives/threadList/ThreadListLoadMore.js +1 -2
- package/dist/primitives/threadList/ThreadListNew.js +1 -2
- package/dist/primitives/threadList/ThreadListRoot.js +1 -2
- package/dist/primitives/threadList.js +1 -2
- package/dist/primitives/threadListFocusGroup.js +1 -2
- package/dist/primitives/threadListItem/ThreadListItemArchive.js +1 -2
- package/dist/primitives/threadListItem/ThreadListItemDelete.js +1 -2
- package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemRoot.js +2 -3
- package/dist/primitives/threadListItem/ThreadListItemRoot.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js +1 -2
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.js +1 -2
- package/dist/primitives/threadListItem.js +1 -2
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.js +1 -2
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.js +1 -2
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.js +1 -2
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.js +1 -2
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.js +1 -2
- package/dist/primitives/threadListItemMore/scope.js +1 -2
- package/dist/primitives/threadListItemMore.js +1 -2
- package/dist/sandbox-host/SandboxHost.js +2 -3
- package/dist/unstable/useComposerInput.js +1 -2
- package/dist/unstable/useComposerInputHistory.js +2 -3
- package/dist/unstable/useLiveCompletionAdapter.js +1 -2
- package/dist/unstable/useMentionAdapter.js +1 -2
- package/dist/unstable/useMessageStallDetection.js +1 -2
- package/dist/unstable/useModelContextSnapshot.js +1 -2
- package/dist/unstable/useSlashCommandAdapter.js +1 -2
- package/dist/unstable/webmcp/WebMcpRegistrationResource.js +1 -2
- package/dist/unstable/webmcp/convertTools.js +1 -2
- package/dist/unstable/webmcp/useWebMcpProvider.js +1 -2
- package/dist/unstable/webmcp/webmcp-host.js +1 -2
- package/dist/utils/Primitive.js +1 -2
- package/dist/utils/createActionButton.js +1 -2
- package/dist/utils/getSelectionMessageId.js +1 -2
- package/dist/utils/hooks/useManagedRef.js +1 -2
- package/dist/utils/hooks/useMediaQuery.js +1 -2
- package/dist/utils/hooks/useOnScrollToBottom.js +1 -2
- package/dist/utils/hooks/useSizeHandle.js +1 -2
- package/dist/utils/isCompositionKey.js +1 -2
- package/dist/utils/smooth/SmoothContext.js +1 -2
- package/dist/utils/smooth/useSmooth.d.ts.map +1 -1
- package/dist/utils/smooth/useSmooth.js +11 -4
- package/dist/utils/smooth/useSmooth.js.map +1 -1
- package/dist/utils/useIsomorphicLayoutEffect.js +0 -1
- package/package.json +8 -8
- package/src/adapters/GeminiLiveVoiceAdapter.test.ts +992 -0
- package/src/adapters/GeminiLiveVoiceAdapter.ts +454 -0
- package/src/adapters/gemini-live/audio.test.ts +880 -0
- package/src/adapters/gemini-live/audio.ts +333 -0
- package/src/index.test.ts +34 -0
- package/src/index.ts +4 -0
- package/src/mcp-apps/McpAppRenderer.composer.test.tsx +111 -0
- package/src/mcp-apps/McpAppRenderer.test.tsx +24 -23
- package/src/mcp-apps/McpAppRenderer.tsx +9 -1
- package/src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.test.tsx +91 -0
- package/src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.tsx +54 -0
- package/src/primitives/reasoning/useScrollLock.test.tsx +71 -2
- package/src/primitives/reasoning/useScrollLock.ts +78 -51
- package/src/primitives/threadListItem/ThreadListItemRoot.tsx +4 -1
- package/src/primitives/threadListItem/ThreadListKeyboardNav.test.tsx +25 -0
- package/src/utils/smooth/useSmooth.test.tsx +113 -4
- package/src/utils/smooth/useSmooth.ts +16 -2
- package/src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.ts +0 -49
|
@@ -4,7 +4,7 @@ import { useMessagePartText } from "./useMessagePartText.js";
|
|
|
4
4
|
import { useSmooth } from "../../utils/smooth/useSmooth.js";
|
|
5
5
|
import { forwardRef, isValidElement } from "@assistant-ui/tap/react-shim";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/primitives/messagePart/MessagePartText.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Renders the text content of a message part with optional smooth streaming.
|
|
10
10
|
*
|
|
@@ -35,7 +35,6 @@ const MessagePartPrimitiveText = forwardRef(({ smooth = true, component: Compone
|
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
MessagePartPrimitiveText.displayName = "MessagePartPrimitive.Text";
|
|
38
|
-
//#endregion
|
|
39
38
|
export { MessagePartPrimitiveText };
|
|
40
39
|
|
|
41
40
|
//# sourceMappingURL=MessagePartText.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useAuiState } from "@assistant-ui/store";
|
|
3
|
-
|
|
3
|
+
// src/primitives/messagePart/useMessagePartData.ts
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated Use {@link useAuiState} to select and narrow `s.part`.
|
|
6
6
|
* Return `null` for optional rendering. Do not throw inside the selector:
|
|
@@ -28,7 +28,6 @@ function _temp(s) {
|
|
|
28
28
|
if (s.part.type !== "data") return null;
|
|
29
29
|
return s.part;
|
|
30
30
|
}
|
|
31
|
-
//#endregion
|
|
32
31
|
export { useMessagePartData };
|
|
33
32
|
|
|
34
33
|
//# sourceMappingURL=useMessagePartData.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useAuiState } from "@assistant-ui/store";
|
|
3
|
-
|
|
3
|
+
// src/primitives/messagePart/useMessagePartFile.ts
|
|
4
4
|
const COMPLETE_STATUS = Object.freeze({ type: "complete" });
|
|
5
5
|
const EMPTY_FILE_PART = Object.freeze({
|
|
6
6
|
type: "file",
|
|
@@ -31,7 +31,6 @@ function _temp(s) {
|
|
|
31
31
|
if (s.part.type !== "file") return EMPTY_FILE_PART;
|
|
32
32
|
return s.part;
|
|
33
33
|
}
|
|
34
|
-
//#endregion
|
|
35
34
|
export { useMessagePartFile };
|
|
36
35
|
|
|
37
36
|
//# sourceMappingURL=useMessagePartFile.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useAuiState } from "@assistant-ui/store";
|
|
3
|
-
|
|
3
|
+
// src/primitives/messagePart/useMessagePartImage.ts
|
|
4
4
|
const COMPLETE_STATUS = Object.freeze({ type: "complete" });
|
|
5
5
|
const EMPTY_IMAGE_PART = Object.freeze({
|
|
6
6
|
type: "image",
|
|
@@ -30,7 +30,6 @@ function _temp(s) {
|
|
|
30
30
|
if (s.part.type !== "image") return EMPTY_IMAGE_PART;
|
|
31
31
|
return s.part;
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { useMessagePartImage };
|
|
35
34
|
|
|
36
35
|
//# sourceMappingURL=useMessagePartImage.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useAuiState } from "@assistant-ui/store";
|
|
3
|
-
|
|
3
|
+
// src/primitives/messagePart/useMessagePartReasoning.ts
|
|
4
4
|
const COMPLETE_STATUS = Object.freeze({ type: "complete" });
|
|
5
5
|
const EMPTY_REASONING_PART = Object.freeze({
|
|
6
6
|
type: "reasoning",
|
|
@@ -30,7 +30,6 @@ function _temp(s) {
|
|
|
30
30
|
if (s.part.type !== "reasoning") return EMPTY_REASONING_PART;
|
|
31
31
|
return s.part;
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { useMessagePartReasoning };
|
|
35
34
|
|
|
36
35
|
//# sourceMappingURL=useMessagePartReasoning.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useAuiState } from "@assistant-ui/store";
|
|
3
|
-
|
|
3
|
+
// src/primitives/messagePart/useMessagePartSource.ts
|
|
4
4
|
const COMPLETE_STATUS = Object.freeze({ type: "complete" });
|
|
5
5
|
const EMPTY_SOURCE_PART = Object.freeze({
|
|
6
6
|
type: "source",
|
|
@@ -32,7 +32,6 @@ function _temp(s) {
|
|
|
32
32
|
if (s.part.type !== "source") return EMPTY_SOURCE_PART;
|
|
33
33
|
return s.part;
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
export { useMessagePartSource };
|
|
37
36
|
|
|
38
37
|
//# sourceMappingURL=useMessagePartSource.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useAuiState } from "@assistant-ui/store";
|
|
3
|
-
|
|
3
|
+
// src/primitives/messagePart/useMessagePartText.ts
|
|
4
4
|
const COMPLETE_STATUS = Object.freeze({ type: "complete" });
|
|
5
5
|
const EMPTY_TEXT_PART = Object.freeze({
|
|
6
6
|
type: "text",
|
|
@@ -30,7 +30,6 @@ function _temp(s) {
|
|
|
30
30
|
if (s.part.type !== "text" && s.part.type !== "reasoning") return EMPTY_TEXT_PART;
|
|
31
31
|
return s.part;
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { useMessagePartText };
|
|
35
34
|
|
|
36
35
|
//# sourceMappingURL=useMessagePartText.js.map
|
|
@@ -3,14 +3,13 @@ import { MessagePartPrimitiveText } from "./messagePart/MessagePartText.js";
|
|
|
3
3
|
import { MessagePartPrimitiveImage } from "./messagePart/MessagePartImage.js";
|
|
4
4
|
import { MessagePartPrimitiveInProgress } from "./messagePart/MessagePartInProgress.js";
|
|
5
5
|
import { PartPrimitiveMessages as Messages } from "@assistant-ui/core/react";
|
|
6
|
-
|
|
6
|
+
// src/primitives/messagePart.ts
|
|
7
7
|
var messagePart_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
Image: () => MessagePartPrimitiveImage,
|
|
9
9
|
InProgress: () => MessagePartPrimitiveInProgress,
|
|
10
10
|
Messages: () => Messages,
|
|
11
11
|
Text: () => MessagePartPrimitiveText
|
|
12
12
|
});
|
|
13
|
-
//#endregion
|
|
14
13
|
export { MessagePartPrimitiveImage as Image, MessagePartPrimitiveInProgress as InProgress, Messages, MessagePartPrimitiveText as Text, messagePart_exports };
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=messagePart.js.map
|
|
@@ -3,7 +3,7 @@ import { createActionButton } from "../../utils/createActionButton.js";
|
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import "@assistant-ui/tap/react-shim";
|
|
5
5
|
import { useAui } from "@assistant-ui/store";
|
|
6
|
-
|
|
6
|
+
// src/primitives/queueItem/QueueItemRemove.ts
|
|
7
7
|
const useQueueItemRemove = () => {
|
|
8
8
|
const $ = c(2);
|
|
9
9
|
const aui = useAui();
|
|
@@ -26,7 +26,6 @@ const useQueueItemRemove = () => {
|
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
const QueueItemPrimitiveRemove = createActionButton("QueueItemPrimitive.Remove", useQueueItemRemove);
|
|
29
|
-
//#endregion
|
|
30
29
|
export { QueueItemPrimitiveRemove };
|
|
31
30
|
|
|
32
31
|
//# sourceMappingURL=QueueItemRemove.js.map
|
|
@@ -3,7 +3,7 @@ import { createActionButton } from "../../utils/createActionButton.js";
|
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import "@assistant-ui/tap/react-shim";
|
|
5
5
|
import { useAui } from "@assistant-ui/store";
|
|
6
|
-
|
|
6
|
+
// src/primitives/queueItem/QueueItemSteer.ts
|
|
7
7
|
const useQueueItemSteer = () => {
|
|
8
8
|
const $ = c(2);
|
|
9
9
|
const aui = useAui();
|
|
@@ -26,7 +26,6 @@ const useQueueItemSteer = () => {
|
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
const QueueItemPrimitiveSteer = createActionButton("QueueItemPrimitive.Steer", useQueueItemSteer);
|
|
29
|
-
//#endregion
|
|
30
29
|
export { QueueItemPrimitiveSteer };
|
|
31
30
|
|
|
32
31
|
//# sourceMappingURL=QueueItemSteer.js.map
|
|
@@ -4,7 +4,7 @@ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
|
4
4
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
5
5
|
import { useAuiState } from "@assistant-ui/store";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/primitives/queueItem/QueueItemText.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Renders the prompt text of a queue item.
|
|
10
10
|
*
|
|
@@ -41,7 +41,6 @@ function _temp2(part_0) {
|
|
|
41
41
|
function _temp3(s) {
|
|
42
42
|
return (s.queueItem.parts ?? []).filter(_temp).map(_temp2).join("\n\n");
|
|
43
43
|
}
|
|
44
|
-
//#endregion
|
|
45
44
|
export { QueueItemPrimitiveText };
|
|
46
45
|
|
|
47
46
|
//# sourceMappingURL=QueueItemText.js.map
|
|
@@ -2,13 +2,12 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { QueueItemPrimitiveText } from "./queueItem/QueueItemText.js";
|
|
3
3
|
import { QueueItemPrimitiveSteer } from "./queueItem/QueueItemSteer.js";
|
|
4
4
|
import { QueueItemPrimitiveRemove } from "./queueItem/QueueItemRemove.js";
|
|
5
|
-
|
|
5
|
+
// src/primitives/queueItem.ts
|
|
6
6
|
var queueItem_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
Remove: () => QueueItemPrimitiveRemove,
|
|
8
8
|
Steer: () => QueueItemPrimitiveSteer,
|
|
9
9
|
Text: () => QueueItemPrimitiveText
|
|
10
10
|
});
|
|
11
|
-
//#endregion
|
|
12
11
|
export { QueueItemPrimitiveRemove as Remove, QueueItemPrimitiveSteer as Steer, QueueItemPrimitiveText as Text, queueItem_exports };
|
|
13
12
|
|
|
14
13
|
//# sourceMappingURL=queueItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollLock.d.ts","sourceRoot":"","sources":["../../../src/primitives/reasoning/useScrollLock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useScrollLock.d.ts","sourceRoot":"","sources":["../../../src/primitives/reasoning/useScrollLock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;AAgFvE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EAC/D,oBAAoB,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,EACvC,mBAAmB,MAAM,eAqC1B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
3
|
import { useEffect, useRef } from "@assistant-ui/tap/react-shim";
|
|
4
|
-
|
|
4
|
+
// src/primitives/reasoning/useScrollLock.ts
|
|
5
5
|
const findScrollableAncestor = (element) => {
|
|
6
6
|
let current = element;
|
|
7
7
|
while (current) {
|
|
@@ -11,6 +11,39 @@ const findScrollableAncestor = (element) => {
|
|
|
11
11
|
}
|
|
12
12
|
return null;
|
|
13
13
|
};
|
|
14
|
+
const scrollLocks = /* @__PURE__ */ new WeakMap();
|
|
15
|
+
const acquireScrollLock = (scrollContainer) => {
|
|
16
|
+
const existing = scrollLocks.get(scrollContainer);
|
|
17
|
+
if (existing) {
|
|
18
|
+
existing.count++;
|
|
19
|
+
return existing;
|
|
20
|
+
}
|
|
21
|
+
const scrollPosition = scrollContainer.scrollTop;
|
|
22
|
+
const scrollbarWidth = scrollContainer.style.scrollbarWidth;
|
|
23
|
+
const computed = getComputedStyle(scrollContainer);
|
|
24
|
+
const paddingSide = computed.direction === "rtl" ? "paddingLeft" : "paddingRight";
|
|
25
|
+
const previousPadding = scrollContainer.style[paddingSide];
|
|
26
|
+
const elementScrollbarSize = scrollContainer.offsetWidth - scrollContainer.clientWidth - parseFloat(computed.borderLeftWidth) - parseFloat(computed.borderRightWidth);
|
|
27
|
+
const ownerDocument = scrollContainer.ownerDocument;
|
|
28
|
+
const scrollbarSize = (scrollContainer === ownerDocument.documentElement || scrollContainer === ownerDocument.body) && elementScrollbarSize <= 0 ? (ownerDocument.defaultView?.innerWidth ?? 0) - ownerDocument.documentElement.clientWidth : elementScrollbarSize;
|
|
29
|
+
scrollContainer.style.scrollbarWidth = "none";
|
|
30
|
+
if (scrollbarSize > 0) scrollContainer.style[paddingSide] = `${parseFloat(computed[paddingSide]) + scrollbarSize}px`;
|
|
31
|
+
const restoreStyles = () => {
|
|
32
|
+
scrollContainer.style.scrollbarWidth = scrollbarWidth;
|
|
33
|
+
scrollContainer.style[paddingSide] = previousPadding;
|
|
34
|
+
};
|
|
35
|
+
const resetPosition = () => scrollContainer.scrollTop = scrollPosition;
|
|
36
|
+
scrollContainer.addEventListener("scroll", resetPosition);
|
|
37
|
+
const lock = {
|
|
38
|
+
count: 1,
|
|
39
|
+
restore: () => {
|
|
40
|
+
scrollContainer.removeEventListener("scroll", resetPosition);
|
|
41
|
+
restoreStyles();
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
scrollLocks.set(scrollContainer, lock);
|
|
45
|
+
return lock;
|
|
46
|
+
};
|
|
14
47
|
/**
|
|
15
48
|
* Locks scroll position during collapsible/height animations and hides scrollbar.
|
|
16
49
|
*
|
|
@@ -63,31 +96,15 @@ const useScrollLock = (animatedElementRef, animationDuration) => {
|
|
|
63
96
|
cleanupRef.current = null;
|
|
64
97
|
return;
|
|
65
98
|
}
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const computed = getComputedStyle(scrollContainer);
|
|
69
|
-
const paddingSide = computed.direction === "rtl" ? "paddingLeft" : "paddingRight";
|
|
70
|
-
const previousPadding = scrollContainer.style[paddingSide];
|
|
71
|
-
const elementScrollbarSize = scrollContainer.offsetWidth - scrollContainer.clientWidth - parseFloat(computed.borderLeftWidth) - parseFloat(computed.borderRightWidth);
|
|
72
|
-
const ownerDocument = scrollContainer.ownerDocument;
|
|
73
|
-
const scrollbarSize = (scrollContainer === ownerDocument.documentElement || scrollContainer === ownerDocument.body) && elementScrollbarSize <= 0 ? (ownerDocument.defaultView?.innerWidth ?? 0) - ownerDocument.documentElement.clientWidth : elementScrollbarSize;
|
|
74
|
-
scrollContainer.style.scrollbarWidth = "none";
|
|
75
|
-
if (scrollbarSize > 0) scrollContainer.style[paddingSide] = `${parseFloat(computed[paddingSide]) + scrollbarSize}px`;
|
|
76
|
-
const restoreStyles = () => {
|
|
77
|
-
scrollContainer.style.scrollbarWidth = scrollbarWidth;
|
|
78
|
-
scrollContainer.style[paddingSide] = previousPadding;
|
|
79
|
-
};
|
|
80
|
-
const resetPosition = () => scrollContainer.scrollTop = scrollPosition;
|
|
81
|
-
scrollContainer.addEventListener("scroll", resetPosition);
|
|
82
|
-
const timeoutId = setTimeout(() => {
|
|
83
|
-
scrollContainer.removeEventListener("scroll", resetPosition);
|
|
84
|
-
restoreStyles();
|
|
85
|
-
cleanupRef.current = null;
|
|
86
|
-
}, animationDuration);
|
|
99
|
+
const lock = acquireScrollLock(scrollContainer);
|
|
100
|
+
const timeoutId = setTimeout(() => cleanupRef.current?.(), animationDuration);
|
|
87
101
|
cleanupRef.current = () => {
|
|
88
102
|
clearTimeout(timeoutId);
|
|
89
|
-
|
|
90
|
-
|
|
103
|
+
if ((lock.count = lock.count - 1) === 0) {
|
|
104
|
+
lock.restore();
|
|
105
|
+
scrollLocks.delete(scrollContainer);
|
|
106
|
+
}
|
|
107
|
+
cleanupRef.current = null;
|
|
91
108
|
};
|
|
92
109
|
};
|
|
93
110
|
$[2] = animatedElementRef;
|
|
@@ -96,7 +113,6 @@ const useScrollLock = (animatedElementRef, animationDuration) => {
|
|
|
96
113
|
} else t2 = $[4];
|
|
97
114
|
return t2;
|
|
98
115
|
};
|
|
99
|
-
//#endregion
|
|
100
116
|
export { useScrollLock };
|
|
101
117
|
|
|
102
118
|
//# sourceMappingURL=useScrollLock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollLock.js","names":["c","_c","RefObject","useCallback","useEffect","useRef","findScrollableAncestor","element","HTMLElement","current","overflowY","getComputedStyle","parentElement","
|
|
1
|
+
{"version":3,"file":"useScrollLock.js","names":["c","_c","RefObject","useCallback","useEffect","useRef","findScrollableAncestor","element","HTMLElement","current","overflowY","getComputedStyle","parentElement","scrollLocks","WeakMap","count","restore","acquireScrollLock","scrollContainer","existing","get","scrollPosition","scrollTop","scrollbarWidth","style","computed","paddingSide","direction","previousPadding","elementScrollbarSize","offsetWidth","clientWidth","parseFloat","borderLeftWidth","borderRightWidth","ownerDocument","isRootScroller","documentElement","body","scrollbarSize","defaultView","innerWidth","restoreStyles","resetPosition","addEventListener","lock","removeEventListener","set","useScrollLock","animatedElementRef","animationDuration","$","cleanupRef","t0","t1","Symbol","for","t2","timeoutId","setTimeout","clearTimeout","delete","lockScroll","_c","lockScroll"],"sources":["../../../src/primitives/reasoning/useScrollLock.ts"],"sourcesContent":["\"use client\";\n\nimport { type RefObject, useCallback, useEffect, useRef } from \"react\";\n\nconst findScrollableAncestor = (element: HTMLElement | null) => {\n let current = element;\n while (current) {\n const { overflowY } = getComputedStyle(current);\n if (overflowY === \"scroll\" || overflowY === \"auto\") return current;\n current = current.parentElement;\n }\n return null;\n};\n\nconst scrollLocks = new WeakMap<\n HTMLElement,\n { count: number; restore: () => void }\n>();\n\nconst acquireScrollLock = (scrollContainer: HTMLElement) => {\n const existing = scrollLocks.get(scrollContainer);\n if (existing) {\n existing.count++;\n return existing;\n }\n\n const scrollPosition = scrollContainer.scrollTop;\n const scrollbarWidth = scrollContainer.style.scrollbarWidth;\n\n // Hiding the scrollbar collapses its gutter on classic scrollbars, which\n // shifts centered content horizontally; compensate with padding on the\n // side the scrollbar occupies (the left side in RTL).\n const computed = getComputedStyle(scrollContainer);\n const paddingSide =\n computed.direction === \"rtl\" ? \"paddingLeft\" : \"paddingRight\";\n const previousPadding = scrollContainer.style[paddingSide];\n const elementScrollbarSize =\n scrollContainer.offsetWidth -\n scrollContainer.clientWidth -\n parseFloat(computed.borderLeftWidth) -\n parseFloat(computed.borderRightWidth);\n // A root element's offsetWidth already excludes the viewport scrollbar, so\n // the element formula reports zero once the scroll propagates to the\n // viewport, and only then does the viewport measure apply. A body that\n // scrolls in its own right is measured by the element formula like any\n // other scroller, whether or not the viewport is scrolling too.\n const ownerDocument = scrollContainer.ownerDocument;\n const isRootScroller =\n scrollContainer === ownerDocument.documentElement ||\n scrollContainer === ownerDocument.body;\n const scrollbarSize =\n isRootScroller && elementScrollbarSize <= 0\n ? (ownerDocument.defaultView?.innerWidth ?? 0) -\n ownerDocument.documentElement.clientWidth\n : elementScrollbarSize;\n\n scrollContainer.style.scrollbarWidth = \"none\";\n if (scrollbarSize > 0) {\n scrollContainer.style[paddingSide] = `${\n parseFloat(computed[paddingSide]) + scrollbarSize\n }px`;\n }\n\n const restoreStyles = () => {\n scrollContainer.style.scrollbarWidth = scrollbarWidth;\n scrollContainer.style[paddingSide] = previousPadding;\n };\n\n const resetPosition = () => (scrollContainer.scrollTop = scrollPosition);\n scrollContainer.addEventListener(\"scroll\", resetPosition);\n\n const lock = {\n count: 1,\n restore: () => {\n scrollContainer.removeEventListener(\"scroll\", resetPosition);\n restoreStyles();\n },\n };\n scrollLocks.set(scrollContainer, lock);\n return lock;\n};\n\n/**\n * Locks scroll position during collapsible/height animations and hides scrollbar.\n *\n * This utility prevents page jumps when content height changes during animations,\n * providing a smooth user experience. It finds the nearest scrollable ancestor and\n * temporarily locks its scroll position while the animation completes.\n *\n * - Prevents forced reflows: no layout reads, mutations scoped to scrollable parent only\n * - Reactive: only intercepts scroll events when browser actually adjusts\n * - Cleans up automatically after animation duration\n *\n * @param animatedElementRef - Ref to the animated element\n * @param animationDuration - Lock duration in milliseconds\n * @returns Function to activate the scroll lock\n *\n * @example\n * ```tsx\n * const collapsibleRef = useRef<HTMLDivElement>(null);\n * const lockScroll = useScrollLock(collapsibleRef, 200);\n *\n * const handleCollapse = () => {\n * lockScroll(); // Lock scroll before collapsing\n * setIsOpen(false);\n * };\n * ```\n */\nexport const useScrollLock = <T extends HTMLElement = HTMLElement>(\n animatedElementRef: RefObject<T | null>,\n animationDuration: number,\n) => {\n const cleanupRef = useRef<(() => void) | null>(null);\n\n useEffect(() => {\n return () => {\n cleanupRef.current?.();\n };\n }, []);\n\n const lockScroll = useCallback(() => {\n cleanupRef.current?.();\n\n const scrollContainer = findScrollableAncestor(animatedElementRef.current);\n if (!scrollContainer) {\n cleanupRef.current = null;\n return;\n }\n\n const lock = acquireScrollLock(scrollContainer);\n\n const timeoutId = setTimeout(\n () => cleanupRef.current?.(),\n animationDuration,\n );\n\n cleanupRef.current = () => {\n clearTimeout(timeoutId);\n if (--lock.count === 0) {\n lock.restore();\n scrollLocks.delete(scrollContainer);\n }\n cleanupRef.current = null;\n };\n }, [animationDuration, animatedElementRef]);\n\n return lockScroll;\n};\n"],"mappings":"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"}
|
|
@@ -6,7 +6,7 @@ import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
|
6
6
|
import { useAui } from "@assistant-ui/store";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { composeEventHandlers } from "radix-ui/internal";
|
|
9
|
-
|
|
9
|
+
// src/primitives/selectionToolbar/SelectionToolbarQuote.tsx
|
|
10
10
|
/**
|
|
11
11
|
* A button that quotes the currently selected text.
|
|
12
12
|
*
|
|
@@ -80,7 +80,6 @@ const SelectionToolbarPrimitiveQuote = forwardRef((t0, forwardedRef) => {
|
|
|
80
80
|
return t4;
|
|
81
81
|
});
|
|
82
82
|
SelectionToolbarPrimitiveQuote.displayName = "SelectionToolbarPrimitive.Quote";
|
|
83
|
-
//#endregion
|
|
84
83
|
export { SelectionToolbarPrimitiveQuote };
|
|
85
84
|
|
|
86
85
|
//# sourceMappingURL=SelectionToolbarQuote.js.map
|
|
@@ -7,7 +7,7 @@ import { createContext, forwardRef, useContext, useEffect, useRef, useState } fr
|
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { composeEventHandlers } from "radix-ui/internal";
|
|
9
9
|
import { createPortal } from "react-dom";
|
|
10
|
-
|
|
10
|
+
// src/primitives/selectionToolbar/SelectionToolbarRoot.tsx
|
|
11
11
|
const SelectionToolbarContext = createContext(null);
|
|
12
12
|
const useSelectionToolbarInfo = () => {
|
|
13
13
|
return useContext(SelectionToolbarContext);
|
|
@@ -198,7 +198,6 @@ SelectionToolbarPrimitiveRoot.displayName = "SelectionToolbarPrimitive.Root";
|
|
|
198
198
|
function _temp(e) {
|
|
199
199
|
e.preventDefault();
|
|
200
200
|
}
|
|
201
|
-
//#endregion
|
|
202
201
|
export { SelectionToolbarPrimitiveRoot, useSelectionToolbarInfo };
|
|
203
202
|
|
|
204
203
|
//# sourceMappingURL=SelectionToolbarRoot.js.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { SelectionToolbarPrimitiveRoot } from "./selectionToolbar/SelectionToolbarRoot.js";
|
|
3
3
|
import { SelectionToolbarPrimitiveQuote } from "./selectionToolbar/SelectionToolbarQuote.js";
|
|
4
|
-
|
|
4
|
+
// src/primitives/selectionToolbar.ts
|
|
5
5
|
var selectionToolbar_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
Quote: () => SelectionToolbarPrimitiveQuote,
|
|
7
7
|
Root: () => SelectionToolbarPrimitiveRoot
|
|
8
8
|
});
|
|
9
|
-
//#endregion
|
|
10
9
|
export { SelectionToolbarPrimitiveQuote as Quote, SelectionToolbarPrimitiveRoot as Root, selectionToolbar_exports };
|
|
11
10
|
|
|
12
11
|
//# sourceMappingURL=selectionToolbar.js.map
|
|
@@ -4,7 +4,7 @@ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
|
4
4
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
5
5
|
import { useAuiState } from "@assistant-ui/store";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/primitives/suggestion/SuggestionDescription.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Renders the description/label of the suggestion.
|
|
10
10
|
*
|
|
@@ -35,7 +35,6 @@ SuggestionPrimitiveDescription.displayName = "SuggestionPrimitive.Description";
|
|
|
35
35
|
function _temp(s) {
|
|
36
36
|
return s.suggestion.label;
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { SuggestionPrimitiveDescription };
|
|
40
39
|
|
|
41
40
|
//# sourceMappingURL=SuggestionDescription.js.map
|
|
@@ -4,7 +4,7 @@ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
|
4
4
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
5
5
|
import { useAuiState } from "@assistant-ui/store";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/primitives/suggestion/SuggestionTitle.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Renders the title of the suggestion.
|
|
10
10
|
*
|
|
@@ -35,7 +35,6 @@ SuggestionPrimitiveTitle.displayName = "SuggestionPrimitive.Title";
|
|
|
35
35
|
function _temp(s) {
|
|
36
36
|
return s.suggestion.title;
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { SuggestionPrimitiveTitle };
|
|
40
39
|
|
|
41
40
|
//# sourceMappingURL=SuggestionTitle.js.map
|
|
@@ -3,7 +3,7 @@ import { createActionButton } from "../../utils/createActionButton.js";
|
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import { useSuggestionTrigger } from "@assistant-ui/core/react";
|
|
5
5
|
import { useAuiState } from "@assistant-ui/store";
|
|
6
|
-
|
|
6
|
+
// src/primitives/suggestion/SuggestionTrigger.ts
|
|
7
7
|
const useSuggestionTrigger$1 = (t0) => {
|
|
8
8
|
const $ = c(4);
|
|
9
9
|
const { send, clearComposer } = t0;
|
|
@@ -38,7 +38,6 @@ const SuggestionPrimitiveTrigger = createActionButton("SuggestionPrimitive.Trigg
|
|
|
38
38
|
function _temp(s) {
|
|
39
39
|
return s.suggestion.prompt;
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
export { SuggestionPrimitiveTrigger };
|
|
43
42
|
|
|
44
43
|
//# sourceMappingURL=SuggestionTrigger.js.map
|
|
@@ -2,13 +2,12 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { SuggestionPrimitiveTitle } from "./suggestion/SuggestionTitle.js";
|
|
3
3
|
import { SuggestionPrimitiveDescription } from "./suggestion/SuggestionDescription.js";
|
|
4
4
|
import { SuggestionPrimitiveTrigger } from "./suggestion/SuggestionTrigger.js";
|
|
5
|
-
|
|
5
|
+
// src/primitives/suggestion.ts
|
|
6
6
|
var suggestion_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
Description: () => SuggestionPrimitiveDescription,
|
|
8
8
|
Title: () => SuggestionPrimitiveTitle,
|
|
9
9
|
Trigger: () => SuggestionPrimitiveTrigger
|
|
10
10
|
});
|
|
11
|
-
//#endregion
|
|
12
11
|
export { SuggestionPrimitiveDescription as Description, SuggestionPrimitiveTitle as Title, SuggestionPrimitiveTrigger as Trigger, suggestion_exports };
|
|
13
12
|
|
|
14
13
|
//# sourceMappingURL=suggestion.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useAuiState } from "@assistant-ui/store";
|
|
3
|
-
|
|
3
|
+
// src/primitives/thread/ThreadEmpty.ts
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated Use `<AuiIf condition={(s) => s.thread.isEmpty} />` instead.
|
|
6
6
|
*/
|
|
@@ -12,7 +12,6 @@ ThreadPrimitiveEmpty.displayName = "ThreadPrimitive.Empty";
|
|
|
12
12
|
function _temp(s) {
|
|
13
13
|
return s.thread.isEmpty;
|
|
14
14
|
}
|
|
15
|
-
//#endregion
|
|
16
15
|
export { ThreadPrimitiveEmpty };
|
|
17
16
|
|
|
18
17
|
//# sourceMappingURL=ThreadEmpty.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
3
|
import { useAuiState } from "@assistant-ui/store";
|
|
4
|
-
|
|
4
|
+
// src/primitives/thread/ThreadIf.ts
|
|
5
5
|
const useThreadIf = (props) => {
|
|
6
6
|
const $ = c(4);
|
|
7
7
|
let t0;
|
|
@@ -41,7 +41,6 @@ const ThreadPrimitiveIf = (t0) => {
|
|
|
41
41
|
return useThreadIf(query) ? children : null;
|
|
42
42
|
};
|
|
43
43
|
ThreadPrimitiveIf.displayName = "ThreadPrimitive.If";
|
|
44
|
-
//#endregion
|
|
45
44
|
export { ThreadPrimitiveIf };
|
|
46
45
|
|
|
47
46
|
//# sourceMappingURL=ThreadIf.js.map
|
|
@@ -3,7 +3,7 @@ import { createActionButton } from "../../utils/createActionButton.js";
|
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import "@assistant-ui/tap/react-shim";
|
|
5
5
|
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
6
|
-
|
|
6
|
+
// src/primitives/thread/ThreadLoadEarlier.tsx
|
|
7
7
|
const useThreadLoadEarlier = () => {
|
|
8
8
|
const $ = c(2);
|
|
9
9
|
const aui = useAui();
|
|
@@ -30,7 +30,6 @@ const ThreadPrimitiveLoadEarlier = createActionButton("ThreadPrimitive.LoadEarli
|
|
|
30
30
|
function _temp(s) {
|
|
31
31
|
return s.thread.hasEarlier;
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { ThreadPrimitiveLoadEarlier };
|
|
35
34
|
|
|
36
35
|
//# sourceMappingURL=ThreadLoadEarlier.js.map
|
|
@@ -7,7 +7,7 @@ import { forwardRef, useEffect, useRef } from "@assistant-ui/tap/react-shim";
|
|
|
7
7
|
import { useAui } from "@assistant-ui/store";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
import { useComposedRefs } from "radix-ui/internal";
|
|
10
|
-
|
|
10
|
+
// src/primitives/thread/ThreadRoot.tsx
|
|
11
11
|
const escapeEventThreadRoots = /* @__PURE__ */ new WeakMap();
|
|
12
12
|
/**
|
|
13
13
|
* The root container component for a thread.
|
|
@@ -100,7 +100,6 @@ ThreadPrimitiveRoot.displayName = "ThreadPrimitive.Root";
|
|
|
100
100
|
function _temp(target) {
|
|
101
101
|
return target instanceof Element && target.hasAttribute("data-aui-thread-root");
|
|
102
102
|
}
|
|
103
|
-
//#endregion
|
|
104
103
|
export { ThreadPrimitiveRoot };
|
|
105
104
|
|
|
106
105
|
//# sourceMappingURL=ThreadRoot.js.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createContext, useContext } from "@assistant-ui/tap/react-shim";
|
|
3
|
-
|
|
3
|
+
// src/primitives/thread/ThreadRootElementContext.ts
|
|
4
4
|
const ThreadRootElementContext = createContext(void 0);
|
|
5
5
|
const useThreadRootElementRef = () => {
|
|
6
6
|
return useContext(ThreadRootElementContext);
|
|
7
7
|
};
|
|
8
|
-
//#endregion
|
|
9
8
|
export { ThreadRootElementContext, useThreadRootElementRef };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=ThreadRootElementContext.js.map
|
|
@@ -3,7 +3,7 @@ import { useThreadViewport, useThreadViewportStore } from "../../context/react/T
|
|
|
3
3
|
import { createActionButton } from "../../utils/createActionButton.js";
|
|
4
4
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
5
5
|
import "@assistant-ui/tap/react-shim";
|
|
6
|
-
|
|
6
|
+
// src/primitives/thread/ThreadScrollToBottom.ts
|
|
7
7
|
const useThreadScrollToBottom = (t0) => {
|
|
8
8
|
const $ = c(5);
|
|
9
9
|
let t1;
|
|
@@ -32,7 +32,6 @@ const ThreadPrimitiveScrollToBottom = createActionButton("ThreadPrimitive.Scroll
|
|
|
32
32
|
function _temp(s) {
|
|
33
33
|
return s.isAtBottom;
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
export { ThreadPrimitiveScrollToBottom };
|
|
37
36
|
|
|
38
37
|
//# sourceMappingURL=ThreadScrollToBottom.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createActionButton } from "../../utils/createActionButton.js";
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import { useSuggestionTrigger } from "@assistant-ui/core/react";
|
|
5
|
-
|
|
5
|
+
// src/primitives/thread/ThreadSuggestion.ts
|
|
6
6
|
const useThreadSuggestion = (t0) => {
|
|
7
7
|
const $ = c(4);
|
|
8
8
|
const { prompt, send, clearComposer, autoSend } = t0;
|
|
@@ -30,7 +30,6 @@ const ThreadPrimitiveSuggestion = createActionButton("ThreadPrimitive.Suggestion
|
|
|
30
30
|
"autoSend",
|
|
31
31
|
"method"
|
|
32
32
|
]);
|
|
33
|
-
//#endregion
|
|
34
33
|
export { ThreadPrimitiveSuggestion };
|
|
35
34
|
|
|
36
35
|
//# sourceMappingURL=ThreadSuggestion.js.map
|
|
@@ -13,7 +13,7 @@ import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
|
13
13
|
import { useAuiState } from "@assistant-ui/store";
|
|
14
14
|
import { jsx } from "react/jsx-runtime";
|
|
15
15
|
import { useComposedRefs } from "radix-ui/internal";
|
|
16
|
-
|
|
16
|
+
// src/primitives/thread/ThreadViewport.tsx
|
|
17
17
|
const useViewportSizeRef = () => {
|
|
18
18
|
const register = useThreadViewport(_temp);
|
|
19
19
|
return useSizeHandle(register, _temp2);
|
|
@@ -261,7 +261,6 @@ function _temp3(s) {
|
|
|
261
261
|
function _temp4(s_1) {
|
|
262
262
|
return s_1.topAnchorTurn;
|
|
263
263
|
}
|
|
264
|
-
//#endregion
|
|
265
264
|
export { ThreadPrimitiveViewport };
|
|
266
265
|
|
|
267
266
|
//# sourceMappingURL=ThreadViewport.js.map
|
|
@@ -6,7 +6,7 @@ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
|
6
6
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { useComposedRefs } from "radix-ui/internal";
|
|
9
|
-
|
|
9
|
+
// src/primitives/thread/ThreadViewportFooter.tsx
|
|
10
10
|
/**
|
|
11
11
|
* A footer container that measures its height for scroll calculations.
|
|
12
12
|
*
|
|
@@ -56,7 +56,6 @@ function _temp2(el) {
|
|
|
56
56
|
const marginTop = parseFloat(getComputedStyle(el).marginTop) || 0;
|
|
57
57
|
return el.offsetHeight + marginTop;
|
|
58
58
|
}
|
|
59
|
-
//#endregion
|
|
60
59
|
export { ThreadPrimitiveViewportFooter };
|
|
61
60
|
|
|
62
61
|
//# sourceMappingURL=ThreadViewportFooter.js.map
|