@poolse/react-native 3.2.0-dev.0 → 3.2.0-dev.2

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/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to `@poolse/react-native` are documented here.
4
4
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
5
5
  versions follow [semver](https://semver.org).
6
6
 
7
+ ## [3.2.0-dev.2] — 2026-11-16 (prerelease, npm tag `dev`)
8
+
9
+ ### Added
10
+
11
+ - Icons `screen-share` and `screen-share-off`.
12
+
13
+ ## [3.2.0-dev.1] — 2026-11-04 (prerelease, npm tag `dev`)
14
+
15
+ ### Added
16
+
17
+ - `<ConversationView>` streams AI agent replies as they're written, like `@poolse/react-ui`: typing first, then a growing bubble, replaced by the finished message.
18
+
7
19
  ## [3.2.0-dev.0] — 2026-11-04 (prerelease, npm tag `dev`)
8
20
 
9
21
  ### Changed
package/dist/index.cjs CHANGED
@@ -458,6 +458,14 @@ var ICONS = {
458
458
  vb: "0 0 24 24",
459
459
  d: '<path d="M9 7 4 12l5 5"/><path d="M4 12h9.5a6.5 6.5 0 0 1 6.5 6.5V20"/>'
460
460
  },
461
+ "screen-share": {
462
+ vb: "0 0 24 24",
463
+ d: '<rect x="2.6" y="4" width="18.8" height="12.6" rx="2"/><path d="M8.4 20.4h7.2"/><path d="M12 16.6v3.8"/><path d="M12 13V7.4"/><path d="M9.4 9.8 12 7.2l2.6 2.6"/>'
464
+ },
465
+ "screen-share-off": {
466
+ vb: "0 0 24 24",
467
+ d: '<rect x="2.6" y="4" width="18.8" height="12.6" rx="2"/><path d="M8.4 20.4h7.2"/><path d="M12 16.6v3.8"/><path d="M9.6 8 14.4 12.6"/><path d="M14.4 8 9.6 12.6"/>'
468
+ },
461
469
  search: {
462
470
  vb: "0 0 24 24",
463
471
  d: '<circle cx="11" cy="11" r="6.8"/><path d="M20.8 20.8 16 16"/>'
@@ -4279,7 +4287,16 @@ function ConversationView({
4279
4287
  markReadUpTo,
4280
4288
  refetch
4281
4289
  } = react$1.useMessages(conversationId);
4282
- const { typing, signalTyping } = react$1.useTyping(conversationId);
4290
+ const { typing: typingPeople, signalTyping } = react$1.useTyping(conversationId);
4291
+ const streams = react$1.useMessageStreams(conversationId);
4292
+ const typing = react.useMemo(() => {
4293
+ const thinking = streams.filter((s) => s.status === "streaming" && !s.text);
4294
+ if (thinking.length === 0) return typingPeople;
4295
+ const next = new Set(typingPeople);
4296
+ for (const s of thinking) if (s.sender_external_id) next.add(s.sender_external_id);
4297
+ return next;
4298
+ }, [typingPeople, streams]);
4299
+ const visibleStreams = streams.filter((s) => s.text || s.status === "failed");
4283
4300
  const realtimeStatus = react$1.useRealtimeStatus();
4284
4301
  react.useEffect(() => {
4285
4302
  const sub = reactNative.AppState.addEventListener("change", (next) => {
@@ -4503,7 +4520,37 @@ function ConversationView({
4503
4520
  hasMore,
4504
4521
  onLoadMore: loadMore,
4505
4522
  renderItem,
4506
- ListHeader: /* @__PURE__ */ jsxRuntime.jsx(TypingIndicator, { typing, ...labelFor ? { labelFor } : {} }),
4523
+ ListHeader: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { children: [
4524
+ visibleStreams.map(
4525
+ (stream) => stream.status === "failed" ? /* @__PURE__ */ jsxRuntime.jsx(
4526
+ reactNative.Text,
4527
+ {
4528
+ style: [styles22.streamFailed, { color: theme.colors.ink3 }],
4529
+ accessibilityRole: "alert",
4530
+ children: stream.error ? `The agent couldn't reply: ${stream.error}` : "The agent couldn't reply."
4531
+ },
4532
+ stream.id
4533
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
4534
+ MessageRow,
4535
+ {
4536
+ msg: streamingMessage(stream),
4537
+ meId,
4538
+ reactions: false,
4539
+ attachments: false,
4540
+ actions: false,
4541
+ threads: false,
4542
+ quotations: false,
4543
+ ...labelFor ? { labelFor } : {},
4544
+ ...avatarFor ? { avatarFor } : {},
4545
+ showSenderName: showSenderLabels,
4546
+ showAvatar: showAvatars,
4547
+ markdown
4548
+ },
4549
+ stream.id
4550
+ )
4551
+ ),
4552
+ /* @__PURE__ */ jsxRuntime.jsx(TypingIndicator, { typing, ...labelFor ? { labelFor } : {} })
4553
+ ] }),
4507
4554
  ...emptyState !== void 0 ? { emptyState } : {}
4508
4555
  }
4509
4556
  ),
@@ -4560,6 +4607,11 @@ var styles22 = reactNative.StyleSheet.create({
4560
4607
  root: {
4561
4608
  flex: 1
4562
4609
  },
4610
+ streamFailed: {
4611
+ fontSize: 12,
4612
+ marginHorizontal: 16,
4613
+ marginVertical: 4
4614
+ },
4563
4615
  listWrap: {
4564
4616
  flex: 1
4565
4617
  },
@@ -4572,6 +4624,27 @@ var styles22 = reactNative.StyleSheet.create({
4572
4624
  zIndex: 5
4573
4625
  }
4574
4626
  });
4627
+ function streamingMessage(stream) {
4628
+ const now = (/* @__PURE__ */ new Date()).toISOString();
4629
+ return {
4630
+ id: stream.id,
4631
+ tenant_id: "",
4632
+ conversation_id: stream.conversation_id,
4633
+ sender_id: stream.sender_id,
4634
+ sender_external_id: stream.sender_external_id,
4635
+ type: "text",
4636
+ body: `${stream.text} \u258D`,
4637
+ reply_to_id: null,
4638
+ thread_root_id: null,
4639
+ mentions: [],
4640
+ reactions: {},
4641
+ edited_at: null,
4642
+ deleted_at: null,
4643
+ sequence: Number.MAX_SAFE_INTEGER,
4644
+ inserted_at: now,
4645
+ updated_at: now
4646
+ };
4647
+ }
4575
4648
  function UserPickerSheet({
4576
4649
  visible,
4577
4650
  onClose,