@ably/ui 16.0.0-dev.75c5e37e → 16.0.0-dev.8f8c19e6

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 (140) hide show
  1. package/README.md +1 -1
  2. package/core/.DS_Store +0 -0
  3. package/core/FeaturedLink.js +1 -1
  4. package/core/FeaturedLink.js.map +1 -1
  5. package/core/Flyout.js +1 -1
  6. package/core/Flyout.js.map +1 -1
  7. package/core/Footer/data.js +2 -0
  8. package/core/Footer/data.js.map +1 -0
  9. package/core/Footer.js +1 -1
  10. package/core/Footer.js.map +1 -1
  11. package/core/Header/Header.css +8 -0
  12. package/core/Header/HeaderLinks.js +1 -1
  13. package/core/Header/HeaderLinks.js.map +1 -1
  14. package/core/Header.js +1 -1
  15. package/core/Header.js.map +1 -1
  16. package/core/LegacyFooter/LegacyFooter.js +2 -0
  17. package/core/LegacyFooter/LegacyFooter.js.map +1 -0
  18. package/core/LegacyMeganav/LegacyMeganav.js +2 -0
  19. package/core/LegacyMeganav/LegacyMeganav.js.map +1 -0
  20. package/core/LegacyMeganav/MeganavBlogPostsList.js +2 -0
  21. package/core/LegacyMeganav/MeganavBlogPostsList.js.map +1 -0
  22. package/core/LegacyMeganav/MeganavContentCompany.js +2 -0
  23. package/core/LegacyMeganav/MeganavContentCompany.js.map +1 -0
  24. package/core/LegacyMeganav/MeganavContentDevelopers.js +2 -0
  25. package/core/LegacyMeganav/MeganavContentDevelopers.js.map +1 -0
  26. package/core/LegacyMeganav/MeganavContentProducts.js +2 -0
  27. package/core/LegacyMeganav/MeganavContentProducts.js.map +1 -0
  28. package/core/LegacyMeganav/MeganavContentUseCases.js +2 -0
  29. package/core/LegacyMeganav/MeganavContentUseCases.js.map +1 -0
  30. package/core/LegacyMeganav/MeganavControl.js +2 -0
  31. package/core/LegacyMeganav/MeganavControl.js.map +1 -0
  32. package/core/LegacyMeganav/MeganavControlMobileDropdown.js +2 -0
  33. package/core/LegacyMeganav/MeganavControlMobileDropdown.js.map +1 -0
  34. package/core/LegacyMeganav/MeganavControlMobilePanelClose.js +2 -0
  35. package/core/LegacyMeganav/MeganavControlMobilePanelClose.js.map +1 -0
  36. package/core/LegacyMeganav/MeganavControlMobilePanelOpen.js +2 -0
  37. package/core/LegacyMeganav/MeganavControlMobilePanelOpen.js.map +1 -0
  38. package/core/LegacyMeganav/MeganavItemsDesktop.js +2 -0
  39. package/core/LegacyMeganav/MeganavItemsDesktop.js.map +1 -0
  40. package/core/LegacyMeganav/MeganavItemsMobile.js +2 -0
  41. package/core/LegacyMeganav/MeganavItemsMobile.js.map +1 -0
  42. package/core/LegacyMeganav/MeganavItemsSignedIn.js.map +1 -0
  43. package/core/LegacyMeganav/MeganavSearch.js +2 -0
  44. package/core/LegacyMeganav/MeganavSearch.js.map +1 -0
  45. package/core/LegacyMeganav/MeganavSearchAutocomplete.js.map +1 -0
  46. package/core/LegacyMeganav/MeganavSearchPanel.js +2 -0
  47. package/core/LegacyMeganav/MeganavSearchPanel.js.map +1 -0
  48. package/core/LegacyMeganav/MeganavSearchSuggestions.js +2 -0
  49. package/core/LegacyMeganav/MeganavSearchSuggestions.js.map +1 -0
  50. package/core/LegacyMeganav/SignOutLink.js.map +1 -0
  51. package/core/Meganav/.DS_Store +0 -0
  52. package/core/Meganav/MeganavMobile.js +1 -1
  53. package/core/Meganav/MeganavMobile.js.map +1 -1
  54. package/core/Meganav/MeganavPanel.js +1 -1
  55. package/core/Meganav/MeganavPanel.js.map +1 -1
  56. package/core/Meganav/data.js +1 -1
  57. package/core/Meganav/data.js.map +1 -1
  58. package/core/Meganav/images/fan-engagement-nav-image.png +0 -0
  59. package/core/Meganav/images/founders-nav-image.png +0 -0
  60. package/core/Meganav.js +2 -0
  61. package/core/Meganav.js.map +1 -0
  62. package/core/Notice.js +1 -1
  63. package/core/Notice.js.map +1 -1
  64. package/core/ProductTile/ProductDescription.js +1 -1
  65. package/core/ProductTile/ProductDescription.js.map +1 -1
  66. package/core/ProductTile/ProductLabel.js +1 -1
  67. package/core/ProductTile/ProductLabel.js.map +1 -1
  68. package/core/SegmentedControl.js +2 -0
  69. package/core/SegmentedControl.js.map +1 -0
  70. package/core/insights/command-queue.js +2 -0
  71. package/core/insights/command-queue.js.map +1 -0
  72. package/core/insights/datalayer.js +2 -0
  73. package/core/insights/datalayer.js.map +1 -0
  74. package/core/insights/index.js +1 -1
  75. package/core/insights/index.js.map +1 -1
  76. package/core/insights/index.test.js +2 -0
  77. package/core/insights/index.test.js.map +1 -0
  78. package/core/insights/logger.js +2 -0
  79. package/core/insights/logger.js.map +1 -0
  80. package/core/insights/mixpanel.js +1 -1
  81. package/core/insights/mixpanel.js.map +1 -1
  82. package/core/insights/posthog.js +1 -1
  83. package/core/insights/posthog.js.map +1 -1
  84. package/core/insights/service.js +2 -0
  85. package/core/insights/service.js.map +1 -0
  86. package/core/insights/types.js.map +1 -1
  87. package/core/scripts.js +1 -1
  88. package/core/scripts.js.map +1 -1
  89. package/index.d.ts +309 -254
  90. package/package.json +10 -6
  91. package/core/ContactFooter/component.css +0 -11
  92. package/core/ContactFooter/component.js +0 -2
  93. package/core/ContactFooter/component.js.map +0 -1
  94. package/core/ContactFooter.js +0 -2
  95. package/core/ContactFooter.js.map +0 -1
  96. package/core/LegacyMeganav.js +0 -2
  97. package/core/LegacyMeganav.js.map +0 -1
  98. package/core/Meganav/Meganav.js +0 -2
  99. package/core/Meganav/Meganav.js.map +0 -1
  100. package/core/MeganavBlogPostsList.js +0 -2
  101. package/core/MeganavBlogPostsList.js.map +0 -1
  102. package/core/MeganavContentCompany.js +0 -2
  103. package/core/MeganavContentCompany.js.map +0 -1
  104. package/core/MeganavContentDevelopers.js +0 -2
  105. package/core/MeganavContentDevelopers.js.map +0 -1
  106. package/core/MeganavContentProducts.js +0 -2
  107. package/core/MeganavContentProducts.js.map +0 -1
  108. package/core/MeganavContentUseCases.js +0 -2
  109. package/core/MeganavContentUseCases.js.map +0 -1
  110. package/core/MeganavControl.js +0 -2
  111. package/core/MeganavControl.js.map +0 -1
  112. package/core/MeganavControlMobileDropdown.js +0 -2
  113. package/core/MeganavControlMobileDropdown.js.map +0 -1
  114. package/core/MeganavControlMobilePanelClose.js +0 -2
  115. package/core/MeganavControlMobilePanelClose.js.map +0 -1
  116. package/core/MeganavControlMobilePanelOpen.js +0 -2
  117. package/core/MeganavControlMobilePanelOpen.js.map +0 -1
  118. package/core/MeganavItemsDesktop.js +0 -2
  119. package/core/MeganavItemsDesktop.js.map +0 -1
  120. package/core/MeganavItemsMobile.js +0 -2
  121. package/core/MeganavItemsMobile.js.map +0 -1
  122. package/core/MeganavItemsSignedIn.js.map +0 -1
  123. package/core/MeganavSearch.js +0 -2
  124. package/core/MeganavSearch.js.map +0 -1
  125. package/core/MeganavSearchAutocomplete.js.map +0 -1
  126. package/core/MeganavSearchPanel.js +0 -2
  127. package/core/MeganavSearchPanel.js.map +0 -1
  128. package/core/MeganavSearchSuggestions.js +0 -2
  129. package/core/MeganavSearchSuggestions.js.map +0 -1
  130. package/core/SignOutLink.js.map +0 -1
  131. package/core/hubspot-chat-toggle.js +0 -2
  132. package/core/hubspot-chat-toggle.js.map +0 -1
  133. package/core/images/award/g2-best-meets-requirements-2025.png +0 -0
  134. package/core/images/award/g2-best-support-2025.png +0 -0
  135. package/core/images/award/g2-high-performer-2025.png +0 -0
  136. package/core/images/award/g2-users-most-likely-to-recommend-2025.png +0 -0
  137. /package/core/{Footer → LegacyFooter}/component.css +0 -0
  138. /package/core/{MeganavItemsSignedIn.js → LegacyMeganav/MeganavItemsSignedIn.js} +0 -0
  139. /package/core/{MeganavSearchAutocomplete.js → LegacyMeganav/MeganavSearchAutocomplete.js} +0 -0
  140. /package/core/{SignOutLink.js → LegacyMeganav/SignOutLink.js} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/core/insights/service.ts"],"sourcesContent":["import type {\n AnalyticsService,\n InsightsConfig,\n InsightsIdentity,\n} from \"./types\";\nimport * as datalayer from \"./datalayer\";\nimport * as mixpanel from \"./mixpanel\";\nimport * as posthog from \"./posthog\";\nimport * as logger from \"./logger\";\n\n// The real implementation that will be used after initialization\nexport class InsightsService implements AnalyticsService {\n private debugMode: boolean = false;\n\n initInsights({\n mixpanelToken,\n mixpanelAutoCapture,\n mixpanelRecordSessionsPercent = 1,\n posthogApiKey,\n posthogApiHost,\n debug = false,\n }: InsightsConfig): void {\n this.debugMode = !!debug;\n\n if (this.debugMode) {\n logger.debug(\"InsightService: Initializing insights\");\n }\n\n try {\n mixpanel.initMixpanel(\n mixpanelToken,\n mixpanelAutoCapture,\n this.debugMode,\n mixpanelRecordSessionsPercent,\n );\n } catch (e) {\n if (this.debugMode) {\n logger.error(\"Failed to initialize Mixpanel\", e);\n }\n }\n\n try {\n posthog.initPosthog(posthogApiKey, posthogApiHost);\n } catch (e) {\n if (this.debugMode) {\n logger.error(\"Failed to initialize Posthog\", e);\n }\n }\n }\n\n enableDebugMode(): void {\n this.debugMode = true;\n logger.debug(\"Enabling debug mode\");\n\n try {\n mixpanel.enableDebugMode();\n posthog.enableDebugMode();\n } catch (e) {\n logger.error(\"Failed to enable debug mode\", e);\n }\n }\n\n disableDebugMode(): void {\n this.debugMode = false;\n logger.debug(\"Disabling debug mode\");\n\n try {\n mixpanel.disableDebugMode();\n posthog.disableDebugMode();\n } catch (e) {\n logger.error(\"Failed to disable debug mode\", e);\n }\n }\n\n identify(identity: InsightsIdentity): void {\n const { userId, accountId, organisationId, email, name } = identity;\n\n // In very rare cases we might have a user without an account, so we'll\n // let null/undefined/blank strings through on that one\n if (!userId) {\n if (this.debugMode) {\n logger.warn(\"User ID not provided, skipping identify\");\n }\n return;\n }\n\n if (this.debugMode) {\n logger.info(\"Identifying user\", {\n userId,\n accountId,\n organisationId,\n email,\n name,\n });\n }\n\n try {\n mixpanel.identify({ userId, accountId, organisationId, email, name });\n } catch (e) {\n if (this.debugMode) {\n logger.error(\"Failed to identify user in Mixpanel\", e);\n }\n }\n\n try {\n posthog.identify({ userId, accountId, organisationId, email, name });\n } catch (e) {\n if (this.debugMode) {\n logger.error(\"Failed to identify user in Posthog\", e);\n }\n }\n }\n\n trackPageView(): void {\n if (this.debugMode) {\n logger.info(\"Tracking page view\");\n }\n\n try {\n mixpanel.trackPageView();\n } catch (e) {\n if (this.debugMode) {\n logger.error(\"Failed to track page view in Mixpanel\", e);\n }\n }\n\n try {\n posthog.trackPageView();\n } catch (e) {\n if (this.debugMode) {\n logger.error(\"Failed to track page view in Posthog\", e);\n }\n }\n }\n\n track(event: string, properties?: Record<string, unknown>): void {\n if (this.debugMode) {\n logger.info(\"Tracking event\", { event, properties });\n }\n\n try {\n mixpanel.track(event, properties);\n } catch (e) {\n if (this.debugMode) {\n logger.error(\"Failed to track event in Mixpanel\", e);\n }\n }\n\n try {\n posthog.track(event, properties);\n } catch (e) {\n if (this.debugMode) {\n logger.error(\"Failed to track event in Posthog\", e);\n }\n }\n\n try {\n datalayer.track(event, properties);\n } catch (e) {\n if (this.debugMode) {\n logger.error(\"Failed to track event in Datalayer\", e);\n }\n }\n }\n\n startSessionRecording(): void {\n if (this.debugMode) {\n logger.info(\"Starting session recording\");\n }\n\n try {\n mixpanel.startSessionRecording();\n } catch (e) {\n if (this.debugMode) {\n logger.error(\"Failed to start session recording in Mixpanel\", e);\n }\n }\n\n try {\n posthog.startSessionRecording();\n } catch (e) {\n if (this.debugMode) {\n logger.error(\"Failed to start session recording in Posthog\", e);\n }\n }\n }\n\n stopSessionRecording(): void {\n if (this.debugMode) {\n logger.info(\"Stopping session recording\");\n }\n\n try {\n mixpanel.stopSessionRecording();\n } catch (e) {\n if (this.debugMode) {\n logger.error(\"Failed to stop session recording in Mixpanel\", e);\n }\n }\n\n try {\n posthog.stopSessionRecording();\n } catch (e) {\n if (this.debugMode) {\n logger.error(\"Failed to stop session recording in Posthog\", e);\n }\n }\n }\n\n setupObserver(): () => void {\n // Helper to get all data-insight-* attributes from an element\n const getInsightAttributes = (\n element,\n ): { event?: string; [key: string]: string | undefined } => {\n // limit how many data attributes we'll process\n const MAX_ATTRIBUTES = 10;\n let count = 0;\n\n const attributes: { event?: string; [key: string]: string | undefined } =\n {};\n\n for (const attr of element.attributes) {\n if (count >= MAX_ATTRIBUTES) break;\n if (attr.name.startsWith(\"data-insight-\")) {\n // Validate attribute name format\n if (!/^data-insight-[a-zA-Z0-9-]+$/.test(attr.name)) continue;\n\n // Sanitize attribute value\n if (typeof attr.value !== \"string\" || attr.value.length > 100)\n continue;\n\n // Convert data-insight-event-name to eventName\n const key = attr.name\n .replace(\"data-insight-\", \"\")\n .split(\"-\")\n .map((part, index) =>\n index === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1),\n )\n .join(\"\");\n attributes[key] = attr.value;\n count++;\n }\n }\n return attributes;\n };\n\n // Helper to find closest element with data-insight attributes\n const findClosestElementWithInsights = (element) => {\n let current = element;\n while (current && current !== document.body) {\n const insights = getInsightAttributes(current);\n if (Object.keys(insights).length > 0) {\n return insights;\n }\n current = current.parentElement;\n }\n return null;\n };\n\n // Global click handler\n const handleClick = (event: MouseEvent): void => {\n if (!(event.target instanceof HTMLElement)) return;\n const insights = findClosestElementWithInsights(event.target);\n if (insights) {\n // Extract special properties if they exist\n const { event: eventName, ...properties } = insights;\n this.track(eventName || \"element_clicked\", properties);\n }\n };\n\n // Add listener to document body to catch all clicks\n document.body.addEventListener(\"click\", handleClick);\n\n // Return cleanup function in case it's needed\n return () => {\n document.body.removeEventListener(\"click\", handleClick);\n };\n }\n}\n"],"names":["datalayer","mixpanel","posthog","logger","InsightsService","initInsights","mixpanelToken","mixpanelAutoCapture","mixpanelRecordSessionsPercent","posthogApiKey","posthogApiHost","debug","debugMode","initMixpanel","e","error","initPosthog","enableDebugMode","disableDebugMode","identify","identity","userId","accountId","organisationId","email","name","warn","info","trackPageView","track","event","properties","startSessionRecording","stopSessionRecording","setupObserver","getInsightAttributes","element","MAX_ATTRIBUTES","count","attributes","attr","startsWith","test","value","length","key","replace","split","map","part","index","charAt","toUpperCase","slice","join","findClosestElementWithInsights","current","document","body","insights","Object","keys","parentElement","handleClick","target","HTMLElement","eventName","addEventListener","removeEventListener"],"mappings":"oLAKA,UAAYA,cAAe,aAAc,AACzC,WAAYC,aAAc,YAAa,AACvC,WAAYC,YAAa,WAAY,AACrC,WAAYC,WAAY,UAAW,AAGnC,QAAO,MAAMC,gBAGXC,aAAa,CACXC,aAAa,CACbC,mBAAmB,CACnBC,8BAAgC,CAAC,CACjCC,aAAa,CACbC,cAAc,CACdC,MAAQ,KAAK,CACE,CAAQ,CACvB,IAAI,CAACC,SAAS,CAAG,CAAC,CAACD,MAEnB,GAAI,IAAI,CAACC,SAAS,CAAE,CAClBT,OAAOQ,KAAK,CAAC,wCACf,CAEA,GAAI,CACFV,SAASY,YAAY,CACnBP,cACAC,oBACA,IAAI,CAACK,SAAS,CACdJ,8BAEJ,CAAE,MAAOM,EAAG,CACV,GAAI,IAAI,CAACF,SAAS,CAAE,CAClBT,OAAOY,KAAK,CAAC,gCAAiCD,EAChD,CACF,CAEA,GAAI,CACFZ,QAAQc,WAAW,CAACP,cAAeC,eACrC,CAAE,MAAOI,EAAG,CACV,GAAI,IAAI,CAACF,SAAS,CAAE,CAClBT,OAAOY,KAAK,CAAC,+BAAgCD,EAC/C,CACF,CACF,CAEAG,iBAAwB,CACtB,IAAI,CAACL,SAAS,CAAG,KACjBT,OAAOQ,KAAK,CAAC,uBAEb,GAAI,CACFV,SAASgB,eAAe,GACxBf,QAAQe,eAAe,EACzB,CAAE,MAAOH,EAAG,CACVX,OAAOY,KAAK,CAAC,8BAA+BD,EAC9C,CACF,CAEAI,kBAAyB,CACvB,IAAI,CAACN,SAAS,CAAG,MACjBT,OAAOQ,KAAK,CAAC,wBAEb,GAAI,CACFV,SAASiB,gBAAgB,GACzBhB,QAAQgB,gBAAgB,EAC1B,CAAE,MAAOJ,EAAG,CACVX,OAAOY,KAAK,CAAC,+BAAgCD,EAC/C,CACF,CAEAK,SAASC,QAA0B,CAAQ,CACzC,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AASC,IAAI,CAACS,gBAAgB,CAAC,QAASJ,aAGxC,MAAO,KACLN,SAASC,IAAI,CAACU,mBAAmB,CAAC,QAASL,YAC7C,CACF,eAzQA,sBAAQnD,YAAqB,OA0Q/B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/core/insights/types.ts"],"sourcesContent":["export type InsightsIdentity = {\n userId: string;\n accountId: string;\n organisationId?: string;\n email?: string;\n name?: string;\n};\n"],"names":[],"mappings":"AAAA,QAME"}
