@flamingo-stack/openframe-frontend-core 0.0.589 → 0.0.590-2020.5606.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.
Files changed (101) hide show
  1. package/dist/{chunk-EGUU3QCU.cjs → chunk-2564HPMD.cjs} +3 -3
  2. package/dist/{chunk-EGUU3QCU.cjs.map → chunk-2564HPMD.cjs.map} +1 -1
  3. package/dist/{chunk-JDINUWND.cjs → chunk-2MY6BT6P.cjs} +69 -69
  4. package/dist/{chunk-JDINUWND.cjs.map → chunk-2MY6BT6P.cjs.map} +1 -1
  5. package/dist/{chunk-G45RGWHF.cjs → chunk-353GRCTE.cjs} +37 -10
  6. package/dist/chunk-353GRCTE.cjs.map +1 -0
  7. package/dist/{chunk-5CHW7AMP.cjs → chunk-3BQESV5G.cjs} +10 -10
  8. package/dist/{chunk-5CHW7AMP.cjs.map → chunk-3BQESV5G.cjs.map} +1 -1
  9. package/dist/{chunk-KK3XU6YJ.cjs → chunk-3WZQ5RXS.cjs} +4 -4
  10. package/dist/{chunk-KK3XU6YJ.cjs.map → chunk-3WZQ5RXS.cjs.map} +1 -1
  11. package/dist/{chunk-A6X7EXP6.cjs → chunk-5KFIUNKN.cjs} +10 -10
  12. package/dist/{chunk-A6X7EXP6.cjs.map → chunk-5KFIUNKN.cjs.map} +1 -1
  13. package/dist/{chunk-CJOWLRUU.js → chunk-6BPIDRBI.js} +2 -2
  14. package/dist/{chunk-FVRRYJ6P.cjs → chunk-7H4RUNIL.cjs} +22 -22
  15. package/dist/{chunk-FVRRYJ6P.cjs.map → chunk-7H4RUNIL.cjs.map} +1 -1
  16. package/dist/{chunk-CN36E4PK.js → chunk-7JPKCUF7.js} +2 -2
  17. package/dist/{chunk-IYDHV2CS.cjs → chunk-7O7CAZYG.cjs} +43 -43
  18. package/dist/{chunk-IYDHV2CS.cjs.map → chunk-7O7CAZYG.cjs.map} +1 -1
  19. package/dist/{chunk-LGBNHWDN.js → chunk-ACUXSU6J.js} +3 -3
  20. package/dist/{chunk-KVNGYFFP.js → chunk-AV4UXMOH.js} +3 -3
  21. package/dist/{chunk-4ZKAMPBX.js → chunk-BKOCXNAP.js} +2 -2
  22. package/dist/{chunk-MENQLD57.cjs → chunk-CQHFRJSG.cjs} +5 -5
  23. package/dist/{chunk-MENQLD57.cjs.map → chunk-CQHFRJSG.cjs.map} +1 -1
  24. package/dist/{chunk-3OCYNMZ5.js → chunk-CT6I3HOP.js} +3 -3
  25. package/dist/{chunk-C6RJRSIM.cjs → chunk-DAUDWRE4.cjs} +3 -3
  26. package/dist/{chunk-C6RJRSIM.cjs.map → chunk-DAUDWRE4.cjs.map} +1 -1
  27. package/dist/{chunk-NXZC6UTN.js → chunk-DFUO7J3W.js} +2 -2
  28. package/dist/{chunk-TOYHZHTK.js → chunk-E5NSDLYJ.js} +2 -2
  29. package/dist/{chunk-77Y7R243.js → chunk-GAXC43J4.js} +5 -5
  30. package/dist/{chunk-EGYX55HT.cjs → chunk-I3HBFKKM.cjs} +159 -159
  31. package/dist/{chunk-EGYX55HT.cjs.map → chunk-I3HBFKKM.cjs.map} +1 -1
  32. package/dist/{chunk-ADANP3ZA.cjs → chunk-JIIA5BIJ.cjs} +33 -33
  33. package/dist/{chunk-ADANP3ZA.cjs.map → chunk-JIIA5BIJ.cjs.map} +1 -1
  34. package/dist/{chunk-PAUJQV3C.cjs → chunk-KIMRNY7A.cjs} +15 -15
  35. package/dist/{chunk-PAUJQV3C.cjs.map → chunk-KIMRNY7A.cjs.map} +1 -1
  36. package/dist/{chunk-FQBR6SCA.js → chunk-KLNHD4TC.js} +3 -3
  37. package/dist/{chunk-CNKVEVUN.js → chunk-LDNRL62P.js} +5 -5
  38. package/dist/{chunk-I5CJJFEJ.js → chunk-LKMRJ2CP.js} +3 -3
  39. package/dist/{chunk-KWTV3KGY.cjs → chunk-QEV5HPDQ.cjs} +9 -9
  40. package/dist/{chunk-KWTV3KGY.cjs.map → chunk-QEV5HPDQ.cjs.map} +1 -1
  41. package/dist/{chunk-WUCYI3BC.cjs → chunk-RLABO5PY.cjs} +24 -24
  42. package/dist/{chunk-WUCYI3BC.cjs.map → chunk-RLABO5PY.cjs.map} +1 -1
  43. package/dist/{chunk-5FNWOF46.js → chunk-RLC5IISG.js} +6 -6
  44. package/dist/{chunk-GKPY7VLK.js → chunk-RM3PTDSI.js} +4 -4
  45. package/dist/{chunk-NIDPX52C.js → chunk-T3WAHAMH.js} +5 -5
  46. package/dist/{chunk-D7YISHXC.js → chunk-V7RB3EUW.js} +37 -10
  47. package/dist/{chunk-D7YISHXC.js.map → chunk-V7RB3EUW.js.map} +1 -1
  48. package/dist/{chunk-BONXSRHZ.cjs → chunk-WIAEFA2K.cjs} +21 -21
  49. package/dist/{chunk-BONXSRHZ.cjs.map → chunk-WIAEFA2K.cjs.map} +1 -1
  50. package/dist/components/case-studies/index.cjs +9 -9
  51. package/dist/components/case-studies/index.js +3 -3
  52. package/dist/components/chat/index.cjs +2 -2
  53. package/dist/components/chat/index.js +1 -1
  54. package/dist/components/chat/stream/message-mutations.d.ts.map +1 -1
  55. package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
  56. package/dist/components/contact/index.cjs +4 -4
  57. package/dist/components/contact/index.js +3 -3
  58. package/dist/components/docs/index.cjs +7 -7
  59. package/dist/components/docs/index.js +6 -6
  60. package/dist/components/embeds/index.cjs +4 -4
  61. package/dist/components/embeds/index.js +3 -3
  62. package/dist/components/faq/index.cjs +4 -4
  63. package/dist/components/faq/index.js +3 -3
  64. package/dist/components/features/index.cjs +3 -3
  65. package/dist/components/features/index.js +2 -2
  66. package/dist/components/help-center-pages/index.cjs +23 -23
  67. package/dist/components/help-center-pages/index.js +14 -14
  68. package/dist/components/index.cjs +36 -36
  69. package/dist/components/index.js +13 -13
  70. package/dist/components/meeting-scheduler/index.cjs +21 -21
  71. package/dist/components/meeting-scheduler/index.js +2 -2
  72. package/dist/components/navigation/index.cjs +6 -6
  73. package/dist/components/navigation/index.js +5 -5
  74. package/dist/components/onboarding-guides/index.cjs +6 -6
  75. package/dist/components/onboarding-guides/index.js +5 -5
  76. package/dist/components/tickets/index.cjs +7 -7
  77. package/dist/components/tickets/index.js +6 -6
  78. package/dist/components/ui/index.cjs +3 -3
  79. package/dist/components/ui/index.js +2 -2
  80. package/dist/index.cjs +7 -7
  81. package/dist/index.js +6 -6
  82. package/package.json +1 -1
  83. package/src/components/chat/__tests__/ticket-event.test.ts +107 -0
  84. package/src/components/chat/stream/message-mutations.ts +47 -4
  85. package/src/components/chat/utils/process-historical-messages.ts +18 -6
  86. package/dist/chunk-G45RGWHF.cjs.map +0 -1
  87. /package/dist/{chunk-CJOWLRUU.js.map → chunk-6BPIDRBI.js.map} +0 -0
  88. /package/dist/{chunk-CN36E4PK.js.map → chunk-7JPKCUF7.js.map} +0 -0
  89. /package/dist/{chunk-LGBNHWDN.js.map → chunk-ACUXSU6J.js.map} +0 -0
  90. /package/dist/{chunk-KVNGYFFP.js.map → chunk-AV4UXMOH.js.map} +0 -0
  91. /package/dist/{chunk-4ZKAMPBX.js.map → chunk-BKOCXNAP.js.map} +0 -0
  92. /package/dist/{chunk-3OCYNMZ5.js.map → chunk-CT6I3HOP.js.map} +0 -0
  93. /package/dist/{chunk-NXZC6UTN.js.map → chunk-DFUO7J3W.js.map} +0 -0
  94. /package/dist/{chunk-TOYHZHTK.js.map → chunk-E5NSDLYJ.js.map} +0 -0
  95. /package/dist/{chunk-77Y7R243.js.map → chunk-GAXC43J4.js.map} +0 -0
  96. /package/dist/{chunk-FQBR6SCA.js.map → chunk-KLNHD4TC.js.map} +0 -0
  97. /package/dist/{chunk-CNKVEVUN.js.map → chunk-LDNRL62P.js.map} +0 -0
  98. /package/dist/{chunk-I5CJJFEJ.js.map → chunk-LKMRJ2CP.js.map} +0 -0
  99. /package/dist/{chunk-5FNWOF46.js.map → chunk-RLC5IISG.js.map} +0 -0
  100. /package/dist/{chunk-GKPY7VLK.js.map → chunk-RM3PTDSI.js.map} +0 -0
  101. /package/dist/{chunk-NIDPX52C.js.map → chunk-T3WAHAMH.js.map} +0 -0
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  ContactForm
4
- } from "./chunk-3OCYNMZ5.js";
4
+ } from "./chunk-CT6I3HOP.js";
5
5
  import {
6
6
  DeliveryRow,
7
7
  DevCardRowContent,
8
8
  DevCardRowSkeletonList,
9
9
  DevSectionPage
10
- } from "./chunk-CJOWLRUU.js";
10
+ } from "./chunk-6BPIDRBI.js";
11
11
  import {
12
12
  EmptyState,
13
13
  UnifiedPagination
@@ -18,7 +18,7 @@ import {
18
18
  TOAST_COPY,
19
19
  isOptimistic,
20
20
  useOptionalTicketLive
21
- } from "./chunk-FQBR6SCA.js";
21
+ } from "./chunk-KLNHD4TC.js";
22
22
  import {
23
23
  AlertDialog,
24
24
  AlertDialogAction,
@@ -33,7 +33,7 @@ import {
33
33
  Textarea,
34
34
  TicketAttachmentsList,
35
35
  devSectionAnchorId
36
- } from "./chunk-4ZKAMPBX.js";
36
+ } from "./chunk-BKOCXNAP.js";
37
37
  import {
38
38
  toast,
39
39
  useScrollToHash
@@ -51,7 +51,7 @@ import {
51
51
  formatRelativeTime,
52
52
  useChatAttachments,
53
53
  useChatIdentity
54
- } from "./chunk-D7YISHXC.js";
54
+ } from "./chunk-V7RB3EUW.js";
55
55
  import {
56
56
  STICKY_HEADER_OFFSET_PX,
57
57
  scrollElementIntoView
@@ -1838,4 +1838,4 @@ export {
1838
1838
  HelpCenterCreateForm,
1839
1839
  HelpCenterList
1840
1840
  };
1841
- //# sourceMappingURL=chunk-5FNWOF46.js.map
1841
+ //# sourceMappingURL=chunk-RLC5IISG.js.map
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  useOptionalTicketLive
4
- } from "./chunk-FQBR6SCA.js";
4
+ } from "./chunk-KLNHD4TC.js";
5
5
  import {
6
6
  AppLayoutDrawerContainerContext,
7
7
  AppLayoutDrawerCoordinationContext,
@@ -12,7 +12,7 @@ import {
12
12
  UnreadDot,
13
13
  buildTicketOpenHref,
14
14
  useOptionalNotifications
15
- } from "./chunk-4ZKAMPBX.js";
15
+ } from "./chunk-BKOCXNAP.js";
16
16
  import {
17
17
  useFocusTrap,
18
18
  useLocalStorage
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  OVERLAY_BACKDROP_CLASS,
22
22
  useIsHydrated
23
- } from "./chunk-D7YISHXC.js";
23
+ } from "./chunk-V7RB3EUW.js";
24
24
  import {
25
25
  useHeaderHeight,
26
26
  useIsomorphicLayoutEffect,
@@ -1888,4 +1888,4 @@ export {
1888
1888
  MobileBurgerMenu,
1889
1889
  AppLayout
1890
1890
  };
1891
- //# sourceMappingURL=chunk-GKPY7VLK.js.map
1891
+ //# sourceMappingURL=chunk-RM3PTDSI.js.map
@@ -4,13 +4,13 @@ import {
4
4
  } from "./chunk-YLNZPFDW.js";
5
5
  import {
6
6
  DeliveryRow
7
- } from "./chunk-CJOWLRUU.js";
7
+ } from "./chunk-6BPIDRBI.js";
8
8
  import {
9
9
  EmptyState
10
10
  } from "./chunk-Z2FZ5HP2.js";
