@flamingo-stack/openframe-frontend-core 0.0.690-snapshot.20261001124055 → 0.0.690

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 (149) hide show
  1. package/dist/{chunk-2YVTGPM7.js → chunk-22RSJ57Z.js} +2 -2
  2. package/dist/{chunk-JSG7WZKV.js → chunk-25X43LSD.js} +4 -4
  3. package/dist/{chunk-UVUNBXS6.js → chunk-2KILTCND.js} +1 -6
  4. package/dist/chunk-2KILTCND.js.map +1 -0
  5. package/dist/{chunk-ESFPY5FF.cjs → chunk-2MGTNYHW.cjs} +100 -100
  6. package/dist/{chunk-ESFPY5FF.cjs.map → chunk-2MGTNYHW.cjs.map} +1 -1
  7. package/dist/{chunk-SDORFSFK.cjs → chunk-2OD2PPNO.cjs} +37 -37
  8. package/dist/{chunk-SDORFSFK.cjs.map → chunk-2OD2PPNO.cjs.map} +1 -1
  9. package/dist/{chunk-DC3G4XGP.js → chunk-2PQKZWWP.js} +6 -6
  10. package/dist/{chunk-XAOAYDGR.js → chunk-2V4KPBNZ.js} +3 -3
  11. package/dist/{chunk-H54RDLVC.cjs → chunk-3ZAIHRQH.cjs} +35 -35
  12. package/dist/{chunk-H54RDLVC.cjs.map → chunk-3ZAIHRQH.cjs.map} +1 -1
  13. package/dist/{chunk-TSNGVWQO.js → chunk-42RQ4NIL.js} +6 -6
  14. package/dist/{chunk-Y7ZEVTLC.js → chunk-4BUPMSLY.js} +3 -3
  15. package/dist/{chunk-SA4KQCNB.cjs → chunk-4HBYEZ3I.cjs} +82 -82
  16. package/dist/{chunk-SA4KQCNB.cjs.map → chunk-4HBYEZ3I.cjs.map} +1 -1
  17. package/dist/{chunk-LCENRN2N.cjs → chunk-54X75QTC.cjs} +14 -14
  18. package/dist/{chunk-LCENRN2N.cjs.map → chunk-54X75QTC.cjs.map} +1 -1
  19. package/dist/{chunk-Z5FHXCXF.js → chunk-5A3WSWZD.js} +8 -8
  20. package/dist/{chunk-WZYIAKIH.cjs → chunk-5CBQBTGN.cjs} +7 -7
  21. package/dist/{chunk-WZYIAKIH.cjs.map → chunk-5CBQBTGN.cjs.map} +1 -1
  22. package/dist/{chunk-KMW2PXBU.js → chunk-AIXPQT3G.js} +11 -52
  23. package/dist/chunk-AIXPQT3G.js.map +1 -0
  24. package/dist/{chunk-LNKLB7GM.cjs → chunk-BJHM2OEY.cjs} +17 -17
  25. package/dist/{chunk-LNKLB7GM.cjs.map → chunk-BJHM2OEY.cjs.map} +1 -1
  26. package/dist/{chunk-N3526CTH.cjs → chunk-BOM6MMWB.cjs} +3 -3
  27. package/dist/{chunk-N3526CTH.cjs.map → chunk-BOM6MMWB.cjs.map} +1 -1
  28. package/dist/{chunk-N4S7RBUM.cjs → chunk-D7BFS7N6.cjs} +3 -3
  29. package/dist/{chunk-N4S7RBUM.cjs.map → chunk-D7BFS7N6.cjs.map} +1 -1
  30. package/dist/{chunk-C2SVJVEB.js → chunk-DLRE5Y3G.js} +2 -2
  31. package/dist/{chunk-USKQURNF.cjs → chunk-DMXI5D2Q.cjs} +3 -3
  32. package/dist/{chunk-USKQURNF.cjs.map → chunk-DMXI5D2Q.cjs.map} +1 -1
  33. package/dist/{chunk-7WYWPELF.js → chunk-DOUG4UEZ.js} +11 -11
  34. package/dist/{chunk-Y3BC7TOJ.cjs → chunk-FCQR6VY4.cjs} +26 -26
  35. package/dist/{chunk-Y3BC7TOJ.cjs.map → chunk-FCQR6VY4.cjs.map} +1 -1
  36. package/dist/{chunk-7EPGJOKN.js → chunk-HLEXYTOE.js} +4 -4
  37. package/dist/{chunk-MIZU2OTO.cjs → chunk-JGVJRUGB.cjs} +4 -4
  38. package/dist/{chunk-MIZU2OTO.cjs.map → chunk-JGVJRUGB.cjs.map} +1 -1
  39. package/dist/{chunk-DDWLF2JV.cjs → chunk-KZXKT5AX.cjs} +14 -14
  40. package/dist/{chunk-DDWLF2JV.cjs.map → chunk-KZXKT5AX.cjs.map} +1 -1
  41. package/dist/{chunk-4N2JOPAQ.cjs → chunk-MDYTAKJ5.cjs} +22 -22
  42. package/dist/{chunk-4N2JOPAQ.cjs.map → chunk-MDYTAKJ5.cjs.map} +1 -1
  43. package/dist/{chunk-DVSPRY2V.cjs → chunk-NMXL34Z2.cjs} +3 -3
  44. package/dist/{chunk-DVSPRY2V.cjs.map → chunk-NMXL34Z2.cjs.map} +1 -1
  45. package/dist/{chunk-CMYDGVTZ.js → chunk-OC3QH5WG.js} +2 -2
  46. package/dist/{chunk-GZRU2A4L.cjs → chunk-OD2WMUAO.cjs} +197 -197
  47. package/dist/{chunk-GZRU2A4L.cjs.map → chunk-OD2WMUAO.cjs.map} +1 -1
  48. package/dist/{chunk-DZMDG7PC.js → chunk-OQVHGPHA.js} +3 -3
  49. package/dist/{chunk-Y3Q76RAA.cjs → chunk-P27OGSQL.cjs} +37 -37
  50. package/dist/{chunk-Y3Q76RAA.cjs.map → chunk-P27OGSQL.cjs.map} +1 -1
  51. package/dist/{chunk-HM7ZGABI.js → chunk-Q76YVNCQ.js} +2 -2
  52. package/dist/{chunk-53O6PQ3F.cjs → chunk-QNWQQ4RT.cjs} +7 -7
  53. package/dist/{chunk-53O6PQ3F.cjs.map → chunk-QNWQQ4RT.cjs.map} +1 -1
  54. package/dist/{chunk-BXE2RZEV.cjs → chunk-QUGV2GT3.cjs} +34 -34
  55. package/dist/{chunk-BXE2RZEV.cjs.map → chunk-QUGV2GT3.cjs.map} +1 -1
  56. package/dist/{chunk-SC44YJCF.js → chunk-RF2EYX3B.js} +2 -2
  57. package/dist/{chunk-FNMQ2J44.js → chunk-S5M5SEW2.js} +5 -5
  58. package/dist/{chunk-KVDLL4LU.js → chunk-TBJWPNHU.js} +4 -4
  59. package/dist/chunk-TBJWPNHU.js.map +1 -0
  60. package/dist/{chunk-MJI5GVT7.js → chunk-TSENCZUL.js} +11 -11
  61. package/dist/{chunk-XBYF4SGD.js → chunk-U4OJCJTH.js} +4 -4
  62. package/dist/{chunk-GDZ7IC5B.js → chunk-UAKWSR3U.js} +2 -2
  63. package/dist/{chunk-ZLYLHP64.cjs → chunk-UFXV64WQ.cjs} +9 -9
  64. package/dist/{chunk-ZLYLHP64.cjs.map → chunk-UFXV64WQ.cjs.map} +1 -1
  65. package/dist/{chunk-4HZXOQRM.js → chunk-V5NOURSR.js} +5 -5
  66. package/dist/{chunk-CWXRZVDI.cjs → chunk-VLWUKFQE.cjs} +710 -751
  67. package/dist/chunk-VLWUKFQE.cjs.map +1 -0
  68. package/dist/{chunk-5N2ZSB42.cjs → chunk-X4WBGDNW.cjs} +18 -18
  69. package/dist/{chunk-5N2ZSB42.cjs.map → chunk-X4WBGDNW.cjs.map} +1 -1
  70. package/dist/{chunk-6Z26ZMR4.js → chunk-XRSJER2B.js} +4 -4
  71. package/dist/{chunk-I27PWVWE.cjs → chunk-YCKGUQA2.cjs} +12 -17
  72. package/dist/chunk-YCKGUQA2.cjs.map +1 -0
  73. package/dist/{chunk-Y7ZQZOE6.js → chunk-Z622ACFD.js} +5 -5
  74. package/dist/{chunk-BXAGR3PO.cjs → chunk-ZBQZJAC7.cjs} +7 -7
  75. package/dist/chunk-ZBQZJAC7.cjs.map +1 -0
  76. package/dist/components/case-studies/index.cjs +20 -20
  77. package/dist/components/case-studies/index.js +7 -7
  78. package/dist/components/chat/index.cjs +4 -4
  79. package/dist/components/chat/index.js +3 -3
  80. package/dist/components/contact/index.cjs +8 -8
  81. package/dist/components/contact/index.js +7 -7
  82. package/dist/components/docs/index.cjs +11 -11
  83. package/dist/components/docs/index.js +10 -10
  84. package/dist/components/embeds/index.cjs +8 -8
  85. package/dist/components/embeds/index.js +7 -7
  86. package/dist/components/faq/index.cjs +9 -9
  87. package/dist/components/faq/index.js +8 -8
  88. package/dist/components/features/index.cjs +7 -7
  89. package/dist/components/features/index.js +6 -6
  90. package/dist/components/help-center-pages/index.cjs +101 -101
  91. package/dist/components/help-center-pages/index.js +21 -21
  92. package/dist/components/index.cjs +65 -65
  93. package/dist/components/index.js +21 -21
  94. package/dist/components/meeting-scheduler/index.cjs +58 -58
  95. package/dist/components/meeting-scheduler/index.js +8 -8
  96. package/dist/components/navigation/index.cjs +10 -10
  97. package/dist/components/navigation/index.js +9 -9
  98. package/dist/components/onboarding-guides/index.cjs +11 -11
  99. package/dist/components/onboarding-guides/index.js +10 -10
  100. package/dist/components/related-content/index.cjs +6 -6
  101. package/dist/components/related-content/index.js +5 -5
  102. package/dist/components/tickets/index.cjs +12 -12
  103. package/dist/components/tickets/index.js +11 -11
  104. package/dist/components/tickets/ticket-live-provider.d.ts.map +1 -1
  105. package/dist/components/ui/index.cjs +7 -7
  106. package/dist/components/ui/index.js +6 -6
  107. package/dist/hooks/index.cjs +4 -4
  108. package/dist/hooks/index.js +3 -3
  109. package/dist/index.cjs +12 -12
  110. package/dist/index.js +10 -10
  111. package/dist/utils/embed-authed-fetch.d.ts +0 -18
  112. package/dist/utils/embed-authed-fetch.d.ts.map +1 -1
  113. package/dist/utils/index.cjs +6 -50
  114. package/dist/utils/index.cjs.map +1 -1
  115. package/dist/utils/index.js +6 -50
  116. package/dist/utils/index.js.map +1 -1
  117. package/dist/utils/sse-subscription.d.ts +11 -29
  118. package/dist/utils/sse-subscription.d.ts.map +1 -1
  119. package/package.json +1 -1
  120. package/src/components/tickets/ticket-live-provider.tsx +12 -14
  121. package/src/utils/embed-authed-fetch.ts +0 -21
  122. package/src/utils/sse-subscription.ts +20 -107
  123. package/dist/chunk-BXAGR3PO.cjs.map +0 -1
  124. package/dist/chunk-CWXRZVDI.cjs.map +0 -1
  125. package/dist/chunk-I27PWVWE.cjs.map +0 -1
  126. package/dist/chunk-KMW2PXBU.js.map +0 -1
  127. package/dist/chunk-KVDLL4LU.js.map +0 -1
  128. package/dist/chunk-UVUNBXS6.js.map +0 -1
  129. /package/dist/{chunk-2YVTGPM7.js.map → chunk-22RSJ57Z.js.map} +0 -0
  130. /package/dist/{chunk-JSG7WZKV.js.map → chunk-25X43LSD.js.map} +0 -0
  131. /package/dist/{chunk-DC3G4XGP.js.map → chunk-2PQKZWWP.js.map} +0 -0
  132. /package/dist/{chunk-XAOAYDGR.js.map → chunk-2V4KPBNZ.js.map} +0 -0
  133. /package/dist/{chunk-TSNGVWQO.js.map → chunk-42RQ4NIL.js.map} +0 -0
  134. /package/dist/{chunk-Y7ZEVTLC.js.map → chunk-4BUPMSLY.js.map} +0 -0
  135. /package/dist/{chunk-Z5FHXCXF.js.map → chunk-5A3WSWZD.js.map} +0 -0
  136. /package/dist/{chunk-C2SVJVEB.js.map → chunk-DLRE5Y3G.js.map} +0 -0
  137. /package/dist/{chunk-7WYWPELF.js.map → chunk-DOUG4UEZ.js.map} +0 -0
  138. /package/dist/{chunk-7EPGJOKN.js.map → chunk-HLEXYTOE.js.map} +0 -0
  139. /package/dist/{chunk-CMYDGVTZ.js.map → chunk-OC3QH5WG.js.map} +0 -0
  140. /package/dist/{chunk-DZMDG7PC.js.map → chunk-OQVHGPHA.js.map} +0 -0
  141. /package/dist/{chunk-HM7ZGABI.js.map → chunk-Q76YVNCQ.js.map} +0 -0
  142. /package/dist/{chunk-SC44YJCF.js.map → chunk-RF2EYX3B.js.map} +0 -0
  143. /package/dist/{chunk-FNMQ2J44.js.map → chunk-S5M5SEW2.js.map} +0 -0
  144. /package/dist/{chunk-MJI5GVT7.js.map → chunk-TSENCZUL.js.map} +0 -0
  145. /package/dist/{chunk-XBYF4SGD.js.map → chunk-U4OJCJTH.js.map} +0 -0
  146. /package/dist/{chunk-GDZ7IC5B.js.map → chunk-UAKWSR3U.js.map} +0 -0
  147. /package/dist/{chunk-4HZXOQRM.js.map → chunk-V5NOURSR.js.map} +0 -0
  148. /package/dist/{chunk-6Z26ZMR4.js.map → chunk-XRSJER2B.js.map} +0 -0
  149. /package/dist/{chunk-Y7ZQZOE6.js.map → chunk-Z622ACFD.js.map} +0 -0
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  SoftwareInfo,
10
10
  SoftwareSourceBadge,
