@cossistant/next 0.0.26 → 0.0.29

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/conversation-timeline.d.ts.map +1 -1
  2. package/conversation.d.ts +2 -0
  3. package/conversation.d.ts.map +1 -1
  4. package/day-separator.d.ts +76 -0
  5. package/day-separator.d.ts.map +1 -0
  6. package/events.d.ts +32 -0
  7. package/events.d.ts.map +1 -0
  8. package/fallback.d.ts.map +1 -1
  9. package/handle.d.ts +63 -0
  10. package/handle.d.ts.map +1 -0
  11. package/hooks/index.d.ts +2 -2
  12. package/identify-visitor2.d.ts +1 -0
  13. package/identify-visitor2.d.ts.map +1 -1
  14. package/index.d.ts +9 -5
  15. package/index.js +3 -3
  16. package/index2.d.ts +2 -1
  17. package/index2.parts.d.ts +3 -1
  18. package/index4.d.ts +3 -1
  19. package/index7.d.ts +1 -70
  20. package/index8.d.ts +239 -3
  21. package/index8.d.ts.map +1 -0
  22. package/index9.d.ts +4 -0
  23. package/keys.d.ts +2 -0
  24. package/keys.d.ts.map +1 -1
  25. package/merge-refs.d.ts +1 -0
  26. package/package.json +2 -2
  27. package/primitives/index.d.ts +4 -2
  28. package/primitives/index.js +2 -2
  29. package/provider2.d.ts +2 -0
  30. package/provider2.d.ts.map +1 -1
  31. package/router.d.ts +1 -0
  32. package/router.d.ts.map +1 -1
  33. package/router2.d.ts +20 -3
  34. package/router2.d.ts.map +1 -1
  35. package/seen-store.d.ts +2 -0
  36. package/seen-store.d.ts.map +1 -1
  37. package/slots.d.ts +18 -0
  38. package/slots.d.ts.map +1 -0
  39. package/support/index.d.ts +5 -3
  40. package/support/index.js +2 -2
  41. package/support-config2.d.ts +1 -0
  42. package/support-config2.d.ts.map +1 -1
  43. package/support-store.d.ts +42 -14
  44. package/support-store.d.ts.map +1 -1
  45. package/support.css +2 -2
  46. package/timeline-item-attachments.d.ts +65 -0
  47. package/timeline-item-attachments.d.ts.map +1 -0
  48. package/timeline-item-group.d.ts +1 -0
  49. package/timeline-item-group.d.ts.map +1 -1
  50. package/trigger.d.ts +91 -0
  51. package/trigger.d.ts.map +1 -0
  52. package/types.d.ts +75 -12
  53. package/types.d.ts.map +1 -1
  54. package/typing-indicator.d.ts +1 -0
  55. package/typing-indicator.d.ts.map +1 -1
  56. package/typing-store.d.ts +2 -0
  57. package/typing-store.d.ts.map +1 -1
  58. package/typing.d.ts +4 -1
  59. package/typing.d.ts.map +1 -1
  60. package/use-client-query.d.ts +8 -0
  61. package/use-client-query.d.ts.map +1 -1
  62. package/use-conversation-auto-seen.d.ts +2 -1
  63. package/use-conversation-auto-seen.d.ts.map +1 -1
  64. package/use-conversation-history-page.d.ts +2 -0
  65. package/use-conversation-history-page.d.ts.map +1 -1
  66. package/use-conversation-page.d.ts +1 -0
  67. package/use-conversation-page.d.ts.map +1 -1
  68. package/use-conversation-preview.d.ts +3 -1
  69. package/use-conversation-preview.d.ts.map +1 -1
  70. package/use-conversation-timeline-items.d.ts +2 -1
  71. package/use-conversation-timeline-items.d.ts.map +1 -1
  72. package/use-conversation-timeline.d.ts.map +1 -1
  73. package/use-conversation-typing.d.ts +2 -0
  74. package/use-conversation-typing.d.ts.map +1 -1
  75. package/use-conversations.d.ts +2 -1
  76. package/use-conversations.d.ts.map +1 -1
  77. package/use-create-conversation.d.ts +2 -0
  78. package/use-create-conversation.d.ts.map +1 -1
  79. package/use-file-upload.d.ts +1 -0
  80. package/use-grouped-messages.d.ts +10 -6
  81. package/use-grouped-messages.d.ts.map +1 -1
  82. package/use-home-page.d.ts +2 -0
  83. package/use-home-page.d.ts.map +1 -1
  84. package/use-message-composer.d.ts +11 -0
  85. package/use-message-composer.d.ts.map +1 -1
  86. package/use-multimodal-input.d.ts.map +1 -1
  87. package/use-render-element.d.ts.map +1 -1
  88. package/use-rest-client.d.ts +2 -0
  89. package/use-rest-client.d.ts.map +1 -1
  90. package/use-send-message.d.ts +3 -1
  91. package/use-send-message.d.ts.map +1 -1
  92. package/use-visitor.d.ts +2 -0
  93. package/use-visitor.d.ts.map +1 -1
  94. package/utils/index.d.ts +1 -1
  95. package/websocket.d.ts +1 -0
  96. package/websocket.d.ts.map +1 -1
  97. package/window.d.ts +12 -1
  98. package/window.d.ts.map +1 -1
  99. package/bubble.d.ts +0 -29
  100. package/bubble.d.ts.map +0 -1
  101. package/index7.d.ts.map +0 -1