11
11
  import {
12
12
  DetailPageSkeleton
13
- } from "./chunk-NXZC6UTN.js";
13
+ } from "./chunk-DFUO7J3W.js";
14
14
  import {
15
15
  useSelfFetch
16
16
  } from "./chunk-UC5RXT3O.js";
@@ -29,7 +29,7 @@ import {
29
29
  RichMarkdownRenderer,
30
30
  devSectionAnchorId,
31
31
  resolveContentHref
32
- } from "./chunk-4ZKAMPBX.js";
32
+ } from "./chunk-BKOCXNAP.js";
33
33
  import {
34
34
  useHumanitySignals,
35
35
  useScrollToHash
@@ -43,7 +43,7 @@ import {
43
43
  isModifierClick,
44
44
  useCaptions,
45
45
  useIsHydrated
46
- } from "./chunk-D7YISHXC.js";
46
+ } from "./chunk-V7RB3EUW.js";
47
47
  import {
48
48
  STICKY_HEADER_OFFSET_PX
49
49
  } from "./chunk-JRYS4VMV.js";
@@ -1375,4 +1375,4 @@ export {
1375
1375
  useLegalDocs,
1376
1376
  LegalDocumentPage
1377
1377
  };
1378
- //# sourceMappingURL=chunk-NIDPX52C.js.map
1378
+ //# sourceMappingURL=chunk-T3WAHAMH.js.map
@@ -17921,6 +17921,23 @@ function upsertKey(seg) {
17921
17921
  return null;
17922
17922
  }