11
11
  ToolBadge
12
- } from "./chunk-Y7ZQZOE6.js";
12
+ } from "./chunk-Z622ACFD.js";
13
13
  import {
14
14
  AppHeader,
15
15
  AppLayout,
@@ -29,14 +29,14 @@ import {
29
29
  SlidingSidebar,
30
30
  TicketAlertsButton,
31
31
  TopNavigation
32
- } from "./chunk-DC3G4XGP.js";
32
+ } from "./chunk-2PQKZWWP.js";
33
33
  import {
34
34
  MobileNavigationDropdown,
35
35
  MultiLevelNavigation,
36
36
  StickySectionNav,
37
37
  useSectionNavigation
38
- } from "./chunk-CMYDGVTZ.js";
39
- import "./chunk-KVDLL4LU.js";
38
+ } from "./chunk-OC3QH5WG.js";
39
+ import "./chunk-TBJWPNHU.js";
40
40
  import {
41
41
  AIEnrichButton,
42
42
  AIEnrichSection,
@@ -617,7 +617,7 @@ import {
617
617
  withFirstTouchAttribution,
618
618
  withWalkthroughOpenParam,
619
619
  writeDismissCookie
620
- } from "./chunk-KMW2PXBU.js";
620
+ } from "./chunk-AIXPQT3G.js";
621
621
  import "./chunk-L2SLFCXP.js";
