@knocklabs/react 0.11.0 → 0.11.2

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 (105) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/modules/feed/components/NotificationIconButton/NotificationIconButton.js.map +1 -1
  4. package/dist/cjs/modules/feed/components/UnseenBadge/UnseenBadge.js +1 -1
  5. package/dist/cjs/modules/feed/components/UnseenBadge/UnseenBadge.js.map +1 -1
  6. package/dist/cjs/modules/guide/components/Toolbar/KnockButton.js +2 -0
  7. package/dist/cjs/modules/guide/components/Toolbar/KnockButton.js.map +1 -0
  8. package/dist/cjs/modules/guide/components/Toolbar/V1/V1.js +2 -0
  9. package/dist/cjs/modules/guide/components/Toolbar/V1/V1.js.map +1 -0
  10. package/dist/cjs/modules/guide/components/Toolbar/V2/GuideContextDetails.js +2 -0
  11. package/dist/cjs/modules/guide/components/Toolbar/V2/GuideContextDetails.js.map +1 -0
  12. package/dist/cjs/modules/guide/components/Toolbar/V2/GuideHoverCard.js +2 -0
  13. package/dist/cjs/modules/guide/components/Toolbar/V2/GuideHoverCard.js.map +1 -0
  14. package/dist/cjs/modules/guide/components/Toolbar/V2/GuideRow.js +2 -0
  15. package/dist/cjs/modules/guide/components/Toolbar/V2/GuideRow.js.map +1 -0
  16. package/dist/cjs/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.js +2 -0
  17. package/dist/cjs/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.js.map +1 -0
  18. package/dist/cjs/modules/guide/components/Toolbar/V2/V2.js +2 -0
  19. package/dist/cjs/modules/guide/components/Toolbar/V2/V2.js.map +1 -0
  20. package/dist/cjs/modules/guide/components/Toolbar/V2/helpers.js +2 -0
  21. package/dist/cjs/modules/guide/components/Toolbar/V2/helpers.js.map +1 -0
  22. package/dist/cjs/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.js +2 -0
  23. package/dist/cjs/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.js.map +1 -0
  24. package/dist/cjs/modules/guide/components/Toolbar/shared.js +2 -0
  25. package/dist/cjs/modules/guide/components/Toolbar/shared.js.map +1 -0
  26. package/dist/cjs/modules/guide/providers/KnockGuideProvider.js +1 -1
  27. package/dist/cjs/modules/guide/providers/KnockGuideProvider.js.map +1 -1
  28. package/dist/esm/index.mjs +112 -102
  29. package/dist/esm/index.mjs.map +1 -1
  30. package/dist/esm/modules/feed/components/NotificationIconButton/NotificationIconButton.mjs.map +1 -1
  31. package/dist/esm/modules/feed/components/UnseenBadge/UnseenBadge.mjs +5 -5
  32. package/dist/esm/modules/feed/components/UnseenBadge/UnseenBadge.mjs.map +1 -1
  33. package/dist/esm/modules/guide/components/Toolbar/KnockButton.mjs +18 -0
  34. package/dist/esm/modules/guide/components/Toolbar/KnockButton.mjs.map +1 -0
  35. package/dist/esm/modules/guide/components/Toolbar/V1/V1.mjs +42 -0
  36. package/dist/esm/modules/guide/components/Toolbar/V1/V1.mjs.map +1 -0
  37. package/dist/esm/modules/guide/components/Toolbar/V2/GuideContextDetails.mjs +27 -0
  38. package/dist/esm/modules/guide/components/Toolbar/V2/GuideContextDetails.mjs.map +1 -0
  39. package/dist/esm/modules/guide/components/Toolbar/V2/GuideHoverCard.mjs +27 -0
  40. package/dist/esm/modules/guide/components/Toolbar/V2/GuideHoverCard.mjs.map +1 -0
  41. package/dist/esm/modules/guide/components/Toolbar/V2/GuideRow.mjs +37 -0
  42. package/dist/esm/modules/guide/components/Toolbar/V2/GuideRow.mjs.map +1 -0
  43. package/dist/esm/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.mjs +17 -0
  44. package/dist/esm/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.mjs.map +1 -0
  45. package/dist/esm/modules/guide/components/Toolbar/V2/V2.mjs +54 -0
  46. package/dist/esm/modules/guide/components/Toolbar/V2/V2.mjs.map +1 -0
  47. package/dist/esm/modules/guide/components/Toolbar/V2/helpers.mjs +13 -0
  48. package/dist/esm/modules/guide/components/Toolbar/V2/helpers.mjs.map +1 -0
  49. package/dist/esm/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.mjs +166 -0
  50. package/dist/esm/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.mjs.map +1 -0
  51. package/dist/esm/modules/guide/components/Toolbar/shared.mjs +5 -0
  52. package/dist/esm/modules/guide/components/Toolbar/shared.mjs.map +1 -0
  53. package/dist/esm/modules/guide/providers/KnockGuideProvider.mjs +16 -6
  54. package/dist/esm/modules/guide/providers/KnockGuideProvider.mjs.map +1 -1
  55. package/dist/types/index.d.ts +3 -3
  56. package/dist/types/index.d.ts.map +1 -1
  57. package/dist/types/modules/feed/components/NotificationIconButton/NotificationIconButton.d.ts +1 -1
  58. package/dist/types/modules/feed/components/NotificationIconButton/NotificationIconButton.d.ts.map +1 -1
  59. package/dist/types/modules/feed/components/UnseenBadge/UnseenBadge.d.ts +1 -1
  60. package/dist/types/modules/feed/components/UnseenBadge/UnseenBadge.d.ts.map +1 -1
  61. package/dist/types/modules/feed/components/UnseenBadge/index.d.ts +1 -1
  62. package/dist/types/modules/feed/components/UnseenBadge/index.d.ts.map +1 -1
  63. package/dist/types/modules/feed/index.d.ts +1 -1
  64. package/dist/types/modules/feed/index.d.ts.map +1 -1
  65. package/dist/types/modules/guide/components/Toolbar/KnockButton.d.ts +6 -0
  66. package/dist/types/modules/guide/components/Toolbar/KnockButton.d.ts.map +1 -0
  67. package/dist/types/modules/guide/components/Toolbar/V1/V1.d.ts +2 -0
  68. package/dist/types/modules/guide/components/Toolbar/V1/V1.d.ts.map +1 -0
  69. package/dist/types/modules/guide/components/Toolbar/V1/index.d.ts +2 -0
  70. package/dist/types/modules/guide/components/Toolbar/V1/index.d.ts.map +1 -0
  71. package/dist/types/modules/guide/components/Toolbar/V2/GuideContextDetails.d.ts +2 -0
  72. package/dist/types/modules/guide/components/Toolbar/V2/GuideContextDetails.d.ts.map +1 -0
  73. package/dist/types/modules/guide/components/Toolbar/V2/GuideHoverCard.d.ts +8 -0
  74. package/dist/types/modules/guide/components/Toolbar/V2/GuideHoverCard.d.ts.map +1 -0
  75. package/dist/types/modules/guide/components/Toolbar/V2/GuideRow.d.ts +8 -0
  76. package/dist/types/modules/guide/components/Toolbar/V2/GuideRow.d.ts.map +1 -0
  77. package/dist/types/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.d.ts +8 -0
  78. package/dist/types/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.d.ts.map +1 -0
  79. package/dist/types/modules/guide/components/Toolbar/V2/V2.d.ts +2 -0
  80. package/dist/types/modules/guide/components/Toolbar/V2/V2.d.ts.map +1 -0
  81. package/dist/types/modules/guide/components/Toolbar/V2/helpers.d.ts +2 -0
  82. package/dist/types/modules/guide/components/Toolbar/V2/helpers.d.ts.map +1 -0
  83. package/dist/types/modules/guide/components/Toolbar/V2/index.d.ts +2 -0
  84. package/dist/types/modules/guide/components/Toolbar/V2/index.d.ts.map +1 -0
  85. package/dist/types/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.d.ts +79 -0
  86. package/dist/types/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.d.ts.map +1 -0
  87. package/dist/types/modules/guide/components/Toolbar/index.d.ts +3 -0
  88. package/dist/types/modules/guide/components/Toolbar/index.d.ts.map +1 -0
  89. package/dist/types/modules/guide/components/Toolbar/shared.d.ts +2 -0
  90. package/dist/types/modules/guide/components/Toolbar/shared.d.ts.map +1 -0
  91. package/dist/types/modules/guide/components/index.d.ts +1 -1
  92. package/dist/types/modules/guide/components/index.d.ts.map +1 -1
  93. package/dist/types/modules/guide/index.d.ts +1 -1
  94. package/dist/types/modules/guide/index.d.ts.map +1 -1
  95. package/dist/types/modules/guide/providers/KnockGuideProvider.d.ts +5 -1
  96. package/dist/types/modules/guide/providers/KnockGuideProvider.d.ts.map +1 -1
  97. package/package.json +6 -4
  98. package/dist/cjs/modules/guide/components/GuideToolbar/GuideToolbar.js +0 -2
  99. package/dist/cjs/modules/guide/components/GuideToolbar/GuideToolbar.js.map +0 -1
  100. package/dist/esm/modules/guide/components/GuideToolbar/GuideToolbar.mjs +0 -47
  101. package/dist/esm/modules/guide/components/GuideToolbar/GuideToolbar.mjs.map +0 -1
  102. package/dist/types/modules/guide/components/GuideToolbar/GuideToolbar.d.ts +0 -2
  103. package/dist/types/modules/guide/components/GuideToolbar/GuideToolbar.d.ts.map +0 -1
  104. package/dist/types/modules/guide/components/GuideToolbar/index.d.ts +0 -2
  105. package/dist/types/modules/guide/components/GuideToolbar/index.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.11.2
4
+
5
+ ### Patch Changes
6
+
7
+ - b7b3708: [guides] add guide toolbar v2 poc
8
+ - Updated dependencies [cb7148b]
9
+ - Updated dependencies [04a8f16]
10
+ - Updated dependencies [b7b3708]
11
+ - @knocklabs/client@0.21.2
12
+ - @knocklabs/react-core@0.13.2
13
+
14
+ ## 0.11.1
15
+
16
+ ### Patch Changes
17
+
18
+ - 7f8bdfe: Add accessible labels to `UnseenBadge` so screen readers announce the count with context (e.g. "3 unseen notifications") instead of just the bare number
19
+ - Updated dependencies [ddd7981]
20
+ - Updated dependencies [7f8bdfe]
21
+ - @knocklabs/client@0.21.1
22
+ - @knocklabs/react-core@0.13.1
23
+
3
24
  ## 0.11.0
4
25
 