17923
17923
  }
17924
+ function seqlessTicketEventTwinIndex(segments, seg) {
17925
+ if (seg.type !== "ticket_event") return -1;
17926
+ for (let i = segments.length - 1; i >= 0; i--) {
17927
+ const s = segments[i];
17928
+ if (s.type !== "ticket_event") continue;
17929
+ if (s.streamSeq === void 0 && s.data.kind === seg.data.kind && s.data.actorId === seg.data.actorId && s.data.actorName === seg.data.actorName && s.data.actorType === seg.data.actorType && s.data.reason === seg.data.reason && s.data.targetStatusKind === seg.data.targetStatusKind) {
17930
+ return i;
17931
+ }
17932
+ break;
17933
+ }
17934
+ return -1;
17935
+ }
17936
+ function withFirstKnownOccurredAt(existing, incoming) {
17937
+ if (existing.type !== "ticket_event" || incoming.type !== "ticket_event") return incoming;
17938
+ const occurredAt = existing.occurredAt ?? incoming.occurredAt;
17939
+ return occurredAt !== void 0 ? { ...incoming, occurredAt } : incoming;
17940
+ }
17924
17941
  function appendToTrailingAssistant(prev, segments) {
17925
17942
  if (segments.length === 0) return prev;
17926
17943
  const last = prev[prev.length - 1];
@@ -17936,8 +17953,9 @@ function appendToTrailingAssistant(prev, segments) {
17936
17953
  } else if (seg.type === "thinking" && tail?.type === "thinking") {
17937
17954
  merged[merged.length - 1] = { type: "thinking", text: tail.text + seg.text };
17938
17955
  } else if (key) {
17939
- const idx = merged.findIndex((m) => upsertKey(m) === key);
17940
- if (idx !== -1) merged[idx] = seg;
17956
+ let idx = merged.findIndex((m) => upsertKey(m) === key);
17957
+ if (idx === -1) idx = seqlessTicketEventTwinIndex(merged, seg);
17958
+ if (idx !== -1) merged[idx] = withFirstKnownOccurredAt(merged[idx], seg);
17941
17959
  else merged.push(seg);
17942
17960
  } else {
17943
17961
  merged.push(seg);
@@ -21146,7 +21164,7 @@ function decodeHistoricalMessageData(data) {
21146
21164
  return null;
21147
21165
  }
21148
21166
  }
21149
- function applyHistoryEvent(event, accumulator, approvalStatuses, options, escalatedApprovals, offerResolutions, rowCreatedAt) {
21167
+ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escalatedApprovals, offerResolutions, rowCreatedAt, rowStreamSeq) {
21150
21168
  const { displayApprovalTypes, batchApprovalsEnabled = true, escalationOfferStates } = options;
21151
21169
  switch (event.type) {
21152
21170
  case "escalation-offer":
@@ -21165,10 +21183,14 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21165
21183
  text: event.text
21166
21184
  });
21167
21185
  break;
21168
- // Seq-less on purpose: the persisted row's sequence lives on the message
21169
- // (`lastChunkStreamSeq`), not in `messageData`. A live redelivery of the
21170
- // same event matches this segment by payload equality (see
21171
- // `addTicketEvent`).
21186
+ // `rowStreamSeq` re-stamps the event's JetStream sequence (the persisted
21187
+ // row's `lastChunkStreamSeq` - `messageData` itself does not carry it).
21188
+ // The store's `ticket-event:<seq>` upsert key is the ONLY join between
21189
+ // this hydrated segment and a catch-up/stale-consumer replay of the same
21190
+ // chunk; a seq-less segment never joins, so the replayed copy rendered as
21191
+ // a second identical card (the resolve/reopen duplication). The payload
21192
+ // fallback in `addTicketEvent` cannot own that case: a COMPLETE hydrated
21193
+ // tail seeds no accumulator, so the twins only ever meet in the store.
21172
21194
  case "ticket-event":
21173
21195
  accumulator.addTicketEvent(
21174
21196
  {
@@ -21179,7 +21201,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
21179
21201
  reason: event.reason,
21180
21202
  targetStatusKind: event.targetStatusKind
21181
21203
  },
21182
- void 0,
21204
+ rowStreamSeq,
21183
21205
  rowCreatedAt
21184
21206
  );
21185
21207
  break;
@@ -21424,7 +21446,12 @@ function processHistoricalMessages(messages, options = {}) {
21424
21446
  { displayApprovalTypes, batchApprovalsEnabled, escalationOfferStates },
21425
21447
  escalatedApprovals,
21426
21448
  offerResolutions,
21427
- new Date(msg.createdAt)
21449
+ new Date(msg.createdAt),
21450
+ // TICKET_EVENT chunks are standalone, one per row, so the row seq IS
21451
+ // the event seq - but vouch for that only when the row holds exactly
21452
+ // one entry: a bundled row's `lastChunkStreamSeq` belongs to its LAST
21453
+ // chunk and could stamp the wrong event.
21454
+ messageDataArray.length === 1 && typeof msg.lastChunkStreamSeq === "number" ? msg.lastChunkStreamSeq : void 0
21428
21455
  );
21429
21456
  });
21430
21457
  const nextMsg = messages[index + 1];
@@ -24863,4 +24890,4 @@ export {
24863
24890
  buildStreamFrames,
24864
24891
  EmbeddableChat
24865
24892
  };
24866
- //# sourceMappingURL=chunk-D7YISHXC.js.map
24893
+ //# sourceMappingURL=chunk-V7RB3EUW.js.map