622
622
  import "./chunk-BJXDHKUX.js";
623
623
  import {
@@ -734,7 +734,7 @@ import {
734
734
  validateSchema,
735
735
  validateVariables,
736
736
  variablesToUrlParams
737
- } from "./chunk-XAOAYDGR.js";
737
+ } from "./chunk-2V4KPBNZ.js";
738
738
  import "./chunk-JD5TKRCU.js";
739
739
  import {
740
740
  CONTENT_REF_GROUPS,
@@ -756,7 +756,7 @@ import {
756
756
  serializeSchemaParams,
757
757
  shouldIncludeInUrl,
758
758
  withQuery
759
- } from "./chunk-GDZ7IC5B.js";
759
+ } from "./chunk-UAKWSR3U.js";
760
760
  import {
761
761
  Checkbox
762
762
  } from "./chunk-HLCJPRXP.js";
@@ -1158,7 +1158,7 @@ import {
1158
1158
  useVideoOriginPreconnect,
1159
1159
  useVideoWarmup,
1160
1160
  usesCanonicalStatusStyle
1161
- } from "./chunk-Y7ZEVTLC.js";
1161
+ } from "./chunk-4BUPMSLY.js";
1162
1162
  import {
1163
1163
  HEADING_EMOJI_RE,
1164
1164
  HUB_HEADER_OFFSET_PX,
@@ -1541,7 +1541,7 @@ import {
1541
1541
  urlPathLooksLikeSvg,
1542
1542
  useCoverImageFallback,
1543
1543
  webinarTiming
1544
- } from "./chunk-2YVTGPM7.js";
1544
+ } from "./chunk-22RSJ57Z.js";
1545
1545
  import "./chunk-MDKCTSDS.js";