5
26
  ### Minor Changes
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const o=require("./modules/core/components/Button/Button.js"),i=require("./modules/core/components/Button/ButtonGroup.js"),u=require("./modules/core/components/Icons/Bell.js"),a=require("./modules/core/components/Icons/CheckmarkCircle.js"),c=require("./modules/core/components/Icons/ChevronDown.js"),s=require("./modules/core/components/Icons/CloseCircle.js"),l=require("./modules/core/components/Spinner/Spinner.js"),d=require("./modules/core/hooks/useOnBottomScroll.js"),b=require("./modules/feed/components/EmptyFeed/EmptyFeed.js"),m=require("./modules/feed/components/NotificationCell/NotificationCell.js"),C=require("./modules/feed/components/NotificationCell/Avatar.js"),f=require("./modules/feed/components/NotificationFeed/NotificationFeed.js"),P=require("./modules/feed/components/NotificationFeed/NotificationFeedHeader.js"),k=require("./modules/feed/components/NotificationFeed/MarkAsRead.js"),p=require("./modules/feed/components/NotificationFeedContainer/NotificationFeedContainer.js"),y=require("./modules/feed/components/NotificationFeedPopover/NotificationFeedPopover.js"),g=require("./modules/feed/components/NotificationIconButton/NotificationIconButton.js"),O=require("./modules/feed/components/UnseenBadge/UnseenBadge.js"),t=require("./modules/guide/components/Banner/Banner.js"),r=require("./modules/guide/components/Card/Card.js"),S=require("./modules/guide/components/GuideToolbar/GuideToolbar.js"),n=require("./modules/guide/components/Modal/Modal.js"),j=require("./modules/guide/providers/KnockGuideProvider.js"),h=require("./modules/ms-teams/components/MsTeamsAuthButton/MsTeamsAuthButton.js"),T=require("./modules/ms-teams/components/MsTeamsAuthContainer/MsTeamsAuthContainer.js"),K=require("./modules/ms-teams/components/MsTeamsChannelCombobox/MsTeamsChannelCombobox.js"),q=require("./modules/slack/components/SlackAuthButton/SlackAuthButton.js"),M=require("./modules/slack/components/SlackAuthContainer/SlackAuthContainer.js"),B=require("./modules/slack/components/SlackChannelCombobox/SlackChannelCombobox.js"),e=require("@knocklabs/react-core");exports.Button=o.Button;exports.ButtonGroup=i.ButtonGroup;exports.BellIcon=u.BellIcon;exports.CheckmarkCircle=a.CheckmarkCircle;exports.ChevronDown=c.ChevronDown;exports.CloseCircle=s.CloseCircle;exports.Spinner=l.Spinner;exports.useOnBottomScroll=d;exports.EmptyFeed=b.EmptyFeed;exports.NotificationCell=m.NotificationCell;exports.Avatar=C.Avatar;exports.NotificationFeed=f.NotificationFeed;exports.NotificationFeedHeader=P.NotificationFeedHeader;exports.MarkAsRead=k.MarkAsRead;exports.NotificationFeedContainer=p.NotificationFeedContainer;exports.NotificationFeedPopover=y.NotificationFeedPopover;exports.NotificationIconButton=g.NotificationIconButton;exports.UnseenBadge=O.UnseenBadge;exports.Banner=t.Banner;exports.BannerView=t.BannerView;exports.Card=r.Card;exports.CardView=r.CardView;exports.KnockGuideToolbar=S.GuideToolbar;exports.Modal=n.Modal;exports.ModalView=n.ModalView;exports.KnockGuideProvider=j.KnockGuideProvider;exports.MsTeamsAuthButton=h.MsTeamsAuthButton;exports.MsTeamsAuthContainer=T.MsTeamsAuthContainer;exports.MsTeamsChannelCombobox=K;exports.SlackAuthButton=q.SlackAuthButton;exports.SlackAuthContainer=M.SlackAuthContainer;exports.SlackChannelCombobox=B.SlackChannelCombobox;Object.defineProperty(exports,"FilterStatus",{enumerable:!0,get:()=>e.FilterStatus});Object.defineProperty(exports,"I18nContext",{enumerable:!0,get:()=>e.I18nContext});Object.defineProperty(exports,"KnockFeedProvider",{enumerable:!0,get:()=>e.KnockFeedProvider});Object.defineProperty(exports,"KnockGuideContext",{enumerable:!0,get:()=>e.KnockGuideContext});Object.defineProperty(exports,"KnockI18nProvider",{enumerable:!0,get:()=>e.KnockI18nProvider});Object.defineProperty(exports,"KnockMsTeamsProvider",{enumerable:!0,get:()=>e.KnockMsTeamsProvider});Object.defineProperty(exports,"KnockProvider",{enumerable:!0,get:()=>e.KnockProvider});Object.defineProperty(exports,"KnockSlackProvider",{enumerable:!0,get:()=>e.KnockSlackProvider});Object.defineProperty(exports,"feedProviderKey",{enumerable:!0,get:()=>e.feedProviderKey});Object.defineProperty(exports,"formatBadgeCount",{enumerable:!0,get:()=>e.formatBadgeCount});Object.defineProperty(exports,"formatTimestamp",{enumerable:!0,get:()=>e.formatTimestamp});Object.defineProperty(exports,"locales",{enumerable:!0,get:()=>e.locales});Object.defineProperty(exports,"msTeamsProviderKey",{enumerable:!0,get:()=>e.msTeamsProviderKey});Object.defineProperty(exports,"renderNodeOrFallback",{enumerable:!0,get:()=>e.renderNodeOrFallback});Object.defineProperty(exports,"slackProviderKey",{enumerable:!0,get:()=>e.slackProviderKey});Object.defineProperty(exports,"toSentenceCase",{enumerable:!0,get:()=>e.toSentenceCase});Object.defineProperty(exports,"useAuthenticatedKnockClient",{enumerable:!0,get:()=>e.useAuthenticatedKnockClient});Object.defineProperty(exports,"useConnectedMsTeamsChannels",{enumerable:!0,get:()=>e.useConnectedMsTeamsChannels});Object.defineProperty(exports,"useConnectedSlackChannels",{enumerable:!0,get:()=>e.useConnectedSlackChannels});Object.defineProperty(exports,"useCreateNotificationStore",{enumerable:!0,get:()=>e.useCreateNotificationStore});Object.defineProperty(exports,"useFeedSettings",{enumerable:!0,get:()=>e.useFeedSettings});Object.defineProperty(exports,"useGuide",{enumerable:!0,get:()=>e.useGuide});Object.defineProperty(exports,"useGuideContext",{enumerable:!0,get:()=>e.useGuideContext});Object.defineProperty(exports,"useGuides",{enumerable:!0,get:()=>e.useGuides});Object.defineProperty(exports,"useKnockClient",{enumerable:!0,get:()=>e.useKnockClient});Object.defineProperty(exports,"useKnockFeed",{enumerable:!0,get:()=>e.useKnockFeed});Object.defineProperty(exports,"useKnockMsTeamsClient",{enumerable:!0,get:()=>e.useKnockMsTeamsClient});Object.defineProperty(exports,"useKnockSlackClient",{enumerable:!0,get:()=>e.useKnockSlackClient});Object.defineProperty(exports,"useMsTeamsAuth",{enumerable:!0,get:()=>e.useMsTeamsAuth});Object.defineProperty(exports,"useMsTeamsChannels",{enumerable:!0,get:()=>e.useMsTeamsChannels});Object.defineProperty(exports,"useMsTeamsConnectionStatus",{enumerable:!0,get:()=>e.useMsTeamsConnectionStatus});Object.defineProperty(exports,"useMsTeamsTeams",{enumerable:!0,get:()=>e.useMsTeamsTeams});Object.defineProperty(exports,"useNotificationStore",{enumerable:!0,get:()=>e.useNotificationStore});Object.defineProperty(exports,"useNotifications",{enumerable:!0,get:()=>e.useNotifications});Object.defineProperty(exports,"usePreferences",{enumerable:!0,get:()=>e.usePreferences});Object.defineProperty(exports,"useSlackAuth",{enumerable:!0,get:()=>e.useSlackAuth});Object.defineProperty(exports,"useSlackChannels",{enumerable:!0,get:()=>e.useSlackChannels});Object.defineProperty(exports,"useSlackConnectionStatus",{enumerable:!0,get:()=>e.useSlackConnectionStatus});Object.defineProperty(exports,"useStableOptions",{enumerable:!0,get:()=>e.useStableOptions});Object.defineProperty(exports,"useTranslations",{enumerable:!0,get:()=>e.useTranslations});
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const o=require("./modules/core/components/Button/Button.js"),i=require("./modules/core/components/Button/ButtonGroup.js"),u=require("./modules/core/components/Icons/Bell.js"),a=require("./modules/core/components/Icons/CheckmarkCircle.js"),c=require("./modules/core/components/Icons/ChevronDown.js"),s=require("./modules/core/components/Icons/CloseCircle.js"),l=require("./modules/core/components/Spinner/Spinner.js"),d=require("./modules/core/hooks/useOnBottomScroll.js"),b=require("./modules/feed/components/EmptyFeed/EmptyFeed.js"),m=require("./modules/feed/components/NotificationCell/NotificationCell.js"),C=require("./modules/feed/components/NotificationCell/Avatar.js"),f=require("./modules/feed/components/NotificationFeed/NotificationFeed.js"),P=require("./modules/feed/components/NotificationFeed/NotificationFeedHeader.js"),k=require("./modules/feed/components/NotificationFeed/MarkAsRead.js"),p=require("./modules/feed/components/NotificationFeedContainer/NotificationFeedContainer.js"),g=require("./modules/feed/components/NotificationFeedPopover/NotificationFeedPopover.js"),y=require("./modules/feed/components/NotificationIconButton/NotificationIconButton.js"),O=require("./modules/feed/components/UnseenBadge/UnseenBadge.js"),t=require("./modules/guide/components/Banner/Banner.js"),r=require("./modules/guide/components/Card/Card.js");require("react");const e=require("@knocklabs/react-core");require("@telegraph/button");require("@telegraph/layout");require("@telegraph/tag");require("@telegraph/typography");require("lucide-react");;/* empty css */require("@telegraph/tooltip");require("@radix-ui/react-hover-card");require("@knocklabs/client");require("@telegraph/select");const n=require("./modules/guide/components/Modal/Modal.js"),S=require("./modules/guide/providers/KnockGuideProvider.js"),j=require("./modules/ms-teams/components/MsTeamsAuthButton/MsTeamsAuthButton.js"),q=require("./modules/ms-teams/components/MsTeamsAuthContainer/MsTeamsAuthContainer.js"),h=require("./modules/ms-teams/components/MsTeamsChannelCombobox/MsTeamsChannelCombobox.js"),B=require("./modules/slack/components/SlackAuthButton/SlackAuthButton.js"),K=require("./modules/slack/components/SlackAuthContainer/SlackAuthContainer.js"),M=require("./modules/slack/components/SlackChannelCombobox/SlackChannelCombobox.js");exports.Button=o.Button;exports.ButtonGroup=i.ButtonGroup;exports.BellIcon=u.BellIcon;exports.CheckmarkCircle=a.CheckmarkCircle;exports.ChevronDown=c.ChevronDown;exports.CloseCircle=s.CloseCircle;exports.Spinner=l.Spinner;exports.useOnBottomScroll=d;exports.EmptyFeed=b.EmptyFeed;exports.NotificationCell=m.NotificationCell;exports.Avatar=C.Avatar;exports.NotificationFeed=f.NotificationFeed;exports.NotificationFeedHeader=P.NotificationFeedHeader;exports.MarkAsRead=k.MarkAsRead;exports.NotificationFeedContainer=p.NotificationFeedContainer;exports.NotificationFeedPopover=g.NotificationFeedPopover;exports.NotificationIconButton=y.NotificationIconButton;exports.UnseenBadge=O.UnseenBadge;exports.Banner=t.Banner;exports.BannerView=t.BannerView;exports.Card=r.Card;exports.CardView=r.CardView;Object.defineProperty(exports,"FilterStatus",{enumerable:!0,get:()=>e.FilterStatus});Object.defineProperty(exports,"I18nContext",{enumerable:!0,get:()=>e.I18nContext});Object.defineProperty(exports,"KnockFeedProvider",{enumerable:!0,get:()=>e.KnockFeedProvider});Object.defineProperty(exports,"KnockGuideContext",{enumerable:!0,get:()=>e.KnockGuideContext});Object.defineProperty(exports,"KnockI18nProvider",{enumerable:!0,get:()=>e.KnockI18nProvider});Object.defineProperty(exports,"KnockMsTeamsProvider",{enumerable:!0,get:()=>e.KnockMsTeamsProvider});Object.defineProperty(exports,"KnockProvider",{enumerable:!0,get:()=>e.KnockProvider});Object.defineProperty(exports,"KnockSlackProvider",{enumerable:!0,get:()=>e.KnockSlackProvider});Object.defineProperty(exports,"feedProviderKey",{enumerable:!0,get:()=>e.feedProviderKey});Object.defineProperty(exports,"formatBadgeCount",{enumerable:!0,get:()=>e.formatBadgeCount});Object.defineProperty(exports,"formatTimestamp",{enumerable:!0,get:()=>e.formatTimestamp});Object.defineProperty(exports,"getBadgeAriaLabel",{enumerable:!0,get:()=>e.getBadgeAriaLabel});Object.defineProperty(exports,"locales",{enumerable:!0,get:()=>e.locales});Object.defineProperty(exports,"msTeamsProviderKey",{enumerable:!0,get:()=>e.msTeamsProviderKey});Object.defineProperty(exports,"renderNodeOrFallback",{enumerable:!0,get:()=>e.renderNodeOrFallback});Object.defineProperty(exports,"slackProviderKey",{enumerable:!0,get:()=>e.slackProviderKey});Object.defineProperty(exports,"toSentenceCase",{enumerable:!0,get:()=>e.toSentenceCase});Object.defineProperty(exports,"useAuthenticatedKnockClient",{enumerable:!0,get:()=>e.useAuthenticatedKnockClient});Object.defineProperty(exports,"useConnectedMsTeamsChannels",{enumerable:!0,get:()=>e.useConnectedMsTeamsChannels});Object.defineProperty(exports,"useConnectedSlackChannels",{enumerable:!0,get:()=>e.useConnectedSlackChannels});Object.defineProperty(exports,"useCreateNotificationStore",{enumerable:!0,get:()=>e.useCreateNotificationStore});Object.defineProperty(exports,"useFeedSettings",{enumerable:!0,get:()=>e.useFeedSettings});Object.defineProperty(exports,"useGuide",{enumerable:!0,get:()=>e.useGuide});Object.defineProperty(exports,"useGuideContext",{enumerable:!0,get:()=>e.useGuideContext});Object.defineProperty(exports,"useGuides",{enumerable:!0,get:()=>e.useGuides});Object.defineProperty(exports,"useKnockClient",{enumerable:!0,get:()=>e.useKnockClient});Object.defineProperty(exports,"useKnockFeed",{enumerable:!0,get:()=>e.useKnockFeed});Object.defineProperty(exports,"useKnockMsTeamsClient",{enumerable:!0,get:()=>e.useKnockMsTeamsClient});Object.defineProperty(exports,"useKnockSlackClient",{enumerable:!0,get:()=>e.useKnockSlackClient});Object.defineProperty(exports,"useMsTeamsAuth",{enumerable:!0,get:()=>e.useMsTeamsAuth});Object.defineProperty(exports,"useMsTeamsChannels",{enumerable:!0,get:()=>e.useMsTeamsChannels});Object.defineProperty(exports,"useMsTeamsConnectionStatus",{enumerable:!0,get:()=>e.useMsTeamsConnectionStatus});Object.defineProperty(exports,"useMsTeamsTeams",{enumerable:!0,get:()=>e.useMsTeamsTeams});Object.defineProperty(exports,"useNotificationStore",{enumerable:!0,get:()=>e.useNotificationStore});Object.defineProperty(exports,"useNotifications",{enumerable:!0,get:()=>e.useNotifications});Object.defineProperty(exports,"usePreferences",{enumerable:!0,get:()=>e.usePreferences});Object.defineProperty(exports,"useSlackAuth",{enumerable:!0,get:()=>e.useSlackAuth});Object.defineProperty(exports,"useSlackChannels",{enumerable:!0,get:()=>e.useSlackChannels});Object.defineProperty(exports,"useSlackConnectionStatus",{enumerable:!0,get:()=>e.useSlackConnectionStatus});Object.defineProperty(exports,"useStableOptions",{enumerable:!0,get:()=>e.useStableOptions});Object.defineProperty(exports,"useTranslations",{enumerable:!0,get:()=>e.useTranslations});exports.Modal=n.Modal;exports.ModalView=n.ModalView;exports.KnockGuideProvider=S.KnockGuideProvider;exports.MsTeamsAuthButton=j.MsTeamsAuthButton;exports.MsTeamsAuthContainer=q.MsTeamsAuthContainer;exports.MsTeamsChannelCombobox=h;exports.SlackAuthButton=B.SlackAuthButton;exports.SlackAuthContainer=K.SlackAuthContainer;exports.SlackChannelCombobox=M.SlackChannelCombobox;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationIconButton.js","sources":["../../../../../../src/modules/feed/components/NotificationIconButton/NotificationIconButton.tsx"],"sourcesContent":["import { useKnockFeed } from \"@knocklabs/react-core\";\nimport React, { SyntheticEvent } from \"react\";\n\nimport { BellIcon } from \"../../../core/components/Icons\";\nimport { BadgeCountType, UnseenBadge } from \"../UnseenBadge\";\n\nimport \"./styles.css\";\n\nexport interface NotificationIconButtonProps {\n // What value should we use to drive the badge count?\n badgeCountType?: BadgeCountType;\n onClick: (e: SyntheticEvent) => void;\n}\n\nexport const NotificationIconButton = React.forwardRef<\n HTMLButtonElement,\n NotificationIconButtonProps\n>(({ onClick, badgeCountType }, ref) => {\n const { colorMode } = useKnockFeed();\n\n return (\n <button\n className={`rnf-notification-icon-button rnf-notification-icon-button--${colorMode}`}\n aria-label=\"Open notification feed\"\n ref={ref}\n onClick={onClick}\n >\n <BellIcon aria-hidden />\n <UnseenBadge badgeCountType={badgeCountType} />\n </button>\n );\n});\n"],"names":["NotificationIconButton","React","forwardRef","onClick","badgeCountType","ref","colorMode","useKnockFeed","BellIcon","UnseenBadge"],"mappings":"2UAcaA,EAAyBC,EAAAA,QAAMC,WAG1C,CAAC,CAAEC,QAAAA,EAASC,eAAAA,CAAe,EAAGC,IAAQ,CAChC,KAAA,CAAEC,UAAAA,GAAcC,eAAa,EAEnC,+BACG,SACC,CAAA,UAAW,8DAA8DD,CAAS,GAClF,aAAW,yBACX,IAAAD,EACA,QAAAF,GAEAF,EAAAA,QAAA,cAACO,YAAS,cAAW,EAAA,CAAA,EACpBP,EAAAA,QAAA,cAAAQ,EAAAA,YAAA,CAAY,eAAAL,CAA+B,CAAA,CAC9C,CAEJ,CAAC"}
1
+ {"version":3,"file":"NotificationIconButton.js","sources":["../../../../../../src/modules/feed/components/NotificationIconButton/NotificationIconButton.tsx"],"sourcesContent":["import { type BadgeCountType, useKnockFeed } from \"@knocklabs/react-core\";\nimport React, { SyntheticEvent } from \"react\";\n\nimport { BellIcon } from \"../../../core/components/Icons\";\nimport { UnseenBadge } from \"../UnseenBadge\";\n\nimport \"./styles.css\";\n\nexport interface NotificationIconButtonProps {\n // What value should we use to drive the badge count?\n badgeCountType?: BadgeCountType;\n onClick: (e: SyntheticEvent) => void;\n}\n\nexport const NotificationIconButton = React.forwardRef<\n HTMLButtonElement,\n NotificationIconButtonProps\n>(({ onClick, badgeCountType }, ref) => {\n const { colorMode } = useKnockFeed();\n\n return (\n <button\n className={`rnf-notification-icon-button rnf-notification-icon-button--${colorMode}`}\n aria-label=\"Open notification feed\"\n ref={ref}\n onClick={onClick}\n >\n <BellIcon aria-hidden />\n <UnseenBadge badgeCountType={badgeCountType} />\n </button>\n );\n});\n"],"names":["NotificationIconButton","React","forwardRef","onClick","badgeCountType","ref","colorMode","useKnockFeed","BellIcon","UnseenBadge"],"mappings":"2UAcaA,EAAyBC,EAAAA,QAAMC,WAG1C,CAAC,CAAEC,QAAAA,EAASC,eAAAA,CAAe,EAAGC,IAAQ,CAChC,KAAA,CAAEC,UAAAA,GAAcC,eAAa,EAEnC,+BACG,SACC,CAAA,UAAW,8DAA8DD,CAAS,GAClF,aAAW,yBACX,IAAAD,EACA,QAAAF,GAEAF,EAAAA,QAAA,cAACO,YAAS,cAAW,EAAA,CAAA,EACpBP,EAAAA,QAAA,cAAAQ,EAAAA,YAAA,CAAY,eAAAL,CAA+B,CAAA,CAC9C,CAEJ,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@knocklabs/react-core"),c=require("react");;/* empty css */const o=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},a=o(c);function s(e,n){switch(e){case"all":return n.total_count;case"unread":return n.unread_count;case"unseen":return n.unseen_count}}const l=({badgeCountType:e="unseen"})=>{const{useFeedStore:n}=u.useKnockFeed(),t=n(r=>s(e,r.metadata));return t!==0?a.default.createElement("div",{className:"rnf-unseen-badge"},a.default.createElement("span",{className:"rnf-unseen-badge__count"},u.formatBadgeCount(t))):null};exports.UnseenBadge=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@knocklabs/react-core"),s=require("react");;/* empty css */const c=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},u=c(s);function o(e,t){switch(e){case"all":return t.total_count;case"unread":return t.unread_count;case"unseen":return t.unseen_count}}const l=({badgeCountType:e="unseen"})=>{const{useFeedStore:t}=a.useKnockFeed(),n=t(r=>o(e,r.metadata));return n!==0?u.default.createElement("div",{className:"rnf-unseen-badge",role:"status","aria-label":a.getBadgeAriaLabel(n,e)},u.default.createElement("span",{className:"rnf-unseen-badge__count","aria-hidden":"true"},a.formatBadgeCount(n))):null};exports.UnseenBadge=l;
2
2
  //# sourceMappingURL=UnseenBadge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnseenBadge.js","sources":["../../../../../../src/modules/feed/components/UnseenBadge/UnseenBadge.tsx"],"sourcesContent":["import { FeedMetadata } from \"@knocklabs/client\";\nimport { formatBadgeCount, useKnockFeed } from \"@knocklabs/react-core\";\nimport React from \"react\";\n\nimport \"./styles.css\";\n\nexport type BadgeCountType = \"unseen\" | \"unread\" | \"all\";\n\nexport type UnseenBadgeProps = {\n badgeCountType?: BadgeCountType;\n};\n\nfunction selectBadgeCount(\n badgeCountType: BadgeCountType,\n metadata: FeedMetadata,\n) {\n switch (badgeCountType) {\n case \"all\":\n return metadata.total_count;\n case \"unread\":\n return metadata.unread_count;\n case \"unseen\":\n return metadata.unseen_count;\n }\n}\n\nexport const UnseenBadge: React.FC<UnseenBadgeProps> = ({\n badgeCountType = \"unseen\",\n}) => {\n const { useFeedStore } = useKnockFeed();\n const badgeCountValue = useFeedStore((state) =>\n selectBadgeCount(badgeCountType, state.metadata),\n );\n\n return badgeCountValue !== 0 ? (\n <div className=\"rnf-unseen-badge\">\n <span className=\"rnf-unseen-badge__count\">\n {formatBadgeCount(badgeCountValue)}\n </span>\n </div>\n ) : null;\n};\n"],"names":["selectBadgeCount","badgeCountType","metadata","total_count","unread_count","unseen_count","UnseenBadge","useFeedStore","useKnockFeed","badgeCountValue","state","React","formatBadgeCount"],"mappings":"4OAYA,SAASA,EACPC,EACAC,EACA,CACA,OAAQD,EAAc,CACpB,IAAK,MACH,OAAOC,EAASC,YAClB,IAAK,SACH,OAAOD,EAASE,aAClB,IAAK,SACH,OAAOF,EAASG,YAAAA,CAEtB,CAEO,MAAMC,EAA0CA,CAAC,CACtDL,eAAAA,EAAiB,QACnB,IAAM,CACE,KAAA,CAAEM,aAAAA,GAAiBC,eAAa,EAChCC,EAAkBF,EAAcG,GACpCV,EAAiBC,EAAgBS,EAAMR,QAAQ,CACjD,EAEA,OAAOO,IAAoB,EACxBE,UAAA,cAAA,MAAA,CAAI,UAAU,oBACbA,EAAAA,QAAA,cAAC,OAAK,CAAA,UAAU,yBACbC,EAAAA,EAAAA,iBAAiBH,CAAe,CACnC,CACF,EACE,IACN"}
