@assistant-ui/react 0.15.16 → 0.15.17
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/README.md +3 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +2 -2
- package/dist/mcp-apps/McpAppRenderer.d.ts +6 -1
- package/dist/mcp-apps/McpAppRenderer.d.ts.map +1 -1
- package/dist/mcp-apps/McpAppRenderer.js +19 -12
- package/dist/mcp-apps/McpAppRenderer.js.map +1 -1
- package/dist/mcp-apps/McpAppsRemoteHost.d.ts.map +1 -1
- package/dist/mcp-apps/McpAppsRemoteHost.js +20 -17
- package/dist/mcp-apps/McpAppsRemoteHost.js.map +1 -1
- package/dist/mcp-apps/app-frame.d.ts.map +1 -1
- package/dist/mcp-apps/app-frame.js +189 -94
- package/dist/mcp-apps/app-frame.js.map +1 -1
- package/dist/mcp-apps/index.d.ts +2 -2
- package/dist/model-context/frame/useAssistantFrameHost.d.ts +1 -1
- package/dist/model-context/frame/useAssistantFrameHost.js +10 -11
- package/dist/model-context/frame/useAssistantFrameHost.js.map +1 -1
- package/dist/model-context/makeAssistantVisible.js +1 -1
- package/dist/model-context/makeAssistantVisible.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarCopy.js +3 -3
- package/dist/primitives/actionBar/ActionBarCopy.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarExportMarkdown.js +3 -3
- package/dist/primitives/actionBar/ActionBarExportMarkdown.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.js +3 -3
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.js +3 -3
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarRoot.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarStopSpeaking.js +3 -3
- package/dist/primitives/actionBar/ActionBarStopSpeaking.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreContent.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreItem.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.js.map +1 -1
- package/dist/primitives/actionBarMore/scope.d.ts +2 -2
- package/dist/primitives/actionBarMore/scope.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/scope.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalAnchor.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalContent.js +1 -1
- package/dist/primitives/assistantModal/AssistantModalContent.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalRoot.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalTrigger.js.map +1 -1
- package/dist/primitives/assistantModal/scope.d.ts +2 -2
- package/dist/primitives/assistantModal/scope.d.ts.map +1 -1
- package/dist/primitives/assistantModal/scope.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerRoot.js.map +1 -1
- package/dist/primitives/composer/ComposerAttachmentDropzone.js +1 -1
- package/dist/primitives/composer/ComposerAttachmentDropzone.js.map +1 -1
- package/dist/primitives/composer/ComposerDictationTranscript.js.map +1 -1
- package/dist/primitives/composer/ComposerInput.js +1 -3
- package/dist/primitives/composer/ComposerInput.js.map +1 -1
- package/dist/primitives/composer/ComposerQuote.js +5 -5
- package/dist/primitives/composer/ComposerQuote.js.map +1 -1
- package/dist/primitives/composer/ComposerRoot.js +3 -3
- package/dist/primitives/composer/ComposerRoot.js.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopover.d.ts +5 -0
- package/dist/primitives/composer/trigger/TriggerPopover.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopover.js +157 -130
- package/dist/primitives/composer/trigger/TriggerPopover.js.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverBack.js +3 -3
- package/dist/primitives/composer/trigger/TriggerPopoverBack.js.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverCategories.js +4 -4
- package/dist/primitives/composer/trigger/TriggerPopoverCategories.js.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverItems.js +4 -4
- package/dist/primitives/composer/trigger/TriggerPopoverItems.js.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverResource.d.ts +2 -0
- package/dist/primitives/composer/trigger/TriggerPopoverResource.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverResource.js +63 -61
- package/dist/primitives/composer/trigger/TriggerPopoverResource.js.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverRootContext.d.ts +2 -0
- package/dist/primitives/composer/trigger/TriggerPopoverRootContext.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverRootContext.js.map +1 -1
- package/dist/primitives/composer/trigger/detectTrigger.d.ts +21 -1
- package/dist/primitives/composer/trigger/detectTrigger.d.ts.map +1 -0
- package/dist/primitives/composer/trigger/detectTrigger.js +17 -3
- package/dist/primitives/composer/trigger/detectTrigger.js.map +1 -1
- package/dist/primitives/composer/trigger/index.d.ts +3 -1
- package/dist/primitives/composer/trigger/index.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/index.js.map +1 -1
- package/dist/primitives/composer/trigger/triggerDetectionResource.d.ts +3 -4
- package/dist/primitives/composer/trigger/triggerDetectionResource.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/triggerDetectionResource.js +15 -14
- package/dist/primitives/composer/trigger/triggerDetectionResource.js.map +1 -1
- package/dist/primitives/composer/trigger/triggerSelectionResource.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/triggerSelectionResource.js +18 -19
- package/dist/primitives/composer/trigger/triggerSelectionResource.js.map +1 -1
- package/dist/primitives/composer.d.ts +3 -2
- package/dist/primitives/composer.js.map +1 -1
- package/dist/primitives/error/ErrorMessage.js.map +1 -1
- package/dist/primitives/message/MessageIf.js.map +1 -1
- package/dist/primitives/message/MessageParts.js.map +1 -1
- package/dist/primitives/message/MessagePartsGrouped.js.map +1 -1
- package/dist/primitives/message/MessageRoot.js +4 -4
- package/dist/primitives/message/MessageRoot.js.map +1 -1
- package/dist/primitives/messagePart/MessagePartText.js.map +1 -1
- package/dist/primitives/selectionToolbar/SelectionToolbarQuote.js +3 -3
- package/dist/primitives/selectionToolbar/SelectionToolbarQuote.js.map +1 -1
- package/dist/primitives/selectionToolbar/SelectionToolbarRoot.js +3 -3
- package/dist/primitives/selectionToolbar/SelectionToolbarRoot.js.map +1 -1
- package/dist/primitives/thread/ThreadIf.js.map +1 -1
- package/dist/primitives/thread/ThreadViewport.js +3 -3
- package/dist/primitives/thread/ThreadViewport.js.map +1 -1
- package/dist/primitives/thread/ThreadViewportFooter.js +3 -3
- package/dist/primitives/thread/ThreadViewportFooter.js.map +1 -1
- package/dist/primitives/thread/useThreadViewportAutoScroll.js +1 -1
- package/dist/primitives/thread/useThreadViewportAutoScroll.js.map +1 -1
- package/dist/primitives/threadList/ThreadListNew.js +3 -3
- package/dist/primitives/threadList/ThreadListNew.js.map +1 -1
- package/dist/primitives/threadListFocusGroup.d.ts +2 -1
- package/dist/primitives/threadListFocusGroup.d.ts.map +1 -1
- package/dist/primitives/threadListFocusGroup.js +2 -2
- package/dist/primitives/threadListFocusGroup.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemRoot.js +3 -3
- package/dist/primitives/threadListItem/ThreadListItemRoot.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.js +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.js.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.js.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.js +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.js.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.js.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.js +1 -2
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.js.map +1 -1
- package/dist/primitives/threadListItemMore/scope.d.ts +2 -2
- package/dist/primitives/threadListItemMore/scope.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/scope.js.map +1 -1
- package/dist/sandbox-host/SandboxHost.d.ts.map +1 -1
- package/dist/sandbox-host/SandboxHost.js +137 -70
- package/dist/sandbox-host/SandboxHost.js.map +1 -1
- package/dist/unstable/useLiveCompletionAdapter.js +3 -1
- package/dist/unstable/useLiveCompletionAdapter.js.map +1 -1
- package/dist/unstable/useSlashCommandAdapter.js +41 -27
- package/dist/unstable/useSlashCommandAdapter.js.map +1 -1
- package/dist/utils/Primitive.d.ts +2 -2
- package/dist/utils/Primitive.js +2 -2
- package/dist/utils/Primitive.js.map +1 -1
- package/dist/utils/createActionButton.js +3 -3
- package/dist/utils/createActionButton.js.map +1 -1
- package/dist/utils/hooks/useOnResizeContent.js +1 -1
- package/dist/utils/hooks/useOnResizeContent.js.map +1 -1
- package/dist/utils/hooks/useOnScrollToBottom.js +1 -1
- package/dist/utils/hooks/useOnScrollToBottom.js.map +1 -1
- package/dist/utils/smooth/SmoothContext.d.ts +24 -0
- package/dist/utils/smooth/SmoothContext.d.ts.map +1 -1
- package/dist/utils/smooth/useSmooth.js +1 -1
- package/dist/utils/smooth/useSmooth.js.map +1 -1
- package/dist/utils/useToolArgsFieldStatus.d.ts +5 -1
- package/package.json +11 -19
- package/src/index.ts +9 -1
- package/src/mcp-apps/McpAppRenderer.test.tsx +133 -4
- package/src/mcp-apps/McpAppRenderer.tsx +28 -21
- package/src/mcp-apps/McpAppsRemoteHost.concurrent.test.tsx +215 -0
- package/src/mcp-apps/McpAppsRemoteHost.ts +28 -12
- package/src/mcp-apps/app-frame.test.tsx +102 -0
- package/src/mcp-apps/app-frame.tsx +17 -4
- package/src/mcp-apps/index.ts +1 -0
- package/src/model-context/frame/AssistantFrame.test.ts +3 -3
- package/src/model-context/frame/SPEC_AssistantFrame.md +1 -1
- package/src/model-context/frame/useAssistantFrameHost.ts +2 -2
- package/src/model-context/makeAssistantVisible.tsx +1 -1
- package/src/primitives/actionBar/ActionBarCopy.tsx +1 -1
- package/src/primitives/actionBar/ActionBarExportMarkdown.tsx +1 -1
- package/src/primitives/actionBar/ActionBarFeedbackNegative.tsx +1 -1
- package/src/primitives/actionBar/ActionBarFeedbackPositive.tsx +1 -1
- package/src/primitives/actionBar/ActionBarStopSpeaking.tsx +1 -1
- package/src/primitives/actionBarMore/scope.ts +2 -2
- package/src/primitives/assistantModal/AssistantModalContent.tsx +1 -1
- package/src/primitives/assistantModal/scope.ts +2 -2
- package/src/primitives/composer/ComposerAttachmentDropzone.tsx +1 -1
- package/src/primitives/composer/ComposerInput.test.tsx +2 -1
- package/src/primitives/composer/ComposerInput.tsx +3 -3
- package/src/primitives/composer/ComposerQuote.tsx +1 -1
- package/src/primitives/composer/ComposerRoot.tsx +1 -1
- package/src/primitives/composer/trigger/TriggerPopover.tsx +16 -1
- package/src/primitives/composer/trigger/TriggerPopoverBack.tsx +1 -1
- package/src/primitives/composer/trigger/TriggerPopoverCategories.tsx +1 -1
- package/src/primitives/composer/trigger/TriggerPopoverItems.tsx +1 -1
- package/src/primitives/composer/trigger/TriggerPopoverResource.ts +4 -1
- package/src/primitives/composer/trigger/TriggerPopoverRootContext.tsx +2 -0
- package/src/primitives/composer/trigger/detectTrigger.test.ts +88 -5
- package/src/primitives/composer/trigger/detectTrigger.ts +50 -9
- package/src/primitives/composer/trigger/index.ts +1 -0
- package/src/primitives/composer/trigger/triggerDetectionResource.ts +10 -7
- package/src/primitives/composer/trigger/triggerSelectionResource.test.ts +15 -3
- package/src/primitives/composer/trigger/triggerSelectionResource.ts +1 -4
- package/src/primitives/composer.ts +1 -0
- package/src/primitives/message/MessageRoot.tsx +1 -1
- package/src/primitives/selectionToolbar/SelectionToolbarQuote.tsx +1 -1
- package/src/primitives/selectionToolbar/SelectionToolbarRoot.tsx +1 -1
- package/src/primitives/thread/ThreadViewport.tsx +1 -1
- package/src/primitives/thread/ThreadViewportFooter.tsx +1 -1
- package/src/primitives/thread/useThreadViewportAutoScroll.ts +1 -1
- package/src/primitives/threadList/ThreadListNew.tsx +1 -1
- package/src/primitives/threadListFocusGroup.ts +2 -2
- package/src/primitives/threadListItem/ThreadListItemRoot.tsx +1 -1
- package/src/primitives/threadListItem/ThreadListItemTrigger.tsx +1 -1
- package/src/primitives/threadListItemMore/ThreadListItemMoreContent.tsx +1 -1
- package/src/primitives/threadListItemMore/ThreadListItemMoreRoot.tsx +1 -1
- package/src/primitives/threadListItemMore/ThreadListItemMoreTrigger.tsx +2 -2
- package/src/primitives/threadListItemMore/scope.ts +2 -2
- package/src/sandbox-host/SandboxHost.test.tsx +45 -1
- package/src/sandbox-host/SandboxHost.tsx +16 -3
- package/src/tests/RemoteThreadListRuntime.adapterProvider.test.tsx +31 -1
- package/src/unstable/useLiveCompletionAdapter.test.tsx +60 -1
- package/src/unstable/useLiveCompletionAdapter.ts +4 -1
- package/src/unstable/useSlashCommandAdapter.test.tsx +141 -0
- package/src/unstable/useSlashCommandAdapter.ts +52 -17
- package/src/utils/Primitive.tsx +2 -2
- package/src/utils/createActionButton.tsx +1 -1
- package/src/utils/hooks/useOnResizeContent.ts +1 -1
- package/src/utils/hooks/useOnScrollToBottom.ts +1 -1
- package/src/utils/smooth/useSmooth.ts +1 -1
- package/dist/legacy-runtime/runtime/MessagePartRuntime.d.ts +0 -3
- package/dist/legacy-runtime/runtime/MessagePartRuntime.js +0 -2
- package/dist/legacy-runtime/runtime/MessageRuntime.d.ts +0 -3
- package/dist/legacy-runtime/runtime/MessageRuntime.js +0 -2
- package/dist/legacy-runtime/runtime/ThreadListRuntime.d.ts +0 -3
- package/dist/legacy-runtime/runtime/ThreadListRuntime.js +0 -2
- package/src/legacy-runtime/runtime/MessagePartRuntime.ts +0 -2
- package/src/legacy-runtime/runtime/MessageRuntime.ts +0 -3
- package/src/legacy-runtime/runtime/ThreadListRuntime.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarExportMarkdown.js","names":["c","_c","forwardRef","useCallback","ActionButtonProps","composeEventHandlers","Primitive","useAuiState","useAui","useActionBarExportMarkdown","t0","$","t1","undefined","filename","onExport","aui","hasExportableContent","_temp2","t2","message","content","getCopyText","blob","Blob","type","url","URL","createObjectURL","a","document","createElement","href","download","Date","now","click","setTimeout","revokeObjectURL","callback","ActionBarPrimitiveExportMarkdown","Element","HTMLButtonElement","Props","forwardedRef","disabled","onClick","props","t3","catch","_temp3","t4","t5","displayName","_temp","text","length","s","role","status","parts","some","error","console"],"sources":["../../../src/primitives/actionBar/ActionBarExportMarkdown.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef, useCallback } from \"react\";\nimport type { ActionButtonProps } from \"../../utils/createActionButton\";\nimport { composeEventHandlers } from \"
|
|
1
|
+
{"version":3,"file":"ActionBarExportMarkdown.js","names":["c","_c","forwardRef","useCallback","ActionButtonProps","composeEventHandlers","Primitive","useAuiState","useAui","useActionBarExportMarkdown","t0","$","t1","undefined","filename","onExport","aui","hasExportableContent","_temp2","t2","message","content","getCopyText","blob","Blob","type","url","URL","createObjectURL","a","document","createElement","href","download","Date","now","click","setTimeout","revokeObjectURL","callback","ActionBarPrimitiveExportMarkdown","Element","HTMLButtonElement","Props","forwardedRef","disabled","onClick","props","t3","catch","_temp3","t4","t5","displayName","_temp","text","length","s","role","status","parts","some","error","console"],"sources":["../../../src/primitives/actionBar/ActionBarExportMarkdown.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef, useCallback } from \"react\";\nimport type { ActionButtonProps } from \"../../utils/createActionButton\";\nimport { composeEventHandlers } from \"radix-ui/internal\";\nimport { Primitive } from \"../../utils/Primitive\";\nimport { useAuiState, useAui } from \"@assistant-ui/store\";\n\nconst useActionBarExportMarkdown = ({\n filename,\n onExport,\n}: {\n filename?: string | undefined;\n onExport?: ((content: string) => void | Promise<void>) | undefined;\n} = {}) => {\n const aui = useAui();\n const hasExportableContent = useAuiState((s) => {\n return (\n (s.message.role !== \"assistant\" ||\n s.message.status?.type !== \"running\") &&\n s.message.parts.some((c) => c.type === \"text\" && c.text.length > 0)\n );\n });\n\n const callback = useCallback(async () => {\n const content = aui.message.getCopyText();\n if (!content) return;\n\n if (onExport) {\n await onExport(content);\n return;\n }\n\n const blob = new Blob([content], { type: \"text/markdown\" });\n const url = URL.createObjectURL(blob);\n const a = document.createElement(\"a\");\n a.href = url;\n a.download = filename ?? `message-${Date.now()}.md`;\n a.click();\n setTimeout(() => URL.revokeObjectURL(url), 40_000);\n }, [aui, filename, onExport]);\n\n if (!hasExportableContent) return null;\n return callback;\n};\n\nexport namespace ActionBarPrimitiveExportMarkdown {\n export type Element = HTMLButtonElement;\n export type Props = ActionButtonProps<typeof useActionBarExportMarkdown>;\n}\n\nexport const ActionBarPrimitiveExportMarkdown = forwardRef<\n ActionBarPrimitiveExportMarkdown.Element,\n ActionBarPrimitiveExportMarkdown.Props\n>(({ filename, onExport, onClick, disabled, ...props }, forwardedRef) => {\n const callback = useActionBarExportMarkdown({ filename, onExport });\n return (\n <Primitive.button\n type=\"button\"\n {...props}\n ref={forwardedRef}\n disabled={disabled || !callback}\n onClick={composeEventHandlers(onClick, () => {\n void callback?.().catch((error: unknown) => {\n console.error(\"[assistant-ui] markdown export failed:\", error);\n });\n })}\n />\n );\n});\n\nActionBarPrimitiveExportMarkdown.displayName =\n \"ActionBarPrimitive.ExportMarkdown\";\n"],"mappings":";;;;;;;;AAQA,MAAMS,8BAA6BC,OAAA;CAAA,MAAAC,IAAAV,EAAA,CAAA;CAAA,IAAAW;CAAA,IAAAD,EAAA,OAAAD,IAAA;EAACE,KAAAF,OAAAG,KAAAA,IAAA,CAM/B,IAN+BH;EAM9BC,EAAA,KAAA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AAiCa,cAC/B;AAhEiC,SAAAC,MAAAtD,GAAA;CAAA,OAYDA,EAACyB,SAAU,UAAUzB,EAACuD,KAAKC,SAAU;AAAC;AAZrC,SAAAtC,OAAAuC,GAAA;CAAA,QAU5BA,EAACrC,QAAQsC,SAAU,eAClBD,EAACrC,QAAQuC,QAAalC,SAAK,cAC7BgC,EAACrC,QAAQwC,MAAMC,KAAMP,KAA6C;AAAC;AAkCvE,SAAAJ,OAAAY,OAAA;CAUQC,QAAOD,MAAO,0CAA0CA,KAAK;AAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Primitive } from "../../utils/Primitive.js";
|
|
2
|
+
import { Primitive as Primitive$1 } from "../../utils/Primitive.js";
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import { useActionBarFeedbackNegative } from "@assistant-ui/core/react";
|
|
5
5
|
import { useAuiState } from "@assistant-ui/store";
|
|
6
6
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
import { composeEventHandlers } from "
|
|
8
|
+
import { composeEventHandlers } from "radix-ui/internal";
|
|
9
9
|
//#region src/primitives/actionBar/ActionBarFeedbackNegative.tsx
|
|
10
10
|
const useActionBarFeedbackNegative$1 = () => {
|
|
11
11
|
const { submit } = useActionBarFeedbackNegative();
|
|
@@ -53,7 +53,7 @@ const ActionBarPrimitiveFeedbackNegative = forwardRef((t0, forwardedRef) => {
|
|
|
53
53
|
} else t4 = $[10];
|
|
54
54
|
let t5;
|
|
55
55
|
if ($[11] !== forwardedRef || $[12] !== props || $[13] !== t1 || $[14] !== t2 || $[15] !== t4) {
|
|
56
|
-
t5 = /* @__PURE__ */ jsx(Primitive.button, {
|
|
56
|
+
t5 = /* @__PURE__ */ jsx(Primitive$1.button, {
|
|
57
57
|
type: "button",
|
|
58
58
|
...t1,
|
|
59
59
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarFeedbackNegative.js","names":["c","_c","forwardRef","ActionButtonProps","composeEventHandlers","Primitive","useAuiState","useActionBarFeedbackNegative","useActionBarFeedbackNegativeBehavior","submit","ActionBarPrimitiveFeedbackNegative","Element","HTMLButtonElement","Props","t0","forwardedRef","$","disabled","onClick","props","isSubmitted","_temp","callback","t1","t2","t3","t4","t5","displayName","s","message","metadata","submittedFeedback","type"],"sources":["../../../src/primitives/actionBar/ActionBarFeedbackNegative.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef } from \"react\";\nimport type { ActionButtonProps } from \"../../utils/createActionButton\";\nimport { composeEventHandlers } from \"
|
|
1
|
+
{"version":3,"file":"ActionBarFeedbackNegative.js","names":["c","_c","forwardRef","ActionButtonProps","composeEventHandlers","Primitive","useAuiState","useActionBarFeedbackNegative","useActionBarFeedbackNegativeBehavior","submit","ActionBarPrimitiveFeedbackNegative","Element","HTMLButtonElement","Props","t0","forwardedRef","$","disabled","onClick","props","isSubmitted","_temp","callback","t1","t2","t3","t4","t5","displayName","s","message","metadata","submittedFeedback","type"],"sources":["../../../src/primitives/actionBar/ActionBarFeedbackNegative.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef } from \"react\";\nimport type { ActionButtonProps } from \"../../utils/createActionButton\";\nimport { composeEventHandlers } from \"radix-ui/internal\";\nimport { Primitive } from \"../../utils/Primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport { useActionBarFeedbackNegative as useActionBarFeedbackNegativeBehavior } from \"@assistant-ui/core/react\";\n\nconst useActionBarFeedbackNegative = () => {\n const { submit } = useActionBarFeedbackNegativeBehavior();\n return submit;\n};\n\nexport namespace ActionBarPrimitiveFeedbackNegative {\n export type Element = HTMLButtonElement;\n export type Props = ActionButtonProps<typeof useActionBarFeedbackNegative>;\n}\n\nexport const ActionBarPrimitiveFeedbackNegative = forwardRef<\n ActionBarPrimitiveFeedbackNegative.Element,\n ActionBarPrimitiveFeedbackNegative.Props\n>(({ onClick, disabled, ...props }, forwardedRef) => {\n const isSubmitted = useAuiState(\n (s) => s.message.metadata.submittedFeedback?.type === \"negative\",\n );\n const callback = useActionBarFeedbackNegative();\n return (\n <Primitive.button\n type=\"button\"\n {...(isSubmitted ? { \"data-submitted\": \"true\" } : {})}\n {...props}\n ref={forwardedRef}\n disabled={disabled || !callback}\n onClick={composeEventHandlers(onClick, () => {\n callback?.();\n })}\n />\n );\n});\n\nActionBarPrimitiveFeedbackNegative.displayName =\n \"ActionBarPrimitive.FeedbackNegative\";\n"],"mappings":";;;;;;;;;AASA,MAAMO,uCAA+B;CACnC,MAAA,EAAAE,WAAmBD,6BAAqC;CAAE,OACnDC;AAAM;AAQf,MAAaC,qCAAqCR,YAGhDY,IAAAC,iBAAA;CAAA,MAAAC,IAAAf,EAAA,EAAA;CAAA,IAAAgB;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAI,SAAAD,UAAA,GAAAE,SAAAL;EAA+BE,EAAA,KAAAF;EAAAE,EAAA,KAAAC;EAAAD,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAA;EAAAF,WAAAD,EAAA;EAAAE,UAAAF,EAAA;EAAAG,QAAAH,EAAA;CAAA;CAChC,MAAAI,cAAoBd,YAClBe,KACF;CACA,MAAAC,WAAiBf,+BAA6B;CAAE,IAAAgB;CAAA,IAAAP,EAAA,OAAAI,aAAA;EAIvCG,KAAAH,cAAA,EAAA,kBAAkC,OAAY,IAA9C,CAA8C;EAACJ,EAAA,KAAAI;EAAAJ,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAG1C,MAAAQ,KAAAP,YAAA,CAAaK;CAAQ,IAAAG;CAAA,IAAAT,EAAA,OAAAM,UAAA;EACQG,WAAA;GACrCH,WAAW;EAAC;EACbN,EAAA,KAAAM;EAAAN,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,OAAAE,WAAAF,EAAA,OAAAS,IAAA;EAFQC,KAAAtB,qBAAqBc,SAASO,EAEtC;EAACT,EAAA,KAAAE;EAAAF,EAAA,KAAAS;EAAAT,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,IAAAW;CAAA,IAAAX,EAAA,QAAAD,gBAAAC,EAAA,QAAAG,SAAAH,EAAA,QAAAO,MAAAP,EAAA,QAAAQ,MAAAR,EAAA,QAAAU,IAAA;EARJC,KAAA,oBAAA,YAAA,QAAA;GACO,MAAA;GAAQ,GACRJ;GAA+C,GAChDJ;GACCJ,KAAAA;GACK,UAAAS;GACD,SAAAE;EAEP,CAAA;EACFV,EAAA,MAAAD;EAAAC,EAAA,MAAAG;EAAAH,EAAA,MAAAO;EAAAP,EAAA,MAAAQ;EAAAR,EAAA,MAAAU;EAAAV,EAAA,MAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,OATFW;AASE,CAEL;AAEDjB,mCAAmCkB,cACjC;AApBA,SAAAP,MAAAQ,GAAA;CAAA,OAESA,EAACC,QAAQC,SAASC,mBAAwBC,SAAK;AAAU"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Primitive } from "../../utils/Primitive.js";
|
|
2
|
+
import { Primitive as Primitive$1 } from "../../utils/Primitive.js";
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import { useActionBarFeedbackPositive } from "@assistant-ui/core/react";
|
|
5
5
|
import { useAuiState } from "@assistant-ui/store";
|
|
6
6
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
import { composeEventHandlers } from "
|
|
8
|
+
import { composeEventHandlers } from "radix-ui/internal";
|
|
9
9
|
//#region src/primitives/actionBar/ActionBarFeedbackPositive.tsx
|
|
10
10
|
const useActionBarFeedbackPositive$1 = () => {
|
|
11
11
|
const { submit } = useActionBarFeedbackPositive();
|
|
@@ -53,7 +53,7 @@ const ActionBarPrimitiveFeedbackPositive = forwardRef((t0, forwardedRef) => {
|
|
|
53
53
|
} else t4 = $[10];
|
|
54
54
|
let t5;
|
|
55
55
|
if ($[11] !== forwardedRef || $[12] !== props || $[13] !== t1 || $[14] !== t2 || $[15] !== t4) {
|
|
56
|
-
t5 = /* @__PURE__ */ jsx(Primitive.button, {
|
|
56
|
+
t5 = /* @__PURE__ */ jsx(Primitive$1.button, {
|
|
57
57
|
type: "button",
|
|
58
58
|
...t1,
|
|
59
59
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarFeedbackPositive.js","names":["c","_c","forwardRef","ActionButtonProps","composeEventHandlers","useAuiState","Primitive","useActionBarFeedbackPositive","useActionBarFeedbackPositiveBehavior","submit","ActionBarPrimitiveFeedbackPositive","Element","HTMLButtonElement","Props","t0","forwardedRef","$","disabled","onClick","props","isSubmitted","_temp","callback","t1","t2","t3","t4","t5","displayName","s","message","metadata","submittedFeedback","type"],"sources":["../../../src/primitives/actionBar/ActionBarFeedbackPositive.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef } from \"react\";\nimport type { ActionButtonProps } from \"../../utils/createActionButton\";\nimport { composeEventHandlers } from \"
|
|
1
|
+
{"version":3,"file":"ActionBarFeedbackPositive.js","names":["c","_c","forwardRef","ActionButtonProps","composeEventHandlers","useAuiState","Primitive","useActionBarFeedbackPositive","useActionBarFeedbackPositiveBehavior","submit","ActionBarPrimitiveFeedbackPositive","Element","HTMLButtonElement","Props","t0","forwardedRef","$","disabled","onClick","props","isSubmitted","_temp","callback","t1","t2","t3","t4","t5","displayName","s","message","metadata","submittedFeedback","type"],"sources":["../../../src/primitives/actionBar/ActionBarFeedbackPositive.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef } from \"react\";\nimport type { ActionButtonProps } from \"../../utils/createActionButton\";\nimport { composeEventHandlers } from \"radix-ui/internal\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport { Primitive } from \"../../utils/Primitive\";\nimport { useActionBarFeedbackPositive as useActionBarFeedbackPositiveBehavior } from \"@assistant-ui/core/react\";\n\nconst useActionBarFeedbackPositive = () => {\n const { submit } = useActionBarFeedbackPositiveBehavior();\n return submit;\n};\n\nexport namespace ActionBarPrimitiveFeedbackPositive {\n export type Element = HTMLButtonElement;\n export type Props = ActionButtonProps<typeof useActionBarFeedbackPositive>;\n}\n\nexport const ActionBarPrimitiveFeedbackPositive = forwardRef<\n ActionBarPrimitiveFeedbackPositive.Element,\n ActionBarPrimitiveFeedbackPositive.Props\n>(({ onClick, disabled, ...props }, forwardedRef) => {\n const isSubmitted = useAuiState(\n (s) => s.message.metadata.submittedFeedback?.type === \"positive\",\n );\n const callback = useActionBarFeedbackPositive();\n return (\n <Primitive.button\n type=\"button\"\n {...(isSubmitted ? { \"data-submitted\": \"true\" } : {})}\n {...props}\n ref={forwardedRef}\n disabled={disabled || !callback}\n onClick={composeEventHandlers(onClick, () => {\n callback?.();\n })}\n />\n );\n});\n\nActionBarPrimitiveFeedbackPositive.displayName =\n \"ActionBarPrimitive.FeedbackPositive\";\n"],"mappings":";;;;;;;;;AASA,MAAMO,uCAA+B;CACnC,MAAA,EAAAE,WAAmBD,6BAAqC;CAAE,OACnDC;AAAM;AAQf,MAAaC,qCAAqCR,YAGhDY,IAAAC,iBAAA;CAAA,MAAAC,IAAAf,EAAA,EAAA;CAAA,IAAAgB;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAI,SAAAD,UAAA,GAAAE,SAAAL;EAA+BE,EAAA,KAAAF;EAAAE,EAAA,KAAAC;EAAAD,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAA;EAAAF,WAAAD,EAAA;EAAAE,UAAAF,EAAA;EAAAG,QAAAH,EAAA;CAAA;CAChC,MAAAI,cAAoBf,YAClBgB,KACF;CACA,MAAAC,WAAiBf,+BAA6B;CAAE,IAAAgB;CAAA,IAAAP,EAAA,OAAAI,aAAA;EAIvCG,KAAAH,cAAA,EAAA,kBAAkC,OAAY,IAA9C,CAA8C;EAACJ,EAAA,KAAAI;EAAAJ,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAG1C,MAAAQ,KAAAP,YAAA,CAAaK;CAAQ,IAAAG;CAAA,IAAAT,EAAA,OAAAM,UAAA;EACQG,WAAA;GACrCH,WAAW;EAAC;EACbN,EAAA,KAAAM;EAAAN,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,OAAAE,WAAAF,EAAA,OAAAS,IAAA;EAFQC,KAAAtB,qBAAqBc,SAASO,EAEtC;EAACT,EAAA,KAAAE;EAAAF,EAAA,KAAAS;EAAAT,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,IAAAW;CAAA,IAAAX,EAAA,QAAAD,gBAAAC,EAAA,QAAAG,SAAAH,EAAA,QAAAO,MAAAP,EAAA,QAAAQ,MAAAR,EAAA,QAAAU,IAAA;EARJC,KAAA,oBAAA,YAAA,QAAA;GACO,MAAA;GAAQ,GACRJ;GAA+C,GAChDJ;GACCJ,KAAAA;GACK,UAAAS;GACD,SAAAE;EAEP,CAAA;EACFV,EAAA,MAAAD;EAAAC,EAAA,MAAAG;EAAAH,EAAA,MAAAO;EAAAP,EAAA,MAAAQ;EAAAR,EAAA,MAAAU;EAAAV,EAAA,MAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,OATFW;AASE,CAEL;AAEDjB,mCAAmCkB,cACjC;AApBA,SAAAP,MAAAQ,GAAA;CAAA,OAESA,EAACC,QAAQC,SAASC,mBAAwBC,SAAK;AAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarRoot.js","names":["c","_c","Primitive","ComponentRef","forwardRef","ComponentPropsWithoutRef","useCallback","useMemo","useState","useActionBarFloatStatus","HideAndFloatStatus","ActionBarInteractionContext","PrimitiveDivProps","div","ActionBarPrimitiveRoot","Element","Props","hideWhenRunning","autohide","autohideFloat","t0","ref","$","rest","interactionCount","setInteractionCount","t1","Symbol","for","released","_temp","_temp2","acquireInteractionLock","t2","interactionContext","t3","t4","forceVisible","hideAndfloatStatus","Hidden","t5","Floating","t6","displayName","count","count_0","Math","max"],"sources":["../../../src/primitives/actionBar/ActionBarRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n forwardRef,\n type ComponentPropsWithoutRef,\n useCallback,\n useMemo,\n useState,\n} from \"react\";\nimport {\n useActionBarFloatStatus,\n HideAndFloatStatus,\n} from \"./useActionBarFloatStatus\";\nimport { ActionBarInteractionContext } from \"./ActionBarInteractionContext\";\n\ntype PrimitiveDivProps = ComponentPropsWithoutRef<typeof Primitive.div>;\n\nexport namespace ActionBarPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = PrimitiveDivProps & {\n /**\n * Whether to hide the action bar when the thread is running.\n * @default false\n */\n hideWhenRunning?: boolean | undefined;\n /**\n * Controls when the action bar should automatically hide.\n * - \"always\": Always hide unless hovered\n * - \"not-last\": Hide unless this is the last message\n * - \"never\": Never auto-hide\n * @default \"never\"\n */\n autohide?: \"always\" | \"not-last\" | \"never\" | undefined;\n /**\n * Controls floating behavior when auto-hidden.\n * - \"always\": Always float when hidden\n * - \"single-branch\": Float only for single-branch messages\n * - \"never\": Never float\n * @default \"never\"\n */\n autohideFloat?: \"always\" | \"single-branch\" | \"never\" | undefined;\n };\n}\n\n/**\n * The root container for action bar components.\n *\n * This component provides intelligent visibility and floating behavior for action bars,\n * automatically hiding and showing based on message state, hover status, and configuration.\n * It supports floating mode for better UX when space is limited.\n *\n * @example\n * ```tsx\n * <ActionBarPrimitive.Root\n * hideWhenRunning={true}\n * autohide=\"not-last\"\n * autohideFloat=\"single-branch\"\n * >\n * <ActionBarPrimitive.Copy />\n * <ActionBarPrimitive.Edit />\n * <ActionBarPrimitive.Reload />\n * </ActionBarPrimitive.Root>\n * ```\n */\nexport const ActionBarPrimitiveRoot = forwardRef<\n ActionBarPrimitiveRoot.Element,\n ActionBarPrimitiveRoot.Props\n>(({ hideWhenRunning, autohide, autohideFloat, ...rest }, ref) => {\n const [interactionCount, setInteractionCount] = useState(0);\n\n const acquireInteractionLock = useCallback(() => {\n let released = false;\n\n setInteractionCount((count) => count + 1);\n\n return () => {\n if (released) return;\n released = true;\n setInteractionCount((count) => Math.max(0, count - 1));\n };\n }, []);\n\n const interactionContext = useMemo(\n () => ({ acquireInteractionLock }),\n [acquireInteractionLock],\n );\n\n const hideAndfloatStatus = useActionBarFloatStatus({\n hideWhenRunning,\n autohide,\n autohideFloat,\n forceVisible: interactionCount > 0,\n });\n\n if (hideAndfloatStatus === HideAndFloatStatus.Hidden) return null;\n\n return (\n <ActionBarInteractionContext.Provider value={interactionContext}>\n <Primitive.div\n {...(hideAndfloatStatus === HideAndFloatStatus.Floating\n ? { \"data-floating\": \"true\" }\n : null)}\n {...rest}\n ref={ref}\n />\n </ActionBarInteractionContext.Provider>\n );\n});\n\nActionBarPrimitiveRoot.displayName = \"ActionBarPrimitive.Root\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,MAAac,yBAAyBV,YAGpCgB,IAAAC,QAAA;CAAA,MAAAC,IAAArB,EAAA,EAAA;CAAA,IAAAiB;CAAA,IAAAC;CAAA,IAAAF;CAAA,IAAAM;CAAA,IAAAD,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAH,iBAAAC,UAAAC,
|
|
1
|
+
{"version":3,"file":"ActionBarRoot.js","names":["c","_c","Primitive","ComponentRef","forwardRef","ComponentPropsWithoutRef","useCallback","useMemo","useState","useActionBarFloatStatus","HideAndFloatStatus","ActionBarInteractionContext","PrimitiveDivProps","div","ActionBarPrimitiveRoot","Element","Props","hideWhenRunning","autohide","autohideFloat","t0","ref","$","rest","interactionCount","setInteractionCount","t1","Symbol","for","released","_temp","_temp2","acquireInteractionLock","t2","interactionContext","t3","t4","forceVisible","hideAndfloatStatus","Hidden","t5","Floating","t6","displayName","count","count_0","Math","max"],"sources":["../../../src/primitives/actionBar/ActionBarRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n forwardRef,\n type ComponentPropsWithoutRef,\n useCallback,\n useMemo,\n useState,\n} from \"react\";\nimport {\n useActionBarFloatStatus,\n HideAndFloatStatus,\n} from \"./useActionBarFloatStatus\";\nimport { ActionBarInteractionContext } from \"./ActionBarInteractionContext\";\n\ntype PrimitiveDivProps = ComponentPropsWithoutRef<typeof Primitive.div>;\n\nexport namespace ActionBarPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = PrimitiveDivProps & {\n /**\n * Whether to hide the action bar when the thread is running.\n * @default false\n */\n hideWhenRunning?: boolean | undefined;\n /**\n * Controls when the action bar should automatically hide.\n * - \"always\": Always hide unless hovered\n * - \"not-last\": Hide unless this is the last message\n * - \"never\": Never auto-hide\n * @default \"never\"\n */\n autohide?: \"always\" | \"not-last\" | \"never\" | undefined;\n /**\n * Controls floating behavior when auto-hidden.\n * - \"always\": Always float when hidden\n * - \"single-branch\": Float only for single-branch messages\n * - \"never\": Never float\n * @default \"never\"\n */\n autohideFloat?: \"always\" | \"single-branch\" | \"never\" | undefined;\n };\n}\n\n/**\n * The root container for action bar components.\n *\n * This component provides intelligent visibility and floating behavior for action bars,\n * automatically hiding and showing based on message state, hover status, and configuration.\n * It supports floating mode for better UX when space is limited.\n *\n * @example\n * ```tsx\n * <ActionBarPrimitive.Root\n * hideWhenRunning={true}\n * autohide=\"not-last\"\n * autohideFloat=\"single-branch\"\n * >\n * <ActionBarPrimitive.Copy />\n * <ActionBarPrimitive.Edit />\n * <ActionBarPrimitive.Reload />\n * </ActionBarPrimitive.Root>\n * ```\n */\nexport const ActionBarPrimitiveRoot = forwardRef<\n ActionBarPrimitiveRoot.Element,\n ActionBarPrimitiveRoot.Props\n>(({ hideWhenRunning, autohide, autohideFloat, ...rest }, ref) => {\n const [interactionCount, setInteractionCount] = useState(0);\n\n const acquireInteractionLock = useCallback(() => {\n let released = false;\n\n setInteractionCount((count) => count + 1);\n\n return () => {\n if (released) return;\n released = true;\n setInteractionCount((count) => Math.max(0, count - 1));\n };\n }, []);\n\n const interactionContext = useMemo(\n () => ({ acquireInteractionLock }),\n [acquireInteractionLock],\n );\n\n const hideAndfloatStatus = useActionBarFloatStatus({\n hideWhenRunning,\n autohide,\n autohideFloat,\n forceVisible: interactionCount > 0,\n });\n\n if (hideAndfloatStatus === HideAndFloatStatus.Hidden) return null;\n\n return (\n <ActionBarInteractionContext.Provider value={interactionContext}>\n <Primitive.div\n {...(hideAndfloatStatus === HideAndFloatStatus.Floating\n ? { \"data-floating\": \"true\" }\n : null)}\n {...rest}\n ref={ref}\n />\n </ActionBarInteractionContext.Provider>\n );\n});\n\nActionBarPrimitiveRoot.displayName = \"ActionBarPrimitive.Root\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,MAAac,yBAAyBV,YAGpCgB,IAAAC,QAAA;CAAA,MAAAC,IAAArB,EAAA,EAAA;CAAA,IAAAiB;CAAA,IAAAC;CAAA,IAAAF;CAAA,IAAAM;CAAA,IAAAD,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAH,iBAAAC,UAAAC,eAAA,GAAAI,QAAAH;EAAqDE,EAAA,KAAAF;EAAAE,EAAA,KAAAJ;EAAAI,EAAA,KAAAH;EAAAG,EAAA,KAAAL;EAAAK,EAAA,KAAAC;CAAA,OAAA;EAAAL,WAAAI,EAAA;EAAAH,gBAAAG,EAAA;EAAAL,kBAAAK,EAAA;EAAAC,OAAAD,EAAA;CAAA;CACtD,MAAA,CAAAE,kBAAAC,uBAAgDjB,SAAS,CAAC;CAAE,IAAAkB;CAAA,IAAAJ,EAAA,OAAAK,O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AuCC,EAAA,MAAAD;EAAAC,EAAA,MAAAC;EAAAD,EAAA,MAAAkB;EAAAlB,EAAA,MAAAoB;CAAA,OAAAA,KAAApB,EAAA;CAAA,OARvCoB;AAQuC,CAE1C;AAED5B,uBAAuB6B,cAAc;AA1CnC,SAAAb,MAAAc,OAAA;CAAA,OAMiCA,QAAQ;AAAC;AAN1C,SAAAb,OAAAc,SAAA;CAAA,OAWmCC,KAAIC,IAAK,GAAGH,UAAQ,CAAC;AAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Primitive } from "../../utils/Primitive.js";
|
|
2
|
+
import { Primitive as Primitive$1 } from "../../utils/Primitive.js";
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import { useActionBarStopSpeaking } from "@assistant-ui/core/react";
|
|
5
5
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import { composeEventHandlers } from "
|
|
7
|
+
import { composeEventHandlers } from "radix-ui/internal";
|
|
8
8
|
//#region src/primitives/actionBar/ActionBarStopSpeaking.tsx
|
|
9
9
|
const useActionBarStopSpeaking$1 = () => {
|
|
10
10
|
const { disabled, stopSpeaking } = useActionBarStopSpeaking();
|
|
@@ -32,7 +32,7 @@ const ActionBarPrimitiveStopSpeaking = forwardRef((props, ref) => {
|
|
|
32
32
|
} else t2 = $[4];
|
|
33
33
|
let t3;
|
|
34
34
|
if ($[5] !== props || $[6] !== ref || $[7] !== t0 || $[8] !== t2) {
|
|
35
|
-
t3 = /* @__PURE__ */ jsx(Primitive.button, {
|
|
35
|
+
t3 = /* @__PURE__ */ jsx(Primitive$1.button, {
|
|
36
36
|
type: "button",
|
|
37
37
|
disabled: t0,
|
|
38
38
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarStopSpeaking.js","names":["c","_c","forwardRef","ActionButtonProps","Primitive","composeEventHandlers","useActionBarStopSpeaking","useActionBarStopSpeakingBehavior","disabled","stopSpeaking","ActionBarPrimitiveStopSpeaking","Element","HTMLButtonElement","Props","props","ref","$","callback","t0","t1","t2","onClick","t3","displayName"],"sources":["../../../src/primitives/actionBar/ActionBarStopSpeaking.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef } from \"react\";\nimport type { ActionButtonProps } from \"../../utils/createActionButton\";\nimport { Primitive } from \"../../utils/Primitive\";\nimport { composeEventHandlers } from \"
|
|
1
|
+
{"version":3,"file":"ActionBarStopSpeaking.js","names":["c","_c","forwardRef","ActionButtonProps","Primitive","composeEventHandlers","useActionBarStopSpeaking","useActionBarStopSpeakingBehavior","disabled","stopSpeaking","ActionBarPrimitiveStopSpeaking","Element","HTMLButtonElement","Props","props","ref","$","callback","t0","t1","t2","onClick","t3","displayName"],"sources":["../../../src/primitives/actionBar/ActionBarStopSpeaking.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef } from \"react\";\nimport type { ActionButtonProps } from \"../../utils/createActionButton\";\nimport { Primitive } from \"../../utils/Primitive\";\nimport { composeEventHandlers } from \"radix-ui/internal\";\nimport { useActionBarStopSpeaking as useActionBarStopSpeakingBehavior } from \"@assistant-ui/core/react\";\n\nconst useActionBarStopSpeaking = () => {\n const { disabled, stopSpeaking } = useActionBarStopSpeakingBehavior();\n if (disabled) return null;\n return stopSpeaking;\n};\n\nexport namespace ActionBarPrimitiveStopSpeaking {\n export type Element = HTMLButtonElement;\n export type Props = ActionButtonProps<typeof useActionBarStopSpeaking>;\n}\n\nexport const ActionBarPrimitiveStopSpeaking = forwardRef<\n ActionBarPrimitiveStopSpeaking.Element,\n ActionBarPrimitiveStopSpeaking.Props\n>((props, ref) => {\n const callback = useActionBarStopSpeaking();\n\n return (\n <Primitive.button\n type=\"button\"\n disabled={!callback}\n {...props}\n ref={ref}\n onClick={composeEventHandlers(props.onClick, () => {\n callback?.();\n })}\n />\n );\n});\n\nActionBarPrimitiveStopSpeaking.displayName = \"ActionBarPrimitive.StopSpeaking\";\n"],"mappings":";;;;;;;;AAQA,MAAMM,mCAA2B;CAC/B,MAAA,EAAAE,UAAAC,iBAAmCF,yBAAiC;CACpE,IAAIC,UAAQ,OAAS;CAAK,OACnBC;AAAY;AAQrB,MAAaC,iCAAiCR,YAG5CY,OAAAC,QAAA;CAAA,MAAAC,IAAAf,EAAA,EAAA;CACA,MAAAgB,WAAiBX,2BAAyB;CAK5B,MAAAY,KAAA,CAACD;CAAQ,IAAAE;CAAA,IAAAH,EAAA,OAAAC,UAAA;EAG0BE,WAAA;GAC3CF,WAAW;EAAC;EACbD,EAAA,KAAAC;EAAAD,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,IAAAI;CAAA,IAAAJ,EAAA,OAAAF,MAAAO,WAAAL,EAAA,OAAAG,IAAA;EAFQC,KAAAf,qBAAqBS,MAAKO,SAAUF,EAE5C;EAACH,EAAA,KAAAF,MAAAO;EAAAL,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAM;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,MAAAF,EAAA,OAAAI,IAAA;EAPJE,KAAA,oBAAA,YAAA,QAAA;GACO,MAAA;GACK,UAAAJ;GAAS,GACfJ;GACCC;GACI,SAAAK;EAEP,CAAA;EACFJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OARFM;AAQE,CAEL;AAEDZ,+BAA+Ba,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarMoreContent.js","names":["c","_c","ComponentPropsWithoutRef","ComponentRef","forwardRef","DropdownMenu","DropdownMenuPrimitive","WithRenderPropProps","DropdownMenuRenderContent","ScopedProps","useDropdownMenuScope","ActionBarMorePrimitiveContent","Element","Content","Props","portalProps","Portal","t0","forwardedRef","$","__scopeActionBarMore","props","t1","sideOffset","undefined","scope","t2","t3","displayName"],"sources":["../../../src/primitives/actionBarMore/ActionBarMoreContent.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\nimport type { WithRenderPropProps } from \"../../utils/Primitive\";\nimport { DropdownMenuRenderContent } from \"../dropdownMenuRenderPrimitives\";\nimport { type ScopedProps, useDropdownMenuScope } from \"./scope\";\n\nexport namespace ActionBarMorePrimitiveContent {\n export type Element = ComponentRef<typeof DropdownMenuPrimitive.Content>;\n export type Props = WithRenderPropProps<\n typeof DropdownMenuPrimitive.Content\n > & {\n portalProps?:\n | ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>\n | undefined;\n };\n}\n\nexport const ActionBarMorePrimitiveContent = forwardRef<\n ActionBarMorePrimitiveContent.Element,\n ActionBarMorePrimitiveContent.Props\n>(\n (\n {\n __scopeActionBarMore,\n portalProps,\n sideOffset = 4,\n ...props\n }: ScopedProps<ActionBarMorePrimitiveContent.Props>,\n forwardedRef,\n ) => {\n const scope = useDropdownMenuScope(__scopeActionBarMore);\n\n return (\n <DropdownMenuPrimitive.Portal {...scope} {...portalProps}>\n <DropdownMenuRenderContent\n {...scope}\n {...props}\n ref={forwardedRef}\n sideOffset={sideOffset}\n />\n </DropdownMenuPrimitive.Portal>\n );\n },\n);\n\nActionBarMorePrimitiveContent.displayName = \"ActionBarMorePrimitive.Content\";\n"],"mappings":";;;;;;;;AAuBA,MAAaW,gCAAgCP,YAI3Ca,IAAAC,iBAAA;CAAA,MAAAC,IAAAlB,EAAA,EAAA;CAAA,IAAAmB;CAAA,IAAAL;CAAA,IAAAM;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAF,IAAA;EACE,CAAA,CAAAG,sBAAAL,aAAAQ,YAAAD,
|
|
1
|
+
{"version":3,"file":"ActionBarMoreContent.js","names":["c","_c","ComponentPropsWithoutRef","ComponentRef","forwardRef","DropdownMenu","DropdownMenuPrimitive","WithRenderPropProps","DropdownMenuRenderContent","ScopedProps","useDropdownMenuScope","ActionBarMorePrimitiveContent","Element","Content","Props","portalProps","Portal","t0","forwardedRef","$","__scopeActionBarMore","props","t1","sideOffset","undefined","scope","t2","t3","displayName"],"sources":["../../../src/primitives/actionBarMore/ActionBarMoreContent.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\nimport type { WithRenderPropProps } from \"../../utils/Primitive\";\nimport { DropdownMenuRenderContent } from \"../dropdownMenuRenderPrimitives\";\nimport { type ScopedProps, useDropdownMenuScope } from \"./scope\";\n\nexport namespace ActionBarMorePrimitiveContent {\n export type Element = ComponentRef<typeof DropdownMenuPrimitive.Content>;\n export type Props = WithRenderPropProps<\n typeof DropdownMenuPrimitive.Content\n > & {\n portalProps?:\n | ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>\n | undefined;\n };\n}\n\nexport const ActionBarMorePrimitiveContent = forwardRef<\n ActionBarMorePrimitiveContent.Element,\n ActionBarMorePrimitiveContent.Props\n>(\n (\n {\n __scopeActionBarMore,\n portalProps,\n sideOffset = 4,\n ...props\n }: ScopedProps<ActionBarMorePrimitiveContent.Props>,\n forwardedRef,\n ) => {\n const scope = useDropdownMenuScope(__scopeActionBarMore);\n\n return (\n <DropdownMenuPrimitive.Portal {...scope} {...portalProps}>\n <DropdownMenuRenderContent\n {...scope}\n {...props}\n ref={forwardedRef}\n sideOffset={sideOffset}\n />\n </DropdownMenuPrimitive.Portal>\n );\n },\n);\n\nActionBarMorePrimitiveContent.displayName = \"ActionBarMorePrimitive.Content\";\n"],"mappings":";;;;;;;;AAuBA,MAAaW,gCAAgCP,YA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js","names":["c","_c","ComponentRef","forwardRef","DropdownMenu","DropdownMenuPrimitive","WithRenderPropProps","DropdownMenuRenderItem","ScopedProps","useDropdownMenuScope","ActionBarMorePrimitiveItem","Element","Item","Props","t0","ref","$","__scopeActionBarMore","rest","scope","t1","displayName"],"sources":["../../../src/primitives/actionBarMore/ActionBarMoreItem.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentRef, forwardRef } from \"react\";\nimport type { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\nimport type { WithRenderPropProps } from \"../../utils/Primitive\";\nimport { DropdownMenuRenderItem } from \"../dropdownMenuRenderPrimitives\";\nimport { type ScopedProps, useDropdownMenuScope } from \"./scope\";\n\nexport namespace ActionBarMorePrimitiveItem {\n export type Element = ComponentRef<typeof DropdownMenuPrimitive.Item>;\n export type Props = WithRenderPropProps<typeof DropdownMenuPrimitive.Item>;\n}\n\nexport const ActionBarMorePrimitiveItem = forwardRef<\n ActionBarMorePrimitiveItem.Element,\n ActionBarMorePrimitiveItem.Props\n>(\n (\n {\n __scopeActionBarMore,\n ...rest\n }: ScopedProps<ActionBarMorePrimitiveItem.Props>,\n ref,\n ) => {\n const scope = useDropdownMenuScope(__scopeActionBarMore);\n\n return <DropdownMenuRenderItem {...scope} {...rest} ref={ref} />;\n },\n);\n\nActionBarMorePrimitiveItem.displayName = \"ActionBarMorePrimitive.Item\";\n"],"mappings":";;;;;;;AAaA,MAAaU,6BAA6BP,YAIxCW,IAAAC,QAAA;CAAA,MAAAC,IAAAf,EAAA,CAAA;CAAA,IAAAgB;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAF,IAAA;EACE,CAAA,CAAAG,
|
|
1
|
+
{"version":3,"file":"ActionBarMoreItem.js","names":["c","_c","ComponentRef","forwardRef","DropdownMenu","DropdownMenuPrimitive","WithRenderPropProps","DropdownMenuRenderItem","ScopedProps","useDropdownMenuScope","ActionBarMorePrimitiveItem","Element","Item","Props","t0","ref","$","__scopeActionBarMore","rest","scope","t1","displayName"],"sources":["../../../src/primitives/actionBarMore/ActionBarMoreItem.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentRef, forwardRef } from \"react\";\nimport type { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\nimport type { WithRenderPropProps } from \"../../utils/Primitive\";\nimport { DropdownMenuRenderItem } from \"../dropdownMenuRenderPrimitives\";\nimport { type ScopedProps, useDropdownMenuScope } from \"./scope\";\n\nexport namespace ActionBarMorePrimitiveItem {\n export type Element = ComponentRef<typeof DropdownMenuPrimitive.Item>;\n export type Props = WithRenderPropProps<typeof DropdownMenuPrimitive.Item>;\n}\n\nexport const ActionBarMorePrimitiveItem = forwardRef<\n ActionBarMorePrimitiveItem.Element,\n ActionBarMorePrimitiveItem.Props\n>(\n (\n {\n __scopeActionBarMore,\n ...rest\n }: ScopedProps<ActionBarMorePrimitiveItem.Props>,\n ref,\n ) => {\n const scope = useDropdownMenuScope(__scopeActionBarMore);\n\n return <DropdownMenuRenderItem {...scope} {...rest} ref={ref} />;\n },\n);\n\nActionBarMorePrimitiveItem.displayName = \"ActionBarMorePrimitive.Item\";\n"],"mappings":";;;;;;;AAaA,MAAaU,6BAA6BP,YAIxCW,IAAAC,QAAA;CAAA,MAAAC,IAAAf,EAAA,CAAA;CAAA,IAAAgB;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAF,IAAA;EACE,CAAA,CAAAG,sBAAA,GAAAC,QAAAJ;EAGgDE,EAAA,KAAAF;EAAAE,EAAA,KAAAC;EAAAD,EAAA,KAAAE;CAAA,OAAA;EAAAD,uBAAAD,EAAA;EAAAE,OAAAF,EAAA;CAAA;CAGhD,MAAAG,QAAcV,qBAAqBQ,oBAAoB;CAAE,IAAAG;CAAA,IAAAJ,EAAA,OAAAD,OAAAC,EAAA,OAAAE,QAAAF,EAAA,OAAAG,OAAA;EAElDC,KAAA,oBAAC,wBAAD;GAAuB,GAAKD;GAAK,GAAMD;GAAWH;EAAG,CAAA;EAAIC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,OAAzDI;AAAyD,CAEpE;AAEAV,2BAA2BW,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarMoreRoot.js","names":["c","_c","FC","useCallback","useEffect","useRef","DropdownMenu","DropdownMenuPrimitive","ScopedProps","useDropdownMenuScope","useActionBarInteractionContext","ActionBarMorePrimitiveRoot","Props","DropdownMenuProps","t0","$","__scopeActionBarMore","onOpenChange","open","rest","scope","actionBarInteraction","releaseInteractionLockRef","isControlled","undefined","t1","nextOpen","current","acquireInteractionLock","setInteractionOpen","t2","nextOpen_0","handleOpenChange","t3","t4","Boolean","t5","t6","Symbol","for","t7","t8","displayName"],"sources":["../../../src/primitives/actionBarMore/ActionBarMoreRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { type FC, useCallback, useEffect, useRef } from \"react\";\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\nimport { type ScopedProps, useDropdownMenuScope } from \"./scope\";\nimport { useActionBarInteractionContext } from \"../actionBar/ActionBarInteractionContext\";\n\nexport namespace ActionBarMorePrimitiveRoot {\n export type Props = DropdownMenuPrimitive.DropdownMenuProps;\n}\n\nexport const ActionBarMorePrimitiveRoot: FC<\n ActionBarMorePrimitiveRoot.Props\n> = ({\n __scopeActionBarMore,\n open,\n onOpenChange,\n ...rest\n}: ScopedProps<ActionBarMorePrimitiveRoot.Props>) => {\n const scope = useDropdownMenuScope(__scopeActionBarMore);\n const actionBarInteraction = useActionBarInteractionContext();\n const releaseInteractionLockRef = useRef<(() => void) | null>(null);\n const isControlled = open !== undefined;\n\n const setInteractionOpen = useCallback(\n (nextOpen: boolean) => {\n if (nextOpen) {\n if (releaseInteractionLockRef.current) return;\n releaseInteractionLockRef.current =\n actionBarInteraction?.acquireInteractionLock() ?? null;\n return;\n }\n\n releaseInteractionLockRef.current?.();\n releaseInteractionLockRef.current = null;\n },\n [actionBarInteraction],\n );\n\n const handleOpenChange = useCallback(\n (nextOpen: boolean) => {\n if (!isControlled) {\n setInteractionOpen(nextOpen);\n }\n onOpenChange?.(nextOpen);\n },\n [isControlled, setInteractionOpen, onOpenChange],\n );\n\n useEffect(() => {\n if (!isControlled) return;\n setInteractionOpen(Boolean(open));\n }, [isControlled, open, setInteractionOpen]);\n\n useEffect(() => {\n return () => {\n releaseInteractionLockRef.current?.();\n releaseInteractionLockRef.current = null;\n };\n }, []);\n\n return (\n <DropdownMenuPrimitive.Root\n {...scope}\n {...rest}\n {...(open !== undefined ? { open } : null)}\n onOpenChange={handleOpenChange}\n />\n );\n};\n\nActionBarMorePrimitiveRoot.displayName = \"ActionBarMorePrimitive.Root\";\n"],"mappings":";;;;;;;;AAWA,MAAaW,8BAETG,OAAA;CAAA,MAAAC,IAAAd,EAAA,EAAA;CAAA,IAAAe;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAE,sBAAAE,MAAAD,
|
|
1
|
+
{"version":3,"file":"ActionBarMoreRoot.js","names":["c","_c","FC","useCallback","useEffect","useRef","DropdownMenu","DropdownMenuPrimitive","ScopedProps","useDropdownMenuScope","useActionBarInteractionContext","ActionBarMorePrimitiveRoot","Props","DropdownMenuProps","t0","$","__scopeActionBarMore","onOpenChange","open","rest","scope","actionBarInteraction","releaseInteractionLockRef","isControlled","undefined","t1","nextOpen","current","acquireInteractionLock","setInteractionOpen","t2","nextOpen_0","handleOpenChange","t3","t4","Boolean","t5","t6","Symbol","for","t7","t8","displayName"],"sources":["../../../src/primitives/actionBarMore/ActionBarMoreRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { type FC, useCallback, useEffect, useRef } from \"react\";\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\nimport { type ScopedProps, useDropdownMenuScope } from \"./scope\";\nimport { useActionBarInteractionContext } from \"../actionBar/ActionBarInteractionContext\";\n\nexport namespace ActionBarMorePrimitiveRoot {\n export type Props = DropdownMenuPrimitive.DropdownMenuProps;\n}\n\nexport const ActionBarMorePrimitiveRoot: FC<\n ActionBarMorePrimitiveRoot.Props\n> = ({\n __scopeActionBarMore,\n open,\n onOpenChange,\n ...rest\n}: ScopedProps<ActionBarMorePrimitiveRoot.Props>) => {\n const scope = useDropdownMenuScope(__scopeActionBarMore);\n const actionBarInteraction = useActionBarInteractionContext();\n const releaseInteractionLockRef = useRef<(() => void) | null>(null);\n const isControlled = open !== undefined;\n\n const setInteractionOpen = useCallback(\n (nextOpen: boolean) => {\n if (nextOpen) {\n if (releaseInteractionLockRef.current) return;\n releaseInteractionLockRef.current =\n actionBarInteraction?.acquireInteractionLock() ?? null;\n return;\n }\n\n releaseInteractionLockRef.current?.();\n releaseInteractionLockRef.current = null;\n },\n [actionBarInteraction],\n );\n\n const handleOpenChange = useCallback(\n (nextOpen: boolean) => {\n if (!isControlled) {\n setInteractionOpen(nextOpen);\n }\n onOpenChange?.(nextOpen);\n },\n [isControlled, setInteractionOpen, onOpenChange],\n );\n\n useEffect(() => {\n if (!isControlled) return;\n setInteractionOpen(Boolean(open));\n }, [isControlled, open, setInteractionOpen]);\n\n useEffect(() => {\n return () => {\n releaseInteractionLockRef.current?.();\n releaseInteractionLockRef.current = null;\n };\n }, []);\n\n return (\n <DropdownMenuPrimitive.Root\n {...scope}\n {...rest}\n {...(open !== undefined ? { open } : null)}\n onOpenChange={handleOpenChange}\n />\n );\n};\n\nActionBarMorePrimitiveRoot.displayName = \"ActionBarMorePrimitive.Root\";\n"],"mappings":";;;;;;;;AAWA,MAAaW,8BAETG,OAAA;CAAA,MAAAC,IAAAd,EAAA,EAAA;CAAA,IAAAe;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAE,sBAAAE,MAAAD,cAAA,GAAAE,QAAAL;EA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;EAAAR,EAAA,MAAAG;EAAAH,EAAA,MAAAc;EAAAd,EAAA,MAAAkB;EAAAlB,EAAA,MAAAmB;CAAA,OAAA;EAAAD,KAAAlB,EAAA;EAAAmB,KAAAnB,EAAA;CAAA;CAH3CX,UAAU6B,IAGPC,EAAwC;CAAC,IAAAE;CAAA,IAAAC;CAAA,IAAAtB,EAAA,QAAAuB,OAAAC,IAAA,2BAAA,GAAA;EAElCH,iBACD;GACLd,0BAAyBK,UAAW;GACpCL,0BAAyBK,UAAW;EAAH;EAElCU,KAAA,CAAA;EAAEtB,EAAA,MAAAqB;EAAArB,EAAA,MAAAsB;CAAA,OAAA;EAAAD,KAAArB,EAAA;EAAAsB,KAAAtB,EAAA;CAAA;CALLX,UAAUgC,IAKPC,EAAE;CAAC,IAAAG;CAAA,IAAAzB,EAAA,QAAAG,MAAA;EAMGsB,KAAAtB,SAASM,KAAAA,IAAT,EAAAN,KAAmC,IAAnC;EAAoCH,EAAA,MAAAG;EAAAH,EAAA,MAAAyB;CAAA,OAAAA,KAAAzB,EAAA;CAAA,IAAA0B;CAAA,IAAA1B,EAAA,QAAAiB,oBAAAjB,EAAA,QAAAI,QAAAJ,EAAA,QAAAK,SAAAL,EAAA,QAAAyB,IAAA;EAH3CC,KAAA,oBAAA,aAAA,MAAA;GAAA,GACMrB;GAAK,GACLD;GAAI,GACHqB;GACSR,cAAAA;EAAgB,CAAA;EAC9BjB,EAAA,MAAAiB;EAAAjB,EAAA,MAAAI;EAAAJ,EAAA,MAAAK;EAAAL,EAAA,MAAAyB;EAAAzB,EAAA,MAAA0B;CAAA,OAAAA,KAAA1B,EAAA;CAAA,OALF0B;AAKE;AAIN9B,2BAA2B+B,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarMoreSeparator.js","names":["c","_c","ComponentRef","forwardRef","DropdownMenu","DropdownMenuPrimitive","WithRenderPropProps","DropdownMenuRenderSeparator","ScopedProps","useDropdownMenuScope","ActionBarMorePrimitiveSeparator","Element","Separator","Props","t0","ref","$","__scopeActionBarMore","rest","scope","t1","displayName"],"sources":["../../../src/primitives/actionBarMore/ActionBarMoreSeparator.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentRef, forwardRef } from \"react\";\nimport type { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\nimport type { WithRenderPropProps } from \"../../utils/Primitive\";\nimport { DropdownMenuRenderSeparator } from \"../dropdownMenuRenderPrimitives\";\nimport { type ScopedProps, useDropdownMenuScope } from \"./scope\";\n\nexport namespace ActionBarMorePrimitiveSeparator {\n export type Element = ComponentRef<typeof DropdownMenuPrimitive.Separator>;\n export type Props = WithRenderPropProps<\n typeof DropdownMenuPrimitive.Separator\n >;\n}\n\nexport const ActionBarMorePrimitiveSeparator = forwardRef<\n ActionBarMorePrimitiveSeparator.Element,\n ActionBarMorePrimitiveSeparator.Props\n>(\n (\n {\n __scopeActionBarMore,\n ...rest\n }: ScopedProps<ActionBarMorePrimitiveSeparator.Props>,\n ref,\n ) => {\n const scope = useDropdownMenuScope(__scopeActionBarMore);\n\n return <DropdownMenuRenderSeparator {...scope} {...rest} ref={ref} />;\n },\n);\n\nActionBarMorePrimitiveSeparator.displayName =\n \"ActionBarMorePrimitive.Separator\";\n"],"mappings":";;;;;;;AAeA,MAAaU,kCAAkCP,YAI7CW,IAAAC,QAAA;CAAA,MAAAC,IAAAf,EAAA,CAAA;CAAA,IAAAgB;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAF,IAAA;EACE,CAAA,CAAAG,
|
|
1
|
+
{"version":3,"file":"ActionBarMoreSeparator.js","names":["c","_c","ComponentRef","forwardRef","DropdownMenu","DropdownMenuPrimitive","WithRenderPropProps","DropdownMenuRenderSeparator","ScopedProps","useDropdownMenuScope","ActionBarMorePrimitiveSeparator","Element","Separator","Props","t0","ref","$","__scopeActionBarMore","rest","scope","t1","displayName"],"sources":["../../../src/primitives/actionBarMore/ActionBarMoreSeparator.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentRef, forwardRef } from \"react\";\nimport type { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\nimport type { WithRenderPropProps } from \"../../utils/Primitive\";\nimport { DropdownMenuRenderSeparator } from \"../dropdownMenuRenderPrimitives\";\nimport { type ScopedProps, useDropdownMenuScope } from \"./scope\";\n\nexport namespace ActionBarMorePrimitiveSeparator {\n export type Element = ComponentRef<typeof DropdownMenuPrimitive.Separator>;\n export type Props = WithRenderPropProps<\n typeof DropdownMenuPrimitive.Separator\n >;\n}\n\nexport const ActionBarMorePrimitiveSeparator = forwardRef<\n ActionBarMorePrimitiveSeparator.Element,\n ActionBarMorePrimitiveSeparator.Props\n>(\n (\n {\n __scopeActionBarMore,\n ...rest\n }: ScopedProps<ActionBarMorePrimitiveSeparator.Props>,\n ref,\n ) => {\n const scope = useDropdownMenuScope(__scopeActionBarMore);\n\n return <DropdownMenuRenderSeparator {...scope} {...rest} ref={ref} />;\n },\n);\n\nActionBarMorePrimitiveSeparator.displayName =\n \"ActionBarMorePrimitive.Separator\";\n"],"mappings":";;;;;;;AAeA,MAAaU,kCAAkCP,YAI7CW,IAAAC,QAAA;CAAA,MAAAC,IAAAf,EAAA,CAAA;CAAA,IAAAgB;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAF,IAAA;EACE,CAAA,CAAAG,sBAAA,GAAAC,QAAAJ;EAGqDE,EAAA,KAAAF;EAAAE,EAAA,KAAAC;EAAAD,EAAA,KAAAE;CAAA,OAAA;EAAAD,uBAAAD,EAAA;EAAAE,OAAAF,EAAA;CAAA;CAGrD,MAAAG,QAAcV,qBAAqBQ,oBAAoB;CAAE,IAAAG;CAAA,IAAAJ,EAAA,OAAAD,OAAAC,EAAA,OAAAE,QAAAF,EAAA,OAAAG,OAAA;EAElDC,KAAA,oBAAC,6BAAD;GAA4B,GAAKD;GAAK,GAAMD;GAAWH;EAAG,CAAA;EAAIC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,OAA9DI;AAA8D,CAEzE;AAEAV,gCAAgCW,cAC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarMoreTrigger.js","names":["c","_c","ComponentRef","forwardRef","DropdownMenu","DropdownMenuPrimitive","WithRenderPropProps","DropdownMenuRenderTrigger","ScopedProps","useDropdownMenuScope","ActionBarMorePrimitiveTrigger","Element","Trigger","Props","t0","ref","$","__scopeActionBarMore","rest","scope","t1","displayName"],"sources":["../../../src/primitives/actionBarMore/ActionBarMoreTrigger.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentRef, forwardRef } from \"react\";\nimport type { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\nimport type { WithRenderPropProps } from \"../../utils/Primitive\";\nimport { DropdownMenuRenderTrigger } from \"../dropdownMenuRenderPrimitives\";\nimport { type ScopedProps, useDropdownMenuScope } from \"./scope\";\n\nexport namespace ActionBarMorePrimitiveTrigger {\n export type Element = ComponentRef<typeof DropdownMenuPrimitive.Trigger>;\n export type Props = WithRenderPropProps<typeof DropdownMenuPrimitive.Trigger>;\n}\n\nexport const ActionBarMorePrimitiveTrigger = forwardRef<\n ActionBarMorePrimitiveTrigger.Element,\n ActionBarMorePrimitiveTrigger.Props\n>(\n (\n {\n __scopeActionBarMore,\n ...rest\n }: ScopedProps<ActionBarMorePrimitiveTrigger.Props>,\n ref,\n ) => {\n const scope = useDropdownMenuScope(__scopeActionBarMore);\n\n return <DropdownMenuRenderTrigger {...scope} {...rest} ref={ref} />;\n },\n);\n\nActionBarMorePrimitiveTrigger.displayName = \"ActionBarMorePrimitive.Trigger\";\n"],"mappings":";;;;;;;AAaA,MAAaU,gCAAgCP,YAI3CW,IAAAC,QAAA;CAAA,MAAAC,IAAAf,EAAA,CAAA;CAAA,IAAAgB;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAF,IAAA;EACE,CAAA,CAAAG,
|
|
1
|
+
{"version":3,"file":"ActionBarMoreTrigger.js","names":["c","_c","ComponentRef","forwardRef","DropdownMenu","DropdownMenuPrimitive","WithRenderPropProps","DropdownMenuRenderTrigger","ScopedProps","useDropdownMenuScope","ActionBarMorePrimitiveTrigger","Element","Trigger","Props","t0","ref","$","__scopeActionBarMore","rest","scope","t1","displayName"],"sources":["../../../src/primitives/actionBarMore/ActionBarMoreTrigger.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentRef, forwardRef } from \"react\";\nimport type { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\nimport type { WithRenderPropProps } from \"../../utils/Primitive\";\nimport { DropdownMenuRenderTrigger } from \"../dropdownMenuRenderPrimitives\";\nimport { type ScopedProps, useDropdownMenuScope } from \"./scope\";\n\nexport namespace ActionBarMorePrimitiveTrigger {\n export type Element = ComponentRef<typeof DropdownMenuPrimitive.Trigger>;\n export type Props = WithRenderPropProps<typeof DropdownMenuPrimitive.Trigger>;\n}\n\nexport const ActionBarMorePrimitiveTrigger = forwardRef<\n ActionBarMorePrimitiveTrigger.Element,\n ActionBarMorePrimitiveTrigger.Props\n>(\n (\n {\n __scopeActionBarMore,\n ...rest\n }: ScopedProps<ActionBarMorePrimitiveTrigger.Props>,\n ref,\n ) => {\n const scope = useDropdownMenuScope(__scopeActionBarMore);\n\n return <DropdownMenuRenderTrigger {...scope} {...rest} ref={ref} />;\n },\n);\n\nActionBarMorePrimitiveTrigger.displayName = \"ActionBarMorePrimitive.Trigger\";\n"],"mappings":";;;;;;;AAaA,MAAaU,gCAAgCP,YAI3CW,IAAAC,QAAA;CAAA,MAAAC,IAAAf,EAAA,CAAA;CAAA,IAAAgB;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAF,IAAA;EACE,CAAA,CAAAG,sBAAA,GAAAC,QAAAJ;EAGmDE,EAAA,KAAAF;EAAAE,EAAA,KAAAC;EAAAD,EAAA,KAAAE;CAAA,OAAA;EAAAD,uBAAAD,EAAA;EAAAE,OAAAF,EAAA;CAAA;CAGnD,MAAAG,QAAcV,qBAAqBQ,oBAAoB;CAAE,IAAAG;CAAA,IAAAJ,EAAA,OAAAD,OAAAC,EAAA,OAAAE,QAAAF,EAAA,OAAAG,OAAA;EAElDC,KAAA,oBAAC,2BAAD;GAA0B,GAAKD;GAAK,GAAMD;GAAWH;EAAG,CAAA;EAAIC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,OAA5DI;AAA4D,CAEvE;AAEAV,8BAA8BW,cAAc"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { Context } from "radix-ui/internal";
|
|
1
2
|
import { DropdownMenu } from "radix-ui";
|
|
2
|
-
import { Scope } from "@radix-ui/react-context";
|
|
3
3
|
//#region src/primitives/actionBarMore/scope.d.ts
|
|
4
4
|
declare const useDropdownMenuScope: ReturnType<typeof DropdownMenu.createDropdownMenuScope>;
|
|
5
5
|
type ScopedProps<P> = P & {
|
|
6
|
-
__scopeActionBarMore?: Scope;
|
|
6
|
+
__scopeActionBarMore?: Context.Scope;
|
|
7
7
|
};
|
|
8
8
|
//#endregion
|
|
9
9
|
export { ScopedProps, useDropdownMenuScope };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.d.ts","names":[],"sources":["../../../src/primitives/actionBarMore/scope.ts"],"mappings":";;;cAGa,sBAAsB,kBAC1B,aAAsB;KAGnB,YAAY,KAAK;EAAM,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"scope.d.ts","names":[],"sources":["../../../src/primitives/actionBarMore/scope.ts"],"mappings":";;;cAGa,sBAAsB,kBAC1B,aAAsB;KAGnB,YAAY,KAAK;EAAM,uBAAuB,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.js","names":["DropdownMenu","DropdownMenuPrimitive","
|
|
1
|
+
{"version":3,"file":"scope.js","names":["DropdownMenu","DropdownMenuPrimitive","Context","useDropdownMenuScope","ReturnType","createDropdownMenuScope","ScopedProps","P","__scopeActionBarMore","Scope"],"sources":["../../../src/primitives/actionBarMore/scope.ts"],"sourcesContent":["import { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\nimport type { Context } from \"radix-ui/internal\";\n\nexport const useDropdownMenuScope: ReturnType<\n typeof DropdownMenuPrimitive.createDropdownMenuScope\n> = DropdownMenuPrimitive.createDropdownMenuScope();\n\nexport type ScopedProps<P> = P & { __scopeActionBarMore?: Context.Scope };\n"],"mappings":";;AAGA,MAAaG,uBAETF,aAAsBI,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantModalAnchor.js","names":["c","_c","ComponentRef","forwardRef","Popover","PopoverPrimitive","WithRenderPropProps","PopoverRenderAnchor","ScopedProps","usePopoverScope","AssistantModalPrimitiveAnchor","Element","Anchor","Props","t0","ref","$","__scopeAssistantModal","rest","scope","t1","displayName"],"sources":["../../../src/primitives/assistantModal/AssistantModalAnchor.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentRef, forwardRef } from \"react\";\nimport type { Popover as PopoverPrimitive } from \"radix-ui\";\nimport type { WithRenderPropProps } from \"../../utils/Primitive\";\nimport { PopoverRenderAnchor } from \"./popoverRenderPrimitives\";\nimport { type ScopedProps, usePopoverScope } from \"./scope\";\n\nexport namespace AssistantModalPrimitiveAnchor {\n export type Element = ComponentRef<typeof PopoverPrimitive.Anchor>;\n export type Props = WithRenderPropProps<typeof PopoverPrimitive.Anchor>;\n}\n\nexport const AssistantModalPrimitiveAnchor = forwardRef<\n AssistantModalPrimitiveAnchor.Element,\n AssistantModalPrimitiveAnchor.Props\n>(\n (\n {\n __scopeAssistantModal,\n ...rest\n }: ScopedProps<AssistantModalPrimitiveAnchor.Props>,\n ref,\n ) => {\n const scope = usePopoverScope(__scopeAssistantModal);\n\n return <PopoverRenderAnchor {...scope} {...rest} ref={ref} />;\n },\n);\nAssistantModalPrimitiveAnchor.displayName = \"AssistantModalPrimitive.Anchor\";\n"],"mappings":";;;;;;;AAaA,MAAaU,gCAAgCP,YAI3CW,IAAAC,QAAA;CAAA,MAAAC,IAAAf,EAAA,CAAA;CAAA,IAAAgB;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAF,IAAA;EACE,CAAA,CAAAG,
|
|
1
|
+
{"version":3,"file":"AssistantModalAnchor.js","names":["c","_c","ComponentRef","forwardRef","Popover","PopoverPrimitive","WithRenderPropProps","PopoverRenderAnchor","ScopedProps","usePopoverScope","AssistantModalPrimitiveAnchor","Element","Anchor","Props","t0","ref","$","__scopeAssistantModal","rest","scope","t1","displayName"],"sources":["../../../src/primitives/assistantModal/AssistantModalAnchor.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ComponentRef, forwardRef } from \"react\";\nimport type { Popover as PopoverPrimitive } from \"radix-ui\";\nimport type { WithRenderPropProps } from \"../../utils/Primitive\";\nimport { PopoverRenderAnchor } from \"./popoverRenderPrimitives\";\nimport { type ScopedProps, usePopoverScope } from \"./scope\";\n\nexport namespace AssistantModalPrimitiveAnchor {\n export type Element = ComponentRef<typeof PopoverPrimitive.Anchor>;\n export type Props = WithRenderPropProps<typeof PopoverPrimitive.Anchor>;\n}\n\nexport const AssistantModalPrimitiveAnchor = forwardRef<\n AssistantModalPrimitiveAnchor.Element,\n AssistantModalPrimitiveAnchor.Props\n>(\n (\n {\n __scopeAssistantModal,\n ...rest\n }: ScopedProps<AssistantModalPrimitiveAnchor.Props>,\n ref,\n ) => {\n const scope = usePopoverScope(__scopeAssistantModal);\n\n return <PopoverRenderAnchor {...scope} {...rest} ref={ref} />;\n },\n);\nAssistantModalPrimitiveAnchor.displayName = \"AssistantModalPrimitive.Anchor\";\n"],"mappings":";;;;;;;AAaA,MAAaU,gCAAgCP,YAI3CW,IAAAC,QAAA;CAAA,MAAAC,IAAAf,EAAA,CAAA;CAAA,IAAAgB;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAF,IAAA;EACE,CAAA,CAAAG,uBAAA,GAAAC,QAAAJ;EAGmDE,EAAA,KAAAF;EAAAE,EAAA,KAAAC;EAAAD,EAAA,KAAAE;CAAA,OAAA;EAAAD,wBAAAD,EAAA;EAAAE,OAAAF,EAAA;CAAA;CAGnD,MAAAG,QAAcV,gBAAgBQ,qBAAqB;CAAE,IAAAG;CAAA,IAAAJ,EAAA,OAAAD,OAAAC,EAAA,OAAAE,QAAAF,EAAA,OAAAG,OAAA;EAE9CC,KAAA,oBAAC,qBAAD;GAAoB,GAAKD;GAAK,GAAMD;GAAWH;EAAG,CAAA;EAAIC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,OAAtDI;AAAsD,CAEjE;AACAV,8BAA8BW,cAAc"}
|
|
@@ -4,7 +4,7 @@ import { PopoverRenderContent } from "./popoverRenderPrimitives.js";
|
|
|
4
4
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
5
5
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import { composeEventHandlers } from "
|
|
7
|
+
import { composeEventHandlers } from "radix-ui/internal";
|
|
8
8
|
import { Popover } from "radix-ui";
|
|
9
9
|
//#region src/primitives/assistantModal/AssistantModalContent.tsx
|
|
10
10
|
const AssistantModalPrimitiveContent = forwardRef((t0, forwardedRef) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantModalContent.js","names":["c","_c","ComponentPropsWithoutRef","ComponentRef","forwardRef","Popover","PopoverPrimitive","composeEventHandlers","WithRenderPropProps","PopoverRenderContent","ScopedProps","usePopoverScope","AssistantModalPrimitiveContent","Element","Content","Props","portalProps","Portal","dissmissOnInteractOutside","t0","forwardedRef","$","__scopeAssistantModal","align","onInteractOutside","props","side","t1","undefined","scope","t2","t3","t4","_temp","t5","t6","t7","displayName","e","preventDefault"],"sources":["../../../src/primitives/assistantModal/AssistantModalContent.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Popover as PopoverPrimitive } from \"radix-ui\";\nimport { composeEventHandlers } from \"
|
|
1
|
+
{"version":3,"file":"AssistantModalContent.js","names":["c","_c","ComponentPropsWithoutRef","ComponentRef","forwardRef","Popover","PopoverPrimitive","composeEventHandlers","WithRenderPropProps","PopoverRenderContent","ScopedProps","usePopoverScope","AssistantModalPrimitiveContent","Element","Content","Props","portalProps","Portal","dissmissOnInteractOutside","t0","forwardedRef","$","__scopeAssistantModal","align","onInteractOutside","props","side","t1","undefined","scope","t2","t3","t4","_temp","t5","t6","t7","displayName","e","preventDefault"],"sources":["../../../src/primitives/assistantModal/AssistantModalContent.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Popover as PopoverPrimitive } from \"radix-ui\";\nimport { composeEventHandlers } from \"radix-ui/internal\";\nimport type { WithRenderPropProps } from \"../../utils/Primitive\";\nimport { PopoverRenderContent } from \"./popoverRenderPrimitives\";\nimport { type ScopedProps, usePopoverScope } from \"./scope\";\n\nexport namespace AssistantModalPrimitiveContent {\n export type Element = ComponentRef<typeof PopoverPrimitive.Content>;\n export type Props = WithRenderPropProps<typeof PopoverPrimitive.Content> & {\n portalProps?:\n | ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>\n | undefined;\n dissmissOnInteractOutside?: boolean | undefined;\n };\n}\n\nexport const AssistantModalPrimitiveContent = forwardRef<\n AssistantModalPrimitiveContent.Element,\n AssistantModalPrimitiveContent.Props\n>(\n (\n {\n __scopeAssistantModal,\n side,\n align,\n onInteractOutside,\n dissmissOnInteractOutside = false,\n portalProps,\n ...props\n }: ScopedProps<AssistantModalPrimitiveContent.Props>,\n forwardedRef,\n ) => {\n const scope = usePopoverScope(__scopeAssistantModal);\n\n return (\n <PopoverPrimitive.Portal {...scope} {...portalProps}>\n <PopoverRenderContent\n {...scope}\n {...props}\n ref={forwardedRef}\n side={side ?? \"top\"}\n align={align ?? \"end\"}\n onInteractOutside={composeEventHandlers(\n onInteractOutside,\n dissmissOnInteractOutside ? undefined : (e) => e.preventDefault(),\n )}\n />\n </PopoverPrimitive.Portal>\n );\n },\n);\n\nAssistantModalPrimitiveContent.displayName = \"AssistantModalPrimitive.Content\";\n"],"mappings":";;;;;;;;;AAuBA,MAAaY,iCAAiCR,YAI5Ce,IAAAC,iBAAA;CAAA,MAAAC,IAAApB,EAAA,EAAA;CAAA,IAAAqB;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAR;CAAA,IAAAS;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAN,EAAA,OAAAF,IAAA;EACE,CAAA,CAAAG,uBAAAI,MAAAH,OAAAC,mBAAAN,2BAAAS,IAAAX,aAAA,GAAAS,SAAAN;EAQoDE,EAAA,KAAAF;EAAAE,EAAA,KAAAC;EAAAD,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAL;EAAAK,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAM;CAAA,OAAA;EAAAL,wBAAAD,EAAA;EAAAE,QAAAF,EAAA;EAAAG,oBAAAH,EAAA;EAAAL,cAAAK,EAAA;EAAAI,QAAAJ,EAAA;EAAAK,OAAAL,EAAA;EAAAM,KAAAN,EAAA;CAAA;CAHlD,MAAAH,4BAAAS,OAAAC,KAAAA,IAAA,QAAAD;CAMF,MAAAE,QAAclB,gBAAgBW,qBAAqB;CAQvC,MAAAQ,KAAAJ,QAAA;CACC,MAAAK,KAAAR,SAAA;CAGL,MAAAS,KAAAd,4BAAAU,KAAAA,IAAAK;CAAiE,IAAAC;CAAA,IAAAb,EAAA,OAAAG,qBAAAH,EAAA,OAAAW,IAAA;EAFhDE,KAAA3B,qBACjBiB,mBACAQ,EACF;EAACX,EAAA,KAAAG;EAAAH,EAAA,KAAAW;EAAAX,EAAA,MAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,IAAAc;CAAA,IAAAd,EAAA,QAAAD,gBAAAC,EAAA,QAAAI,SAAAJ,EAAA,QAAAQ,SAAAR,EAAA,QAAAS,MAAAT,EAAA,QAAAU,MAAAV,EAAA,QAAAa,IAAA;EATHC,KAAA,oBAAC,sBAAD;GAAqB,GACfN;GAAK,GACLJ;GACCL,KAAAA;GACC,MAAAU;GACC,OAAAC;GACY,mBAAAG;EAGlB,CAAA;EACDb,EAAA,MAAAD;EAAAC,EAAA,MAAAI;EAAAJ,EAAA,MAAAQ;EAAAR,EAAA,MAAAS;EAAAT,EAAA,MAAAU;EAAAV,EAAA,MAAAa;EAAAb,EAAA,MAAAc;CAAA,OAAAA,KAAAd,EAAA;CAAA,IAAAe;CAAA,IAAAf,EAAA,QAAAL,eAAAK,EAAA,QAAAQ,SAAAR,EAAA,QAAAc,IAAA;EAXJC,KAAA,oBAAA,QAAA,QAAA;GAAA,GAA6BP;GAAK,GAAMb;GACtCmB,UAAAA;EAWF,CAAA;EAA0Bd,EAAA,MAAAL;EAAAK,EAAA,MAAAQ;EAAAR,EAAA,MAAAc;EAAAd,EAAA,MAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,OAZ1Be;AAY0B,CAGhC;AAEAxB,+BAA+ByB,cAAc;AAhC3C,SAAAJ,MAAAK,GAAA;CAAA,OAwByDA,EAACC,eAAgB;AAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantModalRoot.js","names":["c","_c","FC","useEffect","useState","Popover","PopoverPrimitive","ScopedProps","usePopoverScope","useAui","AssistantModalPrimitiveRoot","Props","PopoverProps","unstable_openOnRunStart","useAssistantModalOpenState","t0","$","defaultOpen","t1","t2","undefined","state","setOpen","aui","t3","t4","on","__scopeAssistantModal","onOpenChange","open","rest","scope","modalOpen","open_0","openChangeHandler","displayName"],"sources":["../../../src/primitives/assistantModal/AssistantModalRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { type FC, useEffect, useState } from \"react\";\nimport { Popover as PopoverPrimitive } from \"radix-ui\";\nimport { type ScopedProps, usePopoverScope } from \"./scope\";\nimport { useAui } from \"@assistant-ui/store\";\n\nexport namespace AssistantModalPrimitiveRoot {\n export type Props = PopoverPrimitive.PopoverProps & {\n unstable_openOnRunStart?: boolean | undefined;\n };\n}\n\nconst useAssistantModalOpenState = ({\n defaultOpen = false,\n unstable_openOnRunStart = true,\n}: {\n defaultOpen?: boolean | undefined;\n unstable_openOnRunStart?: boolean | undefined;\n}) => {\n const state = useState(defaultOpen);\n\n const [, setOpen] = state;\n const aui = useAui();\n useEffect(() => {\n if (!unstable_openOnRunStart) return undefined;\n\n return aui.on(\"thread.runStart\", () => {\n setOpen(true);\n });\n }, [unstable_openOnRunStart, aui, setOpen]);\n\n return state;\n};\n\nexport const AssistantModalPrimitiveRoot: FC<\n AssistantModalPrimitiveRoot.Props\n> = ({\n __scopeAssistantModal,\n defaultOpen,\n unstable_openOnRunStart,\n open,\n onOpenChange,\n ...rest\n}: ScopedProps<AssistantModalPrimitiveRoot.Props>) => {\n const scope = usePopoverScope(__scopeAssistantModal);\n\n const [modalOpen, setOpen] = useAssistantModalOpenState({\n defaultOpen,\n unstable_openOnRunStart,\n });\n\n const openChangeHandler = (open: boolean) => {\n onOpenChange?.(open);\n setOpen(open);\n };\n\n return (\n <PopoverPrimitive.Root\n {...scope}\n open={open === undefined ? modalOpen : open}\n onOpenChange={openChangeHandler}\n {...rest}\n />\n );\n};\n\nAssistantModalPrimitiveRoot.displayName = \"AssistantModalPrimitive.Root\";\n"],"mappings":";;;;;;;;AAaA,MAAMc,8BAA6BC,OAAA;CAAA,MAAAC,IAAAf,EAAA,CAAA;CAAC,MAAA,EAAAgB,aAAAC,IAAAL,yBAAAM,OAAAJ;CAClC,MAAAE,cAAAC,OAAAE,KAAAA,IAAA,QAAAF;CACA,MAAAL,0BAAAM,OAAAC,KAAAA,IAAA,OAAAD;CAKA,MAAAE,QAAcjB,SAASa,WAAW;CAElC,MAAA,GAAAK,WAAoBD;CACpB,MAAAE,MAAYd,OAAO;CAAE,IAAAe;CAAA,IAAAC;CAAA,IAAAT,EAAA,OAAAO,OAAAP,EAAA,OAAAM,WAAAN,EAAA,OAAAH,yBAAA;EACXW,WAAA;GACR,IAAI,CAACX,yBAAuB;GAAmB,OAExCU,IAAGG,GAAI,yBAAmB;IAC/BJ,QAAQ,IAAI;GAAC,CACd;EAAC;EACDG,KAAA;GAACZ;GAAyBU;GAAKD;EAAO;EAACN,EAAA,KAAAO;EAAAP,EAAA,KAAAM;EAAAN,EAAA,KAAAH;EAAAG,EAAA,KAAAQ;EAAAR,EAAA,KAAAS;CAAA,OAAA;EAAAD,KAAAR,EAAA;EAAAS,KAAAT,EAAA;CAAA;CAN1Cb,UAAUqB,IAMPC,EAAuC;CAAC,OAEpCJ;AAAK;AAGd,MAAaX,+BAETK,OAAA;CAAA,MAAAC,IAAAf,EAAA,EAAA;CAAA,IAAA0B;CAAA,IAAAV;CAAA,IAAAW;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAjB;CAAA,IAAAG,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAY,uBAAAV,aAAAJ,yBAAAgB,MAAAD,
|
|
1
|
+
{"version":3,"file":"AssistantModalRoot.js","names":["c","_c","FC","useEffect","useState","Popover","PopoverPrimitive","ScopedProps","usePopoverScope","useAui","AssistantModalPrimitiveRoot","Props","PopoverProps","unstable_openOnRunStart","useAssistantModalOpenState","t0","$","defaultOpen","t1","t2","undefined","state","setOpen","aui","t3","t4","on","__scopeAssistantModal","onOpenChange","open","rest","scope","modalOpen","open_0","openChangeHandler","displayName"],"sources":["../../../src/primitives/assistantModal/AssistantModalRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { type FC, useEffect, useState } from \"react\";\nimport { Popover as PopoverPrimitive } from \"radix-ui\";\nimport { type ScopedProps, usePopoverScope } from \"./scope\";\nimport { useAui } from \"@assistant-ui/store\";\n\nexport namespace AssistantModalPrimitiveRoot {\n export type Props = PopoverPrimitive.PopoverProps & {\n unstable_openOnRunStart?: boolean | undefined;\n };\n}\n\nconst useAssistantModalOpenState = ({\n defaultOpen = false,\n unstable_openOnRunStart = true,\n}: {\n defaultOpen?: boolean | undefined;\n unstable_openOnRunStart?: boolean | undefined;\n}) => {\n const state = useState(defaultOpen);\n\n const [, setOpen] = state;\n const aui = useAui();\n useEffect(() => {\n if (!unstable_openOnRunStart) return undefined;\n\n return aui.on(\"thread.runStart\", () => {\n setOpen(true);\n });\n }, [unstable_openOnRunStart, aui, setOpen]);\n\n return state;\n};\n\nexport const AssistantModalPrimitiveRoot: FC<\n AssistantModalPrimitiveRoot.Props\n> = ({\n __scopeAssistantModal,\n defaultOpen,\n unstable_openOnRunStart,\n open,\n onOpenChange,\n ...rest\n}: ScopedProps<AssistantModalPrimitiveRoot.Props>) => {\n const scope = usePopoverScope(__scopeAssistantModal);\n\n const [modalOpen, setOpen] = useAssistantModalOpenState({\n defaultOpen,\n unstable_openOnRunStart,\n });\n\n const openChangeHandler = (open: boolean) => {\n onOpenChange?.(open);\n setOpen(open);\n };\n\n return (\n <PopoverPrimitive.Root\n {...scope}\n open={open === undefined ? modalOpen : open}\n onOpenChange={openChangeHandler}\n {...rest}\n />\n );\n};\n\nAssistantModalPrimitiveRoot.displayName = \"AssistantModalPrimitive.Root\";\n"],"mappings":";;;;;;;;AAaA,MAAMc,8BAA6BC,OAAA;CAAA,MAAAC,IAAAf,EAAA,CAAA;CAAC,MAAA,EAAAgB,aAAAC,IAAAL,yBAAAM,OAAAJ;CAClC,MAAAE,cAAAC,OAAAE,KAAAA,IAAA,QAAAF;CACA,MAAAL,0BAAAM,OAAAC,KAAAA,IAAA,OAAAD;CAKA,MAAAE,QAAcjB,SAASa,WAAW;CAElC,MAAA,GAAAK,WAAoBD;CACpB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E;CAAA,OAAAA,KAAAF,EAAA;CAHD,MAAA,CAAAgB,WAAAV,WAA6BR,2BAA2BI,EAGvD;CAAE,IAAAC;CAAA,IAAAH,EAAA,QAAAY,gBAAAZ,EAAA,QAAAM,SAAA;EAEuBH,MAAAc,WAAA;GACxBL,eAAeC,MAAI;GACnBP,QAAQO,MAAI;EAAC;EACdb,EAAA,MAAAY;EAAAZ,EAAA,MAAAM;EAAAN,EAAA,MAAAG;CAAA,OAAAA,KAAAH,EAAA;CAHD,MAAAkB,oBAA0Bf;CAQhB,MAAAK,KAAAK,SAAST,KAAAA,IAATY,YAAAH;CAAqC,IAAAJ;CAAA,IAAAT,EAAA,QAAAkB,qBAAAlB,EAAA,QAAAc,QAAAd,EAAA,QAAAe,SAAAf,EAAA,QAAAQ,IAAA;EAF7CC,KAAA,oBAAA,QAAA,MAAA;GAAA,GACMM;GACE,MAAAP;GACQU,cAAAA;GAAiB,GAC3BJ;EAAI,CAAA;EACRd,EAAA,MAAAkB;EAAAlB,EAAA,MAAAc;EAAAd,EAAA,MAAAe;EAAAf,EAAA,MAAAQ;EAAAR,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OALFS;AAKE;AAINf,4BAA4ByB,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantModalTrigger.js","names":["ComponentRef","forwardRef","Popover","PopoverPrimitive","WithRenderPropProps","PopoverRenderTrigger","ScopedProps","usePopoverScope","AssistantModalPrimitiveTrigger","Element","Trigger","Props","t0","ref","$","_c","__scopeAssistantModal","rest","scope","t1","displayName"],"sources":["../../../src/primitives/assistantModal/AssistantModalTrigger.tsx"],"sourcesContent":["import { type ComponentRef, forwardRef } from \"react\";\nimport type { Popover as PopoverPrimitive } from \"radix-ui\";\nimport type { WithRenderPropProps } from \"../../utils/Primitive\";\nimport { PopoverRenderTrigger } from \"./popoverRenderPrimitives\";\nimport { type ScopedProps, usePopoverScope } from \"./scope\";\n\nexport namespace AssistantModalPrimitiveTrigger {\n export type Element = ComponentRef<typeof PopoverPrimitive.Trigger>;\n export type Props = WithRenderPropProps<typeof PopoverPrimitive.Trigger>;\n}\n\nexport const AssistantModalPrimitiveTrigger = forwardRef<\n AssistantModalPrimitiveTrigger.Element,\n AssistantModalPrimitiveTrigger.Props\n>(\n (\n {\n __scopeAssistantModal,\n ...rest\n }: ScopedProps<AssistantModalPrimitiveTrigger.Props>,\n ref,\n ) => {\n const scope = usePopoverScope(__scopeAssistantModal);\n\n return <PopoverRenderTrigger {...scope} {...rest} ref={ref} />;\n },\n);\n\nAssistantModalPrimitiveTrigger.displayName = \"AssistantModalPrimitive.Trigger\";\n"],"mappings":";;;;;;AAWA,MAAaQ,iCAAiCP,YAI5CW,IAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAF,IAAA;EACE,CAAA,CAAAI,
|
|
1
|
+
{"version":3,"file":"AssistantModalTrigger.js","names":["ComponentRef","forwardRef","Popover","PopoverPrimitive","WithRenderPropProps","PopoverRenderTrigger","ScopedProps","usePopoverScope","AssistantModalPrimitiveTrigger","Element","Trigger","Props","t0","ref","$","_c","__scopeAssistantModal","rest","scope","t1","displayName"],"sources":["../../../src/primitives/assistantModal/AssistantModalTrigger.tsx"],"sourcesContent":["import { type ComponentRef, forwardRef } from \"react\";\nimport type { Popover as PopoverPrimitive } from \"radix-ui\";\nimport type { WithRenderPropProps } from \"../../utils/Primitive\";\nimport { PopoverRenderTrigger } from \"./popoverRenderPrimitives\";\nimport { type ScopedProps, usePopoverScope } from \"./scope\";\n\nexport namespace AssistantModalPrimitiveTrigger {\n export type Element = ComponentRef<typeof PopoverPrimitive.Trigger>;\n export type Props = WithRenderPropProps<typeof PopoverPrimitive.Trigger>;\n}\n\nexport const AssistantModalPrimitiveTrigger = forwardRef<\n AssistantModalPrimitiveTrigger.Element,\n AssistantModalPrimitiveTrigger.Props\n>(\n (\n {\n __scopeAssistantModal,\n ...rest\n }: ScopedProps<AssistantModalPrimitiveTrigger.Props>,\n ref,\n ) => {\n const scope = usePopoverScope(__scopeAssistantModal);\n\n return <PopoverRenderTrigger {...scope} {...rest} ref={ref} />;\n },\n);\n\nAssistantModalPrimitiveTrigger.displayName = \"AssistantModalPrimitive.Trigger\";\n"],"mappings":";;;;;;AAWA,MAAaQ,iCAAiCP,YAI5CW,IAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAF,IAAA;EACE,CAAA,CAAAI,uBAAA,GAAAC,QAAAL;EAGoDE,EAAA,KAAAF;EAAAE,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAA;EAAAD,wBAAAF,EAAA;EAAAG,OAAAH,EAAA;CAAA;CAGpD,MAAAI,QAAcX,gBAAgBS,qBAAqB;CAAE,IAAAG;CAAA,IAAAL,EAAA,OAAAD,OAAAC,EAAA,OAAAG,QAAAH,EAAA,OAAAI,OAAA;EAE9CC,KAAA,oBAAC,sBAAD;GAAqB,GAAKD;GAAK,GAAMD;GAAWJ;EAAG,CAAA;EAAIC,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAAvDK;AAAuD,CAElE;AAEAX,+BAA+BY,cAAc"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { Context } from "radix-ui/internal";
|
|
1
2
|
import { Popover } from "radix-ui";
|
|
2
|
-
import { Scope } from "@radix-ui/react-context";
|
|
3
3
|
//#region src/primitives/assistantModal/scope.d.ts
|
|
4
4
|
declare const usePopoverScope: ReturnType<typeof Popover.createPopoverScope>;
|
|
5
5
|
type ScopedProps<P> = P & {
|
|
6
|
-
__scopeAssistantModal?: Scope;
|
|
6
|
+
__scopeAssistantModal?: Context.Scope;
|
|
7
7
|
};
|
|
8
8
|
//#endregion
|
|
9
9
|
export { ScopedProps, usePopoverScope };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.d.ts","names":[],"sources":["../../../src/primitives/assistantModal/scope.ts"],"mappings":";;;cAGa,iBAAiB,kBACrB,QAAiB;KAEd,YAAY,KAAK;EAAM,wBAAwB"}
|
|
1
|
+
{"version":3,"file":"scope.d.ts","names":[],"sources":["../../../src/primitives/assistantModal/scope.ts"],"mappings":";;;cAGa,iBAAiB,kBACrB,QAAiB;KAEd,YAAY,KAAK;EAAM,wBAAwB,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.js","names":["Popover","PopoverPrimitive","
|
|
1
|
+
{"version":3,"file":"scope.js","names":["Popover","PopoverPrimitive","Context","usePopoverScope","ReturnType","createPopoverScope","ScopedProps","P","__scopeAssistantModal","Scope"],"sources":["../../../src/primitives/assistantModal/scope.ts"],"sourcesContent":["import { Popover as PopoverPrimitive } from \"radix-ui\";\nimport type { Context } from \"radix-ui/internal\";\n\nexport const usePopoverScope: ReturnType<\n typeof PopoverPrimitive.createPopoverScope\n> = PopoverPrimitive.createPopoverScope();\nexport type ScopedProps<P> = P & { __scopeAssistantModal?: Context.Scope };\n"],"mappings":";;AAGA,MAAaG,kBAETF,QAAiBI,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BranchPickerRoot.js","names":["c","_c","Primitive","ComponentRef","forwardRef","ComponentPropsWithoutRef","AuiIf","BranchPickerPrimitiveRoot","Element","div","Props","hideWhenSingleBranch","t0","ref","$","rest","t1","s","message","branchCount","t2","t3","displayName"],"sources":["../../../src/primitives/branchPicker/BranchPickerRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n forwardRef,\n type ComponentPropsWithoutRef,\n} from \"react\";\nimport { AuiIf } from \"@assistant-ui/store\";\n\nexport namespace BranchPickerPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div> & {\n /**\n * Whether to hide the branch picker when there's only one branch available.\n * When true, the component will only render when multiple branches exist.\n * @default false\n */\n hideWhenSingleBranch?: boolean | undefined;\n };\n}\n\n/**\n * The root container for branch picker components.\n *\n * This component provides a container for branch navigation controls,\n * with optional conditional rendering based on the number of available branches.\n * It integrates with the message branching system to allow users to navigate\n * between different response variations.\n *\n * @example\n * ```tsx\n * <BranchPickerPrimitive.Root hideWhenSingleBranch={true}>\n * <BranchPickerPrimitive.Previous />\n * <BranchPickerPrimitive.Count />\n * <BranchPickerPrimitive.Next />\n * </BranchPickerPrimitive.Root>\n * ```\n */\nexport const BranchPickerPrimitiveRoot = forwardRef<\n BranchPickerPrimitiveRoot.Element,\n BranchPickerPrimitiveRoot.Props\n>(({ hideWhenSingleBranch, ...rest }, ref) => {\n return (\n <AuiIf\n condition={(s) => !hideWhenSingleBranch || s.message.branchCount >= 2}\n >\n <Primitive.div {...rest} ref={ref} />\n </AuiIf>\n );\n});\n\nBranchPickerPrimitiveRoot.displayName = \"BranchPickerPrimitive.Root\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAaO,4BAA4BH,YAGvCQ,IAAAC,QAAA;CAAA,MAAAC,IAAAb,EAAA,EAAA;CAAA,IAAAU;CAAA,IAAAI;CAAA,IAAAD,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAD,
|
|
1
|
+
{"version":3,"file":"BranchPickerRoot.js","names":["c","_c","Primitive","ComponentRef","forwardRef","ComponentPropsWithoutRef","AuiIf","BranchPickerPrimitiveRoot","Element","div","Props","hideWhenSingleBranch","t0","ref","$","rest","t1","s","message","branchCount","t2","t3","displayName"],"sources":["../../../src/primitives/branchPicker/BranchPickerRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n forwardRef,\n type ComponentPropsWithoutRef,\n} from \"react\";\nimport { AuiIf } from \"@assistant-ui/store\";\n\nexport namespace BranchPickerPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div> & {\n /**\n * Whether to hide the branch picker when there's only one branch available.\n * When true, the component will only render when multiple branches exist.\n * @default false\n */\n hideWhenSingleBranch?: boolean | undefined;\n };\n}\n\n/**\n * The root container for branch picker components.\n *\n * This component provides a container for branch navigation controls,\n * with optional conditional rendering based on the number of available branches.\n * It integrates with the message branching system to allow users to navigate\n * between different response variations.\n *\n * @example\n * ```tsx\n * <BranchPickerPrimitive.Root hideWhenSingleBranch={true}>\n * <BranchPickerPrimitive.Previous />\n * <BranchPickerPrimitive.Count />\n * <BranchPickerPrimitive.Next />\n * </BranchPickerPrimitive.Root>\n * ```\n */\nexport const BranchPickerPrimitiveRoot = forwardRef<\n BranchPickerPrimitiveRoot.Element,\n BranchPickerPrimitiveRoot.Props\n>(({ hideWhenSingleBranch, ...rest }, ref) => {\n return (\n <AuiIf\n condition={(s) => !hideWhenSingleBranch || s.message.branchCount >= 2}\n >\n <Primitive.div {...rest} ref={ref} />\n </AuiIf>\n );\n});\n\nBranchPickerPrimitiveRoot.displayName = \"BranchPickerPrimitive.Root\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAaO,4BAA4BH,YAGvCQ,IAAAC,QAAA;CAAA,MAAAC,IAAAb,EAAA,EAAA;CAAA,IAAAU;CAAA,IAAAI;CAAA,IAAAD,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAD,sBAAA,GAAAI,QAAAH;EAAiCE,EAAA,KAAAF;EAAAE,EAAA,KAAAH;EAAAG,EAAA,KAAAC;CAAA,OAAA;EAAAJ,uBAAAG,EAAA;EAAAC,OAAAD,EAAA;CAAA;CAAA,IAAAE;CAAA,IAAAF,EAAA,OAAAH,sBAAA;EAGnBK,MAAAC,MAAO,CAACN,wBAAwBM,EAACC,QAAQC,eAAgB;EAACL,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAM;CAAA,IAAAN,EAAA,OAAAD,OAAAC,EAAA,OAAAC,MAAA;EAErEK,KAAA,oBAAA,UAAA,KAAA;GAAA,GAAmBL;GAAWF;EAAG,CAAA;EAAIC,EAAA,KAAAD;EAAAC,EAAA,KAAAC;EAAAD,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAE,MAAAF,EAAA,OAAAM,IAAA;EAHvCC,KAAA,oBAAC,OAAD;GACa,WAAAL;GAEXI,UAAAA;EAHI,CAAA;EAIEN,EAAA,KAAAE;EAAAF,EAAA,KAAAM;EAAAN,EAAA,MAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAJRO;AAIQ,CAEX;AAEDd,0BAA0Be,cAAc"}
|
|
@@ -3,7 +3,7 @@ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
|
3
3
|
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
import { cloneElement, forwardRef, isValidElement, useState } from "@assistant-ui/tap/react-shim";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { composeEventHandlers } from "
|
|
6
|
+
import { composeEventHandlers } from "radix-ui/internal";
|
|
7
7
|
import { Slot } from "radix-ui";
|
|
8
8
|
//#region src/primitives/composer/ComposerAttachmentDropzone.tsx
|
|
9
9
|
const ComposerPrimitiveAttachmentDropzone = forwardRef((t0, ref) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerAttachmentDropzone.js","names":["c","_c","forwardRef","useCallback","useState","ReactElement","cloneElement","isValidElement","composeEventHandlers","Slot","React","useAui","ComposerPrimitiveAttachmentDropzone","Element","HTMLDivElement","Props","HTMLAttributes","asChild","render","disabled","t0","ref","$","t1","children","rest","undefined","isDragging","setIsDragging","aui","t2","e","dataTransfer","types","includes","preventDefault","thread","getState","capabilities","attachments","dropEffect","handleDragEnterCapture","t3","e_0","handleDragOverCapture","t4","e_1","next","relatedTarget","Node","currentTarget","contains","handleDragLeaveCapture","t5","e_2","files","Array","from","length","Promise","all","map","file","composer","addAttachment","handleDrop","t6","t7","onDragEnterCapture","t8","onDragOverCapture","t9","onDragLeaveCapture","t10","onDropCapture","t11","mergedProps","renderChildren","props","Record","t12","ReactNode","t13","t14","Comp","Root","displayName"],"sources":["../../../src/primitives/composer/ComposerAttachmentDropzone.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n forwardRef,\n useCallback,\n useState,\n type ReactElement,\n cloneElement,\n isValidElement,\n} from \"react\";\n\nimport { composeEventHandlers } from \"
|
|
1
|
+
{"version":3,"file":"ComposerAttachmentDropzone.js","names":["c","_c","forwardRef","useCallback","useState","ReactElement","cloneElement","isValidElement","composeEventHandlers","Slot","React","useAui","ComposerPrimitiveAttachmentDropzone","Element","HTMLDivElement","Props","HTMLAttributes","asChild","render","disabled","t0","ref","$","t1","children","rest","undefined","isDragging","setIsDragging","aui","t2","e","dataTransfer","types","includes","preventDefault","thread","getState","capabilities","attachments","dropEffect","handleDragEnterCapture","t3","e_0","handleDragOverCapture","t4","e_1","next","relatedTarget","Node","currentTarget","contains","handleDragLeaveCapture","t5","e_2","files","Array","from","length","Promise","all","map","file","composer","addAttachment","handleDrop","t6","t7","onDragEnterCapture","t8","onDragOverCapture","t9","onDragLeaveCapture","t10","onDropCapture","t11","mergedProps","renderChildren","props","Record","t12","ReactNode","t13","t14","Comp","Root","displayName"],"sources":["../../../src/primitives/composer/ComposerAttachmentDropzone.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n forwardRef,\n useCallback,\n useState,\n type ReactElement,\n cloneElement,\n isValidElement,\n} from \"react\";\n\nimport { composeEventHandlers } from \"radix-ui/internal\";\nimport { Slot } from \"radix-ui\";\nimport type React from \"react\";\nimport { useAui } from \"@assistant-ui/store\";\n\nexport namespace ComposerPrimitiveAttachmentDropzone {\n export type Element = HTMLDivElement;\n export type Props = React.HTMLAttributes<HTMLDivElement> & {\n asChild?: boolean | undefined;\n render?: ReactElement | undefined;\n disabled?: boolean | undefined;\n };\n}\n\nexport const ComposerPrimitiveAttachmentDropzone = forwardRef<\n HTMLDivElement,\n ComposerPrimitiveAttachmentDropzone.Props\n>(({ disabled, asChild = false, render, children, ...rest }, ref) => {\n const [isDragging, setIsDragging] = useState(false);\n const aui = useAui();\n\n // An unprevented file drop navigates the tab to the file, so file drags are\n // claimed via preventDefault even when the runtime does not support attachments.\n const handleDragEnterCapture = useCallback(\n (e: React.DragEvent) => {\n if (disabled) return;\n if (!e.dataTransfer.types.includes(\"Files\")) return;\n e.preventDefault();\n if (!aui.thread.getState().capabilities.attachments) {\n e.dataTransfer.dropEffect = \"none\";\n return;\n }\n setIsDragging(true);\n },\n [disabled, aui],\n );\n\n const handleDragOverCapture = useCallback(\n (e: React.DragEvent) => {\n if (disabled) return;\n if (!e.dataTransfer.types.includes(\"Files\")) return;\n e.preventDefault();\n if (!aui.thread.getState().capabilities.attachments) {\n e.dataTransfer.dropEffect = \"none\";\n return;\n }\n if (!isDragging) setIsDragging(true);\n },\n [disabled, isDragging, aui],\n );\n\n const handleDragLeaveCapture = useCallback(\n (e: React.DragEvent) => {\n if (disabled) return;\n e.preventDefault();\n const next = e.relatedTarget as Node | null;\n if (next && e.currentTarget.contains(next)) {\n return;\n }\n setIsDragging(false);\n },\n [disabled],\n );\n\n const handleDrop = useCallback(\n async (e: React.DragEvent) => {\n if (disabled) return;\n setIsDragging(false);\n if (!e.dataTransfer.types.includes(\"Files\")) return;\n e.preventDefault();\n const files = Array.from(e.dataTransfer.files);\n if (!aui.thread.getState().capabilities.attachments || files.length === 0)\n return;\n await Promise.all(\n files.map(async (file) => {\n try {\n await aui.composer.addAttachment(file);\n } catch {\n // The composer runtime emits composer.attachmentAddError before rejecting;\n // the readonly and empty-thread stubs only throw.\n }\n }),\n );\n },\n [disabled, aui],\n );\n\n const mergedProps = {\n ...(isDragging ? { \"data-dragging\": \"true\" } : null),\n ...rest,\n onDragEnterCapture: composeEventHandlers(\n rest.onDragEnterCapture,\n handleDragEnterCapture,\n ),\n onDragOverCapture: composeEventHandlers(\n rest.onDragOverCapture,\n handleDragOverCapture,\n ),\n onDragLeaveCapture: composeEventHandlers(\n rest.onDragLeaveCapture,\n handleDragLeaveCapture,\n ),\n onDropCapture: composeEventHandlers(rest.onDropCapture, handleDrop),\n ref,\n };\n\n if (render && isValidElement(render)) {\n const renderChildren =\n children !== undefined\n ? children\n : (render.props as Record<string, unknown>).children;\n return (\n <Slot.Root {...mergedProps}>\n {cloneElement(render, undefined, renderChildren as React.ReactNode)}\n </Slot.Root>\n );\n }\n\n const Comp = asChild ? Slot.Root : \"div\";\n return <Comp {...mergedProps}>{children}</Comp>;\n});\n\nComposerPrimitiveAttachmentDropzone.displayName =\n \"ComposerPrimitive.AttachmentDropzone\";\n"],"mappings":";;;;;;;;AAyBA,MAAaY,sCAAsCV,YAGjDkB,IAAAC,QAAA;CAAA,MAAAC,IAAArB,EAAA,EAAA;CAAC,MAAA,EAAAkB,UAAAF,SAAAM,IAAAL,QAAAM,UAAA,GAAAC,SAAAL;CAAY,MAAAH,UAAAM,OAAAG,KAAAA,IAAA,QAAAH;CACb,MAAA,CAAAI,YAAAC,iBAAoCxB,SAAS,KAAK;CAClD,MAAAyB,MAAYlB,OAAO;CAAE,IAAAmB;CAAA,IAAAR,EAAA,OAAAO,OAAAP,EAAA,OAAAH,UAAA;EAKnBW,MAAAC,MAAA;GACE,IAAIZ,UAAQ;GACZ,IAAI,CAACY,EAACC,aAAaC,MAAMC,SAAU,OAAO,GAAC;GAC3CH,EAACI,eAAgB;GACjB,IAAI,CAACN,IAAGO,OAAOC,SAAU,CAAC,CAAAC,aAAaC,aAAY;IACjDR,EAACC,aAAaQ,aAAc;IAAH;GAAA;GAG3BZ,cAAc,IAAI;EAAC;EACpBN,EAAA,KAAAO;EAAAP,EAAA,KAAAH;EAAAG,EAAA,KAAAQ;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aAAaE,KAAAA,IAAbF,WAEKN,OAAM4D,MAAiCtD;EAGwB,IAAA0D;EAAA,IAAA5D,EAAA,QAAAJ,UAAAI,EAAA,QAAA0D,KAAA;GAAjEE,MAAA5E,aAAaY,QAAQQ,KAAAA,GAAWsD,GAAiC;GAAC1D,EAAA,MAAAJ;GAAAI,EAAA,MAAA0D;GAAA1D,EAAA,MAAA4D;EAAA,OAAAA,MAAA5D,EAAA;EAAA,IAAA6D;EAAA,IAAA7D,EAAA,QAAAsD,eAAAtD,EAAA,QAAA4D,KAAA;GADrEC,MAAA,oBAAA,KAAA,MAAA;IAAA,GAAeP;IACZM,UAAAA;GACH,CAAA;GAAY5D,EAAA,MAAAsD;GAAAtD,EAAA,MAAA4D;GAAA5D,EAAA,MAAA6D;EAAA,OAAAA,MAAA7D,EAAA;EAAA,OAFZ6D;CAEY;CAIhB,MAAAC,OAAanE,UAAUR,KAAI4E,OAAd;CAA4B,IAAAL;CAAA,IAAA1D,EAAA,QAAA8D,QAAA9D,EAAA,QAAAE,YAAAF,EAAA,QAAAsD,aAAA;EAClCI,MAAA,oBAAC,MAAD;GAAK,GAAKJ;GAAcpD;EAAnB,CAAA;EAAmCF,EAAA,MAAA8D;EAAA9D,EAAA,MAAAE;EAAAF,EAAA,MAAAsD;EAAAtD,EAAA,MAAA0D;CAAA,OAAAA,MAAA1D,EAAA;CAAA,OAAxC0D;AAAwC,CAChD;AAEDpE,oCAAoC0E,cAClC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerDictationTranscript.js","names":["c","_c","Primitive","ComponentRef","forwardRef","ComponentPropsWithoutRef","useAuiState","ComposerPrimitiveDictationTranscript","Element","span","Props","t0","$","children","props","transcript","_temp","t1","t2","displayName","s","composer","dictation"],"sources":["../../../src/primitives/composer/ComposerDictationTranscript.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n forwardRef,\n type ComponentPropsWithoutRef,\n} from \"react\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace ComposerPrimitiveDictationTranscript {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\n/**\n * Renders the current interim (partial) transcript while dictation is active.\n *\n * This component displays real-time feedback of what the user is saying before\n * the transcription is finalized and committed to the composer input.\n *\n * @example\n * ```tsx\n * <AuiIf condition={(s) => s.composer.dictation != null}>\n * <div className=\"dictation-preview\">\n * <ComposerPrimitive.DictationTranscript />\n * </div>\n * </AuiIf>\n * ```\n */\nexport const ComposerPrimitiveDictationTranscript = forwardRef<\n ComposerPrimitiveDictationTranscript.Element,\n ComposerPrimitiveDictationTranscript.Props\n>(({ children, ...props }, forwardRef) => {\n const transcript = useAuiState((s) => s.composer.dictation?.transcript);\n\n if (!transcript) return null;\n\n return (\n <Primitive.span {...props} ref={forwardRef}>\n {children ?? transcript}\n </Primitive.span>\n );\n});\n\nComposerPrimitiveDictationTranscript.displayName =\n \"ComposerPrimitive.DictationTranscript\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAaO,uCAAuCH,YAGlDO,IAAAP,eAAA;CAAA,MAAAQ,IAAAX,EAAA,CAAA;CAAA,IAAAY;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAE,
|
|
1
|
+
{"version":3,"file":"ComposerDictationTranscript.js","names":["c","_c","Primitive","ComponentRef","forwardRef","ComponentPropsWithoutRef","useAuiState","ComposerPrimitiveDictationTranscript","Element","span","Props","t0","$","children","props","transcript","_temp","t1","t2","displayName","s","composer","dictation"],"sources":["../../../src/primitives/composer/ComposerDictationTranscript.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n forwardRef,\n type ComponentPropsWithoutRef,\n} from \"react\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace ComposerPrimitiveDictationTranscript {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\n/**\n * Renders the current interim (partial) transcript while dictation is active.\n *\n * This component displays real-time feedback of what the user is saying before\n * the transcription is finalized and committed to the composer input.\n *\n * @example\n * ```tsx\n * <AuiIf condition={(s) => s.composer.dictation != null}>\n * <div className=\"dictation-preview\">\n * <ComposerPrimitive.DictationTranscript />\n * </div>\n * </AuiIf>\n * ```\n */\nexport const ComposerPrimitiveDictationTranscript = forwardRef<\n ComposerPrimitiveDictationTranscript.Element,\n ComposerPrimitiveDictationTranscript.Props\n>(({ children, ...props }, forwardRef) => {\n const transcript = useAuiState((s) => s.composer.dictation?.transcript);\n\n if (!transcript) return null;\n\n return (\n <Primitive.span {...props} ref={forwardRef}>\n {children ?? transcript}\n </Primitive.span>\n );\n});\n\nComposerPrimitiveDictationTranscript.displayName =\n \"ComposerPrimitive.DictationTranscript\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAaO,uCAAuCH,YAGlDO,IAAAP,eAAA;CAAA,MAAAQ,IAAAX,EAAA,CAAA;CAAA,IAAAY;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAE,UAAA,GAAAC,SAAAH;EAAsBC,EAAA,KAAAD;EAAAC,EAAA,KAAAC;EAAAD,EAAA,KAAAE;CAAA,OAAA;EAAAD,WAAAD,EAAA;EAAAE,QAAAF,EAAA;CAAA;CACvB,MAAAG,aAAmBT,YAAYU,KAAuC;CAEtE,IAAI,CAACD,YAAU,OAAS;CAInB,MAAAE,KAAAJ,YAAAE;CAAsB,IAAAG;CAAA,IAAAN,EAAA,OAAAR,cAAAQ,EAAA,OAAAE,SAAAF,EAAA,OAAAK,IAAA;EADzBC,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBJ;GAAYV,KAAAA;GAC7Ba,UAAAA;EACH,CAAA;EAAiBL,EAAA,KAAAR;EAAAQ,EAAA,KAAAE;EAAAF,EAAA,KAAAK;EAAAL,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDX,qCAAqCY,cACnC;AAbA,SAAAH,MAAAI,GAAA;CAAA,OACsCA,EAACC,SAASC,WAAsBP;AAAA"}
|
|
@@ -7,11 +7,9 @@ import { useComposerInputDisabled, useComposerInputValue, useTriggerPopoverAriaP
|
|
|
7
7
|
import { useAui } from "@assistant-ui/store";
|
|
8
8
|
import { cloneElement, forwardRef, isValidElement, useCallback, useEffect, useRef } from "@assistant-ui/tap/react-shim";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
import { useComposedRefs } from "
|
|
11
|
-
import { composeEventHandlers } from "@radix-ui/primitive";
|
|
10
|
+
import { composeEventHandlers, useComposedRefs, useEscapeKeydown } from "radix-ui/internal";
|
|
12
11
|
import { Slot } from "radix-ui";
|
|
13
12
|
import TextareaAutosize from "react-textarea-autosize";
|
|
14
|
-
import { useEscapeKeydown } from "@radix-ui/react-use-escape-keydown";
|
|
15
13
|
import { flushTapSync } from "@assistant-ui/tap";
|
|
16
14
|
//#region src/primitives/composer/ComposerInput.tsx
|
|
17
15
|
const TOUCH_PRIMARY_QUERY = "(pointer: coarse) and (not (any-pointer: fine))";
|