1546
1546
  import {
1547
1547
  EMBED_PROXY_OPTIONAL_HEADERS,
@@ -1588,7 +1588,7 @@ import {
1588
1588
  useAuthedImageSrc,
1589
1589
  useImageEdgeColor,
1590
1590
  useOgPlaceholderUrl
1591
- } from "./chunk-UVUNBXS6.js";
1591
+ } from "./chunk-2KILTCND.js";
1592
1592
  import {
1593
1593
  FigmaIcon,
1594
1594
  ImageIcon,
@@ -71,16 +71,6 @@ export interface EmbedAuthAdapter {
71
71
  * remains the rule, this is the narrow exception.
72
72
  */
73
73
  allowedOrigins?: string[];
74
- /**
75
- * Optional: call `listener` whenever `getHeaders()` starts returning a NEW
76
- * credential (a rotation the host ran on its own — e.g. a native shell's
77
- * background refresh). Returns an unsubscribe. Lets a long-lived surface
78
- * that stopped after a 401 retry as soon as a usable credential exists,
79
- * instead of on its next backoff step. Fire only on a real change: a
80
- * listener may respond with a request, and through `refresh` that request
81
- * can lead the host to notify again.
82
- */
83
- subscribe?: (listener: () => void) => () => void;
84
74
  }
85
75
  /**
86
76
  * Register a host-owned auth adapter for `embedAuthedFetch`. Pass `null`
@@ -100,14 +90,6 @@ export declare function setEmbedAuthAdapter(adapter: EmbedAuthAdapter | null): v
100
90
  * single auth knob (the adapter), not a second content-fetch registration.
101
91
  */
102
92
  export declare function hasEmbedAuthAdapter(): boolean;
103
- /**
104
- * Subscribe to the registered adapter's credential changes
105
- * (`EmbedAuthAdapter.subscribe`). A no-op when no adapter is registered, or
106
- * the adapter doesn't report changes. Reads the adapter once, at call time:
107
- * an adapter registered (or replaced) after a subscriber starts is not
108
- * picked up — register it before the surfaces that need it mount.
109
- */
110
- export declare function subscribeEmbedCredentialChange(listener: () => void): () => void;
111
93
  /**
112
94
  * Whether `url` is an asset the browser CANNOT load natively because its
113
95
  * auth rides in request headers.
@@ -1 +1 @@
1
- {"version":3,"file":"embed-authed-fetch.d.ts","sourceRoot":"","sources":["../../src/utils/embed-authed-fetch.ts"],"names":[],"mappings":"AA4BA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;4EAMwE;IACxE,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACtD;;6EAEyE;IACzE,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CAClD;AA0BD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAS1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAE/E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAiB1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAkCvF"}
1
+ {"version":3,"file":"embed-authed-fetch.d.ts","sourceRoot":"","sources":["../../src/utils/embed-authed-fetch.ts"],"names":[],"mappings":"AA4BA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;4EAMwE;IACxE,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACtD;;6EAEyE;IACzE,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AA0BD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAS1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAiB1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAkCvF"}
@@ -3772,10 +3772,6 @@ function setEmbedAuthAdapter(adapter2) {
3772
3772
  }
3773
3773
  storeRegisteredAuthAdapter(adapter2);
3774
3774
  }
3775
- function subscribeEmbedCredentialChange(listener) {
3776
- return getRegisteredAuthAdapter()?.subscribe?.(listener) ?? (() => {
3777
- });
3778
- }
3779
3775
  function embedAuthedFetch(url, init = {}) {
3780
3776
  assertSameOrigin(url);
3781
3777
  let baseHeaders;
@@ -3883,9 +3879,6 @@ var SUBSCRIBE_CONFIRM_TIMEOUT_MS = 15e3;
3883
3879
  var SERVER_RETRY_GRACE_MS = 9e4;
3884
3880
  var FAILED_RECONNECT_DELAY_MS = 3e4;
3885
3881
  var HIDDEN_GRACE_MS = 45e3;
3886
- var AUTH_RETRY_INITIAL_MS = 3e4;
3887
- var AUTH_RETRY_MAX_MS = 3e5;
3888
- var PRESENCE_RETRY_MIN_INTERVAL_MS = 3e4;
3889
3882
  function createSseSubscription(options) {
3890
3883
  const {
3891
3884
  url,
@@ -3901,10 +3894,6 @@ function createSseSubscription(options) {
3901
3894
  let closed = false;
3902
3895
  let suspended = false;
3903
3896
  let attempt = 0;
3904
- let authAttempt = 0;
3905
- let stalled = false;
3906
- let awaitingAuth = false;
3907
- let lastConnectAt = 0;
3908
3897
  let generation = 0;
3909
3898
  let abortController = null;
3910
3899
  let retryTimerId = null;
@@ -3981,6 +3970,7 @@ function createSseSubscription(options) {
3981
3970
  confirmTimerId = clearLifecycleTimer(confirmTimerId);
3982
3971
  serverGraceTimerId = clearLifecycleTimer(serverGraceTimerId);
3983
3972
  failedDelayTimerId = clearLifecycleTimer(failedDelayTimerId);
3973
+ hiddenGraceTimerId = clearLifecycleTimer(hiddenGraceTimerId);
3984
3974
  };
3985
3975
  const armSilenceTimer = () => {
3986
3976
  if (silenceTimerId) clearTimeout(silenceTimerId);
@@ -3988,23 +3978,16 @@ function createSseSubscription(options) {
3988
3978
  abortController?.abort();
3989
3979
  }, silenceTimeoutMs);
3990
3980
  };
3991
- const scheduleReconnect = (delayMs) => {
3981
+ const scheduleReconnect = () => {
3992
3982
  if (closed || suspended || retryTimerId) return;
3993
- if (failedDelayTimerId) {
3994
- setStatus("reconnecting");
3995
- return;
3996
- }
3997
- let backoff = delayMs;
3998
- if (backoff === void 0) {
3999
- backoff = Math.min(maxBackoffMs, initialBackoffMs * 2 ** attempt);
4000
- attempt += 1;
4001
- }
3983
+ setStatus("reconnecting");
3984
+ const backoff = Math.min(maxBackoffMs, initialBackoffMs * 2 ** attempt);
4002
3985
  const jitter = backoff * 0.25 * Math.random();
3986
+ attempt += 1;
4003
3987
  retryTimerId = setTimeout(() => {
4004
3988
  retryTimerId = null;
4005
3989
  void connect();
4006
3990
  }, backoff + jitter);
4007
- setStatus("reconnecting");
4008
3991
  };
4009
3992
  const parseFrame = (rawFrame) => {
4010
3993
  let eventName = "message";
@@ -4036,9 +4019,6 @@ function createSseSubscription(options) {
4036
4019
  async function connect() {
4037
4020
  if (closed || suspended) return;
4038
4021
  const gen = ++generation;
4039
- stalled = false;
4040
- awaitingAuth = false;
4041
- lastConnectAt = Date.now();
4042
4022
  setStatus("connecting");
4043
4023
  abortController = new AbortController();
4044
4024
  let response;
@@ -4066,19 +4046,9 @@ function createSseSubscription(options) {
4066
4046
  return;
4067
4047
  }
4068
4048
  const blockLayer = response.headers.get("x-block-layer");
4069
- const blockNote = blockLayer ? ` (x-block-layer: ${blockLayer})` : "";
4070
- if (response.status === 401 && pauseWhenHidden) {
4071
- const delayMs = Math.min(AUTH_RETRY_MAX_MS, AUTH_RETRY_INITIAL_MS * 2 ** authAttempt);
4072
- authAttempt += 1;
4073
- console.warn(`[sse-subscription] 401 for ${url}${blockNote} \u2014 retrying in ~${Math.round(delayMs / 1e3)}s`);
4074
- awaitingAuth = true;
4075
- scheduleReconnect(delayMs);
4076
- return;
4077
- }
4078
4049
  console.warn(
4079
- `[sse-subscription] terminal ${response.status} for ${url}${blockNote} \u2014 ${pauseWhenHidden ? "retrying on presence" : "not retrying"}`
4050
+ `[sse-subscription] terminal ${response.status} for ${url}${blockLayer ? ` (x-block-layer: ${blockLayer})` : ""} \u2014 not retrying`
4080
4051
  );
4081
- stalled = pauseWhenHidden;
4082
4052
  setStatus("terminal");
4083
4053
  return;
4084
4054
  }
@@ -4087,7 +4057,6 @@ function createSseSubscription(options) {
4087
4057
  return;
4088
4058
  }
4089
4059
  attempt = 0;
4090
- authAttempt = 0;
4091
4060
  setStatus("open");
4092
4061
  armSilenceTimer();
4093
4062
  confirmTimerId = clearLifecycleTimer(confirmTimerId);
@@ -4149,10 +4118,6 @@ function createSseSubscription(options) {
4149
4118
  abortController?.abort();
4150
4119
  setStatus("suspended");
4151
4120
  };
4152
- const retryIfStalled = () => {
4153
- if (!stalled || Date.now() - lastConnectAt < PRESENCE_RETRY_MIN_INTERVAL_MS) return;
4154
- doReconnect();
4155
- };
4156
4121
  const onVisibilityChange = () => {
4157
4122
  if (document.visibilityState === "hidden") {
4158
4123
  if (!hiddenGraceTimerId) {
@@ -4167,21 +4132,15 @@ function createSseSubscription(options) {
4167
4132
  if (suspended) {
4168
4133
  suspended = false;
4169
4134
  void connect();
4170
- return;
4171
4135
  }
4172
- retryIfStalled();
4173
4136
  };
4174
4137
  const onOnline = () => {
4175
4138
  if (!suspended) doReconnect();
4176
4139
  };
4177
- const unsubscribeCredentials = pauseWhenHidden && fetchImpl === embedAuthedFetch ? subscribeEmbedCredentialChange(() => {
4178
- if (awaitingAuth) doReconnect();
4179
- }) : null;
4180
4140
  const listenersActive = pauseWhenHidden && typeof document !== "undefined" && typeof window !== "undefined";
4181
4141
  if (listenersActive) {
4182
4142
  document.addEventListener("visibilitychange", onVisibilityChange);
4183
4143
  window.addEventListener("online", onOnline);
4184
- window.addEventListener("focus", retryIfStalled);
4185
4144
  }
4186
4145
  void connect();
4187
4146
  return {
@@ -4190,14 +4149,11 @@ function createSseSubscription(options) {
4190
4149
  closed = true;
4191
4150
  generation += 1;
4192
4151
  clearTimers();
4193
- hiddenGraceTimerId = clearLifecycleTimer(hiddenGraceTimerId);
4194
4152
  abortController?.abort();
4195
4153
  if (listenersActive) {
4196
4154
  document.removeEventListener("visibilitychange", onVisibilityChange);
4197
4155
  window.removeEventListener("online", onOnline);
4198
- window.removeEventListener("focus", retryIfStalled);
4199
4156
  }
4200
- unsubscribeCredentials?.();
4201
4157
  setConnected(false);
4202
4158
  onStatusChange?.("closed");
4203
4159
  },