@assistant-ui/react 0.15.31 → 0.15.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/adapters/OpenAIRealtimeVoiceAdapter.js +1 -2
- package/dist/assistant-transport.js +1 -2
- package/dist/cloud-renderer/CloudRendererHost.js +1 -2
- package/dist/context/ReadonlyStore.js +1 -2
- package/dist/context/providers/MessageProvider.js +1 -2
- package/dist/context/providers/ThreadViewportProvider.js +1 -2
- package/dist/context/react/ThreadViewportContext.js +1 -2
- package/dist/context/react/utils/createContextHook.js +1 -2
- package/dist/context/react/utils/createContextStoreHook.js +1 -2
- package/dist/context/stores/ThreadViewport.js +1 -2
- package/dist/devtools/DevToolsHooks.js +1 -2
- package/dist/hooks/useMessageQuote.js +1 -2
- package/dist/hooks/useMessageTiming.js +1 -2
- package/dist/hooks/useToolCallElapsed.js +1 -2
- package/dist/internal.js +1 -2
- package/dist/legacy-runtime/AssistantRuntimeProvider.js +1 -2
- package/dist/mcp-apps/McpAppRenderer.d.ts.map +1 -1
- package/dist/mcp-apps/McpAppRenderer.js +3 -3
- package/dist/mcp-apps/McpAppRenderer.js.map +1 -1
- package/dist/mcp-apps/McpAppsRemoteHost.js +1 -2
- package/dist/mcp-apps/app-frame.js +1 -2
- package/dist/mcp-apps/bridge.js +1 -2
- package/dist/mcp-apps/csp.js +1 -2
- package/dist/mcp-apps/types.js +1 -2
- package/dist/mcp-apps/utils.js +1 -2
- package/dist/model-context/frame/useAssistantFrameHost.js +1 -2
- package/dist/model-context/makeAssistantVisible.js +1 -2
- package/dist/primitives/actionBar/ActionBarCopy.js +1 -2
- package/dist/primitives/actionBar/ActionBarEdit.js +1 -2
- package/dist/primitives/actionBar/ActionBarExportMarkdown.js +1 -2
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.js +1 -2
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.js +1 -2
- package/dist/primitives/actionBar/ActionBarInteractionContext.js +1 -2
- package/dist/primitives/actionBar/ActionBarReload.js +1 -2
- package/dist/primitives/actionBar/ActionBarRoot.js +1 -2
- package/dist/primitives/actionBar/ActionBarSpeak.js +1 -2
- package/dist/primitives/actionBar/ActionBarStopSpeaking.js +1 -2
- package/dist/primitives/actionBar/useActionBarFloatStatus.js +1 -2
- package/dist/primitives/actionBar.js +1 -2
- package/dist/primitives/actionBarMore/ActionBarMoreContent.js +1 -2
- package/dist/primitives/actionBarMore/ActionBarMoreItem.js +1 -2
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.js +1 -2
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.js +1 -2
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.js +1 -2
- package/dist/primitives/actionBarMore/scope.js +1 -2
- package/dist/primitives/actionBarMore.js +1 -2
- package/dist/primitives/assistantModal/AssistantModalAnchor.js +1 -2
- package/dist/primitives/assistantModal/AssistantModalContent.js +1 -2
- package/dist/primitives/assistantModal/AssistantModalRoot.js +1 -2
- package/dist/primitives/assistantModal/AssistantModalTrigger.js +1 -2
- package/dist/primitives/assistantModal/popoverRenderPrimitives.js +1 -2
- package/dist/primitives/assistantModal/scope.js +1 -2
- package/dist/primitives/assistantModal.js +1 -2
- package/dist/primitives/attachment/AttachmentName.js +1 -2
- package/dist/primitives/attachment/AttachmentRemove.js +1 -2
- package/dist/primitives/attachment/AttachmentRoot.js +1 -2
- package/dist/primitives/attachment/AttachmentThumb.js +1 -2
- package/dist/primitives/attachment.js +1 -2
- package/dist/primitives/branchPicker/BranchPickerCount.js +1 -2
- package/dist/primitives/branchPicker/BranchPickerNext.js +1 -2
- package/dist/primitives/branchPicker/BranchPickerNumber.js +1 -2
- package/dist/primitives/branchPicker/BranchPickerPrevious.js +1 -2
- package/dist/primitives/branchPicker/BranchPickerRoot.js +1 -2
- package/dist/primitives/branchPicker.js +1 -2
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts +5 -4
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.js +57 -20
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.js.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtRoot.js +1 -2
- package/dist/primitives/chainOfThought.js +1 -2
- package/dist/primitives/composer/ComposerAddAttachment.js +1 -2
- package/dist/primitives/composer/ComposerAttachmentDropzone.js +1 -2
- package/dist/primitives/composer/ComposerCancel.js +1 -2
- package/dist/primitives/composer/ComposerCompactContext.js +1 -2
- package/dist/primitives/composer/ComposerDictate.js +1 -2
- package/dist/primitives/composer/ComposerDictationTranscript.js +1 -2
- package/dist/primitives/composer/ComposerInput.js +1 -2
- package/dist/primitives/composer/ComposerInputPluginContext.js +1 -2
- package/dist/primitives/composer/ComposerQuote.js +1 -2
- package/dist/primitives/composer/ComposerResume.js +1 -2
- package/dist/primitives/composer/ComposerRoot.js +1 -2
- package/dist/primitives/composer/ComposerSend.js +1 -2
- package/dist/primitives/composer/ComposerStopDictation.js +1 -2
- package/dist/primitives/composer/composerInputSelector.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopover.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverAction.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverBack.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverCategories.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverDirective.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverItems.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverResource.js +1 -2
- package/dist/primitives/composer/trigger/TriggerPopoverRootContext.js +1 -2
- package/dist/primitives/composer/trigger/detectTrigger.js +1 -2
- package/dist/primitives/composer/trigger/index.js +1 -2
- package/dist/primitives/composer/trigger/matchesTriggerItemQuery.js +1 -2
- package/dist/primitives/composer/trigger/triggerDetectionResource.js +1 -2
- package/dist/primitives/composer/trigger/triggerKeyboardResource.js +1 -2
- package/dist/primitives/composer/trigger/triggerNavigationResource.js +1 -2
- package/dist/primitives/composer/trigger/triggerSelectionResource.js +1 -2
- package/dist/primitives/composer/useComposerCancelWithFocus.js +1 -2
- package/dist/primitives/composer/useComposerInputState.js +1 -2
- package/dist/primitives/composer.js +1 -2
- package/dist/primitives/dropdownMenuRenderPrimitives.js +1 -2
- package/dist/primitives/error/ErrorMessage.js +1 -2
- package/dist/primitives/error/ErrorRoot.js +1 -2
- package/dist/primitives/error.js +1 -2
- package/dist/primitives/message/MessageError.js +1 -2
- package/dist/primitives/message/MessageIf.js +1 -2
- package/dist/primitives/message/MessageParts.js +1 -2
- package/dist/primitives/message/MessagePartsGrouped.js +1 -2
- package/dist/primitives/message/MessageRoot.js +1 -2
- package/dist/primitives/message.js +1 -2
- package/dist/primitives/messagePart/MessagePartImage.js +1 -2
- package/dist/primitives/messagePart/MessagePartText.js +1 -2
- package/dist/primitives/messagePart/useMessagePartData.js +1 -2
- package/dist/primitives/messagePart/useMessagePartFile.js +1 -2
- package/dist/primitives/messagePart/useMessagePartImage.js +1 -2
- package/dist/primitives/messagePart/useMessagePartReasoning.js +1 -2
- package/dist/primitives/messagePart/useMessagePartSource.js +1 -2
- package/dist/primitives/messagePart/useMessagePartText.js +1 -2
- package/dist/primitives/messagePart.js +1 -2
- package/dist/primitives/queueItem/QueueItemRemove.js +1 -2
- package/dist/primitives/queueItem/QueueItemSteer.js +1 -2
- package/dist/primitives/queueItem/QueueItemText.js +1 -2
- package/dist/primitives/queueItem.js +1 -2
- package/dist/primitives/reasoning/useScrollLock.d.ts.map +1 -1
- package/dist/primitives/reasoning/useScrollLock.js +41 -25
- package/dist/primitives/reasoning/useScrollLock.js.map +1 -1
- package/dist/primitives/selectionToolbar/SelectionToolbarQuote.js +1 -2
- package/dist/primitives/selectionToolbar/SelectionToolbarRoot.js +1 -2
- package/dist/primitives/selectionToolbar.js +1 -2
- package/dist/primitives/suggestion/SuggestionDescription.js +1 -2
- package/dist/primitives/suggestion/SuggestionTitle.js +1 -2
- package/dist/primitives/suggestion/SuggestionTrigger.js +1 -2
- package/dist/primitives/suggestion.js +1 -2
- package/dist/primitives/thread/ThreadEmpty.js +1 -2
- package/dist/primitives/thread/ThreadIf.js +1 -2
- package/dist/primitives/thread/ThreadLoadEarlier.js +1 -2
- package/dist/primitives/thread/ThreadRoot.js +1 -2
- package/dist/primitives/thread/ThreadRootElementContext.js +1 -2
- package/dist/primitives/thread/ThreadScrollToBottom.js +1 -2
- package/dist/primitives/thread/ThreadSuggestion.js +1 -2
- package/dist/primitives/thread/ThreadViewport.js +1 -2
- package/dist/primitives/thread/ThreadViewportFooter.js +1 -2
- package/dist/primitives/thread/topAnchor/computeTopAnchorSlack.js +1 -2
- package/dist/primitives/thread/topAnchor/createReserveObservers.js +1 -2
- package/dist/primitives/thread/topAnchor/mountTopAnchorReserve.js +1 -2
- package/dist/primitives/thread/topAnchor/topAnchorTurn.js +1 -2
- package/dist/primitives/thread/topAnchor/topAnchorUtils.js +1 -2
- package/dist/primitives/thread/topAnchor/useTopAnchorReserve.js +1 -2
- package/dist/primitives/thread/useThreadViewportAutoScroll.js +1 -2
- package/dist/primitives/thread.js +1 -2
- package/dist/primitives/threadList/ThreadListLoadMore.js +1 -2
- package/dist/primitives/threadList/ThreadListNew.js +1 -2
- package/dist/primitives/threadList/ThreadListRoot.js +1 -2
- package/dist/primitives/threadList.js +1 -2
- package/dist/primitives/threadListFocusGroup.js +1 -2
- package/dist/primitives/threadListItem/ThreadListItemArchive.js +1 -2
- package/dist/primitives/threadListItem/ThreadListItemDelete.js +1 -2
- package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemRoot.js +2 -3
- package/dist/primitives/threadListItem/ThreadListItemRoot.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js +1 -2
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.js +1 -2
- package/dist/primitives/threadListItem.js +1 -2
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.js +1 -2
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.js +1 -2
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.js +1 -2
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.js +1 -2
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.js +1 -2
- package/dist/primitives/threadListItemMore/scope.js +1 -2
- package/dist/primitives/threadListItemMore.js +1 -2
- package/dist/sandbox-host/SandboxHost.js +1 -2
- package/dist/unstable/useComposerInput.js +1 -2
- package/dist/unstable/useComposerInputHistory.js +1 -2
- package/dist/unstable/useLiveCompletionAdapter.js +1 -2
- package/dist/unstable/useMentionAdapter.js +1 -2
- package/dist/unstable/useMessageStallDetection.js +1 -2
- package/dist/unstable/useModelContextSnapshot.js +1 -2
- package/dist/unstable/useSlashCommandAdapter.js +1 -2
- package/dist/unstable/webmcp/WebMcpRegistrationResource.js +1 -2
- package/dist/unstable/webmcp/convertTools.js +1 -2
- package/dist/unstable/webmcp/useWebMcpProvider.js +1 -2
- package/dist/unstable/webmcp/webmcp-host.js +1 -2
- package/dist/utils/Primitive.js +1 -2
- package/dist/utils/createActionButton.js +1 -2
- package/dist/utils/getSelectionMessageId.js +1 -2
- package/dist/utils/hooks/useManagedRef.js +1 -2
- package/dist/utils/hooks/useMediaQuery.js +1 -2
- package/dist/utils/hooks/useOnScrollToBottom.js +1 -2
- package/dist/utils/hooks/useSizeHandle.js +1 -2
- package/dist/utils/isCompositionKey.js +1 -2
- package/dist/utils/smooth/SmoothContext.js +1 -2
- package/dist/utils/smooth/useSmooth.d.ts.map +1 -1
- package/dist/utils/smooth/useSmooth.js +11 -4
- package/dist/utils/smooth/useSmooth.js.map +1 -1
- package/dist/utils/useIsomorphicLayoutEffect.js +0 -1
- package/package.json +6 -6
- package/src/mcp-apps/McpAppRenderer.composer.test.tsx +111 -0
- package/src/mcp-apps/McpAppRenderer.test.tsx +24 -23
- package/src/mcp-apps/McpAppRenderer.tsx +9 -1
- package/src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.test.tsx +91 -0
- package/src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.tsx +54 -0
- package/src/primitives/reasoning/useScrollLock.test.tsx +71 -2
- package/src/primitives/reasoning/useScrollLock.ts +78 -51
- package/src/primitives/threadListItem/ThreadListItemRoot.tsx +4 -1
- package/src/primitives/threadListItem/ThreadListKeyboardNav.test.tsx +25 -0
- package/src/utils/smooth/useSmooth.test.tsx +113 -4
- package/src/utils/smooth/useSmooth.ts +16 -2
- package/src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.ts +0 -49
|
@@ -1,29 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { Primitive as Primitive$1 } from "../../utils/Primitive.js";
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
|
-
import "@assistant-ui/tap/react-shim";
|
|
4
|
+
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
5
5
|
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const aui = useAui();
|
|
10
|
-
const collapsed = useAuiState(_temp);
|
|
11
|
-
let t0;
|
|
12
|
-
if ($[0] !== aui.chainOfThought || $[1] !== collapsed) {
|
|
13
|
-
t0 = () => {
|
|
14
|
-
aui.chainOfThought.setCollapsed(!collapsed);
|
|
15
|
-
};
|
|
16
|
-
$[0] = aui.chainOfThought;
|
|
17
|
-
$[1] = collapsed;
|
|
18
|
-
$[2] = t0;
|
|
19
|
-
} else t0 = $[2];
|
|
20
|
-
return t0;
|
|
21
|
-
};
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { composeEventHandlers } from "radix-ui/internal";
|
|
8
|
+
// src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.tsx
|
|
22
9
|
/**
|
|
23
10
|
* A button component that toggles the collapsed state of the chain of thought accordion.
|
|
24
11
|
*
|
|
25
12
|
* This component automatically handles the toggle functionality, expanding or collapsing
|
|
26
13
|
* the chain of thought parts when clicked.
|
|
14
|
+
* Exposes the current disclosure state through `aria-expanded`.
|
|
27
15
|
*
|
|
28
16
|
* @example
|
|
29
17
|
* ```tsx
|
|
@@ -32,11 +20,60 @@ const useChainOfThoughtAccordionTrigger = () => {
|
|
|
32
20
|
* </ChainOfThoughtPrimitive.AccordionTrigger>
|
|
33
21
|
* ```
|
|
34
22
|
*/
|
|
35
|
-
const ChainOfThoughtPrimitiveAccordionTrigger =
|
|
23
|
+
const ChainOfThoughtPrimitiveAccordionTrigger = forwardRef((t0, ref) => {
|
|
24
|
+
const $ = c(14);
|
|
25
|
+
let onClick;
|
|
26
|
+
let props;
|
|
27
|
+
if ($[0] !== t0) {
|
|
28
|
+
({onClick, ...props} = t0);
|
|
29
|
+
$[0] = t0;
|
|
30
|
+
$[1] = onClick;
|
|
31
|
+
$[2] = props;
|
|
32
|
+
} else {
|
|
33
|
+
onClick = $[1];
|
|
34
|
+
props = $[2];
|
|
35
|
+
}
|
|
36
|
+
const aui = useAui();
|
|
37
|
+
const collapsed = useAuiState(_temp);
|
|
38
|
+
let t1;
|
|
39
|
+
if ($[3] !== aui || $[4] !== collapsed) {
|
|
40
|
+
t1 = () => {
|
|
41
|
+
aui.chainOfThought.setCollapsed(!collapsed);
|
|
42
|
+
};
|
|
43
|
+
$[3] = aui;
|
|
44
|
+
$[4] = collapsed;
|
|
45
|
+
$[5] = t1;
|
|
46
|
+
} else t1 = $[5];
|
|
47
|
+
const toggle = t1;
|
|
48
|
+
const t2 = !collapsed;
|
|
49
|
+
let t3;
|
|
50
|
+
if ($[6] !== onClick || $[7] !== toggle) {
|
|
51
|
+
t3 = composeEventHandlers(onClick, toggle);
|
|
52
|
+
$[6] = onClick;
|
|
53
|
+
$[7] = toggle;
|
|
54
|
+
$[8] = t3;
|
|
55
|
+
} else t3 = $[8];
|
|
56
|
+
let t4;
|
|
57
|
+
if ($[9] !== props || $[10] !== ref || $[11] !== t2 || $[12] !== t3) {
|
|
58
|
+
t4 = /* @__PURE__ */ jsx(Primitive$1.button, {
|
|
59
|
+
type: "button",
|
|
60
|
+
...props,
|
|
61
|
+
ref,
|
|
62
|
+
"aria-expanded": t2,
|
|
63
|
+
onClick: t3
|
|
64
|
+
});
|
|
65
|
+
$[9] = props;
|
|
66
|
+
$[10] = ref;
|
|
67
|
+
$[11] = t2;
|
|
68
|
+
$[12] = t3;
|
|
69
|
+
$[13] = t4;
|
|
70
|
+
} else t4 = $[13];
|
|
71
|
+
return t4;
|
|
72
|
+
});
|
|
73
|
+
ChainOfThoughtPrimitiveAccordionTrigger.displayName = "ChainOfThoughtPrimitive.AccordionTrigger";
|
|
36
74
|
function _temp(s) {
|
|
37
75
|
return s.chainOfThought.collapsed;
|
|
38
76
|
}
|
|
39
|
-
//#endregion
|
|
40
77
|
export { ChainOfThoughtPrimitiveAccordionTrigger };
|
|
41
78
|
|
|
42
79
|
//# sourceMappingURL=ChainOfThoughtAccordionTrigger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainOfThoughtAccordionTrigger.js","names":["c","_c","ActionButtonElement","
|
|
1
|
+
{"version":3,"file":"ChainOfThoughtAccordionTrigger.js","names":["c","_c","ActionButtonElement","ComponentPropsWithoutRef","forwardRef","useCallback","useAuiState","useAui","composeEventHandlers","Primitive","ChainOfThoughtPrimitiveAccordionTrigger","Element","Props","button","t0","ref","$","onClick","props","aui","collapsed","_temp","t1","chainOfThought","setCollapsed","toggle","t2","t3","t4","displayName","s","_c","Primitive"],"sources":["../../../src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ActionButtonElement } from \"../../utils/createActionButton\";\nimport { type ComponentPropsWithoutRef, forwardRef, useCallback } from \"react\";\nimport { useAuiState, useAui } from \"@assistant-ui/store\";\nimport { composeEventHandlers } from \"radix-ui/internal\";\nimport { Primitive } from \"../../utils/Primitive\";\n\nexport namespace ChainOfThoughtPrimitiveAccordionTrigger {\n export type Element = ActionButtonElement;\n /**\n * Props for the ChainOfThoughtPrimitive.AccordionTrigger component.\n * Inherits all button element props and action button functionality.\n */\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\n/**\n * A button component that toggles the collapsed state of the chain of thought accordion.\n *\n * This component automatically handles the toggle functionality, expanding or collapsing\n * the chain of thought parts when clicked.\n * Exposes the current disclosure state through `aria-expanded`.\n *\n * @example\n * ```tsx\n * <ChainOfThoughtPrimitive.AccordionTrigger>\n * Toggle Reasoning\n * </ChainOfThoughtPrimitive.AccordionTrigger>\n * ```\n */\nexport const ChainOfThoughtPrimitiveAccordionTrigger = forwardRef<\n ChainOfThoughtPrimitiveAccordionTrigger.Element,\n ChainOfThoughtPrimitiveAccordionTrigger.Props\n>(({ onClick, ...props }, ref) => {\n const aui = useAui();\n const collapsed = useAuiState((s) => s.chainOfThought.collapsed);\n const toggle = useCallback(() => {\n aui.chainOfThought.setCollapsed(!collapsed);\n }, [aui, collapsed]);\n\n return (\n <Primitive.button\n type=\"button\"\n {...props}\n ref={ref}\n aria-expanded={!collapsed}\n onClick={composeEventHandlers(onClick, toggle)}\n />\n );\n});\n\nChainOfThoughtPrimitiveAccordionTrigger.displayName =\n \"ChainOfThoughtPrimitive.AccordionTrigger\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAaU,0CAA0CN,YAGrDU,IAAAC,QAAA;CAAA,MAAAC,IAAAf,EAAA,EAAA;CAAA,IAAAgB;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAG,SAAA,GAAAC,SAAAJ;EAAqBE,EAAA,KAAAF;EAAAE,EAAA,KAAAC;EAAAD,EAAA,KAAAE;CAAA,OAAA;EAAAD,UAAAD,EAAA;EAAAE,QAAAF,EAAA;CAAA;CACtB,MAAAG,MAAYZ,OAAO;CACnB,MAAAa,YAAkBd,YAAYe,KAAiC;CAAE,IAAAC;CAAA,IAAAN,EAAA,OAAAG,OAAAH,EAAA,OAAAI,WAAA;EACtCE,WAAA;GACzBH,IAAGI,eAAeC,aAAc,CAACJ,SAAS;EAAC;EAC5CJ,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAFD,MAAAS,SAAeH;CASI,MAAAI,KAAA,CAACN;CAAS,IAAAO;CAAA,IAAAX,EAAA,OAAAC,WAAAD,EAAA,OAAAS,QAAA;EAChBE,KAAAnB,qBAAqBS,SAASQ,MAAM;EAACT,EAAA,KAAAC;EAAAD,EAAA,KAAAS;EAAAT,EAAA,KAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,OAAAE,SAAAF,EAAA,QAAAD,OAAAC,EAAA,QAAAU,MAAAV,EAAA,QAAAW,IAAA;EALhDC,KAAA,oBAAAI,YAAA,QAAA;GACO,MAAA;GAAQ,GACTd;GACCH;GACU,iBAAAW;GACN,SAAAC;EAAqC,CAAA;EAC9CX,EAAA,KAAAE;EAAAF,EAAA,MAAAD;EAAAC,EAAA,MAAAU;EAAAV,EAAA,MAAAW;EAAAX,EAAA,MAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OANFY;AAME,CAEL;AAEDlB,wCAAwCmB,cACtC;AAnBA,SAAAR,MAAAS,GAAA;CAAA,OAEqCA,EAACP,eAAeH;AAAU"}
|
|
@@ -3,7 +3,7 @@ import { Primitive } from "../../utils/Primitive.js";
|
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/primitives/chainOfThought/ChainOfThoughtRoot.tsx
|
|
7
7
|
/**
|
|
8
8
|
* The root container for chain of thought components.
|
|
9
9
|
*
|
|
@@ -35,7 +35,6 @@ const ChainOfThoughtPrimitiveRoot = forwardRef((props, ref) => {
|
|
|
35
35
|
return t0;
|
|
36
36
|
});
|
|
37
37
|
ChainOfThoughtPrimitiveRoot.displayName = "ChainOfThoughtPrimitive.Root";
|
|
38
|
-
//#endregion
|
|
39
38
|
export { ChainOfThoughtPrimitiveRoot };
|
|
40
39
|
|
|
41
40
|
//# sourceMappingURL=ChainOfThoughtRoot.js.map
|
|
@@ -2,13 +2,12 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { ChainOfThoughtPrimitiveRoot } from "./chainOfThought/ChainOfThoughtRoot.js";
|
|
3
3
|
import { ChainOfThoughtPrimitiveAccordionTrigger } from "./chainOfThought/ChainOfThoughtAccordionTrigger.js";
|
|
4
4
|
import { ChainOfThoughtPrimitiveParts } from "./chainOfThought/ChainOfThoughtParts.js";
|
|
5
|
-
|
|
5
|
+
// src/primitives/chainOfThought.ts
|
|
6
6
|
var chainOfThought_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
AccordionTrigger: () => ChainOfThoughtPrimitiveAccordionTrigger,
|
|
8
8
|
Parts: () => ChainOfThoughtPrimitiveParts,
|
|
9
9
|
Root: () => ChainOfThoughtPrimitiveRoot
|
|
10
10
|
});
|
|
11
|
-
//#endregion
|
|
12
11
|
export { ChainOfThoughtPrimitiveAccordionTrigger as AccordionTrigger, ChainOfThoughtPrimitiveParts as Parts, ChainOfThoughtPrimitiveRoot as Root, chainOfThought_exports };
|
|
13
12
|
|
|
14
13
|
//# sourceMappingURL=chainOfThought.js.map
|
|
@@ -4,7 +4,7 @@ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
|
4
4
|
import { useComposerAddAttachment } from "@assistant-ui/core/react";
|
|
5
5
|
import { useInsertionEffect, useRef } from "@assistant-ui/tap/react-shim";
|
|
6
6
|
import { useAui } from "@assistant-ui/store";
|
|
7
|
-
|
|
7
|
+
// src/primitives/composer/ComposerAddAttachment.ts
|
|
8
8
|
const useComposerAddAttachment$1 = (t0) => {
|
|
9
9
|
const $ = c(10);
|
|
10
10
|
let t1;
|
|
@@ -71,7 +71,6 @@ const useComposerAddAttachment$1 = (t0) => {
|
|
|
71
71
|
return callback;
|
|
72
72
|
};
|
|
73
73
|
const ComposerPrimitiveAddAttachment = createActionButton("ComposerPrimitive.AddAttachment", useComposerAddAttachment$1, ["multiple"]);
|
|
74
|
-
//#endregion
|
|
75
74
|
export { ComposerPrimitiveAddAttachment };
|
|
76
75
|
|
|
77
76
|
//# sourceMappingURL=ComposerAddAttachment.js.map
|
|
@@ -5,7 +5,7 @@ import { useAui, useAuiState } from "@assistant-ui/store";
|
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { composeEventHandlers } from "radix-ui/internal";
|
|
7
7
|
import { Slot } from "radix-ui";
|
|
8
|
-
|
|
8
|
+
// src/primitives/composer/ComposerAttachmentDropzone.tsx
|
|
9
9
|
const ComposerPrimitiveAttachmentDropzone = forwardRef(({ disabled, asChild = false, render, children, ...rest }, ref) => {
|
|
10
10
|
const [isDragging, setIsDragging] = useState(false);
|
|
11
11
|
const aui = useAui();
|
|
@@ -74,7 +74,6 @@ const ComposerPrimitiveAttachmentDropzone = forwardRef(({ disabled, asChild = fa
|
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
ComposerPrimitiveAttachmentDropzone.displayName = "ComposerPrimitive.AttachmentDropzone";
|
|
77
|
-
//#endregion
|
|
78
77
|
export { ComposerPrimitiveAttachmentDropzone };
|
|
79
78
|
|
|
80
79
|
//# sourceMappingURL=ComposerAttachmentDropzone.js.map
|
|
@@ -3,7 +3,7 @@ import { createActionButton } from "../../utils/createActionButton.js";
|
|
|
3
3
|
import { useComposerCancelWithFocus } from "./useComposerCancelWithFocus.js";
|
|
4
4
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
5
5
|
import { useComposerCancel } from "@assistant-ui/core/react";
|
|
6
|
-
|
|
6
|
+
// src/primitives/composer/ComposerCancel.ts
|
|
7
7
|
const useComposerCancel$1 = () => {
|
|
8
8
|
const $ = c(2);
|
|
9
9
|
const { disabled, cancel } = useComposerCancel();
|
|
@@ -34,7 +34,6 @@ const useComposerCancel$1 = () => {
|
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
36
|
const ComposerPrimitiveCancel = createActionButton("ComposerPrimitive.Cancel", useComposerCancel$1);
|
|
37
|
-
//#endregion
|
|
38
37
|
export { ComposerPrimitiveCancel };
|
|
39
38
|
|
|
40
39
|
//# sourceMappingURL=ComposerCancel.js.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createContext, useContext } from "@assistant-ui/tap/react-shim";
|
|
3
|
-
|
|
3
|
+
// src/primitives/composer/ComposerCompactContext.tsx
|
|
4
4
|
const ComposerCompactContext = createContext(null);
|
|
5
5
|
const useComposerCompactContextOptional = () => {
|
|
6
6
|
return useContext(ComposerCompactContext);
|
|
7
7
|
};
|
|
8
|
-
//#endregion
|
|
9
8
|
export { ComposerCompactContext, useComposerCompactContextOptional };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=ComposerCompactContext.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createActionButton } from "../../utils/createActionButton.js";
|
|
3
3
|
import { useComposerDictate } from "@assistant-ui/core/react";
|
|
4
|
-
|
|
4
|
+
// src/primitives/composer/ComposerDictate.ts
|
|
5
5
|
const useComposerDictate$1 = () => {
|
|
6
6
|
const { disabled, startDictation } = useComposerDictate();
|
|
7
7
|
if (disabled) return null;
|
|
@@ -20,7 +20,6 @@ const useComposerDictate$1 = () => {
|
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
22
|
const ComposerPrimitiveDictate = createActionButton("ComposerPrimitive.Dictate", useComposerDictate$1);
|
|
23
|
-
//#endregion
|
|
24
23
|
export { ComposerPrimitiveDictate };
|
|
25
24
|
|
|
26
25
|
//# sourceMappingURL=ComposerDictate.js.map
|
|
@@ -4,7 +4,7 @@ import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
|
4
4
|
import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
5
5
|
import { useAuiState } from "@assistant-ui/store";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/primitives/composer/ComposerDictationTranscript.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Renders the current interim (partial) transcript while dictation is active.
|
|
10
10
|
*
|
|
@@ -54,7 +54,6 @@ ComposerPrimitiveDictationTranscript.displayName = "ComposerPrimitive.DictationT
|
|
|
54
54
|
function _temp(s) {
|
|
55
55
|
return s.composer.dictation?.transcript;
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { ComposerPrimitiveDictationTranscript };
|
|
59
58
|
|
|
60
59
|
//# sourceMappingURL=ComposerDictationTranscript.js.map
|
|
@@ -15,7 +15,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
15
15
|
import { composeEventHandlers, useComposedRefs, useEscapeKeydown } from "radix-ui/internal";
|
|
16
16
|
import { Slot } from "radix-ui";
|
|
17
17
|
import TextareaAutosize from "react-textarea-autosize";
|
|
18
|
-
|
|
18
|
+
// src/primitives/composer/ComposerInput.tsx
|
|
19
19
|
const TOUCH_PRIMARY_QUERY = "(pointer: coarse) and (not (any-pointer: fine))";
|
|
20
20
|
/**
|
|
21
21
|
* A text input component for composing messages.
|
|
@@ -213,7 +213,6 @@ const ComposerPrimitiveInput = forwardRef(({ autoFocus = false, asChild, render,
|
|
|
213
213
|
return /* @__PURE__ */ jsx(Component, { ...inputProps });
|
|
214
214
|
});
|
|
215
215
|
ComposerPrimitiveInput.displayName = "ComposerPrimitive.Input";
|
|
216
|
-
//#endregion
|
|
217
216
|
export { ComposerPrimitiveInput };
|
|
218
217
|
|
|
219
218
|
//# sourceMappingURL=ComposerInput.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
3
|
import { createContext, useContext, useRef } from "@assistant-ui/tap/react-shim";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/primitives/composer/ComposerInputPluginContext.tsx
|
|
6
6
|
const ComposerInputPluginRegistryContext = createContext(null);
|
|
7
7
|
const useComposerInputPluginRegistryOptional = () => {
|
|
8
8
|
return useContext(ComposerInputPluginRegistryContext);
|
|
@@ -79,7 +79,6 @@ function _temp2(t0) {
|
|
|
79
79
|
const [plugin] = t0;
|
|
80
80
|
return plugin;
|
|
81
81
|
}
|
|
82
|
-
//#endregion
|
|
83
82
|
export { ComposerInputPluginProvider, useComposerInputPluginRegistryOptional };
|
|
84
83
|
|
|
85
84
|
//# sourceMappingURL=ComposerInputPluginContext.js.map
|
|
@@ -5,7 +5,7 @@ import { forwardRef } from "@assistant-ui/tap/react-shim";
|
|
|
5
5
|
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { composeEventHandlers } from "radix-ui/internal";
|
|
8
|
-
|
|
8
|
+
// src/primitives/composer/ComposerQuote.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Renders a container for the quoted text preview in the composer.
|
|
11
11
|
* Only renders when a quote is set.
|
|
@@ -133,7 +133,6 @@ function _temp(s) {
|
|
|
133
133
|
function _temp2(s) {
|
|
134
134
|
return s.composer.quote?.text;
|
|
135
135
|
}
|
|
136
|
-
//#endregion
|
|
137
136
|
export { ComposerPrimitiveQuote, ComposerPrimitiveQuoteDismiss, ComposerPrimitiveQuoteText };
|
|
138
137
|
|
|
139
138
|
//# sourceMappingURL=ComposerQuote.js.map
|
|
@@ -3,7 +3,7 @@ import { createActionButton } from "../../utils/createActionButton.js";
|
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import { useComposerResume } from "@assistant-ui/core/react";
|
|
5
5
|
import "@assistant-ui/tap/react-shim";
|
|
6
|
-
|
|
6
|
+
// src/primitives/composer/ComposerResume.ts
|
|
7
7
|
const useComposerResume$1 = () => {
|
|
8
8
|
const $ = c(2);
|
|
9
9
|
const { disabled, resume } = useComposerResume();
|
|
@@ -28,7 +28,6 @@ const useComposerResume$1 = () => {
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
const ComposerPrimitiveResume = createActionButton("ComposerPrimitive.Resume", useComposerResume$1);
|
|
31
|
-
//#endregion
|
|
32
31
|
export { ComposerPrimitiveResume };
|
|
33
32
|
|
|
34
33
|
//# sourceMappingURL=ComposerResume.js.map
|
|
@@ -8,7 +8,7 @@ import { forwardRef, useState, version } from "@assistant-ui/tap/react-shim";
|
|
|
8
8
|
import { useAuiState } from "@assistant-ui/store";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
import { composeEventHandlers } from "radix-ui/internal";
|
|
11
|
-
|
|
11
|
+
// src/primitives/composer/ComposerRoot.tsx
|
|
12
12
|
const INTERACTIVE_ELEMENT_SELECTOR = [
|
|
13
13
|
"a",
|
|
14
14
|
"audio[controls]",
|
|
@@ -160,7 +160,6 @@ function _temp2(e_0) {
|
|
|
160
160
|
e_0.preventDefault();
|
|
161
161
|
input.focus();
|
|
162
162
|
}
|
|
163
|
-
//#endregion
|
|
164
163
|
export { ComposerPrimitiveRoot };
|
|
165
164
|
|
|
166
165
|
//# sourceMappingURL=ComposerRoot.js.map
|
|
@@ -3,7 +3,7 @@ import { createActionButton } from "../../utils/createActionButton.js";
|
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import { useComposerSend as useComposerSend$1 } from "@assistant-ui/core/react";
|
|
5
5
|
import "@assistant-ui/tap/react-shim";
|
|
6
|
-
|
|
6
|
+
// src/primitives/composer/ComposerSend.ts
|
|
7
7
|
const useComposerSend = () => {
|
|
8
8
|
const $ = c(2);
|
|
9
9
|
const { disabled, send } = useComposerSend$1();
|
|
@@ -32,7 +32,6 @@ const useComposerSend = () => {
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
const ComposerPrimitiveSend = createActionButton("ComposerPrimitive.Send", useComposerSend);
|
|
35
|
-
//#endregion
|
|
36
35
|
export { ComposerPrimitiveSend, useComposerSend };
|
|
37
36
|
|
|
38
37
|
//# sourceMappingURL=ComposerSend.js.map
|
|
@@ -3,7 +3,7 @@ import { createActionButton } from "../../utils/createActionButton.js";
|
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import "@assistant-ui/tap/react-shim";
|
|
5
5
|
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
6
|
-
|
|
6
|
+
// src/primitives/composer/ComposerStopDictation.ts
|
|
7
7
|
const useComposerStopDictation = () => {
|
|
8
8
|
const $ = c(2);
|
|
9
9
|
const aui = useAui();
|
|
@@ -36,7 +36,6 @@ const ComposerPrimitiveStopDictation = createActionButton("ComposerPrimitive.Sto
|
|
|
36
36
|
function _temp(s) {
|
|
37
37
|
return s.composer.dictation != null;
|
|
38
38
|
}
|
|
39
|
-
//#endregion
|
|
40
39
|
export { ComposerPrimitiveStopDictation };
|
|
41
40
|
|
|
42
41
|
//# sourceMappingURL=ComposerStopDictation.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// src/primitives/composer/composerInputSelector.ts
|
|
2
2
|
const CONTENT_EDITABLE_SELECTOR = "[contenteditable]:not([contenteditable='false'])";
|
|
3
3
|
const COMPOSER_INPUT_SELECTOR = `textarea:not(:disabled), ${CONTENT_EDITABLE_SELECTOR}`;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { COMPOSER_INPUT_SELECTOR, CONTENT_EDITABLE_SELECTOR };
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=composerInputSelector.js.map
|
|
@@ -8,7 +8,7 @@ import { createContext, forwardRef, useContext, useEffect, useEffectEvent, useId
|
|
|
8
8
|
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
9
9
|
import { useResource } from "@assistant-ui/tap";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
|
|
11
|
+
// src/primitives/composer/trigger/TriggerPopover.tsx
|
|
12
12
|
const TriggerPopoverScopeContext = createContext(null);
|
|
13
13
|
const useTriggerPopoverScopeContext = () => {
|
|
14
14
|
const ctx = useContext(TriggerPopoverScopeContext);
|
|
@@ -315,7 +315,6 @@ ComposerPrimitiveTriggerPopover.displayName = "ComposerPrimitive.TriggerPopover"
|
|
|
315
315
|
function _temp(s) {
|
|
316
316
|
return s.composer.text;
|
|
317
317
|
}
|
|
318
|
-
//#endregion
|
|
319
318
|
export { ComposerPrimitiveTriggerPopover, useTriggerBehaviorRegistration, useTriggerPopoverScopeContext, useTriggerPopoverScopeContextOptional };
|
|
320
319
|
|
|
321
320
|
//# sourceMappingURL=TriggerPopover.js.map
|
|
@@ -3,7 +3,7 @@ import { useTriggerBehaviorRegistration } from "./TriggerPopover.js";
|
|
|
3
3
|
import { defaultDirectiveFormatter } from "@assistant-ui/core";
|
|
4
4
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
5
5
|
import { useEffect, useInsertionEffect, useRef } from "@assistant-ui/tap/react-shim";
|
|
6
|
-
|
|
6
|
+
// src/primitives/composer/trigger/TriggerPopoverAction.tsx
|
|
7
7
|
/**
|
|
8
8
|
* Configures a `<TriggerPopover>` to fire a handler when an item is selected,
|
|
9
9
|
* optionally leaving a directive chip behind as an audit trail. Render exactly
|
|
@@ -71,7 +71,6 @@ const ComposerPrimitiveTriggerPopoverAction = (t0) => {
|
|
|
71
71
|
return null;
|
|
72
72
|
};
|
|
73
73
|
ComposerPrimitiveTriggerPopoverAction.displayName = "ComposerPrimitive.TriggerPopoverAction";
|
|
74
|
-
//#endregion
|
|
75
74
|
export { ComposerPrimitiveTriggerPopoverAction };
|
|
76
75
|
|
|
77
76
|
//# sourceMappingURL=TriggerPopoverAction.js.map
|
|
@@ -5,7 +5,7 @@ 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
7
|
import { composeEventHandlers } from "radix-ui/internal";
|
|
8
|
-
|
|
8
|
+
// src/primitives/composer/trigger/TriggerPopoverBack.tsx
|
|
9
9
|
/**
|
|
10
10
|
* A button that navigates back from category items to the category list.
|
|
11
11
|
* Only renders when a category is active (drill-down view).
|
|
@@ -48,7 +48,6 @@ const ComposerPrimitiveTriggerPopoverBack = forwardRef((t0, forwardedRef) => {
|
|
|
48
48
|
return t2;
|
|
49
49
|
});
|
|
50
50
|
ComposerPrimitiveTriggerPopoverBack.displayName = "ComposerPrimitive.TriggerPopoverBack";
|
|
51
|
-
//#endregion
|
|
52
51
|
export { ComposerPrimitiveTriggerPopoverBack };
|
|
53
52
|
|
|
54
53
|
//# sourceMappingURL=TriggerPopoverBack.js.map
|
|
@@ -5,7 +5,7 @@ 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
7
|
import { composeEventHandlers } from "radix-ui/internal";
|
|
8
|
-
|
|
8
|
+
// src/primitives/composer/trigger/TriggerPopoverCategories.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Renders the top-level category list via a render function.
|
|
11
11
|
* Only renders when no category is active and search mode is off.
|
|
@@ -154,7 +154,6 @@ const ComposerPrimitiveTriggerPopoverCategoryItem = forwardRef((t0, forwardedRef
|
|
|
154
154
|
return t8;
|
|
155
155
|
});
|
|
156
156
|
ComposerPrimitiveTriggerPopoverCategoryItem.displayName = "ComposerPrimitive.TriggerPopoverCategoryItem";
|
|
157
|
-
//#endregion
|
|
158
157
|
export { ComposerPrimitiveTriggerPopoverCategories, ComposerPrimitiveTriggerPopoverCategoryItem };
|
|
159
158
|
|
|
160
159
|
//# sourceMappingURL=TriggerPopoverCategories.js.map
|
|
@@ -3,7 +3,7 @@ import { useTriggerBehaviorRegistration } from "./TriggerPopover.js";
|
|
|
3
3
|
import { defaultDirectiveFormatter } from "@assistant-ui/core";
|
|
4
4
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
5
5
|
import { useEffect, useInsertionEffect, useRef } from "@assistant-ui/tap/react-shim";
|
|
6
|
-
|
|
6
|
+
// src/primitives/composer/trigger/TriggerPopoverDirective.tsx
|
|
7
7
|
/**
|
|
8
8
|
* Configures a `<TriggerPopover>` to insert a directive chip when an item is
|
|
9
9
|
* selected. Render exactly one behavior sub-primitive per `<TriggerPopover>`.
|
|
@@ -63,7 +63,6 @@ const ComposerPrimitiveTriggerPopoverDirective = (t0) => {
|
|
|
63
63
|
return null;
|
|
64
64
|
};
|
|
65
65
|
ComposerPrimitiveTriggerPopoverDirective.displayName = "ComposerPrimitive.TriggerPopoverDirective";
|
|
66
|
-
//#endregion
|
|
67
66
|
export { ComposerPrimitiveTriggerPopoverDirective };
|
|
68
67
|
|
|
69
68
|
//# sourceMappingURL=TriggerPopoverDirective.js.map
|
|
@@ -5,7 +5,7 @@ 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
7
|
import { composeEventHandlers } from "radix-ui/internal";
|
|
8
|
-
|
|
8
|
+
// src/primitives/composer/trigger/TriggerPopoverItems.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Renders the list of items within a category or search results via a render function.
|
|
11
11
|
* Only renders when a category is active or search mode is on.
|
|
@@ -152,7 +152,6 @@ const ComposerPrimitiveTriggerPopoverItem = forwardRef((t0, forwardedRef) => {
|
|
|
152
152
|
return t8;
|
|
153
153
|
});
|
|
154
154
|
ComposerPrimitiveTriggerPopoverItem.displayName = "ComposerPrimitive.TriggerPopoverItem";
|
|
155
|
-
//#endregion
|
|
156
155
|
export { ComposerPrimitiveTriggerPopoverItem, ComposerPrimitiveTriggerPopoverItems };
|
|
157
156
|
|
|
158
157
|
//# sourceMappingURL=TriggerPopoverItems.js.map
|
|
@@ -5,7 +5,7 @@ import { TriggerSelectionResource } from "./triggerSelectionResource.js";
|
|
|
5
5
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
6
6
|
import { useEffectEvent } from "@assistant-ui/tap/react-shim";
|
|
7
7
|
import { resource, useResource } from "@assistant-ui/tap";
|
|
8
|
-
|
|
8
|
+
// src/primitives/composer/trigger/TriggerPopoverResource.ts
|
|
9
9
|
/** Composes detection, navigation, keyboard, and selection sub-resources. */
|
|
10
10
|
const useTriggerPopoverResource = (t0) => {
|
|
11
11
|
const $ = c(47);
|
|
@@ -137,7 +137,6 @@ const useTriggerPopoverResource = (t0) => {
|
|
|
137
137
|
return t6;
|
|
138
138
|
};
|
|
139
139
|
const TriggerPopoverResource = resource(useTriggerPopoverResource);
|
|
140
|
-
//#endregion
|
|
141
140
|
export { TriggerPopoverResource };
|
|
142
141
|
|
|
143
142
|
//# sourceMappingURL=TriggerPopoverResource.js.map
|
|
@@ -3,7 +3,7 @@ import { ComposerInputPluginProvider, useComposerInputPluginRegistryOptional } f
|
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import { createContext, useContext, useRef, useSyncExternalStore } from "@assistant-ui/tap/react-shim";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/primitives/composer/trigger/TriggerPopoverRootContext.tsx
|
|
7
7
|
const TriggerPopoverRootContext = createContext(null);
|
|
8
8
|
const TriggerPopoverAriaPublishContext = createContext(null);
|
|
9
9
|
const useTriggerPopoverRootContext = () => {
|
|
@@ -272,7 +272,6 @@ const ComposerPrimitiveTriggerPopoverRoot = (t0) => {
|
|
|
272
272
|
};
|
|
273
273
|
ComposerPrimitiveTriggerPopoverRoot.displayName = "ComposerPrimitive.TriggerPopoverRoot";
|
|
274
274
|
function _temp() {}
|
|
275
|
-
//#endregion
|
|
276
275
|
export { ComposerPrimitiveTriggerPopoverRoot, useTriggerPopoverActiveAriaOptional, useTriggerPopoverAriaPublish, useTriggerPopoverRootContext, useTriggerPopoverRootContextOptional, useTriggerPopoverTriggers, useTriggerPopoverTriggersOptional };
|
|
277
276
|
|
|
278
277
|
//# sourceMappingURL=TriggerPopoverRootContext.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/primitives/composer/trigger/detectTrigger.ts
|
|
2
2
|
const WHITESPACE_RE = /\s/u;
|
|
3
3
|
function resolveTriggerMatch(text, triggerChar, cursorPosition, match) {
|
|
4
4
|
if (match === null) return null;
|
|
@@ -34,7 +34,6 @@ function detectTrigger(text, triggerChar, cursorPosition, matcher) {
|
|
|
34
34
|
}
|
|
35
35
|
return null;
|
|
36
36
|
}
|
|
37
|
-
//#endregion
|
|
38
37
|
export { detectTrigger, resolveTriggerMatch };
|
|
39
38
|
|
|
40
39
|
//# sourceMappingURL=detectTrigger.js.map
|
|
@@ -5,12 +5,11 @@ import { ComposerPrimitiveTriggerPopoverItem, ComposerPrimitiveTriggerPopoverIte
|
|
|
5
5
|
import { ComposerPrimitiveTriggerPopoverBack } from "./TriggerPopoverBack.js";
|
|
6
6
|
import { ComposerPrimitiveTriggerPopoverAction } from "./TriggerPopoverAction.js";
|
|
7
7
|
import { ComposerPrimitiveTriggerPopoverDirective } from "./TriggerPopoverDirective.js";
|
|
8
|
-
|
|
8
|
+
// src/primitives/composer/trigger/index.ts
|
|
9
9
|
const ComposerPrimitiveTriggerPopover = Object.assign(ComposerPrimitiveTriggerPopover$1, {
|
|
10
10
|
Directive: ComposerPrimitiveTriggerPopoverDirective,
|
|
11
11
|
Action: ComposerPrimitiveTriggerPopoverAction
|
|
12
12
|
});
|
|
13
|
-
//#endregion
|
|
14
13
|
export { ComposerPrimitiveTriggerPopover, ComposerPrimitiveTriggerPopoverBack, ComposerPrimitiveTriggerPopoverCategories, ComposerPrimitiveTriggerPopoverCategoryItem, ComposerPrimitiveTriggerPopoverItem, ComposerPrimitiveTriggerPopoverItems, ComposerPrimitiveTriggerPopoverRoot, useTriggerPopoverRootContext, useTriggerPopoverRootContextOptional, useTriggerPopoverScopeContext, useTriggerPopoverScopeContextOptional, useTriggerPopoverTriggers, useTriggerPopoverTriggersOptional };
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// src/primitives/composer/trigger/matchesTriggerItemQuery.ts
|
|
2
2
|
function matchesTriggerItemQuery(item, lowerQuery) {
|
|
3
3
|
if (!lowerQuery) return true;
|
|
4
4
|
return item.id.toLowerCase().includes(lowerQuery) || item.label.toLowerCase().includes(lowerQuery) || (item.description?.toLowerCase().includes(lowerQuery) ?? false);
|
|
5
5
|
}
|
|
6
|
-
//#endregion
|
|
7
6
|
export { matchesTriggerItemQuery };
|
|
8
7
|
|
|
9
8
|
//# sourceMappingURL=matchesTriggerItemQuery.js.map
|
|
@@ -2,7 +2,7 @@ import { detectTrigger } from "./detectTrigger.js";
|
|
|
2
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
3
|
import { useState } from "@assistant-ui/tap/react-shim";
|
|
4
4
|
import { resource } from "@assistant-ui/tap";
|
|
5
|
-
|
|
5
|
+
// src/primitives/composer/trigger/triggerDetectionResource.ts
|
|
6
6
|
/** Tracks cursor position and derives the active trigger + query from composer text. */
|
|
7
7
|
const useTriggerDetectionResource = (t0) => {
|
|
8
8
|
const $ = c(8);
|
|
@@ -34,7 +34,6 @@ const useTriggerDetectionResource = (t0) => {
|
|
|
34
34
|
return t2;
|
|
35
35
|
};
|
|
36
36
|
const TriggerDetectionResource = resource(useTriggerDetectionResource);
|
|
37
|
-
//#endregion
|
|
38
37
|
export { TriggerDetectionResource };
|
|
39
38
|
|
|
40
39
|
//# sourceMappingURL=triggerDetectionResource.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
2
|
import { useEffectEvent, useState } from "@assistant-ui/tap/react-shim";
|
|
3
3
|
import { resource } from "@assistant-ui/tap";
|
|
4
|
-
|
|
4
|
+
// src/primitives/composer/trigger/triggerKeyboardResource.ts
|
|
5
5
|
/** Relies on `Unstable_TriggerCategory` never carrying a `type` field. */
|
|
6
6
|
function isTriggerItem(x) {
|
|
7
7
|
return "type" in x;
|
|
@@ -123,7 +123,6 @@ const useTriggerKeyboardResource = (t0) => {
|
|
|
123
123
|
return t4;
|
|
124
124
|
};
|
|
125
125
|
const TriggerKeyboardResource = resource(useTriggerKeyboardResource);
|
|
126
|
-
//#endregion
|
|
127
126
|
export { TriggerKeyboardResource };
|
|
128
127
|
|
|
129
128
|
//# sourceMappingURL=triggerKeyboardResource.js.map
|
|
@@ -2,7 +2,7 @@ import { matchesTriggerItemQuery } from "./matchesTriggerItemQuery.js";
|
|
|
2
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
3
|
import { useEffectEvent, useState } from "@assistant-ui/tap/react-shim";
|
|
4
4
|
import { resource } from "@assistant-ui/tap";
|
|
5
|
-
|
|
5
|
+
// src/primitives/composer/trigger/triggerNavigationResource.ts
|
|
6
6
|
/**
|
|
7
7
|
* Computes categories, items, search results, and navigation state from the
|
|
8
8
|
* adapter + current query. Pure derivation — no side effects on the composer.
|
|
@@ -204,7 +204,6 @@ const useTriggerNavigationResource = (t0) => {
|
|
|
204
204
|
return t9;
|
|
205
205
|
};
|
|
206
206
|
const TriggerNavigationResource = resource(useTriggerNavigationResource);
|
|
207
|
-
//#endregion
|
|
208
207
|
export { TriggerNavigationResource };
|
|
209
208
|
|
|
210
209
|
//# sourceMappingURL=triggerNavigationResource.js.map
|