@@ -1,3 +1,5 @@
1
+ import { CossistantClient } from "@cossistant/core";
2
+
1
3
  //#region ../react/src/hooks/private/use-rest-client.d.ts
2
4
  type UseClientResult = {
3
5
  client: CossistantClient;
@@ -1 +1 @@
1
- {"version":3,"file":"use-rest-client.d.ts","names":[],"sources":["../../react/src/hooks/private/use-rest-client.ts"],"sourcesContent":[],"mappings":";AAMY,KAAA,eAAA,GAAe;EAWX,MAAA,EAVP,gBAcN;SAbK;;;;;;;;iBASQ,SAAA,kEAIb"}
1
+ {"version":3,"file":"use-rest-client.d.ts","names":[],"sources":["../../react/src/hooks/private/use-rest-client.ts"],"sourcesContent":[],"mappings":";;;KAMY,eAAA;UACH;EADG,KAAA,EAEJ,KAFI,GAAA,IAAe;AAW3B,CAAA;;;;;;;iBAAgB,SAAA,kEAIb"}
@@ -1,5 +1,6 @@
1
- //#region ../react/src/hooks/use-send-message.d.ts
1
+ import { CossistantClient } from "@cossistant/core";
2
2
 
3
+ //#region ../react/src/hooks/use-send-message.d.ts
3
4
  type SendMessageOptions = {
4
5
  conversationId?: string | null;
5
6
  message: string;
@@ -24,6 +25,7 @@ type UseSendMessageResult = {
24
25
  mutate: (options: SendMessageOptions) => void;
25
26
  mutateAsync: (options: SendMessageOptions) => Promise<SendMessageResult | null>;
26
27
  isPending: boolean;
28
+ isUploading: boolean;
27
29
  error: Error | null;
28
30
  reset: () => void;
29
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"use-send-message.d.ts","names":[],"sources":["../../react/src/hooks/use-send-message.ts"],"sourcesContent":[],"mappings":";;AAYwB,KAJZ,kBAAA,GAIY;EAQL,cAAA,CAAA,EAAA,MAAA,GAAA,IAAA;EAAK,OAAA,EAAA,MAAA;EAGZ,KAAA,CAAA,EAZH,IAYG,EAAA;EAOA,oBAAA,CAAA,EAlBY,YAkBQ,EAAA;EACb,SAAA,CAAA,EAAA,MAAA;EAER;;;;EAGE,SAAA,CAAA,EAAA,MAAA;EAID,SAAA,CAAA,EAAA,CAAA,cAAqB,EAAA,MAAA,EACvB,SAAA,EAAA,MAAgB,EAAA,GAAA,IAAA;EA4CV,OAAA,CAAA,EAAA,CAAA,KAAA,EAjEG,KAiEW,EAAA,GAAA,IACpB;;KA/DE,iBAAA;;;iBAGI;yBACQ;;KAGZ,oBAAA;oBACO;yBAER,uBACL,QAAQ;;SAEN;;;KAII,qBAAA;WACF;;;;;;iBA4CM,cAAA,WACN,wBACP"}
1
+ {"version":3,"file":"use-send-message.d.ts","names":[],"sources":["../../react/src/hooks/use-send-message.ts"],"sourcesContent":[],"mappings":";;;AAiBY,KAAA,kBAAA,GAAkB;EAGrB,cAAA,CAAA,EAAA,MAAA,GAAA,IAAA;EACe,OAAA,EAAA,MAAA;EAQL,KAAA,CAAA,EATV,IASU,EAAA;EAAK,oBAAA,CAAA,EARA,YAQA,EAAA;EAGZ,SAAA,CAAA,EAAA,MAAA;EAOA;;;;EAIN,SAAA,CAAA,EAAA,MAAA;EAGE,SAAA,CAAA,EAAA,CAAA,cAAA,EAAA,MAAA,EAAA,SAAA,EAAA,MAAA,EAAA,GAAA,IAAA;EAAK,OAAA,CAAA,EAAA,CAAA,KAAA,EAjBM,KAiBN,EAAA,GAAA,IAAA;AAIb,CAAA;AAoHgB,KAtIJ,iBAAA,GAsIkB;;;iBAnId;yBACQ;;KAGZ,oBAAA;oBACO;yBAER,uBACL,QAAQ;;;SAGN;;;KAII,qBAAA;WACF;;;;;;iBAmHM,cAAA,WACN,wBACP"}
package/use-visitor.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { PublicVisitor, VisitorMetadata, VisitorResponse } from "@cossistant/types";
2
+
1
3
  //#region ../react/src/hooks/use-visitor.d.ts
2
4
  type UseVisitorReturn = {
3
5
  visitor: PublicVisitor | null;
@@ -1 +1 @@
1
- {"version":3,"file":"use-visitor.d.ts","names":[],"sources":["../../react/src/hooks/use-visitor.ts"],"sourcesContent":[],"mappings":";AAQY,KAAA,gBAAA,GAAgB;EAClB,OAAA,EAAA,aAAA,GAAA,IAAA;EAEE,kBAAA,EAAA,CAAA,QAAA,EAAA,eAAA,EAAA,GACN,OADM,CACE,eADF,GAAA,IAAA,CAAA;EACE,QAAA,EAAA,CAAA,MAAA,EAAA;IAAR,UAAA,CAAA,EAAA,MAAA;IAMO,KAAA,CAAA,EAAA,MAAA;IACN,IAAA,CAAA,EAAA,MAAA;IAAO,KAAA,CAAA,EAAA,MAAA;IAsBE,QAAA,CAAU,EAvBb,MAuBa,CAAA,MAAI,EAAA,OAAA,CAAA;QAtBvB;;;;;;;;;;;;iBAsBS,UAAA,CAAA,GAAc"}
1
+ {"version":3,"file":"use-visitor.d.ts","names":[],"sources":["../../react/src/hooks/use-visitor.ts"],"sourcesContent":[],"mappings":";;;KAQY,gBAAA;WACF;EADE,kBAAA,EAAgB,CAAA,QAAA,EAGhB,eAHgB,EAAA,GAItB,OAJsB,CAId,eAJc,GAAA,IAAA,CAAA;EAClB,QAAA,EAAA,CAAA,MAAA,EAAA;IAEE,UAAA,CAAA,EAAA,MAAA;IACE,KAAA,CAAA,EAAA,MAAA;IAAR,IAAA,CAAA,EAAA,MAAA;IAMO,KAAA,CAAA,EAAA,MAAA;IACN,QAAA,CAAA,EADM,MACN,CAAA,MAAA,EAAA,OAAA,CAAA;EAAO,CAAA,EAAA,GAAP,OAAO,CAAA;IAsBE,SAAU,EAAA,MAAA;;;;;;;;;;;iBAAV,UAAA,CAAA,GAAc"}
package/utils/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { shouldDisplayConversation } from "../conversation.js";
2
2
  import { PENDING_CONVERSATION_ID, generateShortPrimaryId } from "../id.js";
3
3
  import { useRenderElement } from "../use-render-element.js";
4
- import "../index8.js";
4
+ import "../index9.js";
5
5
  export { PENDING_CONVERSATION_ID, generateShortPrimaryId, shouldDisplayConversation, useRenderElement };
package/websocket.d.ts CHANGED
@@ -22,6 +22,7 @@ type WebSocketProviderProps = {
22
22
  declare const WebSocketProvider: React.FC<WebSocketProviderProps>;
23
23
  /**
24
24
  * Accessor for the support websocket context.
25
+ * Throws if used outside WebSocketProvider.
25
26
  */
26
27
  declare const useWebSocket: () => WebSocketContextValue;
27
28
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"websocket.d.ts","names":[],"sources":["../../react/src/support/context/websocket.tsx"],"sourcesContent":[],"mappings":";;;;;KAYK,qBAAA,GAAwB;KAExB,sBAAA;YACM,KAAA,CAAM;EAHZ,SAAA,CAAA,EAAA,MAAA;EAEA,SAAA,CAAA,EAAA,MAAA;EAsJQ,SAAA,CAAA,EAAA,MAAA;EA8BA,KAAA,CAAA,EAAA,MAAA;;;;oBA3KM;;;;;;cA6IN,mBAAmB,KAAA,CAAM,GAAG;;;;cA8B5B,oBAAmB"}
1
+ {"version":3,"file":"websocket.d.ts","names":[],"sources":["../../react/src/support/context/websocket.tsx"],"sourcesContent":[],"mappings":";;;;;KAYK,qBAAA,GAAwB;KAExB,sBAAA;YACM,KAAA,CAAM;EAHZ,SAAA,CAAA,EAAA,MAAA;EAEA,SAAA,CAAA,EAAA,MAAA;EAsJQ,SAAA,CAAA,EAAA,MAAA;EA+BA,KAAA,CAAA,EAAA,MAAA;;;;oBA5KM;;;;;;cA6IN,mBAAmB,KAAA,CAAM,GAAG;;;;;cA+B5B,oBAAmB"}
package/window.d.ts CHANGED
@@ -6,7 +6,8 @@ type WindowRenderProps = {
6
6
  close: () => void;
7
7
  };
8
8
  /**
9
- * Dialog container with open/close state and escape key handling.
9
+ * Dialog container with open/close state, escape key handling,
10
+ * focus trap, and focus restoration.
10
11
  *
11
12
  * @example
12
13
  * <Window isOpen={isOpen} onOpenChange={setOpen}>
@@ -21,6 +22,16 @@ declare const SupportWindow: React$1.ForwardRefExoticComponent<Omit<React$1.HTML
21
22
  children?: React$1.ReactNode | ((props: WindowRenderProps) => React$1.ReactNode);
22
23
  asChild?: boolean;
23
24
  closeOnEscape?: boolean;
25
+ /**
26
+ * Whether to trap focus within the dialog when open.
27
+ * @default true
28
+ */
29
+ trapFocus?: boolean;
30
+ /**
31
+ * Whether to restore focus to the previously focused element when closing.
32
+ * @default true
33
+ */
34
+ restoreFocus?: boolean;
24
35
  id?: string;
25
36
  } & React$1.RefAttributes<HTMLDivElement>>;
26
37
  //#endregion
package/window.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"window.d.ts","names":[],"sources":["../../react/src/primitives/window.tsx"],"sourcesContent":[],"mappings":";;;KAIY,iBAAA;;EAAA,KAAA,EAAA,GAAA,GAAA,IAAA;AA2BZ,CAAA;;;;;;;;;;;cAAa,eAAa,OAAA,CAAA,0BAAA,KAAA,OAAA,CAAA,eAAA;;;aAhBd,OAAA,CAAM,qBAAqB,sBAAsB,OAAA,CAAM"}
1
+ {"version":3,"file":"window.d.ts","names":[],"sources":["../../react/src/primitives/window.tsx"],"sourcesContent":[],"mappings":";;;KAIY,iBAAA;;EAAA,KAAA,EAAA,GAAA,GAAA,IAAA;AAsEZ,CAAA;;;;;;;;;;;;cAAa,eAAa,OAAA,CAAA,0BAAA,KAAA,OAAA,CAAA,eAAA;;;aA3Dd,OAAA,CAAM,qBAAqB,sBAAsB,OAAA,CAAM"}
package/bubble.d.ts DELETED
@@ -1,29 +0,0 @@
1
- import * as React$1 from "react";
2
-
3
- //#region ../react/src/primitives/bubble.d.ts
4
-
5
- /**
6
- * Floating action button that toggles the support window.
7
- *
8
- * @example
9
- * <Bubble>
10
- * {({ isOpen, unreadCount, toggle }) => (
11
- * <button onClick={toggle}>
12
- * {isOpen ? "×" : "💬"} {unreadCount > 0 && `(${unreadCount})`}
13
- * </button>
14
- * )}
15
- * </Bubble>
16
- */
17
- declare const SupportBubble: React$1.ForwardRefExoticComponent<Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
18
- children?: React$1.ReactNode | ((props: {
19
- isOpen: boolean;
20
- unreadCount: number;
21
- isTyping: boolean;
22
- toggle: () => void;
23
- }) => React$1.ReactNode);
24
- asChild?: boolean;
25
- className?: string;
26
- } & React$1.RefAttributes<HTMLButtonElement>>;
27
- //#endregion
28
- export { SupportBubble };
29
- //# sourceMappingURL=bubble.d.ts.map
package/bubble.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"bubble.d.ts","names":[],"sources":["../../react/src/primitives/bubble.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;cAkCa,eAAa,OAAA,CAAA,0BAAA,KAAA,OAAA,CAAA,qBAAA;aAvBtB,OAAA,CAAM;;;;;QAMA,OAAA,CAAM"}
package/index7.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index7.d.ts","names":[],"sources":["../../react/src/support/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;KAmBY,qCAAqC;;;;EAArC,WAAA,CAAA,EAAA,OAAY,GAAA,UAAA;EAAyB,YAAA,CAAA,EAAA,MAAA,EAAA;EAO9B,eAAA,CAAA,EAAA,cAAA,EAAA;EAET,WAAA,CAAA,EAAA,OAAA;EAC6B,MAAA,CAAA,EAD7B,MAC6B;EAA5B,OAAA,CAAA,EAAA,2BAAA,CAA4B,MAA5B,CAAA;EAOoB,KAAA,CAAA,EAAA,OAAA,GAAA,MAAA;EAApB,KAAM,CAAA,EAAA;IACiB,MAAA,CAAA,EADvB,KAAA,CAAM,aACiB,CADH,eACG,CAAA;IAAd,SAAA,CAAA,EAAN,KAAA,CAAM,aAAA,CAAc,kBAAd,CAAA;IACW,MAAA,CAAA,EAApB,KAAA,CAAM,aAAc,CAAA,eAAA,CAAA;EAApB,CAAA;EAWI,UAAA,CAAA,EAAA;IAEG,IAAA,CAAA,EAAA,MAAA;IAAS,MAAA,CAAA,EAAA,MAAA;IAoBX,SAAO,CAAA,EAAA,MAAA;EAAyB,CAAA;EAC/C,WAAA,CAAA,EAvBc,UAuBd,EAAA;EACA,QAAA,CAAA,EAtBW,KAAA,CAAM,SAsBjB;CACA;;;;;;;;;;;;;;;;;;iBAHe,gCAAgC;;;;;;;;;;;;;;;GAe7C,aAAa,UAAU"}