@tencent-rtc/mcp 1.4.7 → 1.6.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cursor-setting.png +0 -0
- package/knowledge/bm25-cache.js +74 -0
- package/knowledge/bm25-cache.js.map +1 -0
- package/knowledge/bm25.js +148 -0
- package/knowledge/bm25.js.map +1 -0
- package/knowledge/build-index.js +70 -0
- package/knowledge/build-index.js.map +1 -0
- package/knowledge/chunker.js +168 -0
- package/knowledge/chunker.js.map +1 -0
- package/knowledge/content-loader.js +40 -0
- package/knowledge/content-loader.js.map +1 -0
- package/knowledge/doc-url-resolver.js +143 -0
- package/knowledge/doc-url-resolver.js.map +1 -0
- package/knowledge/extractors.js +26 -0
- package/knowledge/extractors.js.map +1 -0
- package/knowledge/path-meta.js +185 -0
- package/knowledge/path-meta.js.map +1 -0
- package/knowledge/search/exact-lookup.js +498 -0
- package/knowledge/search/exact-lookup.js.map +1 -0
- package/knowledge/search/filter-pool.js +105 -0
- package/knowledge/search/filter-pool.js.map +1 -0
- package/knowledge/search/product-scope-intent.js +41 -0
- package/knowledge/search/product-scope-intent.js.map +1 -0
- package/knowledge/search/requires-framework.js +82 -0
- package/knowledge/search/requires-framework.js.map +1 -0
- package/knowledge/search/search-knowledge.js +230 -0
- package/knowledge/search/search-knowledge.js.map +1 -0
- package/mcp-server-prompt.png +0 -0
- package/package.json +1 -1
- package/resource/_schema/feature-aliases.yaml +10 -0
- package/resource/_schema/goal-tags.yaml +72 -0
- package/resource/_schema/products.yaml +19 -0
- package/resource/_schema/trtc-intents.yaml +27 -0
- package/resource/_schema/types.yaml +43 -0
- package/resource/index/component-slugs.json +1 -0
- package/resource/index/doc-source-urls.json +1 -0
- package/resource/index/manifest.json +1 -0
- package/resource/{doc → integration}/callkit/preset/android/integration.md +34 -28
- package/resource/integration/callkit/preset/flutter/integration.md +346 -0
- package/resource/integration/callkit/preset/ios/integration.md +408 -0
- package/resource/integration/callkit/preset/react/integration.md +362 -0
- package/resource/integration/callkit/preset/vue/integration.md +356 -0
- package/resource/integration/chat/preset/android/integration.md +500 -0
- package/resource/integration/chat/preset/flutter/integration.md +370 -0
- package/resource/integration/chat/preset/ios/integration.md +566 -0
- package/resource/integration/chat/preset/react/integration.md +490 -0
- package/resource/integration/chat/preset/vue/integration.md +504 -0
- package/resource/{doc → integration}/livekit/preset/live/vue/live-list-integration.md +26 -22
- package/resource/{doc → integration}/livekit/preset/live/vue/live-player-desk-integration.md +22 -18
- package/resource/integration/livekit/preset/live/vue/live-player-h5-integration.md +309 -0
- package/resource/{doc → integration}/livekit/preset/live/vue/live-pusher-integration.md +47 -39
- package/resource/integration/roomkit/preset/vue/integration.md +562 -0
- package/resource/knowledge/callkit/core-sdk/android/answer-call.md +828 -0
- package/resource/knowledge/callkit/core-sdk/android/make-call.md +897 -0
- package/resource/knowledge/callkit/core-sdk/android/offline-push.md +363 -0
- package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +1111 -0
- package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +1132 -0
- package/resource/{doc → knowledge}/callkit/core-sdk/flutter/offline-push.md +174 -151
- package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +1084 -0
- package/resource/knowledge/callkit/core-sdk/ios/make-call.md +1252 -0
- package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +534 -0
- package/resource/knowledge/callkit/core-sdk/uni-app/answer-call.md +953 -0
- package/resource/knowledge/callkit/core-sdk/uni-app/make-call.md +1061 -0
- package/resource/knowledge/callkit/faq/android.md +92 -0
- package/resource/{doc/callkit/faq/android-faq.md → knowledge/callkit/faq/common.md} +11 -12
- package/resource/knowledge/callkit/faq/error-code.md +67 -0
- package/resource/knowledge/callkit/faq/flutter.md +52 -0
- package/resource/knowledge/callkit/faq/ios.md +104 -0
- package/resource/knowledge/callkit/faq/web.md +74 -0
- package/resource/knowledge/callkit/preset/android/api.md +412 -0
- package/resource/knowledge/callkit/preset/flutter/api.md +22 -0
- package/resource/knowledge/callkit/preset/ios/api.md +234 -0
- package/resource/knowledge/callkit/preset/web/api.md +83 -0
- package/resource/knowledge/chat/preset/android/features/chat-setting.md +74 -0
- package/resource/knowledge/chat/preset/android/features/contact-list.md +43 -0
- package/resource/knowledge/chat/preset/android/features/conversation-list.md +117 -0
- package/resource/knowledge/chat/preset/android/features/language.md +136 -0
- package/resource/knowledge/chat/preset/android/features/message-input.md +57 -0
- package/resource/knowledge/chat/preset/android/features/message-list.md +142 -0
- package/resource/knowledge/chat/preset/android/features/search.md +64 -0
- package/resource/knowledge/chat/preset/android/features/theme.md +222 -0
- package/resource/knowledge/chat/preset/android-view/integration.md +300 -0
- package/resource/knowledge/chat/preset/flutter/features/chat-setting.md +64 -0
- package/resource/knowledge/chat/preset/flutter/features/contact-list.md +40 -0
- package/resource/knowledge/chat/preset/flutter/features/conversation-list.md +129 -0
- package/resource/knowledge/chat/preset/flutter/features/language.md +104 -0
- package/resource/knowledge/chat/preset/flutter/features/message-input.md +54 -0
- package/resource/knowledge/chat/preset/flutter/features/message-list.md +158 -0
- package/resource/knowledge/chat/preset/flutter/features/search.md +59 -0
- package/resource/knowledge/chat/preset/flutter/features/theme.md +261 -0
- package/resource/knowledge/chat/preset/ios/features/chat-setting.md +94 -0
- package/resource/knowledge/chat/preset/ios/features/contact-list.md +119 -0
- package/resource/knowledge/chat/preset/ios/features/conversation-list.md +134 -0
- package/resource/knowledge/chat/preset/ios/features/language.md +125 -0
- package/resource/knowledge/chat/preset/ios/features/message-input.md +69 -0
- package/resource/knowledge/chat/preset/ios/features/message-list.md +162 -0
- package/resource/knowledge/chat/preset/ios/features/search.md +93 -0
- package/resource/knowledge/chat/preset/ios/features/theme.md +270 -0
- package/resource/{doc/chatkit/ios → knowledge/chat/preset/ios-uikit}/integration.md +160 -158
- package/resource/knowledge/chat/preset/react/features/chat-setting.md +101 -0
- package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/contact-list.md +43 -41
- package/resource/knowledge/chat/preset/react/features/conversation-actions.md +215 -0
- package/resource/knowledge/chat/preset/react/features/conversation-list.md +339 -0
- package/resource/knowledge/chat/preset/react/features/conversation-preview.md +101 -0
- package/resource/knowledge/chat/preset/react/features/conversation-search.md +61 -0
- package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/message-input.md +117 -156
- package/resource/knowledge/chat/preset/react/features/message-list.md +297 -0
- package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/search.md +65 -59
- package/resource/knowledge/chat/preset/react/features/theme.md +93 -0
- package/resource/knowledge/chat/preset/vue/features/chat-header.md +331 -0
- package/resource/knowledge/chat/preset/vue/features/chat-setting.md +79 -0
- package/resource/knowledge/chat/preset/vue/features/contact-list.md +277 -0
- package/resource/knowledge/chat/preset/vue/features/conversation-actions.md +234 -0
- package/resource/knowledge/chat/preset/vue/features/conversation-list.md +331 -0
- package/resource/knowledge/chat/preset/vue/features/conversation-preview.md +216 -0
- package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/conversation-search.md +13 -13
- package/resource/knowledge/chat/preset/vue/features/message-input.md +551 -0
- package/resource/knowledge/chat/preset/vue/features/message-list.md +350 -0
- package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/search.md +79 -73
- package/resource/knowledge/chat/preset/vue/features/theme.md +136 -0
- package/resource/knowledge/chat/urls/error-code.md +17 -0
- package/resource/knowledge/chat/urls/product.md +43 -0
- package/resource/knowledge/chat/urls/restapi.md +204 -0
- package/resource/knowledge/chat/urls/sdk/android.md +80 -0
- package/resource/knowledge/chat/urls/sdk/flutter.md +71 -0
- package/resource/knowledge/chat/urls/sdk/ios.md +80 -0
- package/resource/knowledge/chat/urls/sdk/web.md +80 -0
- package/resource/knowledge/chat/urls/webhook.md +68 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/AudioEffectStore.md +286 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/BarrageStore.md +174 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/BattleStore.md +329 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CameraView.md +55 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CoGuestStore.md +434 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/CoHostStore.md +362 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/DeviceStore.md +466 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/GiftStore.md +173 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LikeStore.md +51 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveAudienceStore.md +291 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveCoreView.md +78 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveSeatStore.md +488 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/android/LoginStore.md +219 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/AudioEffectStore.md +282 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BarrageStore.md +212 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BaseBeautyStore.md +153 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BattleStore.md +312 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoGuestStore.md +404 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoHostStore.md +334 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/DeviceStore.md +426 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/GiftStore.md +166 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LikeStore.md +52 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveAudienceStore.md +281 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveCoreView.md +150 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveSeatStore.md +438 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LoginStore.md +190 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/AudioEffectStore.md +291 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BarrageStore.md +192 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BaseBeautyStore.md +146 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/BattleStore.md +309 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoGuestStore.md +370 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoHostStore.md +339 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/DeviceStore.md +503 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/GiftStore.md +188 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LikeStore.md +51 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveAudienceStore.md +289 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveCoreView.md +78 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveSeatStore.md +487 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/ios/LoginStore.md +183 -0
- package/resource/knowledge/livekit/core-sdk/api-reference/web/index.md +736 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audience-list.md +53 -47
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audio-effect.md +28 -24
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-barrage.md +22 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-base-beauty.md +17 -15
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-co-guest-interaction.md +19 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-gift.md +102 -89
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-host-interaction.md +41 -37
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-integration.md +45 -43
- package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-live-list.md +23 -20
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audience-list.md +41 -41
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audio-effect.md +70 -69
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-barrage.md +68 -71
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-base-beauty.md +43 -47
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-co-guest-interaction.md +59 -56
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-gift.md +103 -105
- package/resource/knowledge/livekit/core-sdk/live/flutter/live-host-interaction.md +869 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-integration.md +84 -87
- package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-live-list.md +43 -40
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audience-list.md +11 -10
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audio-effect.md +28 -24
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-barrage.md +22 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-base-beauty.md +15 -14
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-co-guest-interaction.md +19 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-gift.md +54 -50
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-host-interaction.md +41 -37
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-integration.md +40 -40
- package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-live-list.md +19 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audience-list.md +53 -47
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audio-effect.md +28 -24
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-barrage.md +22 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-co-guest-interaction.md +41 -33
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-gift.md +94 -81
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-host-interaction.md +35 -30
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-integration.md +45 -42
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-room-list.md +23 -20
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audience-list.md +260 -0
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audio-effect.md +598 -0
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-barrage.md +490 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-co-guest-interaction.md +65 -59
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-gift.md +424 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-integration.md +69 -76
- package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-room-list.md +726 -0
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audience-list.md +11 -10
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audio-effect.md +28 -24
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-barrage.md +22 -18
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-co-guest-interaction.md +41 -33
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-gift.md +54 -50
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-host-interaction.md +35 -30
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-integration.md +49 -46
- package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-room-list.md +19 -18
- package/resource/knowledge/livekit/faq/error-code.md +193 -0
- package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/barrage.md +56 -53
- package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-audience-list.md +22 -21
- package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-view.md +34 -32
- package/resource/knowledge/push/config/android.md +92 -0
- package/resource/knowledge/push/config/harmonyos.md +83 -0
- package/resource/knowledge/push/config/ios.md +254 -0
- package/resource/knowledge/push/config/react-native.md +254 -0
- package/resource/knowledge/push/config/unity.md +209 -0
- package/resource/knowledge/push/config/unreal-engine.md +194 -0
- package/resource/knowledge/push/integration/android.md +404 -0
- package/resource/knowledge/push/integration/flutter.md +465 -0
- package/resource/knowledge/push/integration/harmonyos.md +63 -0
- package/resource/knowledge/push/integration/ios.md +246 -0
- package/resource/knowledge/push/integration/react-native.md +366 -0
- package/resource/knowledge/push/integration/uni-app.md +208 -0
- package/resource/knowledge/push/integration/unity.md +389 -0
- package/resource/knowledge/push/integration/unreal-engine.md +390 -0
- package/resource/knowledge/push/overview/prepare.md +60 -0
- package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +241 -0
- package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +588 -0
- package/resource/knowledge/roomkit/core-sdk/android/room-state.md +364 -0
- package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +340 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/call-user-to-room.md +230 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +797 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/room-state.md +325 -0
- package/resource/knowledge/roomkit/core-sdk/flutter/schedule-room.md +325 -0
- package/resource/knowledge/roomkit/core-sdk/ios/call-user-to-room.md +233 -0
- package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +569 -0
- package/resource/knowledge/roomkit/core-sdk/ios/room-state.md +325 -0
- package/resource/knowledge/roomkit/core-sdk/ios/schedule-room.md +322 -0
- package/resource/knowledge/roomkit/core-sdk/vue/call-user-to-room.md +221 -0
- package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/device-detection.md +49 -48
- package/resource/knowledge/roomkit/core-sdk/vue/device-state.md +461 -0
- package/resource/knowledge/roomkit/core-sdk/vue/free-beauty-panel.md +216 -0
- package/resource/knowledge/roomkit/core-sdk/vue/room-chat.md +370 -0
- package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-participant-state.md +61 -60
- package/resource/knowledge/roomkit/core-sdk/vue/room-state.md +280 -0
- package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-view.md +57 -56
- package/resource/knowledge/roomkit/core-sdk/vue/schedule-room.md +319 -0
- package/resource/knowledge/roomkit/core-sdk/vue/screen-share.md +267 -0
- package/resource/knowledge/roomkit/core-sdk/vue/virtual-background.md +261 -0
- package/resource/knowledge/roomkit/preset/android/integration.md +396 -0
- package/resource/knowledge/roomkit/preset/flutter/integration.md +404 -0
- package/resource/knowledge/roomkit/preset/ios/integration.md +369 -0
- package/resource/knowledge/roomkit/preset/react/integration.md +576 -0
- package/resource/knowledge/rtcengine/web/how_to_run_web_sdk_demo.md +44 -0
- package/resource/{doc → knowledge}/rtcengine/web/plugin/21-advanced-auto-play-policy.md +8 -2
- package/resource/{doc → knowledge}/rtcengine/web/plugin/22-advanced-audio-mixer.md +19 -1
- package/resource/{doc → knowledge}/rtcengine/web/plugin/23-advanced-support-detection.md +1 -1
- package/resource/{doc → knowledge}/rtcengine/web/plugin/24-advanced-network-quality.md +8 -8
- package/resource/{doc → knowledge}/rtcengine/web/plugin/25-advanced-device-change.md +1 -1
- package/resource/{doc → knowledge}/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +6 -6
- package/resource/{doc → knowledge}/rtcengine/web/plugin/27-advanced-small-stream.md +3 -3
- package/resource/{doc → knowledge}/rtcengine/web/plugin/29-advanced-water-mark.md +18 -0
- package/resource/{doc → knowledge}/rtcengine/web/plugin/31-advanced-plugins-overview.md +1 -1
- package/resource/{doc → knowledge}/rtcengine/web/plugin/34-advanced-proxy.md +2 -2
- package/resource/{doc → knowledge}/rtcengine/web/plugin/35-advanced-ai-denoiser.md +1 -1
- package/resource/knowledge/trtc/android/TRTCCloud.md +1915 -0
- package/resource/knowledge/trtc/android/TRTCCloudDef.md +1029 -0
- package/resource/knowledge/trtc/android/TRTCCloudListener.md +1095 -0
- package/resource/knowledge/trtc/android/TRTCStatistics.md +68 -0
- package/resource/knowledge/trtc/android/TXAudioEffectManager.md +502 -0
- package/resource/knowledge/trtc/android/TXBeautyManager.md +415 -0
- package/resource/knowledge/trtc/android/TXDeviceManager.md +169 -0
- package/resource/knowledge/trtc/android/TXLiteAVCode.md +125 -0
- package/resource/knowledge/trtc/c++/ITRTCCloud.md +2069 -0
- package/resource/knowledge/trtc/c++/ITRTCStatistics.md +73 -0
- package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +502 -0
- package/resource/knowledge/trtc/c++/ITXDeviceManager.md +391 -0
- package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +1191 -0
- package/resource/knowledge/trtc/c++/TRTCTypeDef.md +931 -0
- package/resource/knowledge/trtc/c++/TXLiteAVCode.md +127 -0
- package/resource/knowledge/trtc/ios/TRTCCloud.md +2118 -0
- package/resource/knowledge/trtc/ios/TRTCCloudDef.md +975 -0
- package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +1131 -0
- package/resource/knowledge/trtc/ios/TRTCStatistics.md +68 -0
- package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +423 -0
- package/resource/knowledge/trtc/ios/TXBeautyManager.md +416 -0
- package/resource/knowledge/trtc/ios/TXDeviceManager.md +387 -0
- package/resource/knowledge/trtc/ios/TXLiteAVCode.md +127 -0
- package/server.js +35 -11
- package/server.js.map +1 -1
- package/tools/call/get_native_call_uikit_integration.js +2 -3
- package/tools/call/get_native_call_uikit_integration.js.map +1 -1
- package/tools/call/get_native_callkit_core_integration.js +2 -5
- package/tools/call/get_native_callkit_core_integration.js.map +1 -1
- package/tools/call/get_web_call_uikit_integration.js +2 -3
- package/tools/call/get_web_call_uikit_integration.js.map +1 -1
- package/tools/chat/get_native_chat_uikit_integration.js +2 -3
- package/tools/chat/get_native_chat_uikit_integration.js.map +1 -1
- package/tools/chat/get_web_chat_uikit_integration.js +2 -3
- package/tools/chat/get_web_chat_uikit_integration.js.map +1 -1
- package/tools/common/present_framework_choice.js +19 -13
- package/tools/common/present_framework_choice.js.map +1 -1
- package/tools/common/record_answer.js +19 -25
- package/tools/common/record_answer.js.map +1 -1
- package/tools/common/record_feedback.js +17 -30
- package/tools/common/record_feedback.js.map +1 -1
- package/tools/common/search_trtc_knowledge.js +45 -0
- package/tools/common/search_trtc_knowledge.js.map +1 -0
- package/tools/definitions/get_native_call_uikit_integration_def.js +3 -1
- package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_callkit_core_integration_def.js +5 -3
- package/tools/definitions/get_native_callkit_core_integration_def.js.map +1 -1
- package/tools/definitions/get_native_chat_uikit_integration_def.js +5 -2
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_livekit_core_integration_def.js +6 -5
- package/tools/definitions/get_native_livekit_core_integration_def.js.map +1 -1
- package/tools/definitions/get_web_call_uikit_integration_def.js +4 -2
- package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_integration_def.js +2 -0
- package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_live_uikit_integration_def.js +5 -5
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_room_core_integration_def.js +50 -0
- package/tools/definitions/get_web_room_core_integration_def.js.map +1 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js +5 -4
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
- package/tools/definitions/integration-boundary.js +6 -0
- package/tools/definitions/integration-boundary.js.map +1 -0
- package/tools/definitions/present_framework_choice_def.js +12 -10
- package/tools/definitions/present_framework_choice_def.js.map +1 -1
- package/tools/definitions/record_answer_def.js +19 -17
- package/tools/definitions/record_answer_def.js.map +1 -1
- package/tools/definitions/record_feedback_def.js +14 -13
- package/tools/definitions/record_feedback_def.js.map +1 -1
- package/tools/definitions/search_trtc_knowledge_def.js +40 -0
- package/tools/definitions/search_trtc_knowledge_def.js.map +1 -0
- package/tools/index.js +5 -36
- package/tools/index.js.map +1 -1
- package/tools/live/get_native_livekit_core_integration.js +1 -3
- package/tools/live/get_native_livekit_core_integration.js.map +1 -1
- package/tools/live/get_web_live_uikit_integration.js +2 -4
- package/tools/live/get_web_live_uikit_integration.js.map +1 -1
- package/tools/room/get_web_room_core_integration.js +48 -0
- package/tools/room/get_web_room_core_integration.js.map +1 -0
- package/tools/room/get_web_room_uikit_integration.js +2 -3
- package/tools/room/get_web_room_uikit_integration.js.map +1 -1
- package/utils/generate-structured-result.js +24 -30
- package/utils/generate-structured-result.js.map +1 -1
- package/utils/get-doc-content.js +14 -8
- package/utils/get-doc-content.js.map +1 -1
- package/utils/report-cls-client.js +18 -20
- package/utils/report-cls-client.js.map +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/doc/callkit/core-sdk/.gitkeep +0 -0
- package/resource/doc/callkit/core-sdk/android/answer-call.md +0 -852
- package/resource/doc/callkit/core-sdk/android/make-call.md +0 -954
- package/resource/doc/callkit/core-sdk/android/offline-push.md +0 -361
- package/resource/doc/callkit/core-sdk/flutter/answer-call.md +0 -1160
- package/resource/doc/callkit/core-sdk/flutter/make-call.md +0 -1205
- package/resource/doc/callkit/core-sdk/ios/answer-call.md +0 -1090
- package/resource/doc/callkit/core-sdk/ios/make-call.md +0 -1248
- package/resource/doc/callkit/core-sdk/ios/offline-push.md +0 -485
- package/resource/doc/callkit/core-sdk/uni-app/answer-call.md +0 -950
- package/resource/doc/callkit/core-sdk/uni-app/make-call.md +0 -1052
- package/resource/doc/callkit/faq/common/error-code.md +0 -47
- package/resource/doc/callkit/faq/flutter-faq.md +0 -115
- package/resource/doc/callkit/faq/ios-faq.md +0 -115
- package/resource/doc/callkit/faq/web-faq.md +0 -36
- package/resource/doc/callkit/preset/android/api.md +0 -296
- package/resource/doc/callkit/preset/flutter/api.md +0 -410
- package/resource/doc/callkit/preset/flutter/integration.md +0 -164
- package/resource/doc/callkit/preset/ios/api.md +0 -80
- package/resource/doc/callkit/preset/ios/integration.md +0 -187
- package/resource/doc/callkit/preset/react/api.md +0 -501
- package/resource/doc/callkit/preset/react/integration.md +0 -86
- package/resource/doc/callkit/preset/vue/api.md +0 -501
- package/resource/doc/callkit/preset/vue/integration.md +0 -83
- package/resource/doc/chatkit/android/faq.md +0 -111
- package/resource/doc/chatkit/android/features/theme.md +0 -219
- package/resource/doc/chatkit/android/integration.md +0 -490
- package/resource/doc/chatkit/faq/android_sdk/client-api.md +0 -281
- package/resource/doc/chatkit/faq/common/product.md +0 -7
- package/resource/doc/chatkit/faq/common/server.md +0 -44
- package/resource/doc/chatkit/faq/common/server_error_code.md +0 -74
- package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +0 -199
- package/resource/doc/chatkit/faq/flutter_sdk/faq.md +0 -53
- package/resource/doc/chatkit/faq/ios_sdk/client-api.md +0 -235
- package/resource/doc/chatkit/faq/web_sdk/error_code.md +0 -47
- package/resource/doc/chatkit/faq/web_sdk/faq.md +0 -287
- package/resource/doc/chatkit/flutter/faq.md +0 -23
- package/resource/doc/chatkit/flutter/features/theme.md +0 -235
- package/resource/doc/chatkit/flutter/integration.md +0 -344
- package/resource/doc/chatkit/ios/faq.md +0 -111
- package/resource/doc/chatkit/ios/features/theme.md +0 -267
- package/resource/doc/chatkit/react/components/avatar.md +0 -104
- package/resource/doc/chatkit/react/components/chat-header.md +0 -148
- package/resource/doc/chatkit/react/components/chat-setting.md +0 -57
- package/resource/doc/chatkit/react/components/chat.md +0 -38
- package/resource/doc/chatkit/react/components/component-list.md +0 -37
- package/resource/doc/chatkit/react/components/conversation-actions.md +0 -174
- package/resource/doc/chatkit/react/components/conversation-list.md +0 -333
- package/resource/doc/chatkit/react/components/conversation-preview.md +0 -118
- package/resource/doc/chatkit/react/components/conversation-search.md +0 -60
- package/resource/doc/chatkit/react/components/message-list.md +0 -293
- package/resource/doc/chatkit/react/components/tuikit.md +0 -34
- package/resource/doc/chatkit/react/faq.md +0 -26
- package/resource/doc/chatkit/react/integration.md +0 -416
- package/resource/doc/chatkit/vue/components/avatar.md +0 -104
- package/resource/doc/chatkit/vue/components/chat-header.md +0 -148
- package/resource/doc/chatkit/vue/components/chat-setting.md +0 -62
- package/resource/doc/chatkit/vue/components/chat.md +0 -45
- package/resource/doc/chatkit/vue/components/component-list.md +0 -87
- package/resource/doc/chatkit/vue/components/contact-list.md +0 -271
- package/resource/doc/chatkit/vue/components/conversation-actions.md +0 -228
- package/resource/doc/chatkit/vue/components/conversation-list.md +0 -320
- package/resource/doc/chatkit/vue/components/conversation-preview.md +0 -213
- package/resource/doc/chatkit/vue/components/message-input.md +0 -1054
- package/resource/doc/chatkit/vue/components/message-list.md +0 -433
- package/resource/doc/chatkit/vue/components/tuikit.md +0 -31
- package/resource/doc/chatkit/vue/components/userpicker.md +0 -256
- package/resource/doc/chatkit/vue/faq.md +0 -36
- package/resource/doc/chatkit/vue/integration.md +0 -428
- package/resource/doc/livekit/core-sdk/live/flutter/live-host-interaction.md +0 -866
- package/resource/doc/livekit/faq/common/error-code.md +0 -88
- package/resource/doc/livekit/preset/live/vue/api-reference/index.md +0 -780
- package/resource/doc/livekit/preset/live/vue/components/co-guest-panel.md +0 -91
- package/resource/doc/livekit/preset/live/vue/components/live-scene-panel.md +0 -112
- package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +0 -215
- package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +0 -300
- package/resource/doc/roomkit/faq/common/error-code.md +0 -67
- package/resource/doc/roomkit/vue/features/call-user-to-room.md +0 -220
- package/resource/doc/roomkit/vue/features/device-state.md +0 -460
- package/resource/doc/roomkit/vue/features/free-beauty-panel.md +0 -215
- package/resource/doc/roomkit/vue/features/room-chat.md +0 -369
- package/resource/doc/roomkit/vue/features/room-state.md +0 -282
- package/resource/doc/roomkit/vue/features/schedule-room.md +0 -318
- package/resource/doc/roomkit/vue/features/screen-share.md +0 -265
- package/resource/doc/roomkit/vue/features/virtual-background.md +0 -271
- package/resource/doc/roomkit/vue/integration.md +0 -315
- package/resource/doc/rtcengine/faq/common/error_code.md +0 -1
- package/resource/doc/rtcengine/faq/web_sdk/.gitkeep +0 -0
- package/resource/doc/rtcengine/web/.gitkeep +0 -0
- package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +0 -59
- package/resource/doc/trtc/C++/ITRTCCloud.md +0 -1970
- package/resource/doc/trtc/C++/ITRTCStatistics.md +0 -70
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +0 -469
- package/resource/doc/trtc/C++/ITXDeviceManager.md +0 -387
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +0 -1082
- package/resource/doc/trtc/C++/TRTCTypeDef.md +0 -925
- package/resource/doc/trtc/C++/TXLiteAVCode.md +0 -129
- package/resource/doc/trtc/android/TRTCCloud.md +0 -1815
- package/resource/doc/trtc/android/TRTCCloudDef.md +0 -992
- package/resource/doc/trtc/android/TRTCCloudListener.md +0 -1004
- package/resource/doc/trtc/android/TRTCStatistics.md +0 -65
- package/resource/doc/trtc/android/TXAudioEffectManager.md +0 -469
- package/resource/doc/trtc/android/TXBeautyManager.md +0 -402
- package/resource/doc/trtc/android/TXDeviceManager.md +0 -173
- package/resource/doc/trtc/android/TXLiteAVCode.md +0 -127
- package/resource/doc/trtc/iOS/TRTCCloud.md +0 -2028
- package/resource/doc/trtc/iOS/TRTCCloudDef.md +0 -958
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +0 -1046
- package/resource/doc/trtc/iOS/TRTCStatistics.md +0 -65
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +0 -397
- package/resource/doc/trtc/iOS/TXBeautyManager.md +0 -403
- package/resource/doc/trtc/iOS/TXDeviceManager.md +0 -381
- package/resource/doc/trtc/iOS/TXLiteAVCode.md +0 -130
- package/tools/call/get_callkit_api.js +0 -33
- package/tools/call/get_callkit_api.js.map +0 -1
- package/tools/chat/get_native_chat_uikit_feature_detail.js +0 -35
- package/tools/chat/get_native_chat_uikit_feature_detail.js.map +0 -1
- package/tools/chat/get_web_chat_uikit_component_detail.js +0 -35
- package/tools/chat/get_web_chat_uikit_component_detail.js.map +0 -1
- package/tools/common/get_faq.js +0 -266
- package/tools/common/get_faq.js.map +0 -1
- package/tools/common/record_skill_session.js +0 -69
- package/tools/common/record_skill_session.js.map +0 -1
- package/tools/definitions/get_callkit_api_def.js +0 -29
- package/tools/definitions/get_callkit_api_def.js.map +0 -1
- package/tools/definitions/get_faq_def.js +0 -47
- package/tools/definitions/get_faq_def.js.map +0 -1
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +0 -31
- package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_native_livekit_core_features_def.js +0 -34
- package/tools/definitions/get_native_livekit_core_features_def.js.map +0 -1
- package/tools/definitions/get_native_trtc_sdk_docs_def.js +0 -32
- package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +0 -1
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js +0 -31
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +0 -1
- package/tools/definitions/get_web_livekit_api_def.js +0 -30
- package/tools/definitions/get_web_livekit_api_def.js.map +0 -1
- package/tools/definitions/get_web_livekit_component_detail_def.js +0 -32
- package/tools/definitions/get_web_livekit_component_detail_def.js.map +0 -1
- package/tools/definitions/get_web_roomkit_feature_detail_def.js +0 -31
- package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +0 -1
- package/tools/definitions/get_web_trtc_sdk_api_def.js +0 -27
- package/tools/definitions/get_web_trtc_sdk_api_def.js.map +0 -1
- package/tools/definitions/get_web_trtc_sdk_integration_def.js +0 -27
- package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +0 -1
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js +0 -27
- package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +0 -1
- package/tools/definitions/record_skill_session_def.js +0 -31
- package/tools/definitions/record_skill_session_def.js.map +0 -1
- package/tools/live/get_native_livekit_core_features.js +0 -68
- package/tools/live/get_native_livekit_core_features.js.map +0 -1
- package/tools/live/get_web_livekit_api.js +0 -33
- package/tools/live/get_web_livekit_api.js.map +0 -1
- package/tools/live/get_web_livekit_component_detail.js +0 -35
- package/tools/live/get_web_livekit_component_detail.js.map +0 -1
- package/tools/room/get_web_roomkit_feature_detail.js +0 -69
- package/tools/room/get_web_roomkit_feature_detail.js.map +0 -1
- package/tools/rtcengine/get_web_trtc_sdk_api.js +0 -32
- package/tools/rtcengine/get_web_trtc_sdk_api.js.map +0 -1
- package/tools/rtcengine/get_web_trtc_sdk_integration.js +0 -32
- package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +0 -1
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js +0 -32
- package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +0 -1
- package/tools/trtc/get_native_trtc_sdk_docs.js +0 -74
- package/tools/trtc/get_native_trtc_sdk_docs.js.map +0 -1
- package/utils/build-session-directives.js +0 -120
- package/utils/build-session-directives.js.map +0 -1
- package/utils/handle-framework.js +0 -9
- package/utils/handle-framework.js.map +0 -1
- package/utils/handle-state-name.js +0 -29
- package/utils/handle-state-name.js.map +0 -1
- package/utils/report-runtime-error-cls-client.js +0 -91
- package/utils/report-runtime-error-cls-client.js.map +0 -1
- /package/resource/{doc/livekit/preset/live/vue/faq.md → knowledge/push/config/donut.md} +0 -0
- /package/resource/{doc/roomkit/vue/faq.md → knowledge/push/integration/donut.md} +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/api.md +0 -0
- /package/resource/{doc/rtcengine/faq/web/web.md → knowledge/rtcengine/web/faq.md} +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/how_to_integrated_web_sdk.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/28-advanced-beauty.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/30-advanced-cross-room-link.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/36-advanced-virtual-background.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/37-advanced-voice-changer.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/40-advanced-video-mixer.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +0 -0
- /package/resource/{doc → knowledge}/rtcengine/web/plugin/43-advanced-face-detection.md +0 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
TUIKit Flutter offers flexible appearance customization with support for Light, Dark, and System theme modes, along with customizable primary colors. A simple configuration enables theme switching and brand color application throughout your app.
|
|
2
|
+
|
|
3
|
+
For example, in the message list, you can see how different theme modes and primary colors affect the UI:
|
|
4
|
+
| <strong>Light + Default Color</strong> | <strong>Light + Orange</strong> | <strong>Dark + Default Color</strong> | <strong>Dark + Green Theme</strong> |
|
|
5
|
+
| --- | --- | --- | --- |
|
|
6
|
+
| | | | |
|
|
7
|
+
|
|
8
|
+
## Core Features
|
|
9
|
+
|
|
10
|
+
### Theme Mode
|
|
11
|
+
- **Light Mode**: Provides a bright interface for daytime use.
|
|
12
|
+
|
|
13
|
+
- **Dark Mode**: Displays a dim interface for low-light environments.
|
|
14
|
+
|
|
15
|
+
- **System Mode**: Automatically matches the system's appearance setting.
|
|
16
|
+
|
|
17
|
+
### Primary Theme Color Customization
|
|
18
|
+
- **Preset Theme Colors**: Choose from built-in options like blue, green, red, orange, and more.
|
|
19
|
+
|
|
20
|
+
- **Custom Theme Colors**: Set any Hex color value to match your brand.
|
|
21
|
+
|
|
22
|
+
- **Smart Palette Generation**: Automatically creates a palette of 10 color shades based on your selected color.
|
|
23
|
+
|
|
24
|
+
- **Reset to Default**: Easily revert to the default theme color with one click.
|
|
25
|
+
|
|
26
|
+
## API Reference
|
|
27
|
+
|
|
28
|
+
All theme configuration and queries are managed through the `ThemeState` API.
|
|
29
|
+
|
|
30
|
+
### Setting Theme Mode
|
|
31
|
+
| Method | Parameter | Return Value | Description |
|
|
32
|
+
| --- | --- | --- | --- |
|
|
33
|
+
| <code>setThemeMode</code> | <code>ThemeType</code> | <code>void</code> | Sets the theme mode, saves the setting, and refreshes the UI.<br>- <code>ThemeType.SYSTEM</code>: Follows system settings.<br>- <code>ThemeType.LIGHT</code>: Enables light mode.<br>- <code>ThemeType.DARK</code>: Enables dark mode. |
|
|
34
|
+
|
|
35
|
+
### Setting Primary Theme Color
|
|
36
|
+
|
|
37
|
+
|Method|Parameter|Return Value|Description|
|
|
38
|
+
|---------|---------|---------|---------|
|
|
39
|
+
|`setPrimaryColor`|`String`|`Unit`|Sets the primary theme color using a Hex string (e.g., "#1C66E5").|
|
|
40
|
+
|`clearPrimaryColor`|None|`Unit`|Removes the custom theme color and resets to the default blue.|
|
|
41
|
+
|
|
42
|
+
> **Notes****:**
|
|
43
|
+
>
|
|
44
|
+
> - Both `setThemeMode` and `setPrimaryColor` automatically persist the configuration. No manual save is required. Settings are restored on app startup.
|
|
45
|
+
> - Changing theme configuration automatically clears the cache to ensure real-time updates. Manual cache management is not needed.
|
|
46
|
+
> - Avoid calling theme APIs repeatedly (such as within loops).
|
|
47
|
+
|
|
48
|
+
### Querying ThemeState
|
|
49
|
+
|
|
50
|
+
Use the following read-only properties to retrieve the current theme configuration:
|
|
51
|
+
|
|
52
|
+
|Property|Type|Description|
|
|
53
|
+
|---------|---------|---------|
|
|
54
|
+
|`currentMode`|`ThemeType`|The current theme mode.|
|
|
55
|
+
|`currentPrimaryColor`|`String?`|The current primary theme color (Hex value).|
|
|
56
|
+
|`hasCustomPrimaryColor`|`Boolean`|Indicates if a custom primary color is set.|
|
|
57
|
+
|`isDarkMode`|`Boolean`|Indicates if dark mode is active.|
|
|
58
|
+
|
|
59
|
+
## Usage
|
|
60
|
+
|
|
61
|
+
This section covers how to integrate and apply theme and color customization in your app, with three recommended approaches ranging from basic to advanced.
|
|
62
|
+
|
|
63
|
+
### Project Setup
|
|
64
|
+
|
|
65
|
+
Wrap your app's entry point with `ComponentTheme` and configure `MaterialApp` as shown below. For implementation details, see the [demo](https://github.com/Tencent-RTC/TUIKit_Flutter/blob/main/chat/demo/lib/main.dart):
|
|
66
|
+
``` java
|
|
67
|
+
@override
|
|
68
|
+
Widget build(BuildContext context) {
|
|
69
|
+
return ComponentTheme(
|
|
70
|
+
child: MultiProvider(
|
|
71
|
+
providers: [
|
|
72
|
+
ChangeNotifierProvider.value(value: LocaleProvider()),
|
|
73
|
+
],
|
|
74
|
+
child: Builder(builder: (context) {
|
|
75
|
+
final themeState = BaseThemeProvider.of(context);
|
|
76
|
+
final isDarkMode = themeState.isDarkMode;
|
|
77
|
+
// ...... other configuration omitted
|
|
78
|
+
return MaterialApp(
|
|
79
|
+
themeMode: isDarkMode ? ThemeMode.dark : ThemeMode.light,
|
|
80
|
+
// ...... other configuration omitted
|
|
81
|
+
);
|
|
82
|
+
}),
|
|
83
|
+
),
|
|
84
|
+
);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Option A: Configure with AppBuilder (Recommended)
|
|
88
|
+
|
|
89
|
+
AppBuilder is a flexible tool for customizing features and UI through a unified JSON configuration file. It is ideal for maintaining consistent appearance across Web and Native apps.
|
|
90
|
+
|
|
91
|
+
Try AppBuilder in the [Chat Web Demo](https://trtc.io/demo/homepage/#/detail):
|
|
92
|
+
|
|
93
|
+
While the Chat Web Demo does not currently preview mobile configuration in real time, mobile projects fully support AppBuilder configuration.
|
|
94
|
+
|
|
95
|
+
Follow the steps below to apply your AppBuilder settings from the Web Demo to your mobile project:
|
|
96
|
+
1. Download the configuration file.
|
|
97
|
+
|
|
98
|
+
2. Add the appConfig.json file to your Flutter project.
|
|
99
|
+
|
|
100
|
+
3. Load the configuration file on app startup.
|
|
101
|
+
|
|
102
|
+
#### Step 1: Download the Configuration File
|
|
103
|
+
|
|
104
|
+
Visit the [Chat Web Demo](https://trtc.io/demo/homepage/#/detail) and download the appConfig.json configuration file. The download path is:
|
|
105
|
+
|
|
106
|
+
Below is an example of `appConfig.json`. Configuration items map directly to fields in AppBuilder. Appearance settings are located under the `theme` section:
|
|
107
|
+
``` json
|
|
108
|
+
{
|
|
109
|
+
"theme": {
|
|
110
|
+
"mode": "light", // Theme mode: "light" for Light Mode, "dark" for Dark Mode, "system" to follow device settings
|
|
111
|
+
"primaryColor": "#E65100" // Primary color in Hex format
|
|
112
|
+
},
|
|
113
|
+
"messageList": {
|
|
114
|
+
"alignment": "two-sided",
|
|
115
|
+
"enableReadReceipt": false,
|
|
116
|
+
"messageActionList": [
|
|
117
|
+
"copy",
|
|
118
|
+
"recall",
|
|
119
|
+
"quote",
|
|
120
|
+
"forward",
|
|
121
|
+
"delete"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"conversationList": {
|
|
125
|
+
"enableCreateConversation": true,
|
|
126
|
+
"conversationActionList": [
|
|
127
|
+
"delete",
|
|
128
|
+
"mute",
|
|
129
|
+
"pin",
|
|
130
|
+
"markUnread"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"messageInput": {
|
|
134
|
+
"hideSendButton": false,
|
|
135
|
+
"attachmentPickerMode": "collapsed"
|
|
136
|
+
},
|
|
137
|
+
"search": {
|
|
138
|
+
"hideSearch": false
|
|
139
|
+
},
|
|
140
|
+
"avatar": {
|
|
141
|
+
"shape": "circular"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Configuration Options**
|
|
147
|
+
|
|
148
|
+
|Parameter|Type|Options|Description|
|
|
149
|
+
|---------|---------|---------|---------|
|
|
150
|
+
|`mode`|String|`"system"`, `"light"`, `"dark"`|Theme mode|
|
|
151
|
+
|`primaryColor`|String|Hex value, e.g., `"#0ABF77"`|Primary theme color|
|
|
152
|
+
|
|
153
|
+
#### Step 2: Add the Configuration File to Your Project
|
|
154
|
+
|
|
155
|
+
Drag appConfig.json into your project. For example, in the [TUIKit Flutter](https://github.com/Tencent-RTC/TUIKit_Flutter/tree/main) demo, appConfig.json is placed in the assets folder:
|
|
156
|
+
|
|
157
|
+
Declare the assets resource in your pubspec.yaml file:
|
|
158
|
+
``` java
|
|
159
|
+
assets:
|
|
160
|
+
- assets/
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
#### Step 3: Load the Configuration File
|
|
164
|
+
|
|
165
|
+
Specify the JSON file path and load it during app initialization:
|
|
166
|
+
``` java
|
|
167
|
+
class _MyAppState extends State<MyApp> {
|
|
168
|
+
bool _isInitialized = false;
|
|
169
|
+
|
|
170
|
+
@override
|
|
171
|
+
void initState() {
|
|
172
|
+
super.initState();
|
|
173
|
+
_initializeApp();
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
Future<void> _initializeApp() async {
|
|
177
|
+
await StorageUtil.init();
|
|
178
|
+
await AppBuilder.init(configPath: 'packages/uikit_next/assets/appConfig.json');
|
|
179
|
+
|
|
180
|
+
if (mounted) {
|
|
181
|
+
setState(() {
|
|
182
|
+
_isInitialized = true;
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Once configured, TUIKit Flutter components will automatically use the theme mode and primary color defined in appConfig.json when the app starts.
|
|
190
|
+
|
|
191
|
+
### Option B: Set Theme Mode in Code
|
|
192
|
+
|
|
193
|
+
Set the theme mode directly using the `setThemeMode` API. Example:
|
|
194
|
+
``` swift
|
|
195
|
+
val themeState = ThemeState.shared
|
|
196
|
+
Column {
|
|
197
|
+
Button(onClick = {
|
|
198
|
+
themeState.setThemeMode(ThemeMode.SYSTEM)
|
|
199
|
+
}) { Text(text = "Follow System") }
|
|
200
|
+
Button(onClick = {
|
|
201
|
+
themeState.setThemeMode(ThemeMode.LIGHT)
|
|
202
|
+
}) { Text(text = "Light Mode") }
|
|
203
|
+
Button(onClick = {
|
|
204
|
+
themeState.setThemeMode(ThemeMode.DARK)
|
|
205
|
+
}) { Text(text = "Dark Mode") }
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Option C: Set Primary Color in Code
|
|
210
|
+
|
|
211
|
+
Set the primary theme color using the `setPrimaryColor` API. Provide a Hex color value, and TUIKit Flutter will automatically generate a full palette for UI components. No manual color adaptation is required.
|
|
212
|
+
``` swift
|
|
213
|
+
final themeState = BaseThemeProvider.of(context);
|
|
214
|
+
themeState.setPrimaryColor('#1C66E5');
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
> **Recommendations****:**
|
|
218
|
+
>
|
|
219
|
+
> - For most use cases, we recommend managing appearance via a JSON configuration file for simplicity, reliability, and cross-platform consistency.
|
|
220
|
+
> - Always use colors from `themeState.colors` throughout your app to maintain a consistent look when switching themes.
|
|
221
|
+
|
|
222
|
+
## FAQs
|
|
223
|
+
|
|
224
|
+
### How do I check if dark mode is active?
|
|
225
|
+
``` java
|
|
226
|
+
if (themeState.isDarkMode) {
|
|
227
|
+
// Currently in dark mode
|
|
228
|
+
} else {
|
|
229
|
+
// Currently in light mode
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Can I set transparency for the theme color?
|
|
234
|
+
|
|
235
|
+
No. Only 6-digit Hex codes (RGB) are supported; 8-digit Hex (RGBA) formats are not allowed.
|
|
236
|
+
|
|
237
|
+
### How do I reset to the default theme?
|
|
238
|
+
``` swift
|
|
239
|
+
themeState.clearPrimaryColor() // Removes custom theme color
|
|
240
|
+
themeState.setThemeMode(ThemeType.SYSTEM) // Switches to system default mode
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Where is theme configuration saved?
|
|
244
|
+
|
|
245
|
+
Theme settings are stored in the app's persistent storage. If the app is uninstalled, the configuration is removed and reset to default on reinstall.
|
|
246
|
+
|
|
247
|
+
### How do I retrieve the current theme configuration?
|
|
248
|
+
``` swift
|
|
249
|
+
final themeState = BaseThemeProvider.of(context);
|
|
250
|
+
final config = themeState.currentTheme;
|
|
251
|
+
print("Mode: ${config.type}");
|
|
252
|
+
print("Primary color: ${config.primaryColor ?? "Default"}");
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Can I set both theme mode and primary color at the same time?
|
|
256
|
+
|
|
257
|
+
Yes. You can call both methods independently, and the system will merge the settings automatically:
|
|
258
|
+
``` swift
|
|
259
|
+
themeState.setThemeMode(ThemeType.DARK)
|
|
260
|
+
themeState.setPrimaryColor("#0ABF77")
|
|
261
|
+
```
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
## Component Overview
|
|
2
|
+
|
|
3
|
+
ChatSetting is a set of chat settings components built with SwiftUI. It includes two main components: C2CChatSetting (C2C Chat Settings) and GroupChatSetting (Group Chat Settings).
|
|
4
|
+
|
|
5
|
+
These components offer robust chat session management features, such as user information management, permission controls, group management, and other essential capabilities.
|
|
6
|
+
| <strong>C2C Chat Settings Interface</strong> | <strong>Group Chat Settings Interface</strong> |
|
|
7
|
+
| --- | --- |
|
|
8
|
+
| | |
|
|
9
|
+
|
|
10
|
+
## Component Integration
|
|
11
|
+
|
|
12
|
+
ChatSetting is included in TUIKit SwiftUI. To use ChatSetting, integrate TUIKit SwiftUI into your project. For detailed integration steps, see the [TUIKit SwiftUI documentation](https://www.tencentcloud.com/document/product/1047/77460).
|
|
13
|
+
|
|
14
|
+
## Component Structure
|
|
15
|
+
|
|
16
|
+
ChatSetting contains two main components: C2CChatSetting (C2C Chat Settings) and GroupChatSetting (Group Chat Settings). Each provides a variety of configuration options.
|
|
17
|
+
|
|
18
|
+
### C2C Chat Settings (C2CChatSetting)
|
|
19
|
+
|
|
20
|
+
#### Initialization Parameters
|
|
21
|
+
|
|
22
|
+
|Parameter Name|Type|Description|
|
|
23
|
+
|---------|---------|---------|
|
|
24
|
+
|`userID`|`String`|The user ID of the chat partner.|
|
|
25
|
+
|`onSendMessageClick`|`(() -> Void)?`|The webhook triggered when the Send Message button is clicked (optional).|
|
|
26
|
+
|`onContactDelete`|`(() -> Void)? `|The webhook triggered when the Delete Contact button is clicked (optional).|
|
|
27
|
+
|
|
28
|
+
#### Initialization Interface
|
|
29
|
+
|
|
30
|
+
|Method Name|Parameters|Description|
|
|
31
|
+
|---------|---------|---------|
|
|
32
|
+
|`init`|`userID: String, onSendMessageClick: (() -> Void)?, onContactDelete: (() -> Void)?`|Initializes the C2C Chat Settings component.|
|
|
33
|
+
|
|
34
|
+
### Group Chat Settings (GroupChatSetting)
|
|
35
|
+
|
|
36
|
+
#### Initialization Parameters
|
|
37
|
+
|
|
38
|
+
|Parameter Name|Type|Description|
|
|
39
|
+
|---------|---------|---------|
|
|
40
|
+
|`groupID`|`String`|The group ID used to identify the group chat.|
|
|
41
|
+
|`onSendMessageClick`|`(() -> Void)?`|Webhook triggered when the Send Message button is clicked (optional).|
|
|
42
|
+
|`onGroupDelete`|`(() -> Void)?`|Webhook triggered when the Disband Group or Leave Group button is clicked (optional).|
|
|
43
|
+
|
|
44
|
+
#### Initialization Interface
|
|
45
|
+
|
|
46
|
+
|Method Name|Parameters|Description|
|
|
47
|
+
|---------|---------|---------|
|
|
48
|
+
|`init`|`groupID: String, onSendMessageClick: (() -> Void)?, onGroupDelete: (() -> Void)?`|Initializes the Group Chat Settings component.|
|
|
49
|
+
|
|
50
|
+
## Basic Usage
|
|
51
|
+
|
|
52
|
+
To display the C2C Chat Settings page, initialize C2CChatSetting as shown below:
|
|
53
|
+
``` swift
|
|
54
|
+
import AtomicX
|
|
55
|
+
import SwiftUI
|
|
56
|
+
|
|
57
|
+
struct C2CSettingView: View {
|
|
58
|
+
let userID: String
|
|
59
|
+
|
|
60
|
+
var body: some View {
|
|
61
|
+
C2CChatSetting(
|
|
62
|
+
userID: userID,
|
|
63
|
+
onSendMessageClick: {
|
|
64
|
+
// Handle send message button click
|
|
65
|
+
},
|
|
66
|
+
onContactDelete: {
|
|
67
|
+
// Handle delete contact button click
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
To display the Group Chat Settings page, initialize GroupChatSetting as shown below:
|
|
75
|
+
``` swift
|
|
76
|
+
import AtomicX
|
|
77
|
+
import SwiftUI
|
|
78
|
+
|
|
79
|
+
struct GroupSettingView: View {
|
|
80
|
+
let groupID: String
|
|
81
|
+
|
|
82
|
+
var body: some View {
|
|
83
|
+
GroupChatSetting(
|
|
84
|
+
groupID: groupID,
|
|
85
|
+
onSendMessageClick: {
|
|
86
|
+
// Handle send message button click
|
|
87
|
+
},
|
|
88
|
+
onGroupDelete: {
|
|
89
|
+
// Handle disband or leave group button click
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
## Component Overview
|
|
2
|
+
|
|
3
|
+
ContactList is a SwiftUI component that provides a complete contact management interface. It supports displaying contacts, handling friend requests, managing group lists, blacklist management, and offers a variety of interactive webhook interfaces.
|
|
4
|
+
| <strong>Contact List</strong> | <strong>Group List</strong> | <strong>Friend Request List</strong> |
|
|
5
|
+
| --- | --- | --- |
|
|
6
|
+
| | | |
|
|
7
|
+
|
|
8
|
+
## Component Integration
|
|
9
|
+
|
|
10
|
+
The `ContactList` component is included in TUIKit SwiftUI. To use `ContactList`, integrate TUIKit SwiftUI into your project. For detailed integration steps, refer to the [TUIKit SwiftUI](https://www.tencentcloud.com/document/product/1047/77460) documentation.
|
|
11
|
+
|
|
12
|
+
## Component Structure
|
|
13
|
+
|
|
14
|
+
`ContactList` is the primary component for displaying and managing contacts. It represents the full contact list page and provides a public initializer:
|
|
15
|
+
| <strong>Method</strong> | <strong>Parameter</strong> | <strong>Description</strong> |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| <code>init</code> | <code>contactStore: ContactListStore</code> | Contact data store. Use <code>ContactListStore.create()</code> to create a default instance. |
|
|
18
|
+
| <code>onContactClick: ((AZOrderedListItem) -> Void)?</code> | Webhook triggered when a contact is clicked. Optional. | |
|
|
19
|
+
| <code>onGroupClick: ((AZOrderedListItem) -> Void)?</code> | Webhook triggered when a group is clicked. Optional. | |
|
|
20
|
+
|
|
21
|
+
The top section of `ContactList` includes entry cells for subviews such as friend requests, group requests, group list, and blacklist. The lower section displays the contact list, as shown below:
|
|
22
|
+
|
|
23
|
+
`ContactList` includes built-in navigation for subpages. When you tap entries such as friend requests, group requests, group list, or blacklist, the corresponding subpage opens automatically as a full-screen modal (fullScreenCover). No manual navigation handling is required.
|
|
24
|
+
|
|
25
|
+
If you want to use subpages independently (such as the friend request list or group list), each subpage provides its own initializer, as described below:
|
|
26
|
+
| <strong>Subpage</strong> | <strong>Method Name</strong> | <strong>Parameter</strong> | <strong>Description</strong> |
|
|
27
|
+
| --- | --- | --- | --- |
|
|
28
|
+
| Friend Request Page (FriendApplicationListView) | init | <code>contactStore: ContactListStore</code> | Contact data store, passed from ContactList |
|
|
29
|
+
| init | <code>onDismiss: (() -> Void)?</code> | Webhook triggered when the page is closed. Optional. | |
|
|
30
|
+
| Group Request Page (GroupApplicationListView) | init | <code>contactStore: ContactListStore</code> | Contact data store, passed from ContactList |
|
|
31
|
+
| init | <code>onDismiss: (() -> Void)?</code> | Webhook triggered when the page is closed. Optional. | |
|
|
32
|
+
| Group List Page (GroupListView) | init | <code>contactStore: ContactListStore</code> | Contact data store, passed from ContactList |
|
|
33
|
+
| init | <code>onGroupClick: ((AZOrderedListItem) -> Void)?</code> | Webhook triggered when a group is clicked in the group list. Optional. | |
|
|
34
|
+
| init | <code>onDismiss: (() -> Void)?</code> | Webhook triggered when the page is closed. Optional. | |
|
|
35
|
+
| Blacklist Page (BlackListView) | init | <code>contactStore: ContactListStore</code> | Contact data store, passed from ContactList |
|
|
36
|
+
| init | <code>onDismiss: (() -> Void)?</code> | Webhook triggered when the page is closed. Optional. | |
|
|
37
|
+
|
|
38
|
+
## Basic Usage
|
|
39
|
+
|
|
40
|
+
### Quick Integration
|
|
41
|
+
|
|
42
|
+
ContactList includes built-in navigation for all subpages. Simply initialize the component to enable full contact management features:
|
|
43
|
+
``` swift
|
|
44
|
+
import AtomicX
|
|
45
|
+
import SwiftUI
|
|
46
|
+
|
|
47
|
+
struct ContactsPage: View {
|
|
48
|
+
private let contactStore = ContactListStore.create()
|
|
49
|
+
|
|
50
|
+
var body: some View {
|
|
51
|
+
ContactList(
|
|
52
|
+
contactStore: contactStore,
|
|
53
|
+
onContactClick: { contact in
|
|
54
|
+
// Handle contact click
|
|
55
|
+
print("Contact clicked: \(contact.title)")
|
|
56
|
+
},
|
|
57
|
+
onGroupClick: { group in
|
|
58
|
+
// Handle group click (triggered when a group is clicked from the group list page)
|
|
59
|
+
print("Group clicked: \(group.title)")
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
When you tap entries such as friend requests, group requests, group list, or blacklist, the component automatically opens the corresponding subpage as a full-screen modal. No additional navigation logic is required. See the navigation demo below:
|
|
67
|
+
|
|
68
|
+
### Key Considerations
|
|
69
|
+
|
|
70
|
+
#### Built-in Navigation
|
|
71
|
+
|
|
72
|
+
ContactList automatically manages navigation for its subpages and presents them using fullScreenCover:
|
|
73
|
+
- Friend Request Page (FriendApplicationListView)
|
|
74
|
+
|
|
75
|
+
- Group Request Page (GroupApplicationListView)
|
|
76
|
+
|
|
77
|
+
- Group List Page (GroupListView)
|
|
78
|
+
|
|
79
|
+
- Blacklist Page (BlackListView)
|
|
80
|
+
|
|
81
|
+
You do not need to manage navigation state or configure NavigationLink manually.
|
|
82
|
+
|
|
83
|
+
#### Webhook Handling
|
|
84
|
+
|
|
85
|
+
ContactList provides two optional webhook callbacks:
|
|
86
|
+
``` swift
|
|
87
|
+
ContactList(
|
|
88
|
+
contactStore: contactStore,
|
|
89
|
+
onContactClick: { contact in
|
|
90
|
+
// Triggered when a contact in the contact list is clicked
|
|
91
|
+
},
|
|
92
|
+
onGroupClick: { group in
|
|
93
|
+
// Triggered when a group in the group list is clicked
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
#### Data Sharing
|
|
99
|
+
|
|
100
|
+
Create a data store instance using `ContactListStore.create()`. The component automatically shares this instance with all subpages to maintain data consistency:
|
|
101
|
+
``` swift
|
|
102
|
+
private let contactStore = ContactListStore.create()
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
#### Using Subpages Independently
|
|
106
|
+
|
|
107
|
+
To use subpages independently in other parts of your app, initialize the corresponding view directly:
|
|
108
|
+
``` swift
|
|
109
|
+
// Use the group list page independently
|
|
110
|
+
GroupListView(
|
|
111
|
+
contactStore: contactStore,
|
|
112
|
+
onGroupClick: { group in
|
|
113
|
+
print("Group clicked: \(group.title)")
|
|
114
|
+
},
|
|
115
|
+
onDismiss: {
|
|
116
|
+
// Close the page
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
```
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
## Component Overview
|
|
2
|
+
|
|
3
|
+
ConversationList is a SwiftUI component for displaying and managing user chat conversations. It offers a full set of conversation list features, including conversation display and interactive actions.
|
|
4
|
+
| <strong>Conversation List</strong> | <strong>Conversation Actions</strong> |
|
|
5
|
+
| --- | --- |
|
|
6
|
+
| | |
|
|
7
|
+
|
|
8
|
+
## Component Integration
|
|
9
|
+
|
|
10
|
+
ConversationList is part of TUIKit SwiftUI. To use ConversationList, integrate TUIKit SwiftUI into your project. For detailed integration steps, see the [TUIKit SwiftUI documentation](https://www.tencentcloud.com/document/product/1047/77460).
|
|
11
|
+
|
|
12
|
+
## Component Structure
|
|
13
|
+
|
|
14
|
+
ConversationList exposes only its initialization method. All other logic is encapsulated within the component.
|
|
15
|
+
|
|
16
|
+
#### Public Methods
|
|
17
|
+
| <strong>Method</strong> | <strong>Parameter</strong> | <strong>Description</strong> |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| <code>init</code> | <code>onConversationClick: @escaping (ConversationInfo) -> Void</code> | Initializes the component and sets the conversation click Webhook. Required. |
|
|
20
|
+
| <code>config: ConversationActionConfigProtocol = ChatConversationActionConfig()</code> | Initializes the component and sets the conversation action menu items. Optional. | |
|
|
21
|
+
| <code>customActions: [ConversationCustomAction] = []</code> | Initializes the component and sets custom conversation action options. Optional. | |
|
|
22
|
+
|
|
23
|
+
## Basic Usage
|
|
24
|
+
|
|
25
|
+
You can initialize and use the ConversationList component directly. You must implement the onConversationClick Webhook.
|
|
26
|
+
|
|
27
|
+
|**Parameter Name**|**Type**|**Description**|
|
|
28
|
+
|---------|---------|---------|
|
|
29
|
+
|`onConversationClick`|`(ConversationInfo) -> Void`|Conversation click Webhook, triggered when a user clicks a conversation cell.|
|
|
30
|
+
|
|
31
|
+
Sample code:
|
|
32
|
+
``` swift
|
|
33
|
+
import AtomicX
|
|
34
|
+
import SwiftUI
|
|
35
|
+
|
|
36
|
+
struct ContentView: View {
|
|
37
|
+
var body: some View {
|
|
38
|
+
ConversationList(
|
|
39
|
+
onConversationClick: { conversation in
|
|
40
|
+
// Recommended: Navigate to the chat page here
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Customization
|
|
48
|
+
|
|
49
|
+
You can customize the action items in the conversation list using the following methods.
|
|
50
|
+
|
|
51
|
+
#### Method 1. Hide Conversation Action Items Locally
|
|
52
|
+
|
|
53
|
+
Pass a custom config when initializing ConversationList to control which menu items are displayed:
|
|
54
|
+
``` swift
|
|
55
|
+
struct CustomConversationView: View {
|
|
56
|
+
var body: some View {
|
|
57
|
+
ConversationList(
|
|
58
|
+
onConversationClick: { conversation in
|
|
59
|
+
// Navigate on conversation cell click
|
|
60
|
+
},
|
|
61
|
+
// Hide ClearHistory
|
|
62
|
+
config: ChatConversationActionConfig(isSupportDelete: true, isSupportPin: true, isSupportClearHistory: false)
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Currently Supported Menu Item Toggles**
|
|
69
|
+
|
|
70
|
+
|**Action Type**|**Description**|
|
|
71
|
+
|---------|---------|
|
|
72
|
+
|`isSupportDelete`|Enable or disable deleting conversations|
|
|
73
|
+
|`isSupportPin`|Enable or disable Pin Conversation|
|
|
74
|
+
|`isSupportClearHistory`|Enable or disable clearing conversation history|
|
|
75
|
+
|
|
76
|
+
#### Method 2. Add Conversation Action Items Locally
|
|
77
|
+
|
|
78
|
+
Pass `customActions` when initializing ConversationList. ConversationList will display your custom options below the default actions:
|
|
79
|
+
|
|
80
|
+
|**Parameter Name**|**Type**|**Description**|
|
|
81
|
+
|---------|---------|---------|
|
|
82
|
+
|`customActions`|`[ConversationCustomAction]`|Custom conversation actions, shown when the user opens the conversation action menu.|
|
|
83
|
+
|
|
84
|
+
Sample code:
|
|
85
|
+
``` java
|
|
86
|
+
struct CustomConversationView: View {
|
|
87
|
+
var body: some View {
|
|
88
|
+
ConversationList(
|
|
89
|
+
onConversationClick: { conversation in
|
|
90
|
+
onShowMessage?(NavigationInfo(conversation: conversation))
|
|
91
|
+
},
|
|
92
|
+
// Custom actions
|
|
93
|
+
customActions: [
|
|
94
|
+
ConversationCustomAction(title: "Share") { conversation in
|
|
95
|
+
print("Share conversation: \(conversation.title ?? "")")
|
|
96
|
+
},
|
|
97
|
+
]
|
|
98
|
+
)
|
|
99
|
+
.conversationActions([.delete, .pin, .clearHistory])
|
|
100
|
+
.environmentObject(themeState)
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
#### Method 3. Global Configuration
|
|
107
|
+
|
|
108
|
+
Configure global action items using `AppBuilderConfig`:
|
|
109
|
+
``` swift
|
|
110
|
+
// Set this at application startup; if omitted, the feature is not enabled
|
|
111
|
+
AppBuilderConfig.shared.conversationActionList = [
|
|
112
|
+
.delete, // Enable delete
|
|
113
|
+
.pin, // Enable Pin Conversation
|
|
114
|
+
.clearHistory // Enable clearing conversation messages
|
|
115
|
+
]
|
|
116
|
+
|
|
117
|
+
// Then initialize ConversationList; all ConversationList instances will use the above conversationActionList configuration
|
|
118
|
+
ConversationList(
|
|
119
|
+
onConversationClick: { conversation in
|
|
120
|
+
// Navigate to the chat page here if needed
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
> **Note:**
|
|
126
|
+
>
|
|
127
|
+
|
|
128
|
+
> Local configuration takes precedence over global configuration.
|
|
129
|
+
>
|
|
130
|
+
|
|
131
|
+
The following images show the customization effects:
|
|
132
|
+
| <strong>Conversation Actions</strong><br><strong> (Default Options)</strong> | <strong>Conversation Actions</strong><br><strong> (Delete Option Hidden)</strong> | <strong>Conversation Actions </strong><br><strong>(Share Option Added)</strong> |
|
|
133
|
+
| --- | --- | --- |
|
|
134
|
+
| | | |
|