k2-im 0.1.49 → 0.1.50

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/browser.js CHANGED
@@ -1 +1 @@
1
- export{Ua as canCopyImageToClipboard,Va as copyImageToClipboard,B as createLazyBrowserApiProtocolClient}from'./chunk-SWWW7C2U.js';import'./chunk-527YCOBJ.js';import'./chunk-WOT6VMZA.js';
1
+ export{Ua as canCopyImageToClipboard,Va as copyImageToClipboard,B as createLazyBrowserApiProtocolClient}from'./chunk-ZFYM6YHK.js';import'./chunk-JHGB6KYI.js';import'./chunk-WOT6VMZA.js';
@@ -114,8 +114,11 @@ type LastMessageSummary = {
114
114
  kind: 'transfer';
115
115
  } | {
116
116
  kind: 'gift';
117
- } | {
117
+ }
118
+ /** 直播间分享。`title` 与卡片主标题一致:先主播昵称,没有再用房间标题。 */
119
+ | {
118
120
  kind: 'liveRoom';
121
+ title?: string;
119
122
  } | {
120
123
  kind: 'call';
121
124
  callKind: ImCallKind;
@@ -5178,14 +5181,16 @@ interface ConversationHandle<TType extends ProductHandleConversationType = Produ
5178
5181
  /**
5179
5182
  * 按稳定消息 id 打开目标附近的连续历史窗口。
5180
5183
  *
5181
- * @remarks GROUP 完整置顶预览可按消息时间定位;CHANNEL 置顶未缓存时先按 ID 取回正式历史记录,
5182
- * 以服务端游标准备前后相邻页后一次替换窗口;准备失败保留原窗口。只含控制行的页每侧最多继续四页,
5183
- * 预算用完仍保留分页能力。短期搜索结果只作为只读锚点;partial 置顶和过期搜索结果明确拒绝定位。
5184
- * @throws 没有可用锚点、远端确认缺失或目标不属于当前复合会话时,抛出稳定 `IM_SDK_MESSAGE_NOT_FOUND`
5185
- * (`category: 'state'`、`retryable: false`、`details.messageId`)。这是常见产品结果而非链路异常,
5186
- * 调用方应据此与真正的存储/协议失败区分反馈,不要解析错误文案。
5184
+ * @remarks 冷启动置顶和搜索结果只提供目标 id;目标不在当前窗口或本地原文时,须经精确会话
5185
+ * `by_id` 确认真实原文及排序位置。预览或搜索位置不能充当历史游标。
5186
+ * GROUP/CHANNEL 使用远端相邻页准备两侧上下文后一次替换窗口;失败保留原窗口。
5187
+ * `signal` 取消本次定位,阻止提交准备中的窗口;不会撤销共享按 ID 查询已取得的合法缓存。
5188
+ * @throws 仅 `by_id` 明确确认缺失时抛 `IM_SDK_MESSAGE_NOT_FOUND`;没有可信原文时抛
5189
+ * `IM_SDK_MESSAGE_ANCHOR_UNAVAILABLE`。存储、权限与协议异常保留原错误身份。
5187
5190
  */
5188
- loadAround: (messageId: string) => Promise<void>;
5191
+ loadAround: (messageId: string, options?: {
5192
+ signal?: AbortSignal;
5193
+ }) => Promise<void>;
5189
5194
  /**
5190
5195
  * 清空当前账号下此精确会话的本机历史。
5191
5196
  *
@@ -9224,6 +9229,7 @@ interface ImThreadStoreActions {
9224
9229
  /** 默认重新定位;skipIfLoaded 仅在目标已显示且没有在途窗口操作时复用当前窗口。 */
9225
9230
  loadAround: (messageId: string, options?: {
9226
9231
  skipIfLoaded?: boolean;
9232
+ signal?: AbortSignal;
9227
9233
  }) => Promise<boolean>;
9228
9234
  resolveMessage: (messageId: string) => Promise<ImMessageView | null>;
9229
9235
  retainHandle: (handle?: ProductConversationHandle) => () => void;
@@ -9274,7 +9280,7 @@ type ImSearchOperationResult = Readonly<{
9274
9280
  } | {
9275
9281
  ok: false;
9276
9282
  operation: SearchOperation;
9277
- reason: 'not-ready' | 'no-condition' | 'busy' | 'exhausted' | 'stale' | 'failed';
9283
+ reason: 'not-ready' | 'no-condition' | 'busy' | 'exhausted' | 'stale' | 'failed' | 'not-found' | 'anchor-unavailable' | 'cancelled';
9278
9284
  error?: ImSdkErrorShape;
9279
9285
  }>;
9280
9286
  declare function defineImSearchStore(pinia: Pinia): pinia.StoreDefinition<"k2-im-search", Pick<{