@hiver/connector-agent 4.19.0-attachment-beta.7 → 4.19.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"HigSlackSection.d.ts","sourceRoot":"","sources":["../../../src/app/hig-slack/HigSlackSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAkC,MAAM,OAAO,CAAC;AAQ3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAiCjE,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG;IACpD;yEACqE;IACrE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAwOF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAIpD,CAAC"}
1
+ {"version":3,"file":"HigSlackSection.d.ts","sourceRoot":"","sources":["../../../src/app/hig-slack/HigSlackSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAkC,MAAM,OAAO,CAAC;AAQ3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAiCjE,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG;IACpD;yEACqE;IACrE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAoPF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAIpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"attachment-data.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/api/attachment-data.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAO7D,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAIF,eAAO,MAAM,iBAAiB,wDAK3B,qBAAqB,KAAG,OAAO,CAAC,uBAAuB,CAazD,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,GAAG;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAIF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,0FAQ3B,uBAAuB,mFAiCzB,CAAC"}
1
+ {"version":3,"file":"attachment-data.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/api/attachment-data.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAO7D,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAIF,eAAO,MAAM,iBAAiB,wDAK3B,qBAAqB,KAAG,OAAO,CAAC,uBAAuB,CAazD,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,GAAG;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAIF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,0FAQ3B,uBAAuB,mFAuCzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"card-attachment-list.d.ts","sourceRoot":"","sources":["../../../../../../src/features/connector-cards/components/card-list/attachment/card-attachment-list.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAWrD,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,eAAe,EAAE,CAAC;IAG/B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAsED,eAAO,MAAM,kBAAkB,+BAAwC,wBAAwB,4CAyB9F,CAAC"}
1
+ {"version":3,"file":"card-attachment-list.d.ts","sourceRoot":"","sources":["../../../../../../src/features/connector-cards/components/card-list/attachment/card-attachment-list.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAUrD,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,eAAe,EAAE,CAAC;IAG/B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAgED,eAAO,MAAM,kBAAkB,+BAAwC,wBAAwB,4CAyB9F,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import { BoxProps, StackProps } from '@hiver/hiver-ui-kit';
2
2
  import { StyledComponent } from '@emotion/styled';
3
3
  export declare const AttachmentList: StyledComponent<StackProps>;
4
- export declare const AttachmentPillButton: StyledComponent<JSX.IntrinsicElements['button']>;
5
- export declare const AttachmentPillAnchor: StyledComponent<JSX.IntrinsicElements['a']>;
4
+ export declare const AttachmentPill: StyledComponent<BoxProps>;
6
5
  export declare const FileIconWrapper: StyledComponent<BoxProps>;
7
6
  export declare const FileName: StyledComponent<BoxProps>;
8
- export declare const ActionIcon: StyledComponent<BoxProps>;
7
+ export declare const ActionAnchor: StyledComponent<JSX.IntrinsicElements['a']>;
9
8
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/features/connector-cards/components/card-list/attachment/styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAsClD,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,UAAU,CAItD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAAe,CAAC,GAAG,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAGjF,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAAe,CAAC,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAE5E,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,QAAQ,CASrD,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,eAAe,CAAC,QAAQ,CAO9C,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,QAAQ,CAahD,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/features/connector-cards/components/card-list/attachment/styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAuClD,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,UAAU,CAItD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,QAAQ,CAEpD,CAAC;AAKF,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,QAAQ,CAQrD,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,eAAe,CAAC,QAAQ,CAO9C,CAAC;AAIF,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAqBpE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=linked-conv.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linked-conv.test.d.ts","sourceRoot":"","sources":["../../../../../src/features/slack/api/__tests__/linked-conv.test.ts"],"names":[],"mappings":""}
@@ -10,6 +10,29 @@ import { ExternalConversation, SlackThreadGroup } from '../types/wire';
10
10
  * the timer.
11
11
  */
12
12
  export declare const LINKED_CONV_POLL_INTERVAL_MS = 2000;
13
+ /**
14
+ * Slower cadence for the HIG details-panel section (M-HIG). Unlike the tab
15
+ * — which mounts only when the agent opens it — the section lives in the
16
+ * mail-view details column and is near-permanently mounted, so it polls at a
17
+ * lighter rate to keep the always-on background load down. The tab keeps the
18
+ * snappier LINKED_CONV_POLL_INTERVAL_MS.
19
+ */
20
+ export declare const SECTION_POLL_INTERVAL_MS = 5000;
21
+ /**
22
+ * Backoff ceiling for a failing poll. While the endpoint keeps erroring the
23
+ * interval doubles per consecutive failure and is clamped here, so a dead
24
+ * backend is hit at most once a minute instead of every 2s. The first
25
+ * successful fetch resets react-query's failure count, snapping the cadence
26
+ * straight back to the base interval.
27
+ */
28
+ export declare const MAX_POLL_BACKOFF_MS = 60000;
29
+ /**
30
+ * Base interval → actual interval given the number of consecutive fetch
31
+ * failures. Exponential backoff (base·2^failures) capped at
32
+ * MAX_POLL_BACKOFF_MS; a healthy / just-recovered query (failureCount 0)
33
+ * polls at the base cadence.
34
+ */
35
+ export declare function backedOffInterval(baseMs: number, failureCount: number): number;
13
36
  /**
14
37
  * Reads the linked Slack thread for a Hiver conversation, if any.
15
38
  * Returns `null` on 404 (no link yet) and surfaces other errors
@@ -17,17 +40,26 @@ export declare const LINKED_CONV_POLL_INTERVAL_MS = 2000;
17
40
  *
18
41
  * Used by SlackEmptyState (UI-1) to branch between the "Start" CTAs
19
42
  * and the LinkedConversationPanel (UI-5). Polls every
20
- * LINKED_CONV_POLL_INTERVAL_MS while the tab is mounted so inbound
21
- * Slack messages surface without a websocket — react-query pauses
22
- * the timer automatically when the tab is in the background, so
23
- * idle conversations don't burn requests.
43
+ * `refetchIntervalMs` while the surface is active so inbound Slack
44
+ * messages surface without a websocket — react-query pauses the timer
45
+ * when the browser tab is hidden, and hosts that keep the surface
46
+ * mounted-but-hidden pass a 0 interval (via `isActive`) to pause it too.
47
+ *
48
+ * Two load-shedding behaviours layer on the base cadence:
49
+ * - Pass a falsy interval (0 / undefined) to disable polling entirely
50
+ * (the surface is inactive / hidden behind another tab).
51
+ * - While the endpoint is failing, the effective interval backs off
52
+ * exponentially up to MAX_POLL_BACKOFF_MS and snaps back to base on
53
+ * the first success (see `backedOffInterval`).
24
54
  */
25
55
  export declare function useLinkedConversation(hiverConvId: string, enabled?: boolean, refetchIntervalMs?: number): import('@tanstack/react-query').UseQueryResult<ExternalConversation | null, Error>;
26
56
  /**
27
57
  * Channel mode (B4): lazily fetch a single thread's messages (root +
28
58
  * replies) when the user drills into it from the channel list. Enabled
29
59
  * only while a thread is open, so the channel list view never pays for
30
- * replies. Polls on the same cadence so live replies surface.
60
+ * replies. Polls on the same cadence so live replies surface — and, like
61
+ * `useLinkedConversation`, pauses when the surface is inactive (`isActive`
62
+ * false) and backs off while the endpoint is failing.
31
63
  */
32
- export declare function useThread(hiverConvId: string, threadTs: string | null): import('@tanstack/react-query').UseQueryResult<SlackThreadGroup, Error>;
64
+ export declare function useThread(hiverConvId: string, threadTs: string | null, isActive?: boolean): import('@tanstack/react-query').UseQueryResult<SlackThreadGroup, Error>;
33
65
  //# sourceMappingURL=linked-conv.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"linked-conv.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/api/linked-conv.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE1F;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,OAAO,CAAC;AAEjD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,OAAO,UAAO,EACd,iBAAiB,GAAE,MAAqC,sFAoBzD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,2EASrE"}
1
+ {"version":3,"file":"linked-conv.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/api/linked-conv.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE1F;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,OAAO,CAAC;AAEjD;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AAEzC;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAG9E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,OAAO,UAAO,EACd,iBAAiB,GAAE,MAAqC,sFA+BzD;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,UAAO,2EAWtF"}
@@ -10,5 +10,6 @@ import { FC } from 'react';
10
10
  */
11
11
  export declare const HeroIllustration: FC<{
12
12
  width?: number;
13
+ boxed?: boolean;
13
14
  }>;
14
15
  //# sourceMappingURL=HeroIllustration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeroIllustration.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/HeroIllustration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAM3B;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAQnD,CAAC"}
1
+ {"version":3,"file":"HeroIllustration.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/HeroIllustration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAM3B;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAQpE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ThreadDetailView.d.ts","sourceRoot":"","sources":["../../../../../src/features/slack/components/LinkedConversationPanel/ThreadDetailView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAyC,MAAM,OAAO,CAAC;AA0F7E,UAAU,qBAAqB;IAC7B,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC;0EACsE;IACtE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAChD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB;;qEAEiE;IACjE,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAwKtD,CAAC"}
1
+ {"version":3,"file":"ThreadDetailView.d.ts","sourceRoot":"","sources":["../../../../../src/features/slack/components/LinkedConversationPanel/ThreadDetailView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAyC,MAAM,OAAO,CAAC;AA0F7E,UAAU,qBAAqB;IAC7B,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC;0EACsE;IACtE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAChD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB;;qEAEiE;IACjE,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA0KtD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SlackConversationTab.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/SlackConversationTab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAoC,MAAM,OAAO,CAAC;AAwB7D,UAAU,yBAAyB;IACjC;;oDAEgD;IAChD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC;AAuCD,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA2M9D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"SlackConversationTab.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/SlackConversationTab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAoC,MAAM,OAAO,CAAC;AAwB7D,UAAU,yBAAyB;IACjC;;oDAEgD;IAChD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC;AAuCD,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAmN9D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}