1
+ {"version":3,"file":"UnseenBadge.js","sources":["../../../../../../src/modules/feed/components/UnseenBadge/UnseenBadge.tsx"],"sourcesContent":["import { FeedMetadata } from \"@knocklabs/client\";\nimport {\n type BadgeCountType,\n formatBadgeCount,\n getBadgeAriaLabel,\n useKnockFeed,\n} from \"@knocklabs/react-core\";\nimport React from \"react\";\n\nimport \"./styles.css\";\n\nexport type UnseenBadgeProps = {\n badgeCountType?: BadgeCountType;\n};\n\nfunction selectBadgeCount(\n badgeCountType: BadgeCountType,\n metadata: FeedMetadata,\n): number {\n switch (badgeCountType) {\n case \"all\":\n return metadata.total_count;\n case \"unread\":\n return metadata.unread_count;\n case \"unseen\":\n return metadata.unseen_count;\n }\n}\n\nexport const UnseenBadge: React.FC<UnseenBadgeProps> = ({\n badgeCountType = \"unseen\",\n}) => {\n const { useFeedStore } = useKnockFeed();\n const badgeCountValue = useFeedStore((state) =>\n selectBadgeCount(badgeCountType, state.metadata),\n );\n\n return badgeCountValue !== 0 ? (\n <div\n className=\"rnf-unseen-badge\"\n role=\"status\"\n aria-label={getBadgeAriaLabel(badgeCountValue, badgeCountType)}\n >\n <span className=\"rnf-unseen-badge__count\" aria-hidden=\"true\">\n {formatBadgeCount(badgeCountValue)}\n </span>\n </div>\n ) : null;\n};\n"],"names":["selectBadgeCount","badgeCountType","metadata","total_count","unread_count","unseen_count","UnseenBadge","useFeedStore","useKnockFeed","badgeCountValue","state","React","getBadgeAriaLabel","formatBadgeCount"],"mappings":"4OAeA,SAASA,EACPC,EACAC,EACQ,CACR,OAAQD,EAAc,CACpB,IAAK,MACH,OAAOC,EAASC,YAClB,IAAK,SACH,OAAOD,EAASE,aAClB,IAAK,SACH,OAAOF,EAASG,YAAAA,CAEtB,CAEO,MAAMC,EAA0CA,CAAC,CACtDL,eAAAA,EAAiB,QACnB,IAAM,CACE,KAAA,CAAEM,aAAAA,GAAiBC,eAAa,EAChCC,EAAkBF,EAAcG,GACpCV,EAAiBC,EAAgBS,EAAMR,QAAQ,CACjD,EAEOO,OAAAA,IAAoB,EACxBE,UAAA,cAAA,MAAA,CACC,UAAU,mBACV,KAAK,SACL,aAAYC,EAAkBH,kBAAAA,EAAiBR,CAAc,CAE7D,EAAAU,EAAAA,QAAA,cAAC,OAAK,CAAA,UAAU,0BAA0B,cAAY,QACnDE,EAAAA,iBAAiBJ,CAAe,CACnC,CACF,EACE,IACN"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),o=require("@telegraph/button"),n=require("./shared.js");;/* empty css */const r=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},e=r(a),l=({onClick:t})=>e.default.createElement(o.Button,{onClick:t,position:"fixed",top:"4",right:"4",bg:"surface-2",shadow:"3",rounded:"3",w:"10",h:"10",variant:"soft","data-tgph-appearance":"dark","aria-label":"Expand guide toolbar",style:{zIndex:n.TOOLBAR_Z_INDEX}},e.default.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}},e.default.createElement("path",{d:"M11.6001 32.4V7.59998H16.6365V21.8219H16.7774L22.3067 14.8525H27.9418L21.8138 22.0696L28.4001 32.4H22.7996L18.8555 25.572L16.6365 28.0839V32.4H11.6001Z",fill:"#EDEEEF"}),e.default.createElement("path",{d:"M28.4 10.4C28.4 11.9464 27.1467 13.2 25.6 13.2C24.0534 13.2 22.8 11.9464 22.8 10.4C22.8 8.85358 24.0534 7.59998 25.6 7.59998C27.1467 7.59998 28.4 8.85358 28.4 10.4Z",fill:"#FF573A"})));exports.KnockButton=l;
2
+ //# sourceMappingURL=KnockButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KnockButton.js","sources":["../../../../../../src/modules/guide/components/Toolbar/KnockButton.tsx"],"sourcesContent":["import { Button } from \"@telegraph/button\";\n\nimport { TOOLBAR_Z_INDEX } from \"./shared\";\nimport \"./styles.css\";\n\ntype Props = {\n onClick: () => void;\n};\n\nexport const KnockButton = ({ onClick }: Props) => {\n return (\n <Button\n onClick={onClick}\n position=\"fixed\"\n top=\"4\"\n right=\"4\"\n bg=\"surface-2\"\n shadow=\"3\"\n rounded=\"3\"\n w=\"10\"\n h=\"10\"\n variant=\"soft\"\n data-tgph-appearance=\"dark\"\n aria-label=\"Expand guide toolbar\"\n style={{ zIndex: TOOLBAR_Z_INDEX }}\n >\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{\n position: \"absolute\",\n top: \"50%\",\n left: \"50%\",\n transform: \"translate(-50%, -50%)\",\n }}\n >\n <path\n d=\"M11.6001 32.4V7.59998H16.6365V21.8219H16.7774L22.3067 14.8525H27.9418L21.8138 22.0696L28.4001 32.4H22.7996L18.8555 25.572L16.6365 28.0839V32.4H11.6001Z\"\n fill=\"#EDEEEF\"\n />\n <path\n d=\"M28.4 10.4C28.4 11.9464 27.1467 13.2 25.6 13.2C24.0534 13.2 22.8 11.9464 22.8 10.4C22.8 8.85358 24.0534 7.59998 25.6 7.59998C27.1467 7.59998 28.4 8.85358 28.4 10.4Z\"\n fill=\"#FF573A\"\n />\n </svg>\n </Button>\n );\n};\n"],"names":["KnockButton","onClick","React","Button","zIndex","TOOLBAR_Z_INDEX","position","top","left","transform"],"mappings":"iQASaA,EAAcA,CAAC,CAAEC,QAAAA,CAAe,IAEzCC,EAAA,QAAA,cAACC,SACC,CAAA,QAAAF,EACA,SAAS,QACT,IAAI,IACJ,MAAM,IACN,GAAG,YACH,OAAO,IACP,QAAQ,IACR,EAAE,KACF,EAAE,KACF,QAAQ,OACR,uBAAqB,OACrB,aAAW,uBACX,MAAO,CAAEG,OAAQC,EAAAA,eAAAA,CAEjB,EAAAH,EAAA,QAAA,cAAC,MACC,CAAA,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,MAAO,CACLI,SAAU,WACVC,IAAK,MACLC,KAAM,MACNC,UAAW,uBAAA,GAGbP,EAAAA,QAAA,cAAC,OACC,CAAA,EAAE,0JACF,KAAK,SAAS,CAAA,EAEhBA,EAAAA,QAAA,cAAC,QACC,EAAE,uKACF,KAAK,SAAS,CAAA,CAElB,CACF"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),i=require("@knocklabs/react-core"),c=require("@telegraph/button"),l=require("@telegraph/layout"),g=require("@telegraph/tag"),p=require("@telegraph/typography"),n=require("lucide-react"),h=require("../KnockButton.js"),m=require("../shared.js");;/* empty css */const y=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=y(u),C=()=>{const[e,s]=u.useState(!1),{client:r}=i.useGuideContext(),o=i.useStore(r.store,f=>f.debug);if(!(o!=null&&o.forcedGuideKey))return null;const d=()=>{r.exitDebugMode()},a=()=>{s(!e)};return e?t.default.createElement(h.KnockButton,{onClick:a}):t.default.createElement(l.Stack,{gap:"2",align:"center",position:"fixed",top:"4",right:"4",backgroundColor:"surface-2",bg:"surface-2",shadow:"3",rounded:"3",py:"2",px:"3","data-tgph-appearance":"dark",style:{zIndex:m.TOOLBAR_Z_INDEX}},t.default.createElement(l.Stack,{gap:"2",align:"center",direction:"row"},t.default.createElement(g.Tag,{color:"green",variant:"soft",icon:{icon:n.Wrench,"aria-hidden":!0}},"Debug"),t.default.createElement(p.Text,{as:"div",size:"1",weight:"medium",w:"full",maxWidth:"40",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},o.forcedGuideKey),t.default.createElement(c.Button,{onClick:d,size:"1",variant:"soft",trailingIcon:{icon:n.Undo2,"aria-hidden":!0}},"Exit"),t.default.createElement(c.Button,{onClick:a,size:"1",variant:"soft",leadingIcon:{icon:n.Minimize2,alt:"Collapse guide toolbar"}})))};exports.V1=C;
2
+ //# sourceMappingURL=V1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V1.js","sources":["../../../../../../../src/modules/guide/components/Toolbar/V1/V1.tsx"],"sourcesContent":["import { useGuideContext, useStore } from \"@knocklabs/react-core\";\nimport { Button } from \"@telegraph/button\";\nimport { Stack } from \"@telegraph/layout\";\nimport { Tag } from \"@telegraph/tag\";\nimport { Text } from \"@telegraph/typography\";\nimport { Minimize2, Undo2, Wrench } from \"lucide-react\";\nimport { useState } from \"react\";\n\nimport { KnockButton } from \"../KnockButton\";\nimport { TOOLBAR_Z_INDEX } from \"../shared\";\nimport \"../styles.css\";\n\nexport const V1 = () => {\n const [isCollapsed, setIsCollapsed] = useState(false);\n\n const { client } = useGuideContext();\n const debugState = useStore(client.store, (state) => state.debug);\n\n if (!debugState?.forcedGuideKey) {\n return null;\n }\n\n const handleExit = () => {\n client.exitDebugMode();\n };\n\n const handleToggleCollapse = () => {\n setIsCollapsed(!isCollapsed);\n };\n\n if (isCollapsed) {\n return <KnockButton onClick={handleToggleCollapse} />;\n }\n\n return (\n <Stack\n gap=\"2\"\n align=\"center\"\n position=\"fixed\"\n top=\"4\"\n right=\"4\"\n backgroundColor=\"surface-2\"\n bg=\"surface-2\"\n shadow=\"3\"\n rounded=\"3\"\n py=\"2\"\n px=\"3\"\n data-tgph-appearance=\"dark\"\n style={{ zIndex: TOOLBAR_Z_INDEX }}\n >\n <Stack gap=\"2\" align=\"center\" direction=\"row\">\n <Tag\n color=\"green\"\n variant=\"soft\"\n icon={{ icon: Wrench, \"aria-hidden\": true }}\n >\n Debug\n </Tag>\n\n <Text\n as=\"div\"\n size=\"1\"\n weight=\"medium\"\n w=\"full\"\n maxWidth=\"40\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {debugState.forcedGuideKey}\n </Text>\n\n <Button\n onClick={handleExit}\n size=\"1\"\n variant=\"soft\"\n trailingIcon={{ icon: Undo2, \"aria-hidden\": true }}\n >\n Exit\n </Button>\n\n <Button\n onClick={handleToggleCollapse}\n size=\"1\"\n variant=\"soft\"\n leadingIcon={{ icon: Minimize2, alt: \"Collapse guide toolbar\" }}\n />\n </Stack>\n </Stack>\n );\n};\n"],"names":["V1","isCollapsed","setIsCollapsed","useState","client","useGuideContext","debugState","useStore","store","state","debug","forcedGuideKey","handleExit","exitDebugMode","handleToggleCollapse","React","KnockButton","Stack","zIndex","TOOLBAR_Z_INDEX","Tag","icon","Wrench","Text","overflow","textOverflow","whiteSpace","Button","Undo2","Minimize2","alt"],"mappings":"6bAYaA,EAAKA,IAAM,CACtB,KAAM,CAACC,EAAaC,CAAc,EAAIC,EAAAA,SAAS,EAAK,EAE9C,CAAEC,OAAAA,GAAWC,kBAAgB,EAC7BC,EAAaC,EAAAA,SAASH,EAAOI,MAAQC,GAAUA,EAAMC,KAAK,EAE5D,GAAA,EAACJ,GAAAA,MAAAA,EAAYK,gBACR,OAAA,KAGT,MAAMC,EAAaA,IAAM,CACvBR,EAAOS,cAAc,CACvB,EAEMC,EAAuBA,IAAM,CACjCZ,EAAe,CAACD,CAAW,CAC7B,EAEA,OAAIA,EACKc,EAAAA,QAAA,cAACC,EAAAA,YAAY,CAAA,QAASF,CAAwB,CAAA,EAIrDC,EAAA,QAAA,cAACE,EACC,MAAA,CAAA,IAAI,IACJ,MAAM,SACN,SAAS,QACT,IAAI,IACJ,MAAM,IACN,gBAAgB,YAChB,GAAG,YACH,OAAO,IACP,QAAQ,IACR,GAAG,IACH,GAAG,IACH,uBAAqB,OACrB,MAAO,CAAEC,OAAQC,EAAAA,eAAAA,GAEjBJ,EAAAA,QAAA,cAACE,EAAM,MAAA,CAAA,IAAI,IAAI,MAAM,SAAS,UAAU,KAAA,0BACrCG,MACC,CAAA,MAAM,QACN,QAAQ,OACR,KAAM,CAAEC,KAAMC,EAAAA,OAAQ,cAAe,EAAA,CAAO,EAAA,OAG9C,EAEAP,EAAA,QAAA,cAACQ,QACC,GAAG,MACH,KAAK,IACL,OAAO,SACP,EAAE,OACF,SAAS,KACT,MAAO,CACLC,SAAU,SACVC,aAAc,WACdC,WAAY,QAGbpB,CAAAA,EAAAA,EAAWK,cACd,EAECI,EAAA,QAAA,cAAAY,EAAA,OAAA,CACC,QAASf,EACT,KAAK,IACL,QAAQ,OACR,aAAc,CAAES,KAAMO,EAAAA,MAAO,cAAe,EAAK,CAAA,EAAE,MAGrD,EAECb,UAAA,cAAAY,EAAAA,OAAA,CACC,QAASb,EACT,KAAK,IACL,QAAQ,OACR,YAAa,CAAEO,KAAMQ,EAAAA,UAAWC,IAAK,wBAAyB,CAAA,CAAE,CAEpE,CACF,CAEJ"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@knocklabs/react-core"),r=require("@telegraph/layout"),a=require("@telegraph/typography"),m=require("lucide-react"),u=require("react");function d(t){if(t&&typeof t=="object"&&"default"in t)return t;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const c=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,c.get?c:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const e=d(u),p=()=>{const{client:t}=s.useGuideContext(),[n,o]=e.useState(!1),c=s.useStore(t.store,l=>l.guideGroups[0]),i=(c==null?void 0:c.display_interval)??null;return e.createElement(r.Stack,{direction:"column",borderTop:"px"},e.createElement(r.Stack,{h:"5",px:"2",bg:"gray-3",align:"center",gap:"1",style:{cursor:"pointer"},onClick:()=>o(l=>!l)},e.createElement(a.Text,{as:"span",size:"0",weight:"medium"},"Details"),n?e.createElement(m.ChevronDown,{size:12}):e.createElement(m.ChevronRight,{size:12})),n&&e.createElement(r.Stack,{direction:"column"},e.createElement(r.Stack,{direction:"column",gap:"0_5",py:"1",px:"2",borderTop:"px"},e.createElement(a.Text,{as:"span",size:"0",weight:"medium"},"Throttle"),e.createElement(a.Text,{as:"code",size:"0"},i===null?"-":`Every ${i}s`)),e.createElement(r.Stack,{direction:"column",py:"1",px:"2",borderTop:"px"},e.createElement(a.Text,{as:"span",size:"0",weight:"medium"},"Target params"),e.createElement(r.Stack,{direction:"column",gap:"0_5",mt:"1"},e.createElement(a.Text,{as:"span",size:"0",color:"gray"},"Tenant"),e.createElement(a.Text,{as:"code",size:"0"},t.targetParams.tenant?e.createElement(r.Box,{rounded:"2",overflow:"auto",backgroundColor:"gray-2",border:"px",style:{maxHeight:"200px"}},e.createElement("pre",{style:{fontSize:"11px",margin:0}},e.createElement("code",null,t.targetParams.tenant))):e.createElement(a.Text,{as:"code",size:"0"},"-"))),e.createElement(r.Stack,{direction:"column",gap:"0_5"},e.createElement(a.Text,{as:"span",size:"0",color:"gray"},"Data"),t.targetParams.data?e.createElement(r.Box,{rounded:"2",overflow:"auto",backgroundColor:"gray-2",border:"px",style:{maxHeight:"200px"}},e.createElement("pre",{style:{fontSize:"11px",margin:0}},e.createElement("code",null,JSON.stringify(t.targetParams.data,null,2)))):e.createElement(a.Text,{as:"code",size:"0"},"-")))))};exports.GuideContextDetails=p;
2
+ //# sourceMappingURL=GuideContextDetails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GuideContextDetails.js","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/GuideContextDetails.tsx"],"sourcesContent":["import { useGuideContext, useStore } from \"@knocklabs/react-core\";\nimport { Box, Stack } from \"@telegraph/layout\";\nimport { Text } from \"@telegraph/typography\";\nimport { ChevronDown, ChevronRight } from \"lucide-react\";\nimport * as React from \"react\";\n\nexport const GuideContextDetails = () => {\n const { client } = useGuideContext();\n const [isExpanded, setIsExpanded] = React.useState(false);\n\n const defaultGroup = useStore(client.store, (state) => state.guideGroups[0]);\n const displayInterval = defaultGroup?.display_interval ?? null;\n\n return (\n <Stack direction=\"column\" borderTop=\"px\">\n <Stack\n h=\"5\"\n px=\"2\"\n bg=\"gray-3\"\n align=\"center\"\n gap=\"1\"\n style={{ cursor: \"pointer\" }}\n onClick={() => setIsExpanded((prev) => !prev)}\n >\n <Text as=\"span\" size=\"0\" weight=\"medium\">\n Details\n </Text>\n {isExpanded ? <ChevronDown size={12} /> : <ChevronRight size={12} />}\n </Stack>\n\n {isExpanded && (\n <Stack direction=\"column\">\n <Stack direction=\"column\" gap=\"0_5\" py=\"1\" px=\"2\" borderTop=\"px\">\n <Text as=\"span\" size=\"0\" weight=\"medium\">\n Throttle\n </Text>\n <Text as=\"code\" size=\"0\">\n {displayInterval === null ? \"-\" : `Every ${displayInterval}s`}\n </Text>\n </Stack>\n\n <Stack direction=\"column\" py=\"1\" px=\"2\" borderTop=\"px\">\n <Text as=\"span\" size=\"0\" weight=\"medium\">\n Target params\n </Text>\n <Stack direction=\"column\" gap=\"0_5\" mt=\"1\">\n <Text as=\"span\" size=\"0\" color=\"gray\">\n Tenant\n </Text>\n <Text as=\"code\" size=\"0\">\n {client.targetParams.tenant ? (\n <Box\n rounded=\"2\"\n overflow=\"auto\"\n backgroundColor=\"gray-2\"\n border=\"px\"\n style={{ maxHeight: \"200px\" }}\n >\n <pre style={{ fontSize: \"11px\", margin: 0 }}>\n <code>{client.targetParams.tenant}</code>\n </pre>\n </Box>\n ) : (\n <Text as=\"code\" size=\"0\">\n -\n </Text>\n )}\n </Text>\n </Stack>\n\n <Stack direction=\"column\" gap=\"0_5\">\n <Text as=\"span\" size=\"0\" color=\"gray\">\n Data\n </Text>\n {client.targetParams.data ? (\n <Box\n rounded=\"2\"\n overflow=\"auto\"\n backgroundColor=\"gray-2\"\n border=\"px\"\n style={{ maxHeight: \"200px\" }}\n >\n <pre style={{ fontSize: \"11px\", margin: 0 }}>\n <code>\n {JSON.stringify(client.targetParams.data, null, 2)}\n </code>\n </pre>\n </Box>\n ) : (\n <Text as=\"code\" size=\"0\">\n -\n </Text>\n )}\n </Stack>\n </Stack>\n </Stack>\n )}\n </Stack>\n );\n};\n"],"names":["GuideContextDetails","client","useGuideContext","isExpanded","setIsExpanded","React","useState","defaultGroup","useStore","store","state","guideGroups","displayInterval","display_interval","Stack","cursor","prev","Text","ChevronDown","ChevronRight","targetParams","tenant","Box","maxHeight","fontSize","margin","data","JSON","stringify"],"mappings":"mjBAMaA,EAAsBA,IAAM,CACjC,KAAA,CAAEC,OAAAA,GAAWC,kBAAgB,EAC7B,CAACC,EAAYC,CAAa,EAAIC,EAAMC,SAAS,EAAK,EAElDC,EAAeC,WAASP,EAAOQ,SAAkBC,EAAMC,YAAY,CAAC,CAAC,EACrEC,GAAkBL,GAAAA,YAAAA,EAAcM,mBAAoB,KAE1D,uBACGC,EAAM,MAAA,CAAA,UAAU,SAAS,UAAU,IAAA,kBACjCA,EAAAA,MACC,CAAA,EAAE,IACF,GAAG,IACH,GAAG,SACH,MAAM,SACN,IAAI,IACJ,MAAO,CAAEC,OAAQ,SAAA,EACjB,QAAS,IAAMX,EAAwBY,GAAA,CAACA,CAAI,CAAA,EAE3CX,EAAA,cAAAY,EAAA,KAAA,CAAK,GAAG,OAAO,KAAK,IAAI,OAAO,UAAQ,SAExC,EACCd,EAAaE,EAAA,cAACa,EAAAA,YAAY,CAAA,KAAM,EAAM,CAAA,EAAIb,EAAA,cAAAc,EAAA,aAAA,CAAa,KAAM,EAAA,CAAM,CACtE,EAEChB,GACEE,EAAA,cAAAS,EAAAA,MAAA,CAAM,UAAU,QAAA,EACdT,EAAA,cAAAS,QAAA,CAAM,UAAU,SAAS,IAAI,MAAM,GAAG,IAAI,GAAG,IAAI,UAAU,IAAA,EACzDT,EAAA,cAAAY,EAAAA,KAAA,CAAK,GAAG,OAAO,KAAK,IAAI,OAAO,Q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AAQ,CAAE,CAAA,EACvCpB,EAAA,cAAA,OAAA,KACEsB,KAAKC,UAAU3B,EAAOmB,aAAaM,KAAM,KAAM,CAAC,CACnD,CACF,CACF,EAEArB,EAAA,cAACY,EAAAA,KAAK,CAAA,GAAG,OAAO,KAAK,KAAG,GAExB,CAEJ,CACF,CACF,CAEJ,CAEJ"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@radix-ui/react-hover-card"),c=require("@telegraph/layout"),s=require("react"),d=require("./useInspectGuideClientStore.js");function l(e){if(e&&typeof e=="object"&&"default"in e)return e;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const o=l(u),t=l(s),f=({children:e,guide:r})=>{if(d.isUnknownGuide(r))return t.createElement(c.Stack,{align:"center"},e);const{annotation:n,activation_location_rules:a,priority:p,...i}=r;return t.createElement(o.Root,null,t.createElement(o.Trigger,null,t.createElement(c.Stack,{align:"center"},e)),t.createElement(o.Portal,null,t.createElement(o.Content,{sideOffset:16,side:"left"},t.createElement(c.Box,{px:"2",shadow:"2",rounded:"3",border:"px",overflow:"auto",backgroundColor:"surface-2",style:{width:"450px",maxHeight:"600px"}},t.createElement("pre",{style:{fontSize:"11px"}},t.createElement("code",null,JSON.stringify(i,null,2)))),t.createElement(o.Arrow,null))))};exports.GuideHoverCard=f;
2
+ //# sourceMappingURL=GuideHoverCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GuideHoverCard.js","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/GuideHoverCard.tsx"],"sourcesContent":["import * as HoverCard from \"@radix-ui/react-hover-card\";\nimport { Box, Stack } from \"@telegraph/layout\";\nimport * as React from \"react\";\n\nimport {\n AnnotatedGuide,\n UnknownGuide,\n isUnknownGuide,\n} from \"./useInspectGuideClientStore\";\n\ntype Props = {\n guide: AnnotatedGuide | UnknownGuide;\n};\n\nexport const GuideHoverCard = ({\n children,\n guide,\n}: React.PropsWithChildren<Props>) => {\n if (isUnknownGuide(guide)) {\n return <Stack align=\"center\">{children}</Stack>;\n }\n\n // Prune out internal or legacy fields.\n const {\n annotation: _annotation,\n activation_location_rules: _activation_location_rules,\n priority: _priority,\n ...rest\n } = guide;\n\n return (\n <HoverCard.Root>\n <HoverCard.Trigger>\n <Stack align=\"center\">{children}</Stack>\n </HoverCard.Trigger>\n <HoverCard.Portal>\n <HoverCard.Content sideOffset={16} side=\"left\">\n <Box\n px=\"2\"\n shadow=\"2\"\n rounded=\"3\"\n border=\"px\"\n overflow=\"auto\"\n backgroundColor=\"surface-2\"\n style={{\n width: \"450px\",\n maxHeight: \"600px\",\n }}\n >\n <pre\n style={{\n fontSize: \"11px\",\n }}\n >\n <code>{JSON.stringify(rest, null, 2)}</code>\n </pre>\n </Box>\n <HoverCard.Arrow />\n </HoverCard.Content>\n </HoverCard.Portal>\n </HoverCard.Root>\n );\n};\n"],"names":["GuideHoverCard","children","guide","isUnknownGuide","React","Stack","annotation","_annotation","activation_location_rules","_activation_location_rules","priority","_priority","rest","HoverCard","Box","width","maxHeight","fontSize","JSON","stringify"],"mappings":"+iBAcaA,EAAiBA,CAAC,CAC7BC,SAAAA,EACAC,MAAAA,CAC8B,IAAM,CAChCC,GAAAA,EAAAA,eAAeD,CAAK,EACtB,OAAQE,EAAA,cAAAC,EAAA,MAAA,CAAM,MAAM,QAAA,EAAUJ,CAAS,EAInC,KAAA,CACJK,WAAYC,EACZC,0BAA2BC,EAC3BC,SAAUC,EACV,GAAGC,CAAAA,EACDV,EAEJ,uBACGW,EAAU,KAAV,KACET,EAAA,cAAAS,EAAU,QAAV,KACCT,EAAA,cAACC,EAAAA,MAAM,CAAA,MAAM,UAAUJ,CAAS,CAClC,EACCG,EAAA,cAAAS,EAAU,OAAV,KACCT,EAAA,cAACS,EAAU,QAAV,CAAkB,WAAY,GAAI,KAAK,QACtCT,EAAA,cAACU,OACC,GAAG,IACH,OAAO,IACP,QAAQ,IACR,OAAO,KACP,SAAS,OACT,gBAAgB,YAChB,MAAO,CACLC,MAAO,QACPC,UAAW,OACb,CAAA,EAECZ,EAAA,cAAA,MAAA,CACC,MAAO,CACLa,SAAU,MAAA,GAGXb,EAAA,cAAA,OAAA,KAAMc,KAAKC,UAAUP,EAAM,KAAM,CAAC,CAAE,CACvC,CACF,EACCR,EAAA,cAAAS,EAAU,MAAV,IAAe,CAClB,CACF,CACF,CAEJ"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@telegraph/button"),a=require("@telegraph/layout"),u=require("@telegraph/tag"),i=require("@telegraph/tooltip"),d=require("@telegraph/typography"),n=require("lucide-react"),p=require("react"),b=require("./GuideHoverCard.js"),c=require("./useInspectGuideClientStore.js");function m(e){if(e&&typeof e=="object"&&"default"in e)return e;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const s=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(r,l,s.get?s:{enumerable:!0,get:()=>e[l]})}}return r.default=e,Object.freeze(r)}const t=m(p),h=({children:e})=>t.createElement(a.Stack,{h:"7",px:"2",borderTop:"px",justify:"space-between",align:"center"},e),g=({guide:e,orderIndex:r})=>t.createElement(h,null,t.createElement(b.GuideHoverCard,{guide:e},t.createElement(a.Stack,{h:"6",justify:"flex-start",align:"center",gap:"2"},t.createElement(u.Tag,{size:"0",variant:"soft",color:e.bypass_global_group_limit?"blue":"default"},r+1),t.createElement(d.Text,{as:"code",size:"1"},e.key))),t.createElement(a.Stack,{justify:"flex-end"},!c.isUnknownGuide(e)&&t.createElement(t.Fragment,null,t.createElement(a.Stack,{gap:"1"},t.createElement(i.Tooltip,{label:e.annotation.selectable.status==="returned"?"This guide was queried and can display":e.annotation.selectable.status==="queried"?"This guide was queried but cannot display":e.annotation.selectable.status==="throttled"?"This guide was queried and can display but is throttled currently":"No component is present in the current location to display this guide"},t.createElement(o.Button,{px:"1",size:"1",variant:"soft",color:e.annotation.selectable.status==="returned"?"green":e.annotation.selectable.status==="queried"?"gray":e.annotation.selectable.status==="throttled"?"yellow":"red",leadingIcon:{icon:n.Code2,alt:"Render"}})),t.createElement(i.Tooltip,{label:e.annotation.activatable.status?"This guide can be activated at the current location":"This guide cannot be activated at the current location"},t.createElement(o.Button,{px:"1",size:"1",variant:"soft",color:e.annotation.activatable.status?"green":"red",leadingIcon:{icon:n.LocateFixed,alt:"Target"}}))),t.createElement(a.Stack,{px:"2",align:"center"},t.createElement(a.Box,{h:"3",borderLeft:"px",borderColor:"gray-6"}))),t.createElement(a.Stack,{gap:"1"},!c.isUnknownGuide(e)&&t.createElement(t.Fragment,null,t.createElement(i.Tooltip,{label:e.annotation.targetable.status?"This user is being targeted":e.annotation.targetable.message},t.createElement(o.Button,{px:"1",size:"1",variant:"soft",color:e.annotation.targetable.status?"green":"red",leadingIcon:{icon:n.UserCircle2,alt:"Target"}})),t.createElement(i.Tooltip,{label:e.annotation.archived.status?"User has already dismissed this guide":"User has not dismissed this guide"},t.createElement(o.Button,{px:"1",size:"1",variant:"soft",color:e.annotation.archived.status?"red":"green",leadingIcon:{icon:n.Eye,alt:"Not archived"}}))),t.createElement(i.Tooltip,{label:c.isUnknownGuide(e)?"This guide has never been committed and published yet":e.active?"This guide is active":"This guide is not active"},t.createElement(o.Button,{px:"1",size:"1",variant:"soft",color:e.active?"green":"red",leadingIcon:e.active?{icon:n.CheckCircle2,alt:"Active"}:{icon:n.CircleDashed,alt:"Inactive"}})))));exports.GuideRow=g;
2
+ //# sourceMappingURL=GuideRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GuideRow.js","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/GuideRow.tsx"],"sourcesContent":["import { Button } from \"@telegraph/button\";\nimport { Box, Stack } from \"@telegraph/layout\";\nimport { Tag } from \"@telegraph/tag\";\nimport { Tooltip } from \"@telegraph/tooltip\";\nimport { Text } from \"@telegraph/typography\";\nimport {\n CheckCircle2,\n CircleDashed,\n Code2,\n Eye,\n LocateFixed,\n UserCircle2,\n} from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { GuideHoverCard } from \"./GuideHoverCard\";\nimport {\n AnnotatedGuide,\n UnknownGuide,\n isUnknownGuide,\n} from \"./useInspectGuideClientStore\";\n\nconst Row = ({ children }: React.PropsWithChildren) => (\n <Stack h=\"7\" px=\"2\" borderTop=\"px\" justify=\"space-between\" align=\"center\">\n {children}\n </Stack>\n);\n\ntype Props = {\n guide: UnknownGuide | AnnotatedGuide;\n orderIndex: number;\n};\n\nexport const GuideRow = ({ guide, orderIndex }: Props) => {\n return (\n <Row>\n <GuideHoverCard guide={guide}>\n <Stack h=\"6\" justify=\"flex-start\" align=\"center\" gap=\"2\">\n <Tag\n size=\"0\"\n variant=\"soft\"\n color={guide.bypass_global_group_limit ? \"blue\" : \"default\"}\n >\n {orderIndex + 1}\n </Tag>\n <Text as=\"code\" size=\"1\">\n {guide.key}\n </Text>\n </Stack>\n </GuideHoverCard>\n\n <Stack justify=\"flex-end\">\n {!isUnknownGuide(guide) && (\n <>\n <Stack gap=\"1\">\n <Tooltip\n label={\n guide.annotation.selectable.status === \"returned\"\n ? \"This guide was queried and can display\"\n : guide.annotation.selectable.status === \"queried\"\n ? \"This guide was queried but cannot display\"\n : guide.annotation.selectable.status === \"throttled\"\n ? \"This guide was queried and can display but is throttled currently\"\n : \"No component is present in the current location to display this guide\"\n }\n >\n <Button\n px=\"1\"\n size=\"1\"\n variant=\"soft\"\n color={\n guide.annotation.selectable.status === \"returned\"\n ? \"green\"\n : guide.annotation.selectable.status === \"queried\"\n ? \"gray\"\n : guide.annotation.selectable.status === \"throttled\"\n ? \"yellow\"\n : \"red\"\n }\n leadingIcon={{ icon: Code2, alt: \"Render\" }}\n />\n </Tooltip>\n <Tooltip\n label={\n guide.annotation.activatable.status\n ? \"This guide can be activated at the current location\"\n : \"This guide cannot be activated at the current location\"\n }\n >\n <Button\n px=\"1\"\n size=\"1\"\n variant=\"soft\"\n color={guide.annotation.activatable.status ? \"green\" : \"red\"}\n leadingIcon={{ icon: LocateFixed, alt: \"Target\" }}\n />\n </Tooltip>\n </Stack>\n <Stack px=\"2\" align=\"center\">\n <Box h=\"3\" borderLeft=\"px\" borderColor=\"gray-6\" />\n </Stack>\n </>\n )}\n <Stack gap=\"1\">\n {!isUnknownGuide(guide) && (\n <>\n <Tooltip\n label={\n guide.annotation.targetable.status\n ? \"This user is being targeted\"\n : guide.annotation.targetable.message\n }\n >\n <Button\n px=\"1\"\n size=\"1\"\n variant=\"soft\"\n color={guide.annotation.targetable.status ? \"green\" : \"red\"}\n leadingIcon={{ icon: UserCircle2, alt: \"Target\" }}\n />\n </Tooltip>\n <Tooltip\n label={\n guide.annotation.archived.status\n ? \"User has already dismissed this guide\"\n : \"User has not dismissed this guide\"\n }\n >\n <Button\n px=\"1\"\n size=\"1\"\n variant=\"soft\"\n color={guide.annotation.archived.status ? \"red\" : \"green\"}\n leadingIcon={{ icon: Eye, alt: \"Not archived\" }}\n />\n </Tooltip>\n </>\n )}\n <Tooltip\n label={\n isUnknownGuide(guide)\n ? \"This guide has never been committed and published yet\"\n : !guide.active\n ? \"This guide is not active\"\n : \"This guide is active\"\n }\n >\n <Button\n px=\"1\"\n size=\"1\"\n variant=\"soft\"\n color={guide.active ? \"green\" : \"red\"}\n leadingIcon={\n guide.active\n ? { icon: CheckCircle2, alt: \"Active\" }\n : { icon: CircleDashed, alt: \"Inactive\" }\n }\n />\n </Tooltip>\n </Stack>\n </Stack>\n </Row>\n );\n};\n"],"names":["Row","children","React","Stack","GuideRow","guide","orderIndex","GuideHoverCard","Tag","bypass_global_group_limit","Text","key","isUnknownGuide","Tooltip","annotation","selectable","status","Button","icon","Code2","alt","activatable","LocateFixed","Box","targetable","message","UserCircle2","archived","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R,MAAOZ,EAAMwB,OAAS,QAAU,MAChC,YACExB,EAAMwB,OACF,CAAEX,KAAMY,EAAAA,aAAcV,IAAK,QAAA,EAC3B,CAAEF,KAAMa,EAAAA,aAAcX,IAAK,UAAA,CAChC,CAAA,CAEL,CACF,CACF,CACF"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),t=require("@telegraph/select"),s=require("../shared.js"),u=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},l=u(n),o=({value:e,onChange:a})=>l.default.createElement(t.Select.Root,{size:"1",value:e,onValueChange:i=>{i&&a(i)},contentProps:{style:{zIndex:s.TOOLBAR_Z_INDEX}}},l.default.createElement(t.Select.Option,{size:"1",value:"only-displaying"},"Displaying on current page"),l.default.createElement(t.Select.Option,{size:"1",value:"only-displayable"},"Displayable on current page"),l.default.createElement(t.Select.Option,{size:"1",value:"all-eligible"},"All eligible guides for user"),l.default.createElement(t.Select.Option,{size:"1",value:"all-guides"},"All existing guides"));exports.GuidesListDisplaySelect=o;
2
+ //# sourceMappingURL=GuidesListDisplaySelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GuidesListDisplaySelect.js","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/GuidesListDisplaySelect.tsx"],"sourcesContent":["import { Select } from \"@telegraph/select\";\n\nimport { TOOLBAR_Z_INDEX } from \"../shared\";\n\nexport type DisplayOption =\n | \"only-displaying\"\n | \"only-displayable\"\n | \"all-eligible\"\n | \"all-guides\";\n\ntype Props = {\n value: DisplayOption;\n onChange: (option: DisplayOption) => void;\n};\n\nexport const GuidesListDisplaySelect = ({ value, onChange }: Props) => {\n return (\n <Select.Root\n size=\"1\"\n value={value}\n onValueChange={(value) => {\n if (!value) return;\n onChange(value as DisplayOption);\n }}\n contentProps={{\n style: { zIndex: TOOLBAR_Z_INDEX },\n }}\n >\n <Select.Option size=\"1\" value=\"only-displaying\">\n Displaying on current page\n </Select.Option>\n <Select.Option size=\"1\" value=\"only-displayable\">\n Displayable on current page\n </Select.Option>\n <Select.Option size=\"1\" value=\"all-eligible\">\n All eligible guides for user\n </Select.Option>\n <Select.Option size=\"1\" value=\"all-guides\">\n All existing guides\n </Select.Option>\n </Select.Root>\n );\n};\n"],"names":["GuidesListDisplaySelect","value","onChange","React","Select","style","zIndex","TOOLBAR_Z_INDEX"],"mappings":"iOAeaA,EAA0BA,CAAC,CAAEC,MAAAA,EAAOC,SAAAA,CAAgB,IAE7DC,UAAA,cAACC,SAAO,KAAP,CACC,KAAK,IACL,MAAAH,EACA,cAAgBA,GAAU,CACnBA,GACLC,EAASD,CAAsB,GAEjC,aAAc,CACZI,MAAO,CAAEC,OAAQC,EAAAA,eAAAA,CAAgB,GAGlCJ,EAAAA,QAAA,cAAAC,SAAO,OAAP,CAAc,KAAK,IAAI,MAAM,iBAAA,EAAiB,4BAE/C,0BACCA,EAAAA,OAAO,OAAP,CAAc,KAAK,IAAI,MAAM,oBAAkB,6BAEhD,EACAD,UAAA,cAACC,SAAO,OAAP,CAAc,KAAK,IAAI,MAAM,gBAAc,8BAE5C,EACCD,EAAAA,QAAA,cAAAC,SAAO,OAAP,CAAc,KAAK,IAAI,MAAM,cAAY,qBAE1C,CACF"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("@knocklabs/react-core"),d=require("@telegraph/button"),n=require("@telegraph/layout"),f=require("lucide-react"),b=require("react"),y=require("../KnockButton.js"),m=require("../shared.js");;/* empty css */const E=require("./GuideContextDetails.js"),g=require("./GuideRow.js"),x=require("./GuidesListDisplaySelect.js"),C=require("./helpers.js"),q=require("./useInspectGuideClientStore.js"),S=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},e=S(b),D=({guides:t,displayOption:i})=>t.map((r,u)=>{const{isEligible:o,isQualified:s,selectable:a}=r.annotation,l=o&&s,c=l&&a.status==="returned";return i==="only-displaying"&&!c||i==="only-displayable"&&!l||i==="all-eligible"&&!o?null:e.default.createElement(g.GuideRow,{key:r.key,guide:r,orderIndex:u})}),k=()=>{const{client:t}=p.useGuideContext(),[i,r]=e.default.useState("only-displayable"),[u,o]=e.default.useState(C.detectToolbarParam()),[s,a]=e.default.useState(!0);e.default.useEffect(()=>{if(u)return t.setDebug(),()=>{t.unsetDebug()}},[u,t]);const l=q.useInspectGuideClientStore();return l?e.default.createElement(n.Box,{position:"fixed",top:"4",right:"4",style:{zIndex:m.TOOLBAR_Z_INDEX}},s?e.default.createElement(y.KnockButton,{onClick:()=>a(!1)}):e.default.createElement(n.Stack,{direction:"column",backgroundColor:"surface-2",shadow:"2",rounded:"3",border:"px",overflow:"hidden",style:{width:"400px"}},e.default.createElement(n.Stack,{w:"full",p:"2",justify:"space-between",direction:"row",style:{boxSizing:"border-box"}},e.default.createElement(n.Box,{style:{width:"220px"}},e.default.createElement(x.GuidesListDisplaySelect,{value:i,onChange:c=>r(c)})),e.default.createElement(n.Stack,{gap:"2"},e.default.createElement(d.Button,{onClick:()=>o(!1),size:"1",variant:"soft",trailingIcon:{icon:f.Undo2,"aria-hidden":!0}},"Exit"),e.default.createElement(d.Button,{onClick:()=>a(!0),size:"1",variant:"soft",leadingIcon:{icon:f.Minimize2,alt:"Collapse guide toolbar"}}))),e.default.createElement(n.Box,{w:"full"},l.error&&e.default.createElement(n.Box,null,l.error),e.default.createElement(E.GuideContextDetails,null),e.default.createElement(D,{guides:l.guides,displayOption:i})))):null};exports.V2=k;
2
+ //# sourceMappingURL=V2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V2.js","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/V2.tsx"],"sourcesContent":["import { useGuideContext } from \"@knocklabs/react-core\";\nimport { Button } from \"@telegraph/button\";\nimport { Box, Stack } from \"@telegraph/layout\";\nimport { Minimize2, Undo2 } from \"lucide-react\";\nimport React from \"react\";\n\nimport { KnockButton } from \"../KnockButton\";\nimport { TOOLBAR_Z_INDEX } from \"../shared\";\nimport \"../styles.css\";\n\nimport { GuideContextDetails } from \"./GuideContextDetails\";\nimport { GuideRow } from \"./GuideRow\";\nimport {\n DisplayOption,\n GuidesListDisplaySelect,\n} from \"./GuidesListDisplaySelect\";\nimport { detectToolbarParam } from \"./helpers\";\nimport {\n InspectionResult,\n useInspectGuideClientStore,\n} from \"./useInspectGuideClientStore\";\n\nconst GuidesList = ({\n guides,\n displayOption,\n}: {\n guides: InspectionResult[\"guides\"];\n displayOption: DisplayOption;\n}) => {\n return guides.map((guide, idx) => {\n const { isEligible, isQualified, selectable } = guide.annotation;\n const isDisplayable = isEligible && isQualified;\n const isDisplaying = isDisplayable && selectable.status === \"returned\";\n\n if (displayOption === \"only-displaying\" && !isDisplaying) {\n return null;\n }\n if (displayOption === \"only-displayable\" && !isDisplayable) {\n return null;\n }\n if (displayOption === \"all-eligible\" && !isEligible) {\n return null;\n }\n\n return <GuideRow key={guide.key} guide={guide} orderIndex={idx} />;\n });\n};\n\nexport const V2 = () => {\n const { client } = useGuideContext();\n\n const [guidesListDisplayOption, setGuidesListDisplayOption] =\n React.useState<DisplayOption>(\"only-displayable\");\n\n const [isVisible, setIsVisible] = React.useState(detectToolbarParam());\n const [isCollapsed, setIsCollapsed] = React.useState(true);\n\n React.useEffect(() => {\n if (!isVisible) {\n return;\n }\n\n client.setDebug();\n\n return () => {\n client.unsetDebug();\n };\n }, [isVisible, client]);\n\n const result = useInspectGuideClientStore();\n if (!result) {\n return null;\n }\n\n return (\n <Box position=\"fixed\" top=\"4\" right=\"4\" style={{ zIndex: TOOLBAR_Z_INDEX }}>\n {isCollapsed ? (\n <KnockButton onClick={() => setIsCollapsed(false)} />\n ) : (\n <Stack\n direction=\"column\"\n backgroundColor=\"surface-2\"\n shadow=\"2\"\n rounded=\"3\"\n border=\"px\"\n overflow=\"hidden\"\n style={{ width: \"400px\" }}\n >\n <Stack\n w=\"full\"\n p=\"2\"\n justify=\"space-between\"\n direction=\"row\"\n style={{ boxSizing: \"border-box\" }}\n >\n <Box style={{ width: \"220px\" }}>\n <GuidesListDisplaySelect\n value={guidesListDisplayOption}\n onChange={(opt) => setGuidesListDisplayOption(opt)}\n />\n </Box>\n\n <Stack gap=\"2\">\n <Button\n onClick={() => setIsVisible(false)}\n size=\"1\"\n variant=\"soft\"\n trailingIcon={{ icon: Undo2, \"aria-hidden\": true }}\n >\n Exit\n </Button>\n <Button\n onClick={() => setIsCollapsed(true)}\n size=\"1\"\n variant=\"soft\"\n leadingIcon={{ icon: Minimize2, alt: \"Collapse guide toolbar\" }}\n />\n </Stack>\n </Stack>\n\n <Box w=\"full\">\n {result.error && <Box>{result.error}</Box>}\n <GuideContextDetails />\n <GuidesList\n guides={result.guides}\n displayOption={guidesListDisplayOption}\n />\n </Box>\n </Stack>\n )}\n </Box>\n );\n};\n"],"names":["GuidesList","guides","displayOption","map","guide","idx","isEligible","isQualified","selectable","annotation","isDisplayable","isDisplaying","status","GuideRow","key","V2","client","useGuideContext","guidesListDisplayOption","setGuidesListDisplayOption","React","useState","isVisible","setIsVisible","detectToolbarParam","isCollapsed","setIsCollapsed","useEffect","setDebug","unsetDebug","result","useInspectGuideClientStore","Box","zIndex","TOOLBAR_Z_INDEX","KnockButton","Stack","width","boxSizing","GuidesListDisplaySelect","opt","Button","icon","Undo2","Minimize2","alt","error","GuideContextDetails"],"mappings":"gjBAsBMA,EAAaA,CAAC,CAClBC,OAAAA,EACAC,cAAAA,CAIF,IACSD,EAAOE,IAAI,CAACC,EAAOC,IAAQ,CAC1B,KAAA,CAAEC,WAAAA,EAAYC,YAAAA,EAAaC,WAAAA,GAAeJ,EAAMK,WAChDC,EAAgBJ,GAAcC,EAC9BI,EAAeD,GAAiBF,EAAWI,SAAW,WAQxDV,OANAA,IAAkB,mBAAqB,CAACS,GAGxCT,IAAkB,oBAAsB,CAACQ,GAGzCR,IAAkB,gBAAkB,CAACI,EAChC,6BAGDO,EAAS,SAAA,CAAA,IAAKT,EAAMU,IAAK,MAAAV,EAAc,WAA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ACC,CAAA,QAAS,IAAMlB,EAAa,EAAK,EACjC,KAAK,IACL,QAAQ,OACR,aAAc,CAAEmB,KAAMC,EAAAA,MAAO,cAAe,EAAA,CAAO,EAAA,MAGrD,EACAvB,EAAAA,QAAA,cAACqB,EAAAA,QACC,QAAS,IAAMf,EAAe,EAAI,EAClC,KAAK,IACL,QAAQ,OACR,YAAa,CAAEgB,KAAME,EAAAA,UAAWC,IAAK,wBAAA,CAA2B,CAAA,CAEpE,CACF,EAEAzB,EAAAA,QAAA,cAACY,EAAAA,IAAI,CAAA,EAAE,MACJF,EAAAA,EAAOgB,OAAS1B,EAAAA,QAAA,cAACY,EAAAA,IAAKF,KAAAA,EAAOgB,KAAM,EACnC1B,EAAAA,QAAA,cAAA2B,EAAAA,oBAAA,IAAmB,EACpB3B,EAAA,QAAA,cAACpB,EACC,CAAA,OAAQ8B,EAAO7B,OACf,cAAeiB,CAAAA,CAAwB,CAE3C,CACF,CAEJ,EA3DO,IA6DX"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@knocklabs/react-core");require("react");;/* empty css */require("lodash.debounce");const e=require("../../../../core/utils.js"),a="knock_guide_toolbar",o=()=>{const r=e.checkForWindow();return!r||!r.location?!1:new URLSearchParams(r.location.search).get(a)==="true"};exports.detectToolbarParam=o;
2
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/helpers.ts"],"sourcesContent":["import { checkForWindow } from \"../../../../../modules/core\";\n\n// Use this param to start Toolbar and enter into a debugging session when\n// it is present and set to true.\nconst TOOLBAR_QUERY_PARAM = \"knock_guide_toolbar\";\n\nexport const detectToolbarParam = () => {\n const win = checkForWindow();\n if (!win || !win.location) {\n return false;\n }\n\n const urlSearchParams = new URLSearchParams(win.location.search);\n const hasToolbarParam = urlSearchParams.get(TOOLBAR_QUERY_PARAM) === \"true\";\n\n return hasToolbarParam;\n};\n"],"names":["TOOLBAR_QUERY_PARAM","detectToolbarParam","win","checkForWindow","location","URLSearchParams","search","get"],"mappings":"sQAIMA,EAAsB,sBAEfC,EAAqBA,IAAM,CACtC,MAAMC,EAAMC,EAAAA,eAAe,EAC3B,MAAI,CAACD,GAAO,CAACA,EAAIE,SACR,GAGe,IAAIC,gBAAgBH,EAAIE,SAASE,MAAM,EACvBC,IAAIP,CAAmB,IAAM,MAGvE"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("@knocklabs/client"),p=require("@knocklabs/react-core"),b=e=>e.reduce((r,s)=>({...r,[s.key]:s}),{}),g=(e,r,s,n)=>{var u,t,o,a,l,c,d,f;const i=!!((a=(o=(t=(u=n.key)==null?void 0:u.one)==null?void 0:t.metadata)==null?void 0:o.opts)!=null&&a.includeThrottled)||!!((f=(d=(c=(l=n.key)==null?void 0:l.all)==null?void 0:c.metadata)==null?void 0:d.opts)!=null&&f.includeThrottled);return e.bypass_global_group_limit?"returned":e.key===s.resolved?r.throttled&&!i?"throttled":"returned":"queried"},v=(e,r,s,n)=>{var t,o,a,l;const i=!!((l=(a=(o=(t=n.type)==null?void 0:t.one)==null?void 0:o.metadata)==null?void 0:a.opts)!=null&&l.includeThrottled),u=n.type.one;if(u.size===0)return"queried";if(e.bypass_global_group_limit){const d=[...u.values()][0];return e.key!==d.key?"queried":"returned"}return e.key===s.resolved?r.throttled&&!i?"throttled":"returned":"queried"},k=(e,r,s,n)=>{var l,c,d,f;const i=n.type.all;if(i.size===0)return"queried";const u=[...i.values()],t=u[0],o=b(u);return(f=(d=(c=(l=n.type)==null?void 0:l.all)==null?void 0:c.metadata)==null?void 0:d.opts)!=null&&f.includeThrottled?o[e.key]?"returned":"queried":(t.bypass_global_group_limit||t.key===s.resolved)&&o[e.key]?r.throttled?e.bypass_global_group_limit?"returned":"throttled":"returned":"queried"},h=(e,r,s,n)=>{var i,u;if(n.key)return g(e,r,s,n);if((i=n.type)!=null&&i.all)return k(e,r,s,n);if((u=n.type)!=null&&u.one)return v(e,r,s,n)},S=(e,r,s)=>{if(!s||s.status==="open")return{status:void 0};const n={key:(s.results.key||{})[e.key],type:(s.results.type||{})[e.type]};if(!!!(n.key||n.type))return{status:void 0};const u=h(e,r,s,n);return u?{status:u,query:n}:{status:void 0}},G=e=>{switch(e.reason){case"not_in_target_audience":case"target_conditions_not_met":return{targetable:{status:!1,reason:e.reason,message:e.message}};case"marked_as_archived":return{archived:{status:!0}};case"guide_not_active":return{active:{status:!1}};default:return}},m=({active:e,targetable:r,archived:s})=>!(!e.status||!r.status||s.status),_=({activatable:e,selectable:r})=>!(!e.status||!r.status),T=(e,r,s)=>{const{ineligibleGuides:n,location:i}=r,u=n[e.key],t=u?G(u):void 0,o={active:(t==null?void 0:t.active)||{status:!0},targetable:(t==null?void 0:t.targetable)||{status:!0},archived:(t==null?void 0:t.archived)||{status:!1},activatable:{status:y.checkActivatable(e,i)},selectable:S(e,r,s)},a={...o,isEligible:m(o),isQualified:_(o)};return{...e,annotation:a}},w=e=>({__typename:"UnknownGuide",key:e,active:!1,bypass_global_group_limit:!1,annotation:{isEligible:!1,isQualified:!1,selectable:{status:void 0}}}),I=()=>{var u;const{client:e}=p.useGuideContext(),r=p.useStore(e.store,t=>{const o=y.checkStateIfThrottled(t);return{location:t.location,guides:t.guides,guideGroups:t.guideGroups,ineligibleGuides:t.ineligibleGuides,debug:t.debug,counter:t.counter,throttled:o}});if(!((u=r.debug)!=null&&u.debugging))return;const s=r.guideGroups[0];if(!s)return{error:"no_guide_group",guides:[]};const n=e.getStage();return{guides:s.display_sequence.map(t=>{const o=r.guides[t];return o?T(o,r,n):w(t)})}},q=e=>typeof e=="object"&&e!==null&&"__typename"in e&&e.__typename==="UnknownGuide";exports.isUnknownGuide=q;exports.resolveIsQualified=_;exports.useInspectGuideClientStore=I;
2
+ //# sourceMappingURL=useInspectGuideClientStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInspectGuideClientStore.js","sources":["../../../../../../../src/modules/guide/components/Toolbar/V2/useInspectGuideClientStore.ts"],"sourcesContent":["import {\n KnockGuide,\n KnockGuideClientGroupStage,\n KnockGuideClientStoreState,\n KnockGuideIneligibilityMarker,\n KnockGuideSelectionResult,\n checkActivatable,\n checkStateIfThrottled,\n} from \"@knocklabs/client\";\nimport { useGuideContext, useStore } from \"@knocklabs/react-core\";\n\nconst byKey = <T extends { key: string }>(items: T[]) => {\n return items.reduce((acc, item) => ({ ...acc, [item.key]: item }), {});\n};\n\n/**\n * This is the main module that will house core logic for the toolbar. It hooks\n * into the guide client state store, extracts relevant data for debugging, and\n * transforms it into easily consumable data for the toolbar - namely\n * \"annotating\" guides for its various statuses to display.\n */\n\n// Active: `true` status = good\ntype ActiveStatus = {\n status: boolean;\n};\n\n// Targetable: `true` status = good\ntype TargetableStatusTrue = {\n status: true;\n};\ntype TargetableStatusFalse = {\n status: false;\n reason: string;\n message: string;\n};\ntype TargetableStatus = TargetableStatusTrue | TargetableStatusFalse;\n\ntype ActivatableStatus = {\n status: boolean;\n};\n\n// Archived: `false` status = good\ntype ArchivedStatus = {\n status: boolean;\n};\n\n// Selectable:\n// - \"returned\": Queried and resolved to return the guide from useGuide(s).\n// - \"throttled\": Queried and resolved but being throttled, so not yet returned.\n// - \"queried\": Queried but not resolved, because there are other higher\n// priority guides that are ahead of this guide in the query result.\n// - undefined: Not reachable with any of the given queries and filters.\ntype SelectionResultByLimit = {\n one?: KnockGuideSelectionResult;\n all?: KnockGuideSelectionResult;\n};\ntype SelectionResultByQuery = {\n key?: SelectionResultByLimit;\n type?: SelectionResultByLimit;\n};\ntype SelectableStatusPresent = {\n status: \"returned\" | \"throttled\" | \"queried\";\n query: SelectionResultByQuery;\n};\ntype SelectableStatusAbsent = {\n status: undefined;\n};\ntype SelectableStatus = SelectableStatusPresent | SelectableStatusAbsent;\n\ntype AnnotatedStatuses = {\n // Individual eligibility statuses:\n active: ActiveStatus;\n targetable: TargetableStatus;\n archived: ArchivedStatus;\n // Individual qualified statuses:\n activatable: ActivatableStatus;\n selectable: SelectableStatus;\n};\n\ntype GuideAnnotation = AnnotatedStatuses & {\n // Resolved eligibility based on active, targetable and archived statuses,\n // which are backend driven evaluation results that are exposed for debugging.\n isEligible: boolean;\n\n // Resolved display qualification based on an activatable status, which\n // informs \"when\" and \"where\" an eligible guide can be displayed to user.\n isQualified: boolean;\n};\n\nexport type AnnotatedGuide = KnockGuide & {\n annotation: GuideAnnotation;\n\n // Legacy fields, typed only to make tsc happy when we prune these out.\n activation_location_rules?: KnockGuide[\"activation_url_patterns\"];\n priority?: number;\n};\n\n// Exists and ordered in control but absent in switchboard (therefore not\n// included in the api response), which implies a newly created guide that has\n// never been published to switchboard.\nexport type UnknownGuide = {\n __typename: \"UnknownGuide\";\n key: KnockGuide[\"key\"];\n active: false;\n bypass_global_group_limit: false;\n annotation: {\n isEligible: false;\n isQualified: false;\n selectable: {\n status: undefined;\n };\n };\n};\n\nexport type InspectionResult = {\n guides: (AnnotatedGuide | UnknownGuide)[];\n error?: \"no_guide_group\";\n};\n\ntype StoreStateSnapshot = Pick<\n KnockGuideClientStoreState,\n | \"location\"\n | \"guides\"\n | \"guideGroups\"\n | \"ineligibleGuides\"\n | \"debug\"\n | \"counter\"\n> & {\n throttled: boolean;\n};\n\nconst inferSelectByKeyReturnStatus = (\n guide: KnockGuide,\n snapshot: StoreStateSnapshot,\n stage: KnockGuideClientGroupStage,\n query: SelectionResultByQuery,\n): SelectableStatusPresent[\"status\"] => {\n const includeThrottled =\n !!query.key?.one?.metadata?.opts?.includeThrottled ||\n !!query.key?.all?.metadata?.opts?.includeThrottled;\n\n // If unthrottled, then it should always be returned.\n if (guide.bypass_global_group_limit) {\n return \"returned\";\n }\n\n // If resolved, expect this guide to be returned unless being throttled.\n if (guide.key === stage.resolved) {\n if (snapshot.throttled && !includeThrottled) {\n return \"throttled\";\n }\n return \"returned\";\n }\n\n // If queried but not resolved, it means this guide is being shadowed by\n // another guide with higher priority because throttled guides can be\n // displayed only one at a time.\n return \"queried\";\n};\n\nconst inferSelectOneByTypeReturnStatus = (\n guide: KnockGuide,\n snapshot: StoreStateSnapshot,\n stage: KnockGuideClientGroupStage,\n query: SelectionResultByQuery,\n): SelectableStatusPresent[\"status\"] => {\n const includeThrottled = !!query.type?.one?.metadata?.opts?.includeThrottled;\n\n const result = query.type!.one!;\n if (result.size === 0) {\n return \"queried\";\n }\n\n // There may be multiple unthrottled guides of the same type, being queried\n // by type to return a single guide, for example: useGuide({ type: \"card\" }).\n //\n // So it is possible for an unthrottled guide to be shadowed by another\n // unthrottled guide of the same type with higher priority, so we need to\n // look at the query result to determine its return status.\n if (guide.bypass_global_group_limit) {\n const guides = [...result.values()];\n const first = guides[0]!;\n\n if (guide.key !== first.key) {\n // Being shadowed by another guide with higher priority.\n return \"queried\";\n }\n return \"returned\";\n }\n\n // If resolved, expect this guide to be returned unless being throttled.\n if (guide.key === stage.resolved) {\n if (snapshot.throttled && !includeThrottled) {\n return \"throttled\";\n }\n return \"returned\";\n }\n\n // If queried but not resolved, it means this guide is being shadowed by\n // another guide with higher priority because throttled guides can be\n // displayed only one at a time.\n return \"queried\";\n};\n\nconst inferSelectAllByTypeReturnStatus = (\n guide: KnockGuide,\n snapshot: StoreStateSnapshot,\n stage: KnockGuideClientGroupStage,\n query: SelectionResultByQuery,\n): SelectableStatusPresent[\"status\"] => {\n const result = query.type!.all!;\n if (result.size === 0) {\n return \"queried\";\n }\n\n const guides = [...result.values()];\n const first = guides[0]!;\n\n // Might want to consider moving this up to do once.\n const guidesByKey: Record<KnockGuide[\"key\"], KnockGuide> = byKey(guides);\n\n // If includeThrottled given, then expect all selected guides to be returned.\n const includeThrottled = !!query.type?.all?.metadata?.opts?.includeThrottled;\n if (includeThrottled) {\n return guidesByKey[guide.key] ? \"returned\" : \"queried\";\n }\n\n // If the first selected guide is unthrottled or resolved, then we should\n // have at minimum one guide to return, and potentially more based on whether\n // we are throttling currently and which other guides are unthrottled.\n if (first.bypass_global_group_limit || first.key === stage.resolved) {\n if (!guidesByKey[guide.key]) {\n return \"queried\";\n }\n if (snapshot.throttled) {\n return guide.bypass_global_group_limit ? \"returned\" : \"throttled\";\n }\n return \"returned\";\n }\n\n return \"queried\";\n};\n\nconst inferSelectReturnStatus = (\n guide: KnockGuide,\n snapshot: StoreStateSnapshot,\n stage: KnockGuideClientGroupStage,\n query: SelectionResultByQuery,\n) => {\n // Querying by key can only return up to a max of one guide, regardless of\n // useGuide or useGuides, and should take precedence in status designation.\n if (query.key) {\n return inferSelectByKeyReturnStatus(guide, snapshot, stage, query);\n }\n\n if (query.type?.all) {\n return inferSelectAllByTypeReturnStatus(guide, snapshot, stage, query);\n }\n if (query.type?.one) {\n return inferSelectOneByTypeReturnStatus(guide, snapshot, stage, query);\n }\n\n // Should not happen but just for completeness.\n return undefined;\n};\n\nconst toSelectableStatus = (\n guide: KnockGuide,\n snapshot: StoreStateSnapshot,\n stage: KnockGuideClientGroupStage | undefined,\n): SelectableStatus => {\n if (!stage || stage.status === \"open\") {\n return { status: undefined };\n }\n\n const query = {\n key: (stage.results.key || {})[guide.key],\n type: (stage.results.type || {})[guide.type],\n };\n\n const queried = Boolean(query.key || query.type);\n if (!queried) {\n // No present query in the current location can select this guide.\n return { status: undefined };\n }\n\n const status = inferSelectReturnStatus(guide, snapshot, stage, query);\n if (!status) {\n return { status: undefined };\n }\n\n return { status, query };\n};\n\nconst toIneligibilityStatus = (\n marker: KnockGuideIneligibilityMarker,\n): Partial<AnnotatedStatuses> | undefined => {\n switch (marker.reason) {\n case \"not_in_target_audience\":\n case \"target_conditions_not_met\":\n return {\n targetable: {\n status: false,\n reason: marker.reason,\n message: marker.message,\n },\n };\n\n case \"marked_as_archived\":\n return {\n archived: {\n status: true,\n },\n };\n\n case \"guide_not_active\":\n return {\n active: {\n status: false,\n },\n };\n\n default:\n return undefined;\n }\n};\n\nconst resolveIsEligible = ({\n active,\n targetable,\n archived,\n}: AnnotatedStatuses) => {\n if (!active.status) return false;\n if (!targetable.status) return false;\n if (archived.status) return false;\n return true;\n};\n\nexport const resolveIsQualified = ({\n activatable,\n selectable,\n}: AnnotatedStatuses) => {\n if (!activatable.status) return false;\n if (!selectable.status) return false;\n return true;\n};\n\nconst annotateGuide = (\n guide: KnockGuide,\n snapshot: StoreStateSnapshot,\n stage: KnockGuideClientGroupStage | undefined,\n): AnnotatedGuide => {\n const { ineligibleGuides, location } = snapshot;\n const marker = ineligibleGuides[guide.key];\n const ineligiblity = marker ? toIneligibilityStatus(marker) : undefined;\n\n const statuses: AnnotatedStatuses = {\n // isEligible:\n active: ineligiblity?.active || { status: true },\n targetable: ineligiblity?.targetable || { status: true },\n archived: ineligiblity?.archived || { status: false },\n // isQualified:\n activatable: { status: checkActivatable(guide, location) },\n selectable: toSelectableStatus(guide, snapshot, stage),\n };\n\n const annotation: GuideAnnotation = {\n ...statuses,\n isEligible: resolveIsEligible(statuses),\n isQualified: resolveIsQualified(statuses),\n };\n\n return {\n ...guide,\n annotation,\n };\n};\n\nconst newUnknownGuide = (key: KnockGuide[\"key\"]) =>\n ({\n __typename: \"UnknownGuide\",\n key,\n active: false,\n bypass_global_group_limit: false,\n annotation: {\n isEligible: false,\n isQualified: false,\n selectable: {\n status: undefined,\n },\n },\n }) as UnknownGuide;\n\nexport const useInspectGuideClientStore = (): InspectionResult | undefined => {\n const { client } = useGuideContext();\n\n // Extract a snapshot of the client store state for debugging.\n const snapshot: StoreStateSnapshot = useStore(client.store, (state) => {\n const throttled = checkStateIfThrottled(state);\n\n return {\n location: state.location,\n guides: state.guides,\n guideGroups: state.guideGroups,\n ineligibleGuides: state.ineligibleGuides,\n debug: state.debug,\n counter: state.counter,\n throttled,\n };\n });\n\n // Not in debugging session, so noop.\n if (!snapshot.debug?.debugging) {\n return undefined;\n }\n\n // Only for completeness, as there should always be a default group so this\n // should never happen.\n const defaultGroup = snapshot.guideGroups[0];\n if (!defaultGroup) {\n return {\n error: \"no_guide_group\",\n guides: [],\n };\n }\n\n const groupStage = client.getStage();\n\n // Annotate guides for various eligibility, activation and query statuses\n // that are useful for debugging purposes.\n const orderedGuides = defaultGroup.display_sequence.map((guideKey) => {\n const guide = snapshot.guides[guideKey];\n if (!guide) {\n return newUnknownGuide(guideKey);\n }\n\n return annotateGuide(guide, snapshot, groupStage);\n });\n\n return {\n guides: orderedGuides,\n };\n};\n\nexport const isUnknownGuide = (input: unknown): input is UnknownGuide =>\n typeof input === \"object\" &&\n input !== null &&\n \"__typename\" in input &&\n (input as UnknownGuide).__typename === \"UnknownGuide\";\n"],"names":["byKey","items","reduce","acc","item","key","inferSelectByKeyReturnStatus","guide","snapshot","stage","query","includeThrottled","one","metadata","opts","all","bypass_global_group_limit","resolved","throttled","inferSelectOneByTypeReturnStatus","type","result","size","first","values","inferSelectAllByTypeReturnStatus","guides","guidesByKey","inferSelectReturnStatus","toSelectableStatus","status","undefined","results","Boolean","toIneligibilityStatus","marker","reason","targetable","message","archived","active","resolveIsEligible","resolveIsQualified","activatable","selectable","annotateGuide","ineligibleGuides","location","ineligiblity","statuses","checkActivatable","annotation","isEligible","isQualified","newUnknownGuide","__typename","useInspectGuideClientStore","client","useGuideContext","useStore","store","state","checkStateIfThrottled","guideGroups","debug","counter","debugging","defaultGroup","error","groupStage","getStage","display_sequence","map","guideKey","isUnknownGuide","input"],"mappings":"wJAWMA,EAAoCC,GACjCA,EAAMC,OAAO,CAACC,EAAKC,KAAU,CAAE,GAAGD,EAAK,CAACC,EAAKC,GAAG,EAAGD,CAAK,GAAI,CAAA,CAAE,EAwHjEE,EAA+BA,CACnCC,EACAC,EACAC,EACAC,IACsC,qBACtC,MAAMC,EACJ,CAAC,GAACD,GAAAA,GAAAA,GAAAA,EAAAA,EAAML,MAANK,YAAAA,EAAWE,MAAXF,YAAAA,EAAgBG,WAAhBH,YAAAA,EAA0BI,OAA1BJ,MAAAA,EAAgCC,mBAClC,CAAC,GAACD,GAAAA,GAAAA,GAAAA,EAAA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AAMf,iBACxBkB,MAAOH,EAAMG,MACbC,QAASJ,EAAMI,QACf/C,UAAAA,CACF,CAAA,CACD,EAGG,GAAA,GAACV,EAAAA,EAASwD,QAATxD,MAAAA,EAAgB0D,WACZnC,OAKHoC,MAAAA,EAAe3D,EAASuD,YAAY,CAAC,EAC3C,GAAI,CAACI,EACI,MAAA,CACLC,MAAO,iBACP1C,OAAQ,CAAA,CACV,EAGI2C,MAAAA,EAAaZ,EAAOa,SAAS,EAa5B,MAAA,CACL5C,OAVoByC,EAAaI,iBAAiBC,IAAkBC,GAAA,CAC9DlE,MAAAA,EAAQC,EAASkB,OAAO+C,CAAQ,EACtC,OAAKlE,EAIEsC,EAActC,EAAOC,EAAU6D,CAAU,EAHvCf,EAAgBmB,CAAQ,CAGe,CACjD,CAID,CACF,EAEaC,EAAkBC,GAC7B,OAAOA,GAAU,UACjBA,IAAU,MACV,eAAgBA,GACfA,EAAuBpB,aAAe"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="var(--tgph-zIndex-tooltip)";exports.TOOLBAR_Z_INDEX=t;
2
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sources":["../../../../../../src/modules/guide/components/Toolbar/shared.ts"],"sourcesContent":["// Match the hardcoded z-index value in the telegraph tooltip package for now\n// to ensure everything within a toolbar is visible.\nexport const TOOLBAR_Z_INDEX = \"var(--tgph-zIndex-tooltip)\";\n"],"names":["TOOLBAR_Z_INDEX"],"mappings":"gFAEO,MAAMA,EAAkB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@knocklabs/react-core"),u=require("react");require("../components/Banner/Banner.js");require("../components/Card/Card.js");const i=require("../components/GuideToolbar/GuideToolbar.js");require("../components/Modal/Modal.js");const c=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},r=c(u),n=({children:e,...t})=>r.default.createElement(o.KnockGuideProvider,{...t},e,r.default.createElement(i.GuideToolbar,null));exports.KnockGuideProvider=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@knocklabs/react-core"),n=require("react");require("../components/Banner/Banner.js");require("../components/Card/Card.js");const o=require("../components/Toolbar/V1/V1.js"),a=require("../components/Toolbar/V2/V2.js");require("../components/Modal/Modal.js");const i=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=i(n),l=({children:e,toolbar:r="v1",...u})=>t.default.createElement(c.KnockGuideProvider,{...u,trackDebugParams:r==="v1"},e,r==="v2"?t.default.createElement(a.V2,null):t.default.createElement(o.V1,null));exports.KnockGuideProvider=l;
2
2
  //# sourceMappingURL=KnockGuideProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"KnockGuideProvider.js","sources":["../../../../../src/modules/guide/providers/KnockGuideProvider.tsx"],"sourcesContent":["import {\n KnockGuideProvider as KnockGuideProviderCore,\n type KnockGuideProviderProps,\n} from \"@knocklabs/react-core\";\nimport React from \"react\";\n\nimport { GuideToolbar } from \"../components\";\n\n// Re-export the core KnockGuideProvider, so we can add React specific functionality\n// like the GuideToolbar component which shouldn't be included in other contexts (e.g. React Native).\nexport const KnockGuideProvider: React.FC<\n React.PropsWithChildren<KnockGuideProviderProps>\n> = ({ children, ...props }) => {\n return (\n <KnockGuideProviderCore {...props}>\n {children}\n <GuideToolbar />\n </KnockGuideProviderCore>\n );\n};\n"],"names":["KnockGuideProvider","children","props","KnockGuideProviderCore","React","GuideToolbar"],"mappings":"uYAUaA,EAETA,CAAC,CAAEC,SAAAA,EAAU,GAAGC,CAAM,4BAErBC,EAAuB,mBAAA,CAAA,GAAID,GACzBD,EACDG,UAAA,cAACC,mBAAY,CACf"}
