@assistant-ui/react 0.10.1 → 0.10.3
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/api/AssistantRuntime.js +5 -4
- package/dist/api/AssistantRuntime.js.map +1 -1
- package/dist/api/AttachmentRuntime.js +11 -10
- package/dist/api/AttachmentRuntime.js.map +1 -1
- package/dist/api/ComposerRuntime.js +16 -15
- package/dist/api/ComposerRuntime.js.map +1 -1
- package/dist/api/ContentPartRuntime.js +3 -2
- package/dist/api/ContentPartRuntime.js.map +1 -1
- package/dist/api/MessageRuntime.js +14 -13
- package/dist/api/MessageRuntime.js.map +1 -1
- package/dist/api/ThreadListItemRuntime.js +3 -2
- package/dist/api/ThreadListItemRuntime.js.map +1 -1
- package/dist/api/ThreadListRuntime.js +11 -10
- package/dist/api/ThreadListRuntime.js.map +1 -1
- package/dist/api/ThreadRuntime.js +14 -13
- package/dist/api/ThreadRuntime.js.map +1 -1
- package/dist/api/subscribable/BaseSubject.js +3 -2
- package/dist/api/subscribable/BaseSubject.js.map +1 -1
- package/dist/api/subscribable/EventSubscriptionSubject.js +4 -3
- package/dist/api/subscribable/EventSubscriptionSubject.js.map +1 -1
- package/dist/api/subscribable/LazyMemoizeSubject.js +5 -4
- package/dist/api/subscribable/LazyMemoizeSubject.js.map +1 -1
- package/dist/api/subscribable/NestedSubscriptionSubject.js +4 -3
- package/dist/api/subscribable/NestedSubscriptionSubject.js.map +1 -1
- package/dist/api/subscribable/SKIP_UPDATE.js +2 -1
- package/dist/api/subscribable/SKIP_UPDATE.js.map +1 -1
- package/dist/api/subscribable/ShallowMemoizeSubject.js +6 -5
- package/dist/api/subscribable/ShallowMemoizeSubject.js.map +1 -1
- package/dist/api/subscribable/shallowEqual.js +1 -0
- package/dist/api/subscribable/shallowEqual.js.map +1 -1
- package/dist/cloud/AssistantCloud.js +7 -6
- package/dist/cloud/AssistantCloud.js.map +1 -1
- package/dist/cloud/AssistantCloudAPI.js +6 -5
- package/dist/cloud/AssistantCloudAPI.js.map +1 -1
- package/dist/cloud/AssistantCloudAuthStrategy.js +9 -8
- package/dist/cloud/AssistantCloudAuthStrategy.js.map +1 -1
- package/dist/cloud/AssistantCloudAuthTokens.js +3 -2
- package/dist/cloud/AssistantCloudAuthTokens.js.map +1 -1
- package/dist/cloud/AssistantCloudRuns.js +3 -2
- package/dist/cloud/AssistantCloudRuns.js.map +1 -1
- package/dist/cloud/AssistantCloudThreadHistoryAdapter.js +6 -5
- package/dist/cloud/AssistantCloudThreadHistoryAdapter.js.map +1 -1
- package/dist/cloud/AssistantCloudThreadMessages.js +3 -2
- package/dist/cloud/AssistantCloudThreadMessages.js.map +1 -1
- package/dist/cloud/AssistantCloudThreads.js +4 -3
- package/dist/cloud/AssistantCloudThreads.js.map +1 -1
- package/dist/cloud/auiV0.js +5 -4
- package/dist/cloud/auiV0.js.map +1 -1
- package/dist/cloud/index.js +3 -2
- package/dist/cloud/index.js.map +1 -1
- package/dist/cloud/useCloudThreadListRuntime.js +5 -3
- package/dist/cloud/useCloudThreadListRuntime.js.map +1 -1
- package/dist/context/ReadonlyStore.js +2 -1
- package/dist/context/ReadonlyStore.js.map +1 -1
- package/dist/context/index.js +4 -3
- package/dist/context/index.js.map +1 -1
- package/dist/context/providers/AssistantRuntimeProvider.js +13 -11
- package/dist/context/providers/AssistantRuntimeProvider.js.map +1 -1
- package/dist/context/providers/AttachmentRuntimeProvider.js +8 -6
- package/dist/context/providers/AttachmentRuntimeProvider.js.map +1 -1
- package/dist/context/providers/ContentPartRuntimeProvider.js +8 -6
- package/dist/context/providers/ContentPartRuntimeProvider.js.map +1 -1
- package/dist/context/providers/MessageRuntimeProvider.js +10 -8
- package/dist/context/providers/MessageRuntimeProvider.js.map +1 -1
- package/dist/context/providers/TextContentPartProvider.js +10 -8
- package/dist/context/providers/TextContentPartProvider.js.map +1 -1
- package/dist/context/providers/ThreadListItemRuntimeProvider.js +8 -6
- package/dist/context/providers/ThreadListItemRuntimeProvider.js.map +1 -1
- package/dist/context/providers/ThreadRuntimeProvider.js +10 -8
- package/dist/context/providers/ThreadRuntimeProvider.js.map +1 -1
- package/dist/context/providers/ThreadViewportProvider.js +8 -6
- package/dist/context/providers/ThreadViewportProvider.js.map +1 -1
- package/dist/context/providers/index.js +3 -2
- package/dist/context/providers/index.js.map +1 -1
- package/dist/context/react/AssistantContext.js +10 -8
- package/dist/context/react/AssistantContext.js.map +1 -1
- package/dist/context/react/AttachmentContext.js +10 -8
- package/dist/context/react/AttachmentContext.js.map +1 -1
- package/dist/context/react/ComposerContext.js +6 -4
- package/dist/context/react/ComposerContext.js.map +1 -1
- package/dist/context/react/ContentPartContext.js +7 -5
- package/dist/context/react/ContentPartContext.js.map +1 -1
- package/dist/context/react/MessageContext.js +11 -9
- package/dist/context/react/MessageContext.js.map +1 -1
- package/dist/context/react/ThreadContext.js +9 -7
- package/dist/context/react/ThreadContext.js.map +1 -1
- package/dist/context/react/ThreadListItemContext.js +7 -5
- package/dist/context/react/ThreadListItemContext.js.map +1 -1
- package/dist/context/react/ThreadViewportContext.js +7 -5
- package/dist/context/react/ThreadViewportContext.js.map +1 -1
- package/dist/context/react/index.js +11 -9
- package/dist/context/react/index.js.map +1 -1
- package/dist/context/react/utils/createContextHook.js +2 -0
- package/dist/context/react/utils/createContextHook.js.map +1 -1
- package/dist/context/react/utils/createContextStoreHook.js +1 -0
- package/dist/context/react/utils/createContextStoreHook.js.map +1 -1
- package/dist/context/react/utils/createStateHookForRuntime.js +2 -1
- package/dist/context/react/utils/createStateHookForRuntime.js.map +1 -1
- package/dist/context/react/utils/ensureBinding.js +2 -21
- package/dist/context/react/utils/ensureBinding.js.map +1 -1
- package/dist/context/react/utils/useRuntimeState.js +3 -2
- package/dist/context/react/utils/useRuntimeState.js.map +1 -1
- package/dist/context/stores/AssistantToolUIs.js +2 -1
- package/dist/context/stores/AssistantToolUIs.js.map +1 -1
- package/dist/context/stores/MessageUtils.js +2 -1
- package/dist/context/stores/MessageUtils.js.map +1 -1
- package/dist/context/stores/ThreadViewport.js +3 -1
- package/dist/context/stores/ThreadViewport.js.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/internal.js +12 -11
- package/dist/internal.js.map +1 -1
- package/dist/model-context/ModelContextTypes.js +2 -1
- package/dist/model-context/ModelContextTypes.js.map +1 -1
- package/dist/model-context/index.js +10 -9
- package/dist/model-context/index.js.map +1 -1
- package/dist/model-context/makeAssistantTool.js +4 -2
- package/dist/model-context/makeAssistantTool.js.map +1 -1
- package/dist/model-context/makeAssistantToolUI.js +4 -2
- package/dist/model-context/makeAssistantToolUI.js.map +1 -1
- package/dist/model-context/makeAssistantVisible.js +9 -7
- package/dist/model-context/makeAssistantVisible.js.map +1 -1
- package/dist/model-context/tool.d.ts +1 -10
- package/dist/model-context/tool.d.ts.map +1 -1
- package/dist/model-context/tool.js +1 -0
- package/dist/model-context/tool.js.map +1 -1
- package/dist/model-context/useAssistantInstructions.js +5 -3
- package/dist/model-context/useAssistantInstructions.js.map +1 -1
- package/dist/model-context/useAssistantTool.d.ts +0 -1
- package/dist/model-context/useAssistantTool.d.ts.map +1 -1
- package/dist/model-context/useAssistantTool.js +5 -4
- package/dist/model-context/useAssistantTool.js.map +1 -1
- package/dist/model-context/useAssistantToolUI.js +4 -2
- package/dist/model-context/useAssistantToolUI.js.map +1 -1
- package/dist/model-context/useInlineRender.js +3 -1
- package/dist/model-context/useInlineRender.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarCopy.js +8 -6
- package/dist/primitives/actionBar/ActionBarCopy.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarEdit.js +6 -4
- package/dist/primitives/actionBar/ActionBarEdit.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.js +7 -5
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.js +6 -4
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarReload.js +8 -6
- package/dist/primitives/actionBar/ActionBarReload.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarRoot.js +5 -3
- package/dist/primitives/actionBar/ActionBarRoot.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarSpeak.js +6 -4
- package/dist/primitives/actionBar/ActionBarSpeak.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarStopSpeaking.js +6 -4
- package/dist/primitives/actionBar/ActionBarStopSpeaking.js.map +1 -1
- package/dist/primitives/actionBar/index.js +9 -8
- package/dist/primitives/actionBar/index.js.map +1 -1
- package/dist/primitives/actionBar/useActionBarFloatStatus.js +6 -4
- package/dist/primitives/actionBar/useActionBarFloatStatus.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalAnchor.js +5 -3
- package/dist/primitives/assistantModal/AssistantModalAnchor.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalContent.js +5 -3
- package/dist/primitives/assistantModal/AssistantModalContent.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalRoot.js +7 -5
- package/dist/primitives/assistantModal/AssistantModalRoot.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalTrigger.js +4 -3
- package/dist/primitives/assistantModal/AssistantModalTrigger.js.map +1 -1
- package/dist/primitives/assistantModal/index.js +5 -4
- package/dist/primitives/assistantModal/index.js.map +1 -1
- package/dist/primitives/assistantModal/scope.js +2 -1
- package/dist/primitives/assistantModal/scope.js.map +1 -1
- package/dist/primitives/attachment/AttachmentName.js +4 -2
- package/dist/primitives/attachment/AttachmentName.js.map +1 -1
- package/dist/primitives/attachment/AttachmentRemove.js +6 -4
- package/dist/primitives/attachment/AttachmentRemove.js.map +1 -1
- package/dist/primitives/attachment/AttachmentRoot.js +3 -2
- package/dist/primitives/attachment/AttachmentRoot.js.map +1 -1
- package/dist/primitives/attachment/AttachmentThumb.js +5 -3
- package/dist/primitives/attachment/AttachmentThumb.js.map +1 -1
- package/dist/primitives/attachment/index.js +5 -4
- package/dist/primitives/attachment/index.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerCount.js +5 -3
- package/dist/primitives/branchPicker/BranchPickerCount.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNext.js +6 -4
- package/dist/primitives/branchPicker/BranchPickerNext.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNumber.js +5 -3
- package/dist/primitives/branchPicker/BranchPickerNumber.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.js +6 -4
- package/dist/primitives/branchPicker/BranchPickerPrevious.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerRoot.js +4 -3
- package/dist/primitives/branchPicker/BranchPickerRoot.js.map +1 -1
- package/dist/primitives/branchPicker/index.js +6 -5
- package/dist/primitives/branchPicker/index.js.map +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.js +6 -4
- package/dist/primitives/composer/ComposerAddAttachment.js.map +1 -1
- package/dist/primitives/composer/ComposerAttachments.js +11 -9
- package/dist/primitives/composer/ComposerAttachments.js.map +1 -1
- package/dist/primitives/composer/ComposerCancel.js +6 -4
- package/dist/primitives/composer/ComposerCancel.js.map +1 -1
- package/dist/primitives/composer/ComposerIf.js +5 -3
- package/dist/primitives/composer/ComposerIf.js.map +1 -1
- package/dist/primitives/composer/ComposerInput.js +8 -6
- package/dist/primitives/composer/ComposerInput.js.map +1 -1
- package/dist/primitives/composer/ComposerRoot.js +5 -3
- package/dist/primitives/composer/ComposerRoot.js.map +1 -1
- package/dist/primitives/composer/ComposerSend.js +8 -6
- package/dist/primitives/composer/ComposerSend.js.map +1 -1
- package/dist/primitives/composer/index.js +8 -7
- package/dist/primitives/composer/index.js.map +1 -1
- package/dist/primitives/contentPart/ContentPartImage.js +5 -3
- package/dist/primitives/contentPart/ContentPartImage.js.map +1 -1
- package/dist/primitives/contentPart/ContentPartInProgress.js +4 -2
- package/dist/primitives/contentPart/ContentPartInProgress.js.map +1 -1
- package/dist/primitives/contentPart/ContentPartText.js +6 -4
- package/dist/primitives/contentPart/ContentPartText.js.map +1 -1
- package/dist/primitives/contentPart/index.js +4 -3
- package/dist/primitives/contentPart/index.js.map +1 -1
- package/dist/primitives/contentPart/useContentPartFile.js +4 -2
- package/dist/primitives/contentPart/useContentPartFile.js.map +1 -1
- package/dist/primitives/contentPart/useContentPartImage.js +4 -2
- package/dist/primitives/contentPart/useContentPartImage.js.map +1 -1
- package/dist/primitives/contentPart/useContentPartReasoning.js +4 -2
- package/dist/primitives/contentPart/useContentPartReasoning.js.map +1 -1
- package/dist/primitives/contentPart/useContentPartSource.js +4 -2
- package/dist/primitives/contentPart/useContentPartSource.js.map +1 -1
- package/dist/primitives/contentPart/useContentPartText.js +4 -2
- package/dist/primitives/contentPart/useContentPartText.js.map +1 -1
- package/dist/primitives/index.js +17 -16
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/message/MessageAttachments.js +11 -9
- package/dist/primitives/message/MessageAttachments.js.map +1 -1
- package/dist/primitives/message/MessageContent.js +19 -17
- package/dist/primitives/message/MessageContent.js.map +1 -1
- package/dist/primitives/message/MessageIf.js +6 -4
- package/dist/primitives/message/MessageIf.js.map +1 -1
- package/dist/primitives/message/MessageRoot.js +7 -5
- package/dist/primitives/message/MessageRoot.js.map +1 -1
- package/dist/primitives/message/index.js +5 -4
- package/dist/primitives/message/index.js.map +1 -1
- package/dist/primitives/thread/ThreadEmpty.js +4 -2
- package/dist/primitives/thread/ThreadEmpty.js.map +1 -1
- package/dist/primitives/thread/ThreadIf.js +5 -3
- package/dist/primitives/thread/ThreadIf.js.map +1 -1
- package/dist/primitives/thread/ThreadMessages.js +14 -12
- package/dist/primitives/thread/ThreadMessages.js.map +1 -1
- package/dist/primitives/thread/ThreadRoot.js +3 -2
- package/dist/primitives/thread/ThreadRoot.js.map +1 -1
- package/dist/primitives/thread/ThreadScrollToBottom.js +6 -4
- package/dist/primitives/thread/ThreadScrollToBottom.js.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.js +7 -5
- package/dist/primitives/thread/ThreadSuggestion.js.map +1 -1
- package/dist/primitives/thread/ThreadViewport.js +7 -5
- package/dist/primitives/thread/ThreadViewport.js.map +1 -1
- package/dist/primitives/thread/index.js +8 -7
- package/dist/primitives/thread/index.js.map +1 -1
- package/dist/primitives/thread/useThreadViewportAutoScroll.js +9 -7
- package/dist/primitives/thread/useThreadViewportAutoScroll.js.map +1 -1
- package/dist/primitives/threadList/ThreadListItems.js +8 -6
- package/dist/primitives/threadList/ThreadListItems.js.map +1 -1
- package/dist/primitives/threadList/ThreadListNew.js +6 -4
- package/dist/primitives/threadList/ThreadListNew.js.map +1 -1
- package/dist/primitives/threadList/ThreadListRoot.js +3 -2
- package/dist/primitives/threadList/ThreadListRoot.js.map +1 -1
- package/dist/primitives/threadList/index.js +4 -3
- package/dist/primitives/threadList/index.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemArchive.js +6 -4
- package/dist/primitives/threadListItem/ThreadListItemArchive.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemDelete.js +6 -4
- package/dist/primitives/threadListItem/ThreadListItemDelete.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemRoot.js +5 -3
- package/dist/primitives/threadListItem/ThreadListItemRoot.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTitle.js +4 -2
- package/dist/primitives/threadListItem/ThreadListItemTitle.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js +6 -4
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.js +6 -4
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.js.map +1 -1
- package/dist/primitives/threadListItem/index.js +7 -6
- package/dist/primitives/threadListItem/index.js.map +1 -1
- package/dist/runtimes/adapters/RuntimeAdapterProvider.js +5 -4
- package/dist/runtimes/adapters/RuntimeAdapterProvider.js.map +1 -1
- package/dist/runtimes/adapters/attachment/CompositeAttachmentAdapter.js +3 -2
- package/dist/runtimes/adapters/attachment/CompositeAttachmentAdapter.js.map +1 -1
- package/dist/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.js +4 -3
- package/dist/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.js.map +1 -1
- package/dist/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.js +4 -3
- package/dist/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.js.map +1 -1
- package/dist/runtimes/adapters/attachment/index.js +4 -3
- package/dist/runtimes/adapters/attachment/index.js.map +1 -1
- package/dist/runtimes/adapters/index.js +5 -4
- package/dist/runtimes/adapters/index.js.map +1 -1
- package/dist/runtimes/adapters/speech/WebSpeechSynthesisAdapter.js +3 -2
- package/dist/runtimes/adapters/speech/WebSpeechSynthesisAdapter.js.map +1 -1
- package/dist/runtimes/adapters/speech/index.js +2 -1
- package/dist/runtimes/adapters/speech/index.js.map +1 -1
- package/dist/runtimes/composer/BaseComposerRuntimeCore.js +5 -4
- package/dist/runtimes/composer/BaseComposerRuntimeCore.js.map +1 -1
- package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.js +5 -4
- package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.js.map +1 -1
- package/dist/runtimes/composer/DefaultThreadComposerRuntimeCore.js +4 -3
- package/dist/runtimes/composer/DefaultThreadComposerRuntimeCore.js.map +1 -1
- package/dist/runtimes/core/BaseAssistantRuntimeCore.js +4 -3
- package/dist/runtimes/core/BaseAssistantRuntimeCore.js.map +1 -1
- package/dist/runtimes/core/BaseThreadRuntimeCore.js +7 -6
- package/dist/runtimes/core/BaseThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.js +7 -6
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.js.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.js +8 -7
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.js.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.js +11 -10
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageConverter.js +3 -2
- package/dist/runtimes/external-store/ThreadMessageConverter.js.map +1 -1
- package/dist/runtimes/external-store/ThreadMessageLike.js +3 -2
- package/dist/runtimes/external-store/ThreadMessageLike.js.map +1 -1
- package/dist/runtimes/external-store/auto-status.js +5 -4
- package/dist/runtimes/external-store/auto-status.js.map +1 -1
- package/dist/runtimes/external-store/createMessageConverter.js +6 -4
- package/dist/runtimes/external-store/createMessageConverter.js.map +1 -1
- package/dist/runtimes/external-store/external-message-converter.js +11 -9
- package/dist/runtimes/external-store/external-message-converter.js.map +1 -1
- package/dist/runtimes/external-store/getExternalStoreMessage.js +6 -5
- package/dist/runtimes/external-store/getExternalStoreMessage.js.map +1 -1
- package/dist/runtimes/external-store/index.js +5 -4
- package/dist/runtimes/external-store/index.js.map +1 -1
- package/dist/runtimes/external-store/useExternalStoreRuntime.js +6 -4
- package/dist/runtimes/external-store/useExternalStoreRuntime.js.map +1 -1
- package/dist/runtimes/index.js +7 -6
- package/dist/runtimes/index.js.map +1 -1
- package/dist/runtimes/local/LocalRuntimeCore.js +7 -6
- package/dist/runtimes/local/LocalRuntimeCore.js.map +1 -1
- package/dist/runtimes/local/LocalRuntimeOptions.js +2 -1
- package/dist/runtimes/local/LocalRuntimeOptions.js.map +1 -1
- package/dist/runtimes/local/LocalThreadListRuntimeCore.js +5 -4
- package/dist/runtimes/local/LocalThreadListRuntimeCore.js.map +1 -1
- package/dist/runtimes/local/LocalThreadRuntimeCore.js +6 -5
- package/dist/runtimes/local/LocalThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/local/index.js +2 -1
- package/dist/runtimes/local/index.js.map +1 -1
- package/dist/runtimes/local/shouldContinue.js +2 -1
- package/dist/runtimes/local/shouldContinue.js.map +1 -1
- package/dist/runtimes/local/useLocalRuntime.js +9 -7
- package/dist/runtimes/local/useLocalRuntime.js.map +1 -1
- package/dist/runtimes/remote-thread-list/BaseSubscribable.js +3 -2
- package/dist/runtimes/remote-thread-list/BaseSubscribable.js.map +1 -1
- package/dist/runtimes/remote-thread-list/EMPTY_THREAD_CORE.js +3 -2
- package/dist/runtimes/remote-thread-list/EMPTY_THREAD_CORE.js.map +1 -1
- package/dist/runtimes/remote-thread-list/OptimisticState.js +5 -4
- package/dist/runtimes/remote-thread-list/OptimisticState.js.map +1 -1
- package/dist/runtimes/remote-thread-list/RemoteThreadListHookInstanceManager.js +9 -7
- package/dist/runtimes/remote-thread-list/RemoteThreadListHookInstanceManager.js.map +1 -1
- package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.js +13 -11
- package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.js.map +1 -1
- package/dist/runtimes/remote-thread-list/adapter/cloud.js +9 -8
- package/dist/runtimes/remote-thread-list/adapter/cloud.js.map +1 -1
- package/dist/runtimes/remote-thread-list/adapter/in-memory.js +3 -2
- package/dist/runtimes/remote-thread-list/adapter/in-memory.js.map +1 -1
- package/dist/runtimes/remote-thread-list/index.js +3 -2
- package/dist/runtimes/remote-thread-list/index.js.map +1 -1
- package/dist/runtimes/remote-thread-list/useRemoteThreadListRuntime.js +8 -6
- package/dist/runtimes/remote-thread-list/useRemoteThreadListRuntime.js.map +1 -1
- package/dist/runtimes/utils/MessageRepository.js +10 -9
- package/dist/runtimes/utils/MessageRepository.js.map +1 -1
- package/dist/tests/setup.js +2971 -3
- package/dist/tests/setup.js.map +1 -1
- package/dist/utils/CompositeContextProvider.js +4 -3
- package/dist/utils/CompositeContextProvider.js.map +1 -1
- package/dist/utils/combined/createCombinedStore.js +3 -1
- package/dist/utils/combined/createCombinedStore.js.map +1 -1
- package/dist/utils/combined/useCombinedStore.js +4 -2
- package/dist/utils/combined/useCombinedStore.js.map +1 -1
- package/dist/utils/createActionButton.js +3 -2
- package/dist/utils/createActionButton.js.map +1 -1
- package/dist/utils/getThreadMessageText.js +2 -1
- package/dist/utils/getThreadMessageText.js.map +1 -1
- package/dist/utils/hooks/useManagedRef.js +2 -1
- package/dist/utils/hooks/useManagedRef.js.map +1 -1
- package/dist/utils/hooks/useOnResizeContent.js +3 -2
- package/dist/utils/hooks/useOnResizeContent.js.map +1 -1
- package/dist/utils/hooks/useOnScrollToBottom.js +4 -2
- package/dist/utils/hooks/useOnScrollToBottom.js.map +1 -1
- package/dist/utils/idUtils.js +5 -4
- package/dist/utils/idUtils.js.map +1 -1
- package/dist/utils/json/is-json.js +1 -0
- package/dist/utils/json/is-json.js.map +1 -1
- package/dist/utils/smooth/SmoothContext.js +10 -8
- package/dist/utils/smooth/SmoothContext.js.map +1 -1
- package/dist/utils/smooth/index.js +4 -2
- package/dist/utils/smooth/index.js.map +1 -1
- package/dist/utils/smooth/useSmooth.js +9 -7
- package/dist/utils/smooth/useSmooth.js.map +1 -1
- package/dist/utils/useToolArgsFieldStatus.js +4 -3
- package/dist/utils/useToolArgsFieldStatus.js.map +1 -1
- package/package.json +4 -4
- package/src/model-context/tool.ts +3 -16
- package/src/model-context/useAssistantTool.tsx +1 -4
@@ -1,17 +1,19 @@
|
|
1
1
|
"use client";
|
2
|
-
|
2
|
+
|
3
|
+
// src/primitives/actionBar/ActionBarFeedbackPositive.tsx
|
3
4
|
import { forwardRef, useCallback } from "react";
|
4
5
|
import { composeEventHandlers } from "@radix-ui/primitive";
|
5
|
-
import { useMessage, useMessageRuntime } from "../../context";
|
6
|
+
import { useMessage, useMessageRuntime } from "../../context/index.js";
|
6
7
|
import { Primitive } from "@radix-ui/react-primitive";
|
7
|
-
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
9
|
+
var useActionBarFeedbackPositive = () => {
|
8
10
|
const messageRuntime = useMessageRuntime();
|
9
11
|
const callback = useCallback(() => {
|
10
12
|
messageRuntime.submitFeedback({ type: "positive" });
|
11
13
|
}, [messageRuntime]);
|
12
14
|
return callback;
|
13
15
|
};
|
14
|
-
|
16
|
+
var ActionBarPrimitiveFeedbackPositive = forwardRef(({ onClick, disabled, ...props }, forwardedRef) => {
|
15
17
|
const isSubmitted = useMessage(
|
16
18
|
(u) => u.submittedFeedback?.type === "positive"
|
17
19
|
);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/actionBar/ActionBarFeedbackPositive.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef, useCallback } from \"react\";\nimport { ActionButtonProps } from \"../../utils/createActionButton\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useMessage, useMessageRuntime } from \"../../context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\n\nconst useActionBarFeedbackPositive = () => {\n const messageRuntime = useMessageRuntime();\n\n const callback = useCallback(() => {\n messageRuntime.submitFeedback({ type: \"positive\" });\n }, [messageRuntime]);\n\n return callback;\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 = useMessage(\n (u) => u.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":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/actionBar/ActionBarFeedbackPositive.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef, useCallback } from \"react\";\nimport { ActionButtonProps } from \"../../utils/createActionButton\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useMessage, useMessageRuntime } from \"../../context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\n\nconst useActionBarFeedbackPositive = () => {\n const messageRuntime = useMessageRuntime();\n\n const callback = useCallback(() => {\n messageRuntime.submitFeedback({ type: \"positive\" });\n }, [messageRuntime]);\n\n return callback;\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 = useMessage(\n (u) => u.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":";;;AAEA,SAAS,YAAY,mBAAmB;AAExC,SAAS,4BAA4B;AACrC,SAAS,YAAY,yBAAyB;AAC9C,SAAS,iBAAiB;AA0BtB;AAxBJ,IAAM,+BAA+B,MAAM;AACzC,QAAM,iBAAiB,kBAAkB;AAEzC,QAAM,WAAW,YAAY,MAAM;AACjC,mBAAe,eAAe,EAAE,MAAM,WAAW,CAAC;AAAA,EACpD,GAAG,CAAC,cAAc,CAAC;AAEnB,SAAO;AACT;AAOO,IAAM,qCAAqC,WAGhD,CAAC,EAAE,SAAS,UAAU,GAAG,MAAM,GAAG,iBAAiB;AACnD,QAAM,cAAc;AAAA,IAClB,CAAC,MAAM,EAAE,mBAAmB,SAAS;AAAA,EACvC;AACA,QAAM,WAAW,6BAA6B;AAC9C,SACE;AAAA,IAAC,UAAU;AAAA,IAAV;AAAA,MACC,MAAK;AAAA,MACJ,GAAI,cAAc,EAAE,kBAAkB,OAAO,IAAI,CAAC;AAAA,MAClD,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,UAAU,YAAY,CAAC;AAAA,MACvB,SAAS,qBAAqB,SAAS,MAAM;AAC3C,mBAAW;AAAA,MACb,CAAC;AAAA;AAAA,EACH;AAEJ,CAAC;AAED,mCAAmC,cACjC;","names":[]}
|
@@ -1,12 +1,14 @@
|
|
1
1
|
"use client";
|
2
|
+
|
3
|
+
// src/primitives/actionBar/ActionBarReload.tsx
|
2
4
|
import {
|
3
5
|
createActionButton
|
4
|
-
} from "../../utils/createActionButton";
|
6
|
+
} from "../../utils/createActionButton.js";
|
5
7
|
import { useCallback } from "react";
|
6
|
-
import { useMessageRuntime } from "../../context";
|
7
|
-
import { useThreadRuntime } from "../../context/react/ThreadContext";
|
8
|
-
import { useCombinedStore } from "../../utils/combined/useCombinedStore";
|
9
|
-
|
8
|
+
import { useMessageRuntime } from "../../context/index.js";
|
9
|
+
import { useThreadRuntime } from "../../context/react/ThreadContext.js";
|
10
|
+
import { useCombinedStore } from "../../utils/combined/useCombinedStore.js";
|
11
|
+
var useActionBarReload = () => {
|
10
12
|
const messageRuntime = useMessageRuntime();
|
11
13
|
const threadRuntime = useThreadRuntime();
|
12
14
|
const disabled = useCombinedStore(
|
@@ -19,7 +21,7 @@ const useActionBarReload = () => {
|
|
19
21
|
if (disabled) return null;
|
20
22
|
return callback;
|
21
23
|
};
|
22
|
-
|
24
|
+
var ActionBarPrimitiveReload = createActionButton(
|
23
25
|
"ActionBarPrimitive.Reload",
|
24
26
|
useActionBarReload
|
25
27
|
);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/actionBar/ActionBarReload.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n ActionButtonElement,\n ActionButtonProps,\n createActionButton,\n} from \"../../utils/createActionButton\";\nimport { useCallback } from \"react\";\nimport { useMessageRuntime } from \"../../context\";\nimport { useThreadRuntime } from \"../../context/react/ThreadContext\";\nimport { useCombinedStore } from \"../../utils/combined/useCombinedStore\";\n\nconst useActionBarReload = () => {\n const messageRuntime = useMessageRuntime();\n const threadRuntime = useThreadRuntime();\n\n const disabled = useCombinedStore(\n [threadRuntime, messageRuntime],\n (t, m) => t.isRunning || t.isDisabled || m.role !== \"assistant\",\n );\n\n const callback = useCallback(() => {\n messageRuntime.reload();\n }, [messageRuntime]);\n\n if (disabled) return null;\n return callback;\n};\n\nexport namespace ActionBarPrimitiveReload {\n export type Element = ActionButtonElement;\n export type Props = ActionButtonProps<typeof useActionBarReload>;\n}\n\nexport const ActionBarPrimitiveReload = createActionButton(\n \"ActionBarPrimitive.Reload\",\n useActionBarReload,\n);\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/actionBar/ActionBarReload.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n ActionButtonElement,\n ActionButtonProps,\n createActionButton,\n} from \"../../utils/createActionButton\";\nimport { useCallback } from \"react\";\nimport { useMessageRuntime } from \"../../context\";\nimport { useThreadRuntime } from \"../../context/react/ThreadContext\";\nimport { useCombinedStore } from \"../../utils/combined/useCombinedStore\";\n\nconst useActionBarReload = () => {\n const messageRuntime = useMessageRuntime();\n const threadRuntime = useThreadRuntime();\n\n const disabled = useCombinedStore(\n [threadRuntime, messageRuntime],\n (t, m) => t.isRunning || t.isDisabled || m.role !== \"assistant\",\n );\n\n const callback = useCallback(() => {\n messageRuntime.reload();\n }, [messageRuntime]);\n\n if (disabled) return null;\n return callback;\n};\n\nexport namespace ActionBarPrimitiveReload {\n export type Element = ActionButtonElement;\n export type Props = ActionButtonProps<typeof useActionBarReload>;\n}\n\nexport const ActionBarPrimitiveReload = createActionButton(\n \"ActionBarPrimitive.Reload\",\n useActionBarReload,\n);\n"],"mappings":";;;AAEA;AAAA,EAGE;AAAA,OACK;AACP,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AAEjC,IAAM,qBAAqB,MAAM;AAC/B,QAAM,iBAAiB,kBAAkB;AACzC,QAAM,gBAAgB,iBAAiB;AAEvC,QAAM,WAAW;AAAA,IACf,CAAC,eAAe,cAAc;AAAA,IAC9B,CAAC,GAAG,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS;AAAA,EACtD;AAEA,QAAM,WAAW,YAAY,MAAM;AACjC,mBAAe,OAAO;AAAA,EACxB,GAAG,CAAC,cAAc,CAAC;AAEnB,MAAI,SAAU,QAAO;AACrB,SAAO;AACT;AAOO,IAAM,2BAA2B;AAAA,EACtC;AAAA,EACA;AACF;","names":[]}
|
@@ -1,12 +1,14 @@
|
|
1
1
|
"use client";
|
2
|
-
|
2
|
+
|
3
|
+
// src/primitives/actionBar/ActionBarRoot.tsx
|
3
4
|
import { Primitive } from "@radix-ui/react-primitive";
|
4
5
|
import { forwardRef } from "react";
|
5
6
|
import {
|
6
7
|
useActionBarFloatStatus,
|
7
8
|
HideAndFloatStatus
|
8
|
-
} from "./useActionBarFloatStatus";
|
9
|
-
|
9
|
+
} from "./useActionBarFloatStatus.js";
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
11
|
+
var ActionBarPrimitiveRoot = forwardRef(({ hideWhenRunning, autohide, autohideFloat, ...rest }, ref) => {
|
10
12
|
const hideAndfloatStatus = useActionBarFloatStatus({
|
11
13
|
hideWhenRunning,
|
12
14
|
autohide,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/actionBar/ActionBarRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { type ComponentRef, forwardRef, ComponentPropsWithoutRef } from \"react\";\nimport {\n useActionBarFloatStatus,\n HideAndFloatStatus,\n} from \"./useActionBarFloatStatus\";\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 hideWhenRunning?: boolean | undefined;\n autohide?: \"always\" | \"not-last\" | \"never\" | undefined;\n autohideFloat?: \"always\" | \"single-branch\" | \"never\" | undefined;\n };\n}\n\nexport const ActionBarPrimitiveRoot = forwardRef<\n ActionBarPrimitiveRoot.Element,\n ActionBarPrimitiveRoot.Props\n>(({ hideWhenRunning, autohide, autohideFloat, ...rest }, ref) => {\n const hideAndfloatStatus = useActionBarFloatStatus({\n hideWhenRunning,\n autohide,\n autohideFloat,\n });\n\n if (hideAndfloatStatus === HideAndFloatStatus.Hidden) return null;\n\n return (\n <Primitive.div\n {...(hideAndfloatStatus === HideAndFloatStatus.Floating\n ? { \"data-floating\": \"true\" }\n : null)}\n {...rest}\n ref={ref}\n />\n );\n});\n\nActionBarPrimitiveRoot.displayName = \"ActionBarPrimitive.Root\";\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/actionBar/ActionBarRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { type ComponentRef, forwardRef, ComponentPropsWithoutRef } from \"react\";\nimport {\n useActionBarFloatStatus,\n HideAndFloatStatus,\n} from \"./useActionBarFloatStatus\";\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 hideWhenRunning?: boolean | undefined;\n autohide?: \"always\" | \"not-last\" | \"never\" | undefined;\n autohideFloat?: \"always\" | \"single-branch\" | \"never\" | undefined;\n };\n}\n\nexport const ActionBarPrimitiveRoot = forwardRef<\n ActionBarPrimitiveRoot.Element,\n ActionBarPrimitiveRoot.Props\n>(({ hideWhenRunning, autohide, autohideFloat, ...rest }, ref) => {\n const hideAndfloatStatus = useActionBarFloatStatus({\n hideWhenRunning,\n autohide,\n autohideFloat,\n });\n\n if (hideAndfloatStatus === HideAndFloatStatus.Hidden) return null;\n\n return (\n <Primitive.div\n {...(hideAndfloatStatus === HideAndFloatStatus.Floating\n ? { \"data-floating\": \"true\" }\n : null)}\n {...rest}\n ref={ref}\n />\n );\n});\n\nActionBarPrimitiveRoot.displayName = \"ActionBarPrimitive.Root\";\n"],"mappings":";;;AAEA,SAAS,iBAAiB;AAC1B,SAA4B,kBAA4C;AACxE;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA0BH;AAbG,IAAM,yBAAyB,WAGpC,CAAC,EAAE,iBAAiB,UAAU,eAAe,GAAG,KAAK,GAAG,QAAQ;AAChE,QAAM,qBAAqB,wBAAwB;AAAA,IACjD;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,MAAI,uBAAuB,mBAAmB,OAAQ,QAAO;AAE7D,SACE;AAAA,IAAC,UAAU;AAAA,IAAV;AAAA,MACE,GAAI,uBAAuB,mBAAmB,WAC3C,EAAE,iBAAiB,OAAO,IAC1B;AAAA,MACH,GAAG;AAAA,MACJ;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,uBAAuB,cAAc;","names":[]}
|
@@ -1,10 +1,12 @@
|
|
1
1
|
"use client";
|
2
|
+
|
3
|
+
// src/primitives/actionBar/ActionBarSpeak.tsx
|
2
4
|
import { useCallback } from "react";
|
3
|
-
import { useMessage, useMessageRuntime } from "../../context";
|
5
|
+
import { useMessage, useMessageRuntime } from "../../context/index.js";
|
4
6
|
import {
|
5
7
|
createActionButton
|
6
|
-
} from "../../utils/createActionButton";
|
7
|
-
|
8
|
+
} from "../../utils/createActionButton.js";
|
9
|
+
var useActionBarSpeak = () => {
|
8
10
|
const messageRuntime = useMessageRuntime();
|
9
11
|
const callback = useCallback(async () => {
|
10
12
|
messageRuntime.speak();
|
@@ -15,7 +17,7 @@ const useActionBarSpeak = () => {
|
|
15
17
|
if (!hasSpeakableContent) return null;
|
16
18
|
return callback;
|
17
19
|
};
|
18
|
-
|
20
|
+
var ActionBarPrimitiveSpeak = createActionButton(
|
19
21
|
"ActionBarPrimitive.Speak",
|
20
22
|
useActionBarSpeak
|
21
23
|
);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/actionBar/ActionBarSpeak.tsx"],"sourcesContent":["\"use client\";\n\nimport { useCallback } from \"react\";\nimport { useMessage, useMessageRuntime } from \"../../context\";\nimport {\n ActionButtonElement,\n ActionButtonProps,\n createActionButton,\n} from \"../../utils/createActionButton\";\n\nconst useActionBarSpeak = () => {\n const messageRuntime = useMessageRuntime();\n const callback = useCallback(async () => {\n messageRuntime.speak();\n }, [messageRuntime]);\n\n const hasSpeakableContent = useMessage((m) => {\n return (\n (m.role !== \"assistant\" || m.status.type !== \"running\") &&\n m.content.some((c) => c.type === \"text\" && c.text.length > 0)\n );\n });\n\n if (!hasSpeakableContent) return null;\n return callback;\n};\n\nexport namespace ActionBarPrimitiveSpeak {\n export type Element = ActionButtonElement;\n export type Props = ActionButtonProps<typeof useActionBarSpeak>;\n}\n\nexport const ActionBarPrimitiveSpeak = createActionButton(\n \"ActionBarPrimitive.Speak\",\n useActionBarSpeak,\n);\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/actionBar/ActionBarSpeak.tsx"],"sourcesContent":["\"use client\";\n\nimport { useCallback } from \"react\";\nimport { useMessage, useMessageRuntime } from \"../../context\";\nimport {\n ActionButtonElement,\n ActionButtonProps,\n createActionButton,\n} from \"../../utils/createActionButton\";\n\nconst useActionBarSpeak = () => {\n const messageRuntime = useMessageRuntime();\n const callback = useCallback(async () => {\n messageRuntime.speak();\n }, [messageRuntime]);\n\n const hasSpeakableContent = useMessage((m) => {\n return (\n (m.role !== \"assistant\" || m.status.type !== \"running\") &&\n m.content.some((c) => c.type === \"text\" && c.text.length > 0)\n );\n });\n\n if (!hasSpeakableContent) return null;\n return callback;\n};\n\nexport namespace ActionBarPrimitiveSpeak {\n export type Element = ActionButtonElement;\n export type Props = ActionButtonProps<typeof useActionBarSpeak>;\n}\n\nexport const ActionBarPrimitiveSpeak = createActionButton(\n \"ActionBarPrimitive.Speak\",\n useActionBarSpeak,\n);\n"],"mappings":";;;AAEA,SAAS,mBAAmB;AAC5B,SAAS,YAAY,yBAAyB;AAC9C;AAAA,EAGE;AAAA,OACK;AAEP,IAAM,oBAAoB,MAAM;AAC9B,QAAM,iBAAiB,kBAAkB;AACzC,QAAM,WAAW,YAAY,YAAY;AACvC,mBAAe,MAAM;AAAA,EACvB,GAAG,CAAC,cAAc,CAAC;AAEnB,QAAM,sBAAsB,WAAW,CAAC,MAAM;AAC5C,YACG,EAAE,SAAS,eAAe,EAAE,OAAO,SAAS,cAC7C,EAAE,QAAQ,KAAK,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,KAAK,SAAS,CAAC;AAAA,EAEhE,CAAC;AAED,MAAI,CAAC,oBAAqB,QAAO;AACjC,SAAO;AACT;AAOO,IAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AACF;","names":[]}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
"use client";
|
2
|
-
|
2
|
+
|
3
|
+
// src/primitives/actionBar/ActionBarStopSpeaking.tsx
|
3
4
|
import { forwardRef } from "react";
|
4
5
|
import { useEscapeKeydown } from "@radix-ui/react-use-escape-keydown";
|
5
6
|
import { Primitive } from "@radix-ui/react-primitive";
|
@@ -8,8 +9,9 @@ import { useCallback } from "react";
|
|
8
9
|
import {
|
9
10
|
useMessage,
|
10
11
|
useMessageRuntime
|
11
|
-
} from "../../context/react/MessageContext";
|
12
|
-
|
12
|
+
} from "../../context/react/MessageContext.js";
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
14
|
+
var useActionBarStopSpeaking = () => {
|
13
15
|
const messageRuntime = useMessageRuntime();
|
14
16
|
const isSpeaking = useMessage((u) => u.speech != null);
|
15
17
|
const callback = useCallback(() => {
|
@@ -18,7 +20,7 @@ const useActionBarStopSpeaking = () => {
|
|
18
20
|
if (!isSpeaking) return null;
|
19
21
|
return callback;
|
20
22
|
};
|
21
|
-
|
23
|
+
var ActionBarPrimitiveStopSpeaking = forwardRef((props, ref) => {
|
22
24
|
const callback = useActionBarStopSpeaking();
|
23
25
|
useEscapeKeydown((e) => {
|
24
26
|
if (callback) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/actionBar/ActionBarStopSpeaking.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef } from \"react\";\nimport { ActionButtonProps } from \"../../utils/createActionButton\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useCallback } from \"react\";\nimport {\n useMessage,\n useMessageRuntime,\n} from \"../../context/react/MessageContext\";\n\nconst useActionBarStopSpeaking = () => {\n const messageRuntime = useMessageRuntime();\n const isSpeaking = useMessage((u) => u.speech != null);\n\n const callback = useCallback(() => {\n messageRuntime.stopSpeaking();\n }, [messageRuntime]);\n\n if (!isSpeaking) return null;\n\n return callback;\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 // TODO this stops working if the user is not hovering over an older message\n useEscapeKeydown((e) => {\n if (callback) {\n e.preventDefault();\n callback();\n }\n });\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":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/actionBar/ActionBarStopSpeaking.tsx"],"sourcesContent":["\"use client\";\n\nimport { forwardRef } from \"react\";\nimport { ActionButtonProps } from \"../../utils/createActionButton\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useCallback } from \"react\";\nimport {\n useMessage,\n useMessageRuntime,\n} from \"../../context/react/MessageContext\";\n\nconst useActionBarStopSpeaking = () => {\n const messageRuntime = useMessageRuntime();\n const isSpeaking = useMessage((u) => u.speech != null);\n\n const callback = useCallback(() => {\n messageRuntime.stopSpeaking();\n }, [messageRuntime]);\n\n if (!isSpeaking) return null;\n\n return callback;\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 // TODO this stops working if the user is not hovering over an older message\n useEscapeKeydown((e) => {\n if (callback) {\n e.preventDefault();\n callback();\n }\n });\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":";;;AAEA,SAAS,kBAAkB;AAE3B,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAmCH;AAjCJ,IAAM,2BAA2B,MAAM;AACrC,QAAM,iBAAiB,kBAAkB;AACzC,QAAM,aAAa,WAAW,CAAC,MAAM,EAAE,UAAU,IAAI;AAErD,QAAM,WAAW,YAAY,MAAM;AACjC,mBAAe,aAAa;AAAA,EAC9B,GAAG,CAAC,cAAc,CAAC;AAEnB,MAAI,CAAC,WAAY,QAAO;AAExB,SAAO;AACT;AAOO,IAAM,iCAAiC,WAG5C,CAAC,OAAO,QAAQ;AAChB,QAAM,WAAW,yBAAyB;AAG1C,mBAAiB,CAAC,MAAM;AACtB,QAAI,UAAU;AACZ,QAAE,eAAe;AACjB,eAAS;AAAA,IACX;AAAA,EACF,CAAC;AAED,SACE;AAAA,IAAC,UAAU;AAAA,IAAV;AAAA,MACC,MAAK;AAAA,MACL,UAAU,CAAC;AAAA,MACV,GAAG;AAAA,MACJ;AAAA,MACA,SAAS,qBAAqB,MAAM,SAAS,MAAM;AACjD,mBAAW;AAAA,MACb,CAAC;AAAA;AAAA,EACH;AAEJ,CAAC;AAED,+BAA+B,cAAc;","names":[]}
|
@@ -1,11 +1,12 @@
|
|
1
|
-
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import {
|
1
|
+
// src/primitives/actionBar/index.ts
|
2
|
+
import { ActionBarPrimitiveRoot } from "./ActionBarRoot.js";
|
3
|
+
import { ActionBarPrimitiveCopy } from "./ActionBarCopy.js";
|
4
|
+
import { ActionBarPrimitiveReload } from "./ActionBarReload.js";
|
5
|
+
import { ActionBarPrimitiveEdit } from "./ActionBarEdit.js";
|
6
|
+
import { ActionBarPrimitiveSpeak } from "./ActionBarSpeak.js";
|
7
|
+
import { ActionBarPrimitiveStopSpeaking } from "./ActionBarStopSpeaking.js";
|
8
|
+
import { ActionBarPrimitiveFeedbackPositive } from "./ActionBarFeedbackPositive.js";
|
9
|
+
import { ActionBarPrimitiveFeedbackNegative } from "./ActionBarFeedbackNegative.js";
|
9
10
|
export {
|
10
11
|
ActionBarPrimitiveCopy as Copy,
|
11
12
|
ActionBarPrimitiveEdit as Edit,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/actionBar/index.ts"],"sourcesContent":["export { ActionBarPrimitiveRoot as Root } from \"./ActionBarRoot\";\nexport { ActionBarPrimitiveCopy as Copy } from \"./ActionBarCopy\";\nexport { ActionBarPrimitiveReload as Reload } from \"./ActionBarReload\";\nexport { ActionBarPrimitiveEdit as Edit } from \"./ActionBarEdit\";\nexport { ActionBarPrimitiveSpeak as Speak } from \"./ActionBarSpeak\";\nexport { ActionBarPrimitiveStopSpeaking as StopSpeaking } from \"./ActionBarStopSpeaking\";\nexport { ActionBarPrimitiveFeedbackPositive as FeedbackPositive } from \"./ActionBarFeedbackPositive\";\nexport { ActionBarPrimitiveFeedbackNegative as FeedbackNegative } from \"./ActionBarFeedbackNegative\";\n"],"mappings":"AAAA,SAAmC,8BAAY;AAC/C,SAAmC,8BAAY;AAC/C,SAAqC,gCAAc;AACnD,SAAmC,8BAAY;AAC/C,SAAoC,+BAAa;AACjD,SAA2C,sCAAoB;AAC/D,SAA+C,0CAAwB;AACvE,SAA+C,0CAAwB;","names":[]}
|
1
|
+
{"version":3,"sources":["../../../src/primitives/actionBar/index.ts"],"sourcesContent":["export { ActionBarPrimitiveRoot as Root } from \"./ActionBarRoot\";\nexport { ActionBarPrimitiveCopy as Copy } from \"./ActionBarCopy\";\nexport { ActionBarPrimitiveReload as Reload } from \"./ActionBarReload\";\nexport { ActionBarPrimitiveEdit as Edit } from \"./ActionBarEdit\";\nexport { ActionBarPrimitiveSpeak as Speak } from \"./ActionBarSpeak\";\nexport { ActionBarPrimitiveStopSpeaking as StopSpeaking } from \"./ActionBarStopSpeaking\";\nexport { ActionBarPrimitiveFeedbackPositive as FeedbackPositive } from \"./ActionBarFeedbackPositive\";\nexport { ActionBarPrimitiveFeedbackNegative as FeedbackNegative } from \"./ActionBarFeedbackNegative\";\n"],"mappings":";AAAA,SAAmC,8BAAY;AAC/C,SAAmC,8BAAY;AAC/C,SAAqC,gCAAc;AACnD,SAAmC,8BAAY;AAC/C,SAAoC,+BAAa;AACjD,SAA2C,sCAAoB;AAC/D,SAA+C,0CAAwB;AACvE,SAA+C,0CAAwB;","names":[]}
|
@@ -1,17 +1,19 @@
|
|
1
1
|
"use client";
|
2
|
+
|
3
|
+
// src/primitives/actionBar/useActionBarFloatStatus.tsx
|
2
4
|
import {
|
3
5
|
useMessageRuntime,
|
4
6
|
useMessageUtilsStore
|
5
|
-
} from "../../context/react/MessageContext";
|
6
|
-
import { useThreadRuntime } from "../../context/react/ThreadContext";
|
7
|
-
import { useCombinedStore } from "../../utils/combined/useCombinedStore";
|
7
|
+
} from "../../context/react/MessageContext.js";
|
8
|
+
import { useThreadRuntime } from "../../context/react/ThreadContext.js";
|
9
|
+
import { useCombinedStore } from "../../utils/combined/useCombinedStore.js";
|
8
10
|
var HideAndFloatStatus = /* @__PURE__ */ ((HideAndFloatStatus2) => {
|
9
11
|
HideAndFloatStatus2["Hidden"] = "hidden";
|
10
12
|
HideAndFloatStatus2["Floating"] = "floating";
|
11
13
|
HideAndFloatStatus2["Normal"] = "normal";
|
12
14
|
return HideAndFloatStatus2;
|
13
15
|
})(HideAndFloatStatus || {});
|
14
|
-
|
16
|
+
var useActionBarFloatStatus = ({
|
15
17
|
hideWhenRunning,
|
16
18
|
autohide,
|
17
19
|
autohideFloat
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/actionBar/useActionBarFloatStatus.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n useMessageRuntime,\n useMessageUtilsStore,\n} from \"../../context/react/MessageContext\";\nimport { useThreadRuntime } from \"../../context/react/ThreadContext\";\nimport { useCombinedStore } from \"../../utils/combined/useCombinedStore\";\n\nexport enum HideAndFloatStatus {\n Hidden = \"hidden\",\n Floating = \"floating\",\n Normal = \"normal\",\n}\n\nexport type UseActionBarFloatStatusProps = {\n hideWhenRunning?: boolean | undefined;\n autohide?: \"always\" | \"not-last\" | \"never\" | undefined;\n autohideFloat?: \"always\" | \"single-branch\" | \"never\" | undefined;\n};\n\nexport const useActionBarFloatStatus = ({\n hideWhenRunning,\n autohide,\n autohideFloat,\n}: UseActionBarFloatStatusProps) => {\n const threadRuntime = useThreadRuntime();\n const messageRuntime = useMessageRuntime();\n const messageUtilsStore = useMessageUtilsStore();\n\n return useCombinedStore(\n [threadRuntime, messageRuntime, messageUtilsStore],\n (t, m, mu) => {\n if (hideWhenRunning && t.isRunning) return HideAndFloatStatus.Hidden;\n\n const autohideEnabled =\n autohide === \"always\" || (autohide === \"not-last\" && !m.isLast);\n\n // normal status\n if (!autohideEnabled) return HideAndFloatStatus.Normal;\n\n // hidden status\n if (!mu.isHovering) return HideAndFloatStatus.Hidden;\n\n // floating status\n if (\n autohideFloat === \"always\" ||\n (autohideFloat === \"single-branch\" && m.branchCount <= 1)\n )\n return HideAndFloatStatus.Floating;\n\n return HideAndFloatStatus.Normal;\n },\n );\n};\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/actionBar/useActionBarFloatStatus.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n useMessageRuntime,\n useMessageUtilsStore,\n} from \"../../context/react/MessageContext\";\nimport { useThreadRuntime } from \"../../context/react/ThreadContext\";\nimport { useCombinedStore } from \"../../utils/combined/useCombinedStore\";\n\nexport enum HideAndFloatStatus {\n Hidden = \"hidden\",\n Floating = \"floating\",\n Normal = \"normal\",\n}\n\nexport type UseActionBarFloatStatusProps = {\n hideWhenRunning?: boolean | undefined;\n autohide?: \"always\" | \"not-last\" | \"never\" | undefined;\n autohideFloat?: \"always\" | \"single-branch\" | \"never\" | undefined;\n};\n\nexport const useActionBarFloatStatus = ({\n hideWhenRunning,\n autohide,\n autohideFloat,\n}: UseActionBarFloatStatusProps) => {\n const threadRuntime = useThreadRuntime();\n const messageRuntime = useMessageRuntime();\n const messageUtilsStore = useMessageUtilsStore();\n\n return useCombinedStore(\n [threadRuntime, messageRuntime, messageUtilsStore],\n (t, m, mu) => {\n if (hideWhenRunning && t.isRunning) return HideAndFloatStatus.Hidden;\n\n const autohideEnabled =\n autohide === \"always\" || (autohide === \"not-last\" && !m.isLast);\n\n // normal status\n if (!autohideEnabled) return HideAndFloatStatus.Normal;\n\n // hidden status\n if (!mu.isHovering) return HideAndFloatStatus.Hidden;\n\n // floating status\n if (\n autohideFloat === \"always\" ||\n (autohideFloat === \"single-branch\" && m.branchCount <= 1)\n )\n return HideAndFloatStatus.Floating;\n\n return HideAndFloatStatus.Normal;\n },\n );\n};\n"],"mappings":";;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AAE1B,IAAK,qBAAL,kBAAKA,wBAAL;AACL,EAAAA,oBAAA,YAAS;AACT,EAAAA,oBAAA,cAAW;AACX,EAAAA,oBAAA,YAAS;AAHC,SAAAA;AAAA,GAAA;AAYL,IAAM,0BAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AACF,MAAoC;AAClC,QAAM,gBAAgB,iBAAiB;AACvC,QAAM,iBAAiB,kBAAkB;AACzC,QAAM,oBAAoB,qBAAqB;AAE/C,SAAO;AAAA,IACL,CAAC,eAAe,gBAAgB,iBAAiB;AAAA,IACjD,CAAC,GAAG,GAAG,OAAO;AACZ,UAAI,mBAAmB,EAAE,UAAW,QAAO;AAE3C,YAAM,kBACJ,aAAa,YAAa,aAAa,cAAc,CAAC,EAAE;AAG1D,UAAI,CAAC,gBAAiB,QAAO;AAG7B,UAAI,CAAC,GAAG,WAAY,QAAO;AAG3B,UACE,kBAAkB,YACjB,kBAAkB,mBAAmB,EAAE,eAAe;AAEvD,eAAO;AAET,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["HideAndFloatStatus"]}
|
@@ -1,9 +1,11 @@
|
|
1
1
|
"use client";
|
2
|
-
|
2
|
+
|
3
|
+
// src/primitives/assistantModal/AssistantModalAnchor.tsx
|
3
4
|
import { forwardRef } from "react";
|
4
5
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
5
|
-
import { usePopoverScope } from "./scope";
|
6
|
-
|
6
|
+
import { usePopoverScope } from "./scope.js";
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
8
|
+
var AssistantModalPrimitiveAnchor = forwardRef(
|
7
9
|
({
|
8
10
|
__scopeAssistantModal,
|
9
11
|
...rest
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/assistantModal/AssistantModalAnchor.tsx"],"sourcesContent":["\"use client\";\n\nimport { ComponentPropsWithoutRef, ComponentRef, forwardRef } from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { ScopedProps, usePopoverScope } from \"./scope\";\n\nexport namespace AssistantModalPrimitiveAnchor {\n export type Element = ComponentRef<typeof PopoverPrimitive.Anchor>;\n export type Props = ComponentPropsWithoutRef<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 <PopoverPrimitive.Anchor {...scope} {...rest} ref={ref} />;\n },\n);\nAssistantModalPrimitiveAnchor.displayName = \"AssistantModalPrimitive.Anchor\";\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/assistantModal/AssistantModalAnchor.tsx"],"sourcesContent":["\"use client\";\n\nimport { ComponentPropsWithoutRef, ComponentRef, forwardRef } from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { ScopedProps, usePopoverScope } from \"./scope\";\n\nexport namespace AssistantModalPrimitiveAnchor {\n export type Element = ComponentRef<typeof PopoverPrimitive.Anchor>;\n export type Props = ComponentPropsWithoutRef<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 <PopoverPrimitive.Anchor {...scope} {...rest} ref={ref} />;\n },\n);\nAssistantModalPrimitiveAnchor.displayName = \"AssistantModalPrimitive.Anchor\";\n"],"mappings":";;;AAEA,SAAiD,kBAAkB;AACnE,YAAY,sBAAsB;AAClC,SAAsB,uBAAuB;AAoBlC;AAbJ,IAAM,gCAAgC;AAAA,EAI3C,CACE;AAAA,IACE;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,QAAQ,gBAAgB,qBAAqB;AAEnD,WAAO,oBAAkB,yBAAjB,EAAyB,GAAG,OAAQ,GAAG,MAAM,KAAU;AAAA,EACjE;AACF;AACA,8BAA8B,cAAc;","names":[]}
|
@@ -1,10 +1,12 @@
|
|
1
1
|
"use client";
|
2
|
-
|
2
|
+
|
3
|
+
// src/primitives/assistantModal/AssistantModalContent.tsx
|
3
4
|
import { forwardRef } from "react";
|
4
5
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
5
|
-
import { usePopoverScope } from "./scope";
|
6
|
+
import { usePopoverScope } from "./scope.js";
|
6
7
|
import { composeEventHandlers } from "@radix-ui/primitive";
|
7
|
-
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
9
|
+
var AssistantModalPrimitiveContent = forwardRef(
|
8
10
|
({
|
9
11
|
__scopeAssistantModal,
|
10
12
|
side,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/assistantModal/AssistantModalContent.tsx"],"sourcesContent":["\"use client\";\n\nimport { ComponentPropsWithoutRef, ComponentRef, forwardRef } from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { ScopedProps, usePopoverScope } from \"./scope\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\n\nexport namespace AssistantModalPrimitiveContent {\n export type Element = ComponentRef<typeof PopoverPrimitive.Content>;\n export type Props = ComponentPropsWithoutRef<\n typeof PopoverPrimitive.Content\n > & {\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 ...props\n }: ScopedProps<AssistantModalPrimitiveContent.Props>,\n forwardedRef,\n ) => {\n const scope = usePopoverScope(__scopeAssistantModal);\n\n return (\n <PopoverPrimitive.Portal {...scope}>\n <PopoverPrimitive.Content\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":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/assistantModal/AssistantModalContent.tsx"],"sourcesContent":["\"use client\";\n\nimport { ComponentPropsWithoutRef, ComponentRef, forwardRef } from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { ScopedProps, usePopoverScope } from \"./scope\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\n\nexport namespace AssistantModalPrimitiveContent {\n export type Element = ComponentRef<typeof PopoverPrimitive.Content>;\n export type Props = ComponentPropsWithoutRef<\n typeof PopoverPrimitive.Content\n > & {\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 ...props\n }: ScopedProps<AssistantModalPrimitiveContent.Props>,\n forwardedRef,\n ) => {\n const scope = usePopoverScope(__scopeAssistantModal);\n\n return (\n <PopoverPrimitive.Portal {...scope}>\n <PopoverPrimitive.Content\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":";;;AAEA,SAAiD,kBAAkB;AACnE,YAAY,sBAAsB;AAClC,SAAsB,uBAAuB;AAC7C,SAAS,4BAA4B;AA8B7B;AAnBD,IAAM,iCAAiC;AAAA,EAI5C,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,4BAA4B;AAAA,IAC5B,GAAG;AAAA,EACL,GACA,iBACG;AACH,UAAM,QAAQ,gBAAgB,qBAAqB;AAEnD,WACE,oBAAkB,yBAAjB,EAAyB,GAAG,OAC3B;AAAA,MAAkB;AAAA,MAAjB;AAAA,QACE,GAAG;AAAA,QACH,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,MAAM,QAAQ;AAAA,QACd,OAAO,SAAS;AAAA,QAChB,mBAAmB;AAAA,UACjB;AAAA,UACA,4BAA4B,SAAY,CAAC,MAAM,EAAE,eAAe;AAAA,QAClE;AAAA;AAAA,IACF,GACF;AAAA,EAEJ;AACF;AAEA,+BAA+B,cAAc;","names":[]}
|
@@ -1,10 +1,12 @@
|
|
1
1
|
"use client";
|
2
|
-
|
2
|
+
|
3
|
+
// src/primitives/assistantModal/AssistantModalRoot.tsx
|
3
4
|
import { useEffect, useState } from "react";
|
4
5
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
5
|
-
import { usePopoverScope } from "./scope";
|
6
|
-
import { useThreadRuntime } from "../../context";
|
7
|
-
|
6
|
+
import { usePopoverScope } from "./scope.js";
|
7
|
+
import { useThreadRuntime } from "../../context/index.js";
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
9
|
+
var useAssistantModalOpenState = ({
|
8
10
|
defaultOpen = false,
|
9
11
|
unstable_openOnRunStart = true
|
10
12
|
}) => {
|
@@ -24,7 +26,7 @@ const useAssistantModalOpenState = ({
|
|
24
26
|
]);
|
25
27
|
return state;
|
26
28
|
};
|
27
|
-
|
29
|
+
var AssistantModalPrimitiveRoot = ({
|
28
30
|
__scopeAssistantModal,
|
29
31
|
defaultOpen,
|
30
32
|
unstable_openOnRunStart,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/assistantModal/AssistantModalRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { FC, useEffect, useState } from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { ScopedProps, usePopoverScope } from \"./scope\";\nimport { useThreadRuntime } from \"../../context\";\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 threadRuntime = useThreadRuntime();\n useEffect(() => {\n if (!unstable_openOnRunStart) return undefined;\n\n return threadRuntime.unstable_on(\"run-start\", () => {\n setOpen(true);\n });\n }, [\n unstable_openOnRunStart,\n setOpen,\n threadRuntime,\n !unstable_openOnRunStart,\n ]);\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":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/assistantModal/AssistantModalRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { FC, useEffect, useState } from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { ScopedProps, usePopoverScope } from \"./scope\";\nimport { useThreadRuntime } from \"../../context\";\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 threadRuntime = useThreadRuntime();\n useEffect(() => {\n if (!unstable_openOnRunStart) return undefined;\n\n return threadRuntime.unstable_on(\"run-start\", () => {\n setOpen(true);\n });\n }, [\n unstable_openOnRunStart,\n setOpen,\n threadRuntime,\n !unstable_openOnRunStart,\n ]);\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":";;;AAEA,SAAa,WAAW,gBAAgB;AACxC,YAAY,sBAAsB;AAClC,SAAsB,uBAAuB;AAC7C,SAAS,wBAAwB;AA0D7B;AAlDJ,IAAM,6BAA6B,CAAC;AAAA,EAClC,cAAc;AAAA,EACd,0BAA0B;AAC5B,MAGM;AACJ,QAAM,QAAQ,SAAS,WAAW;AAElC,QAAM,CAAC,EAAE,OAAO,IAAI;AACpB,QAAM,gBAAgB,iBAAiB;AACvC,YAAU,MAAM;AACd,QAAI,CAAC,wBAAyB,QAAO;AAErC,WAAO,cAAc,YAAY,aAAa,MAAM;AAClD,cAAQ,IAAI;AAAA,IACd,CAAC;AAAA,EACH,GAAG;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA,CAAC;AAAA,EACH,CAAC;AAED,SAAO;AACT;AAEO,IAAM,8BAET,CAAC;AAAA,EACH;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAsD;AACpD,QAAM,QAAQ,gBAAgB,qBAAqB;AAEnD,QAAM,CAAC,WAAW,OAAO,IAAI,2BAA2B;AAAA,IACtD;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,oBAAoB,CAACA,UAAkB;AAC3C,mBAAeA,KAAI;AACnB,YAAQA,KAAI;AAAA,EACd;AAEA,SACE;AAAA,IAAkB;AAAA,IAAjB;AAAA,MACE,GAAG;AAAA,MACJ,MAAM,SAAS,SAAY,YAAY;AAAA,MACvC,cAAc;AAAA,MACb,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,4BAA4B,cAAc;","names":["open"]}
|
@@ -1,8 +1,9 @@
|
|
1
|
-
|
1
|
+
// src/primitives/assistantModal/AssistantModalTrigger.tsx
|
2
2
|
import { forwardRef } from "react";
|
3
3
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
4
|
-
import { usePopoverScope } from "./scope";
|
5
|
-
|
4
|
+
import { usePopoverScope } from "./scope.js";
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
6
|
+
var AssistantModalPrimitiveTrigger = forwardRef(
|
6
7
|
({
|
7
8
|
__scopeAssistantModal,
|
8
9
|
...rest
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/assistantModal/AssistantModalTrigger.tsx"],"sourcesContent":["import { ComponentPropsWithoutRef, ComponentRef, forwardRef } from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { ScopedProps, usePopoverScope } from \"./scope\";\n\nexport namespace AssistantModalPrimitiveTrigger {\n export type Element = ComponentRef<typeof PopoverPrimitive.Trigger>;\n export type Props = ComponentPropsWithoutRef<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 <PopoverPrimitive.Trigger {...scope} {...rest} ref={ref} />;\n },\n);\n\nAssistantModalPrimitiveTrigger.displayName = \"AssistantModalPrimitive.Trigger\";\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/assistantModal/AssistantModalTrigger.tsx"],"sourcesContent":["import { ComponentPropsWithoutRef, ComponentRef, forwardRef } from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { ScopedProps, usePopoverScope } from \"./scope\";\n\nexport namespace AssistantModalPrimitiveTrigger {\n export type Element = ComponentRef<typeof PopoverPrimitive.Trigger>;\n export type Props = ComponentPropsWithoutRef<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 <PopoverPrimitive.Trigger {...scope} {...rest} ref={ref} />;\n },\n);\n\nAssistantModalPrimitiveTrigger.displayName = \"AssistantModalPrimitive.Trigger\";\n"],"mappings":";AAAA,SAAiD,kBAAkB;AACnE,YAAY,sBAAsB;AAClC,SAAsB,uBAAuB;AAoBlC;AAbJ,IAAM,iCAAiC;AAAA,EAI5C,CACE;AAAA,IACE;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,QAAQ,gBAAgB,qBAAqB;AAEnD,WAAO,oBAAkB,0BAAjB,EAA0B,GAAG,OAAQ,GAAG,MAAM,KAAU;AAAA,EAClE;AACF;AAEA,+BAA+B,cAAc;","names":[]}
|
@@ -1,7 +1,8 @@
|
|
1
|
-
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
1
|
+
// src/primitives/assistantModal/index.ts
|
2
|
+
import { AssistantModalPrimitiveRoot } from "./AssistantModalRoot.js";
|
3
|
+
import { AssistantModalPrimitiveTrigger } from "./AssistantModalTrigger.js";
|
4
|
+
import { AssistantModalPrimitiveContent } from "./AssistantModalContent.js";
|
5
|
+
import { AssistantModalPrimitiveAnchor } from "./AssistantModalAnchor.js";
|
5
6
|
export {
|
6
7
|
AssistantModalPrimitiveAnchor as Anchor,
|
7
8
|
AssistantModalPrimitiveContent as Content,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/assistantModal/index.ts"],"sourcesContent":["export { AssistantModalPrimitiveRoot as Root } from \"./AssistantModalRoot\";\nexport { AssistantModalPrimitiveTrigger as Trigger } from \"./AssistantModalTrigger\";\nexport { AssistantModalPrimitiveContent as Content } from \"./AssistantModalContent\";\nexport { AssistantModalPrimitiveAnchor as Anchor } from \"./AssistantModalAnchor\";\n"],"mappings":"AAAA,SAAwC,mCAAY;AACpD,SAA2C,sCAAe;AAC1D,SAA2C,sCAAe;AAC1D,SAA0C,qCAAc;","names":[]}
|
1
|
+
{"version":3,"sources":["../../../src/primitives/assistantModal/index.ts"],"sourcesContent":["export { AssistantModalPrimitiveRoot as Root } from \"./AssistantModalRoot\";\nexport { AssistantModalPrimitiveTrigger as Trigger } from \"./AssistantModalTrigger\";\nexport { AssistantModalPrimitiveContent as Content } from \"./AssistantModalContent\";\nexport { AssistantModalPrimitiveAnchor as Anchor } from \"./AssistantModalAnchor\";\n"],"mappings":";AAAA,SAAwC,mCAAY;AACpD,SAA2C,sCAAe;AAC1D,SAA2C,sCAAe;AAC1D,SAA0C,qCAAc;","names":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/assistantModal/scope.tsx"],"sourcesContent":["import * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport type { Scope } from \"@radix-ui/react-context\";\n\nexport const usePopoverScope = PopoverPrimitive.createPopoverScope();\nexport type ScopedProps<P> = P & { __scopeAssistantModal?: Scope };\n"],"mappings":"AAAA,YAAY,sBAAsB;AAG3B,
|
1
|
+
{"version":3,"sources":["../../../src/primitives/assistantModal/scope.tsx"],"sourcesContent":["import * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport type { Scope } from \"@radix-ui/react-context\";\n\nexport const usePopoverScope = PopoverPrimitive.createPopoverScope();\nexport type ScopedProps<P> = P & { __scopeAssistantModal?: Scope };\n"],"mappings":";AAAA,YAAY,sBAAsB;AAG3B,IAAM,kBAAmC,oCAAmB;","names":[]}
|
@@ -1,7 +1,9 @@
|
|
1
1
|
"use client";
|
2
|
+
|
3
|
+
// src/primitives/attachment/AttachmentName.tsx
|
4
|
+
import { useAttachment } from "../../context/react/AttachmentContext.js";
|
2
5
|
import { Fragment, jsx } from "react/jsx-runtime";
|
3
|
-
|
4
|
-
const AttachmentPrimitiveName = () => {
|
6
|
+
var AttachmentPrimitiveName = () => {
|
5
7
|
const name = useAttachment((a) => a.name);
|
6
8
|
return /* @__PURE__ */ jsx(Fragment, { children: name });
|
7
9
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/attachment/AttachmentName.tsx"],"sourcesContent":["\"use client\";\n\nimport type { FC } from \"react\";\nimport { useAttachment } from \"../../context/react/AttachmentContext\";\n\nexport namespace AttachmentPrimitiveName {\n export type Props = Record<string, never>;\n}\n\nexport const AttachmentPrimitiveName: FC<\n AttachmentPrimitiveName.Props\n> = () => {\n const name = useAttachment((a) => a.name);\n return <>{name}</>;\n};\n\nAttachmentPrimitiveName.displayName = \"AttachmentPrimitive.Name\";\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/attachment/AttachmentName.tsx"],"sourcesContent":["\"use client\";\n\nimport type { FC } from \"react\";\nimport { useAttachment } from \"../../context/react/AttachmentContext\";\n\nexport namespace AttachmentPrimitiveName {\n export type Props = Record<string, never>;\n}\n\nexport const AttachmentPrimitiveName: FC<\n AttachmentPrimitiveName.Props\n> = () => {\n const name = useAttachment((a) => a.name);\n return <>{name}</>;\n};\n\nAttachmentPrimitiveName.displayName = \"AttachmentPrimitive.Name\";\n"],"mappings":";;;AAGA,SAAS,qBAAqB;AAUrB;AAJF,IAAM,0BAET,MAAM;AACR,QAAM,OAAO,cAAc,CAAC,MAAM,EAAE,IAAI;AACxC,SAAO,gCAAG,gBAAK;AACjB;AAEA,wBAAwB,cAAc;","names":[]}
|
@@ -1,17 +1,19 @@
|
|
1
1
|
"use client";
|
2
|
+
|
3
|
+
// src/primitives/attachment/AttachmentRemove.tsx
|
2
4
|
import {
|
3
5
|
createActionButton
|
4
|
-
} from "../../utils/createActionButton";
|
6
|
+
} from "../../utils/createActionButton.js";
|
5
7
|
import { useCallback } from "react";
|
6
|
-
import { useAttachmentRuntime } from "../../context/react/AttachmentContext";
|
7
|
-
|
8
|
+
import { useAttachmentRuntime } from "../../context/react/AttachmentContext.js";
|
9
|
+
var useAttachmentRemove = () => {
|
8
10
|
const attachmentRuntime = useAttachmentRuntime();
|
9
11
|
const handleRemoveAttachment = useCallback(() => {
|
10
12
|
attachmentRuntime.remove();
|
11
13
|
}, [attachmentRuntime]);
|
12
14
|
return handleRemoveAttachment;
|
13
15
|
};
|
14
|
-
|
16
|
+
var AttachmentPrimitiveRemove = createActionButton(
|
15
17
|
"AttachmentPrimitive.Remove",
|
16
18
|
useAttachmentRemove
|
17
19
|
);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/attachment/AttachmentRemove.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n ActionButtonElement,\n ActionButtonProps,\n createActionButton,\n} from \"../../utils/createActionButton\";\nimport { useCallback } from \"react\";\nimport { useAttachmentRuntime } from \"../../context/react/AttachmentContext\";\n\nconst useAttachmentRemove = () => {\n const attachmentRuntime = useAttachmentRuntime();\n\n const handleRemoveAttachment = useCallback(() => {\n attachmentRuntime.remove();\n }, [attachmentRuntime]);\n\n return handleRemoveAttachment;\n};\n\nexport namespace AttachmentPrimitiveRemove {\n export type Element = ActionButtonElement;\n export type Props = ActionButtonProps<typeof useAttachmentRemove>;\n}\n\nexport const AttachmentPrimitiveRemove = createActionButton(\n \"AttachmentPrimitive.Remove\",\n useAttachmentRemove,\n);\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/attachment/AttachmentRemove.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n ActionButtonElement,\n ActionButtonProps,\n createActionButton,\n} from \"../../utils/createActionButton\";\nimport { useCallback } from \"react\";\nimport { useAttachmentRuntime } from \"../../context/react/AttachmentContext\";\n\nconst useAttachmentRemove = () => {\n const attachmentRuntime = useAttachmentRuntime();\n\n const handleRemoveAttachment = useCallback(() => {\n attachmentRuntime.remove();\n }, [attachmentRuntime]);\n\n return handleRemoveAttachment;\n};\n\nexport namespace AttachmentPrimitiveRemove {\n export type Element = ActionButtonElement;\n export type Props = ActionButtonProps<typeof useAttachmentRemove>;\n}\n\nexport const AttachmentPrimitiveRemove = createActionButton(\n \"AttachmentPrimitive.Remove\",\n useAttachmentRemove,\n);\n"],"mappings":";;;AAEA;AAAA,EAGE;AAAA,OACK;AACP,SAAS,mBAAmB;AAC5B,SAAS,4BAA4B;AAErC,IAAM,sBAAsB,MAAM;AAChC,QAAM,oBAAoB,qBAAqB;AAE/C,QAAM,yBAAyB,YAAY,MAAM;AAC/C,sBAAkB,OAAO;AAAA,EAC3B,GAAG,CAAC,iBAAiB,CAAC;AAEtB,SAAO;AACT;AAOO,IAAM,4BAA4B;AAAA,EACvC;AAAA,EACA;AACF;","names":[]}
|
@@ -1,7 +1,8 @@
|
|
1
|
-
|
1
|
+
// src/primitives/attachment/AttachmentRoot.tsx
|
2
2
|
import { Primitive } from "@radix-ui/react-primitive";
|
3
3
|
import { forwardRef } from "react";
|
4
|
-
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
5
|
+
var AttachmentPrimitiveRoot = forwardRef((props, ref) => {
|
5
6
|
return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref });
|
6
7
|
});
|
7
8
|
AttachmentPrimitiveRoot.displayName = "AttachmentPrimitive.Root";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/attachment/AttachmentRoot.tsx"],"sourcesContent":["import { Primitive } from \"@radix-ui/react-primitive\";\nimport { ComponentPropsWithoutRef, ComponentRef, forwardRef } from \"react\";\n\ntype PrimitiveDivProps = ComponentPropsWithoutRef<typeof Primitive.div>;\n\nexport namespace AttachmentPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = PrimitiveDivProps;\n}\n\nexport const AttachmentPrimitiveRoot = forwardRef<\n AttachmentPrimitiveRoot.Element,\n AttachmentPrimitiveRoot.Props\n>((props, ref) => {\n return <Primitive.div {...props} ref={ref} />;\n});\n\nAttachmentPrimitiveRoot.displayName = \"AttachmentPrimitive.Root\";\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/attachment/AttachmentRoot.tsx"],"sourcesContent":["import { Primitive } from \"@radix-ui/react-primitive\";\nimport { ComponentPropsWithoutRef, ComponentRef, forwardRef } from \"react\";\n\ntype PrimitiveDivProps = ComponentPropsWithoutRef<typeof Primitive.div>;\n\nexport namespace AttachmentPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = PrimitiveDivProps;\n}\n\nexport const AttachmentPrimitiveRoot = forwardRef<\n AttachmentPrimitiveRoot.Element,\n AttachmentPrimitiveRoot.Props\n>((props, ref) => {\n return <Primitive.div {...props} ref={ref} />;\n});\n\nAttachmentPrimitiveRoot.displayName = \"AttachmentPrimitive.Root\";\n"],"mappings":";AAAA,SAAS,iBAAiB;AAC1B,SAAiD,kBAAkB;AAa1D;AAJF,IAAM,0BAA0B,WAGrC,CAAC,OAAO,QAAQ;AAChB,SAAO,oBAAC,UAAU,KAAV,EAAe,GAAG,OAAO,KAAU;AAC7C,CAAC;AAED,wBAAwB,cAAc;","names":[]}
|
@@ -1,9 +1,11 @@
|
|
1
1
|
"use client";
|
2
|
-
|
2
|
+
|
3
|
+
// src/primitives/attachment/AttachmentThumb.tsx
|
3
4
|
import { forwardRef } from "react";
|
4
|
-
import { useAttachment } from "../../context/react/AttachmentContext";
|
5
|
+
import { useAttachment } from "../../context/react/AttachmentContext.js";
|
5
6
|
import { Primitive } from "@radix-ui/react-primitive";
|
6
|
-
|
7
|
+
import { jsxs } from "react/jsx-runtime";
|
8
|
+
var AttachmentPrimitiveThumb = forwardRef((props, ref) => {
|
7
9
|
const ext = useAttachment((a) => a.name.split(".").pop());
|
8
10
|
return /* @__PURE__ */ jsxs(Primitive.div, { ...props, ref, children: [
|
9
11
|
".",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/attachment/AttachmentThumb.tsx"],"sourcesContent":["\"use client\";\n\nimport { ComponentPropsWithoutRef, forwardRef, type ComponentRef } from \"react\";\nimport { useAttachment } from \"../../context/react/AttachmentContext\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\n\ntype PrimitiveDivProps = ComponentPropsWithoutRef<typeof Primitive.div>;\n\nexport namespace AttachmentPrimitiveThumb {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = PrimitiveDivProps;\n}\n\nexport const AttachmentPrimitiveThumb = forwardRef<\n AttachmentPrimitiveThumb.Element,\n AttachmentPrimitiveThumb.Props\n>((props, ref) => {\n const ext = useAttachment((a) => a.name.split(\".\").pop());\n return (\n <Primitive.div {...props} ref={ref}>\n .{ext}\n </Primitive.div>\n );\n});\n\nAttachmentPrimitiveThumb.displayName = \"AttachmentPrimitive.Thumb\";\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/attachment/AttachmentThumb.tsx"],"sourcesContent":["\"use client\";\n\nimport { ComponentPropsWithoutRef, forwardRef, type ComponentRef } from \"react\";\nimport { useAttachment } from \"../../context/react/AttachmentContext\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\n\ntype PrimitiveDivProps = ComponentPropsWithoutRef<typeof Primitive.div>;\n\nexport namespace AttachmentPrimitiveThumb {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = PrimitiveDivProps;\n}\n\nexport const AttachmentPrimitiveThumb = forwardRef<\n AttachmentPrimitiveThumb.Element,\n AttachmentPrimitiveThumb.Props\n>((props, ref) => {\n const ext = useAttachment((a) => a.name.split(\".\").pop());\n return (\n <Primitive.div {...props} ref={ref}>\n .{ext}\n </Primitive.div>\n );\n});\n\nAttachmentPrimitiveThumb.displayName = \"AttachmentPrimitive.Thumb\";\n"],"mappings":";;;AAEA,SAAmC,kBAAqC;AACxE,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB;AAetB;AANG,IAAM,2BAA2B,WAGtC,CAAC,OAAO,QAAQ;AAChB,QAAM,MAAM,cAAc,CAAC,MAAM,EAAE,KAAK,MAAM,GAAG,EAAE,IAAI,CAAC;AACxD,SACE,qBAAC,UAAU,KAAV,EAAe,GAAG,OAAO,KAAU;AAAA;AAAA,IAChC;AAAA,KACJ;AAEJ,CAAC;AAED,yBAAyB,cAAc;","names":[]}
|
@@ -1,7 +1,8 @@
|
|
1
|
-
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
1
|
+
// src/primitives/attachment/index.ts
|
2
|
+
import { AttachmentPrimitiveRoot } from "./AttachmentRoot.js";
|
3
|
+
import { AttachmentPrimitiveThumb } from "./AttachmentThumb.js";
|
4
|
+
import { AttachmentPrimitiveName } from "./AttachmentName.js";
|
5
|
+
import { AttachmentPrimitiveRemove } from "./AttachmentRemove.js";
|
5
6
|
export {
|
6
7
|
AttachmentPrimitiveName as Name,
|
7
8
|
AttachmentPrimitiveRemove as Remove,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/attachment/index.ts"],"sourcesContent":["export { AttachmentPrimitiveRoot as Root } from \"./AttachmentRoot\";\nexport { AttachmentPrimitiveThumb as unstable_Thumb } from \"./AttachmentThumb\";\nexport { AttachmentPrimitiveName as Name } from \"./AttachmentName\";\nexport { AttachmentPrimitiveRemove as Remove } from \"./AttachmentRemove\";\n"],"mappings":"AAAA,SAAoC,+BAAY;AAChD,SAAqC,gCAAsB;AAC3D,SAAoC,+BAAY;AAChD,SAAsC,iCAAc;","names":[]}
|
1
|
+
{"version":3,"sources":["../../../src/primitives/attachment/index.ts"],"sourcesContent":["export { AttachmentPrimitiveRoot as Root } from \"./AttachmentRoot\";\nexport { AttachmentPrimitiveThumb as unstable_Thumb } from \"./AttachmentThumb\";\nexport { AttachmentPrimitiveName as Name } from \"./AttachmentName\";\nexport { AttachmentPrimitiveRemove as Remove } from \"./AttachmentRemove\";\n"],"mappings":";AAAA,SAAoC,+BAAY;AAChD,SAAqC,gCAAsB;AAC3D,SAAoC,+BAAY;AAChD,SAAsC,iCAAc;","names":[]}
|
@@ -1,11 +1,13 @@
|
|
1
1
|
"use client";
|
2
|
+
|
3
|
+
// src/primitives/branchPicker/BranchPickerCount.tsx
|
4
|
+
import { useMessage } from "../../context/react/MessageContext.js";
|
2
5
|
import { Fragment, jsx } from "react/jsx-runtime";
|
3
|
-
|
4
|
-
const useBranchPickerCount = () => {
|
6
|
+
var useBranchPickerCount = () => {
|
5
7
|
const branchCount = useMessage((s) => s.branchCount);
|
6
8
|
return branchCount;
|
7
9
|
};
|
8
|
-
|
10
|
+
var BranchPickerPrimitiveCount = () => {
|
9
11
|
const branchCount = useBranchPickerCount();
|
10
12
|
return /* @__PURE__ */ jsx(Fragment, { children: branchCount });
|
11
13
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/primitives/branchPicker/BranchPickerCount.tsx"],"sourcesContent":["\"use client\";\n\nimport type { FC } from \"react\";\nimport { useMessage } from \"../../context/react/MessageContext\";\n\nconst useBranchPickerCount = () => {\n const branchCount = useMessage((s) => s.branchCount);\n return branchCount;\n};\n\nexport namespace BranchPickerPrimitiveCount {\n export type Props = Record<string, never>;\n}\n\nexport const BranchPickerPrimitiveCount: FC<\n BranchPickerPrimitiveCount.Props\n> = () => {\n const branchCount = useBranchPickerCount();\n return <>{branchCount}</>;\n};\n\nBranchPickerPrimitiveCount.displayName = \"BranchPickerPrimitive.Count\";\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/primitives/branchPicker/BranchPickerCount.tsx"],"sourcesContent":["\"use client\";\n\nimport type { FC } from \"react\";\nimport { useMessage } from \"../../context/react/MessageContext\";\n\nconst useBranchPickerCount = () => {\n const branchCount = useMessage((s) => s.branchCount);\n return branchCount;\n};\n\nexport namespace BranchPickerPrimitiveCount {\n export type Props = Record<string, never>;\n}\n\nexport const BranchPickerPrimitiveCount: FC<\n BranchPickerPrimitiveCount.Props\n> = () => {\n const branchCount = useBranchPickerCount();\n return <>{branchCount}</>;\n};\n\nBranchPickerPrimitiveCount.displayName = \"BranchPickerPrimitive.Count\";\n"],"mappings":";;;AAGA,SAAS,kBAAkB;AAelB;AAbT,IAAM,uBAAuB,MAAM;AACjC,QAAM,cAAc,WAAW,CAAC,MAAM,EAAE,WAAW;AACnD,SAAO;AACT;AAMO,IAAM,6BAET,MAAM;AACR,QAAM,cAAc,qBAAqB;AACzC,SAAO,gCAAG,uBAAY;AACxB;AAEA,2BAA2B,cAAc;","names":[]}
|