1
+ {"version":3,"sources":["../../../src/core/insights/types.ts"],"sourcesContent":["export type InsightsConfig = {\n debug: boolean;\n mixpanelToken: string;\n mixpanelAutoCapture: boolean;\n mixpanelRecordSessionsPercent: number;\n posthogApiKey: string;\n posthogApiHost: string;\n};\n\n// Define the interface for our analytics service\nexport interface AnalyticsService {\n initInsights: (config: InsightsConfig) => void;\n enableDebugMode: () => void;\n disableDebugMode: () => void;\n identify: (identity: InsightsIdentity) => void;\n trackPageView: () => void;\n track: (event: string, properties?: Record<string, unknown>) => void;\n startSessionRecording: () => void;\n stopSessionRecording: () => void;\n setupObserver: () => () => void;\n}\n\n// Command type for our queue\nexport type Command = {\n methodName: keyof AnalyticsService;\n args: unknown[];\n};\n\nexport type InsightsIdentity = {\n userId: string;\n accountId: string;\n organisationId?: string;\n email?: string;\n name?: string;\n};\n"],"names":[],"mappings":"AA4BA,QAME"}
package/core/scripts.js CHANGED
@@ -1,2 +1,2 @@
1
- import"array-flat-polyfill";export{default as reactRenderer,renderComponent}from"./react-renderer";export{default as loadSprites}from"./load-sprites";export{default as toggleChatWidget}from"./hubspot-chat-toggle";export*from"./remote-data-store";export*from"./remote-blogs-posts";export*from"./remote-session-data";export*from"./dom-query";
1
+ import"array-flat-polyfill";export{default as reactRenderer,renderComponent}from"./react-renderer";export{default as loadSprites}from"./load-sprites";export*from"./remote-data-store";export*from"./remote-blogs-posts";export*from"./remote-session-data";export*from"./dom-query";
2
2
  //# sourceMappingURL=scripts.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/core/scripts.js"],"sourcesContent":["import \"array-flat-polyfill\";\n\nexport { default as reactRenderer, renderComponent } from \"./react-renderer\";\nexport { default as loadSprites } from \"./load-sprites\";\nexport { default as toggleChatWidget } from \"./hubspot-chat-toggle\";\n\nexport * from \"./remote-data-store\";\nexport * from \"./remote-blogs-posts\";\nexport * from \"./remote-session-data\";\nexport * from \"./dom-query\";\n"],"names":["default","reactRenderer","renderComponent","loadSprites","toggleChatWidget"],"mappings":"AAAA,MAAO,qBAAsB,AAE7B,QAASA,WAAWC,aAAa,CAAEC,eAAe,KAAQ,kBAAmB,AAC7E,QAASF,WAAWG,WAAW,KAAQ,gBAAiB,AACxD,QAASH,WAAWI,gBAAgB,KAAQ,uBAAwB,AAEpE,YAAc,qBAAsB,AACpC,YAAc,sBAAuB,AACrC,YAAc,uBAAwB,AACtC,YAAc,aAAc"}
1
+ {"version":3,"sources":["../../src/core/scripts.js"],"sourcesContent":["import \"array-flat-polyfill\";\n\nexport { default as reactRenderer, renderComponent } from \"./react-renderer\";\nexport { default as loadSprites } from \"./load-sprites\";\n\nexport * from \"./remote-data-store\";\nexport * from \"./remote-blogs-posts\";\nexport * from \"./remote-session-data\";\nexport * from \"./dom-query\";\n"],"names":["default","reactRenderer","renderComponent","loadSprites"],"mappings":"AAAA,MAAO,qBAAsB,AAE7B,QAASA,WAAWC,aAAa,CAAEC,eAAe,KAAQ,kBAAmB,AAC7E,QAASF,WAAWG,WAAW,KAAQ,gBAAiB,AAExD,YAAc,qBAAsB,AACpC,YAAc,sBAAuB,AACrC,YAAc,uBAAwB,AACtC,YAAc,aAAc"}