1
+ {"version":3,"file":"KnockGuideProvider.js","sources":["../../../../../src/modules/guide/providers/KnockGuideProvider.tsx"],"sourcesContent":["import {\n KnockGuideProvider as KnockGuideProviderCore,\n type KnockGuideProviderProps,\n} from \"@knocklabs/react-core\";\nimport React from \"react\";\n\nimport { ToolbarV1, ToolbarV2 } from \"../components\";\n\ntype Props = KnockGuideProviderProps & {\n toolbar?: \"v1\" | \"v2\";\n};\n\n// Re-export the core KnockGuideProvider, so we can add React specific\n// functionality like the Toolbar component which shouldn't be included in other\n// contexts (e.g. React Native).\nexport const KnockGuideProvider: React.FC<React.PropsWithChildren<Props>> = ({\n children,\n toolbar = \"v1\",\n ...props\n}) => {\n return (\n <KnockGuideProviderCore\n {...props}\n // For backward compatibility with toolbar v1. Remove once v2 ships.\n trackDebugParams={toolbar === \"v1\"}\n >\n {children}\n {toolbar === \"v2\" ? <ToolbarV2 /> : <ToolbarV1 />}\n </KnockGuideProviderCore>\n );\n};\n"],"names":["KnockGuideProvider","children","toolbar","props","React","KnockGuideProviderCore","ToolbarV2","ToolbarV1"],"mappings":"uaAeaA,EAA+DA,CAAC,CAC3EC,SAAAA,EACAC,QAAAA,EAAU,KACV,GAAGC,CACL,IAEIC,EAAA,QAAA,cAACC,EAAA,mBAAA,CACC,GAAIF,EAEJ,iBAAkBD,IAAY,IAAA,EAE7BD,EACAC,IAAY,KAAOE,EAAA,QAAA,cAACE,EAAAA,GAAY,IAAA,0BAAIC,EAAAA,GAAY,IAAA,CACnD"}