@syntrologie/adapt-overlays 2.15.0 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/dist/chunk-VHAA22YE.js +14 -0
  2. package/dist/chunk-VHAA22YE.js.map +7 -0
  3. package/dist/runtime.d.ts +2 -1
  4. package/dist/runtime.d.ts.map +1 -1
  5. package/dist/runtime.js +2596 -354
  6. package/dist/runtime.js.map +7 -0
  7. package/dist/schema.d.ts +90 -21
  8. package/dist/schema.d.ts.map +1 -1
  9. package/dist/schema.js +440 -151
  10. package/dist/schema.js.map +7 -0
  11. package/dist/types.d.ts +1 -1
  12. package/dist/types.d.ts.map +1 -1
  13. package/package.json +5 -22
  14. package/dist/WorkflowTracker.d.ts +0 -10
  15. package/dist/WorkflowTracker.d.ts.map +0 -1
  16. package/dist/WorkflowTracker.js +0 -19
  17. package/dist/WorkflowWidget.d.ts +0 -70
  18. package/dist/WorkflowWidget.d.ts.map +0 -1
  19. package/dist/WorkflowWidget.js +0 -330
  20. package/dist/WorkflowWidgetLit.js +0 -617
  21. package/dist/cdn.d.ts +0 -35
  22. package/dist/cdn.d.ts.map +0 -1
  23. package/dist/cdn.js +0 -39
  24. package/dist/celebrations/__tests__/engine.test.js +0 -130
  25. package/dist/celebrations/__tests__/executor.test.js +0 -102
  26. package/dist/celebrations/__tests__/reduced-motion.test.js +0 -97
  27. package/dist/celebrations/effects/__tests__/confetti.test.js +0 -89
  28. package/dist/celebrations/effects/__tests__/emoji-rain.test.js +0 -88
  29. package/dist/celebrations/effects/__tests__/fireworks.test.js +0 -87
  30. package/dist/celebrations/effects/__tests__/sparkles.test.js +0 -79
  31. package/dist/celebrations/effects/confetti.js +0 -80
  32. package/dist/celebrations/effects/emoji-rain.js +0 -73
  33. package/dist/celebrations/effects/fireworks.js +0 -69
  34. package/dist/celebrations/effects/sparkles.js +0 -83
  35. package/dist/celebrations/engine.js +0 -93
  36. package/dist/celebrations/index.js +0 -73
  37. package/dist/celebrations/types.js +0 -1
  38. package/dist/editor.d.ts +0 -27
  39. package/dist/editor.d.ts.map +0 -1
  40. package/dist/editor.js +0 -22
  41. package/dist/executors/tour.js +0 -335
  42. package/dist/highlight.js +0 -180
  43. package/dist/modal.js +0 -218
  44. package/dist/overlay-editor-state.d.ts +0 -41
  45. package/dist/overlay-editor-state.d.ts.map +0 -1
  46. package/dist/overlay-editor-state.js +0 -131
  47. package/dist/overlay-editor-ui.d.ts +0 -9
  48. package/dist/overlay-editor-ui.d.ts.map +0 -1
  49. package/dist/overlay-editor-ui.js +0 -306
  50. package/dist/runtime-lit.d.ts +0 -94
  51. package/dist/runtime-lit.d.ts.map +0 -1
  52. package/dist/runtime-lit.js +0 -402
  53. package/dist/sanitizer.js +0 -84
  54. package/dist/summarize.js +0 -86
  55. package/dist/tooltip.js +0 -279
  56. package/dist/tour-types.js +0 -7
  57. package/dist/types.js +0 -7
  58. package/dist/workflow-types.js +0 -1
  59. package/node_modules/@syntro/design-system/README.md +0 -335
  60. package/node_modules/@syntro/design-system/dist/assets/syntrologie-logo.svg +0 -21
  61. package/node_modules/@syntro/design-system/dist/assets/syntrologie-logomark.svg +0 -10
  62. package/node_modules/@syntro/design-system/dist/index.d.ts +0 -8
  63. package/node_modules/@syntro/design-system/dist/index.d.ts.map +0 -1
  64. package/node_modules/@syntro/design-system/dist/index.js +0 -7
  65. package/node_modules/@syntro/design-system/dist/tailwind-preset.d.ts +0 -19
  66. package/node_modules/@syntro/design-system/dist/tailwind-preset.d.ts.map +0 -1
  67. package/node_modules/@syntro/design-system/dist/tailwind-preset.js +0 -455
  68. package/node_modules/@syntro/design-system/dist/tokens/colors.css +0 -464
  69. package/node_modules/@syntro/design-system/dist/tokens/colors.d.ts +0 -874
  70. package/node_modules/@syntro/design-system/dist/tokens/colors.d.ts.map +0 -1
  71. package/node_modules/@syntro/design-system/dist/tokens/colors.js +0 -564
  72. package/node_modules/@syntro/design-system/dist/tokens/effects.css +0 -43
  73. package/node_modules/@syntro/design-system/dist/tokens/effects.d.ts +0 -139
  74. package/node_modules/@syntro/design-system/dist/tokens/effects.d.ts.map +0 -1
  75. package/node_modules/@syntro/design-system/dist/tokens/effects.js +0 -121
  76. package/node_modules/@syntro/design-system/dist/tokens/index.d.ts +0 -12
  77. package/node_modules/@syntro/design-system/dist/tokens/index.d.ts.map +0 -1
  78. package/node_modules/@syntro/design-system/dist/tokens/index.js +0 -11
  79. package/node_modules/@syntro/design-system/dist/tokens/panel-shell.d.ts +0 -93
  80. package/node_modules/@syntro/design-system/dist/tokens/panel-shell.d.ts.map +0 -1
  81. package/node_modules/@syntro/design-system/dist/tokens/panel-shell.js +0 -72
  82. package/node_modules/@syntro/design-system/package.json +0 -55
  83. package/node_modules/@syntro/design-system/src/assets/syntrologie-logo.svg +0 -21
  84. package/node_modules/@syntro/design-system/src/assets/syntrologie-logomark.svg +0 -10
  85. package/node_modules/@syntrologie/shared-editor-ui/dist/cn.d.ts +0 -2
  86. package/node_modules/@syntrologie/shared-editor-ui/dist/cn.d.ts.map +0 -1
  87. package/node_modules/@syntrologie/shared-editor-ui/dist/cn.js +0 -3
  88. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.d.ts +0 -34
  89. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.d.ts.map +0 -1
  90. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.js +0 -161
  91. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPickerLit.d.ts +0 -84
  92. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPickerLit.d.ts.map +0 -1
  93. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPickerLit.js +0 -323
  94. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.d.ts +0 -7
  95. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.d.ts.map +0 -1
  96. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.js +0 -9
  97. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggleLit.d.ts +0 -25
  98. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggleLit.d.ts.map +0 -1
  99. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggleLit.js +0 -55
  100. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.d.ts +0 -23
  101. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.d.ts.map +0 -1
  102. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.js +0 -40
  103. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLineLit.d.ts +0 -33
  104. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLineLit.d.ts.map +0 -1
  105. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLineLit.js +0 -118
  106. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.d.ts +0 -7
  107. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.d.ts.map +0 -1
  108. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.js +0 -22
  109. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadgeLit.d.ts +0 -32
  110. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadgeLit.d.ts.map +0 -1
  111. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadgeLit.js +0 -68
  112. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.d.ts +0 -8
  113. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.d.ts.map +0 -1
  114. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.js +0 -9
  115. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSectionLit.d.ts +0 -34
  116. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSectionLit.d.ts.map +0 -1
  117. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSectionLit.js +0 -57
  118. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.d.ts +0 -7
  119. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.d.ts.map +0 -1
  120. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.js +0 -4
  121. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButtonLit.d.ts +0 -13
  122. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButtonLit.d.ts.map +0 -1
  123. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButtonLit.js +0 -31
  124. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.d.ts +0 -7
  125. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.d.ts.map +0 -1
  126. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.js +0 -4
  127. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBodyLit.d.ts +0 -7
  128. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBodyLit.d.ts.map +0 -1
  129. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBodyLit.js +0 -15
  130. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.d.ts +0 -13
  131. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.d.ts.map +0 -1
  132. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.js +0 -15
  133. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCardLit.d.ts +0 -36
  134. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCardLit.d.ts.map +0 -1
  135. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCardLit.js +0 -102
  136. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.d.ts +0 -7
  137. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.d.ts.map +0 -1
  138. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.js +0 -4
  139. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooterLit.d.ts +0 -20
  140. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooterLit.d.ts.map +0 -1
  141. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooterLit.js +0 -48
  142. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.d.ts +0 -9
  143. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.d.ts.map +0 -1
  144. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.js +0 -4
  145. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeaderLit.d.ts +0 -16
  146. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeaderLit.d.ts.map +0 -1
  147. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeaderLit.js +0 -25
  148. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.d.ts +0 -8
  149. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.d.ts.map +0 -1
  150. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.js +0 -8
  151. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInputLit.d.ts +0 -66
  152. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInputLit.d.ts.map +0 -1
  153. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInputLit.js +0 -87
  154. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.d.ts +0 -7
  155. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.d.ts.map +0 -1
  156. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.js +0 -4
  157. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayoutLit.d.ts +0 -7
  158. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayoutLit.d.ts.map +0 -1
  159. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayoutLit.js +0 -15
  160. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts +0 -25
  161. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts.map +0 -1
  162. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.js +0 -390
  163. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShellLit.d.ts +0 -66
  164. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShellLit.d.ts.map +0 -1
  165. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShellLit.js +0 -528
  166. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.d.ts +0 -8
  167. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.d.ts.map +0 -1
  168. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.js +0 -8
  169. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelectLit.d.ts +0 -41
  170. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelectLit.d.ts.map +0 -1
  171. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelectLit.js +0 -63
  172. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.d.ts +0 -8
  173. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.d.ts.map +0 -1
  174. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.js +0 -17
  175. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextareaLit.d.ts +0 -55
  176. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextareaLit.d.ts.map +0 -1
  177. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextareaLit.js +0 -92
  178. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.d.ts +0 -32
  179. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.d.ts.map +0 -1
  180. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.js +0 -85
  181. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlightLit.d.ts +0 -90
  182. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlightLit.d.ts.map +0 -1
  183. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlightLit.js +0 -242
  184. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.d.ts +0 -6
  185. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.d.ts.map +0 -1
  186. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.js +0 -4
  187. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyStateLit.d.ts +0 -12
  188. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyStateLit.d.ts.map +0 -1
  189. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyStateLit.js +0 -21
  190. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.d.ts +0 -8
  191. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.d.ts.map +0 -1
  192. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.js +0 -5
  193. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeaderLit.d.ts +0 -21
  194. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeaderLit.d.ts.map +0 -1
  195. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeaderLit.js +0 -33
  196. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.d.ts +0 -12
  197. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.d.ts.map +0 -1
  198. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.js +0 -40
  199. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourneyLit.d.ts +0 -28
  200. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourneyLit.d.ts.map +0 -1
  201. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourneyLit.js +0 -121
  202. package/node_modules/@syntrologie/shared-editor-ui/dist/controllers/PanelShellController.d.ts +0 -110
  203. package/node_modules/@syntrologie/shared-editor-ui/dist/controllers/PanelShellController.d.ts.map +0 -1
  204. package/node_modules/@syntrologie/shared-editor-ui/dist/controllers/PanelShellController.js +0 -476
  205. package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.d.ts +0 -26
  206. package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.d.ts.map +0 -1
  207. package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.js +0 -202
  208. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.d.ts +0 -8
  209. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.d.ts.map +0 -1
  210. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.js +0 -46
  211. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.d.ts +0 -24
  212. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.d.ts.map +0 -1
  213. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.js +0 -86
  214. package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts +0 -36
  215. package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts.map +0 -1
  216. package/node_modules/@syntrologie/shared-editor-ui/dist/index.js +0 -26
  217. package/node_modules/@syntrologie/shared-editor-ui/dist/lit-elements.d.ts +0 -15
  218. package/node_modules/@syntrologie/shared-editor-ui/dist/lit-elements.d.ts.map +0 -1
  219. package/node_modules/@syntrologie/shared-editor-ui/dist/lit-elements.js +0 -14
  220. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts +0 -33
  221. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts.map +0 -1
  222. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.js +0 -68
  223. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.d.ts +0 -22
  224. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.d.ts.map +0 -1
  225. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.js +0 -143
  226. package/node_modules/@syntrologie/shared-editor-ui/package.json +0 -55
package/dist/schema.js CHANGED
@@ -1,156 +1,445 @@
1
- /**
2
- * Adaptive Overlays - Config Schema
3
- *
4
- * Zod schema for validating overlays app configuration.
5
- */
6
- import { AnchorIdZ, TriggerWhenZ } from '@syntrologie/sdk-contracts';
7
- import { z } from 'zod';
8
- /**
9
- * Overlays app config schema.
10
- * Defines the structure for overlay configurations in a canvas config.
11
- */
12
- export const configSchema = z.object({
13
- /** Highlight configurations */
14
- highlights: z
15
- .array(z.object({
16
- anchorId: AnchorIdZ,
17
- summary: z.string(),
18
- style: z
19
- .object({
20
- color: z.string().optional(),
21
- paddingPx: z.number().optional(),
22
- radiusPx: z.number().optional(),
23
- scrimOpacity: z.number().optional(),
1
+ import "./chunk-VHAA22YE.js";
2
+
3
+ // ../../sdk-contracts/dist/schemas.js
4
+ import { z } from "zod";
5
+ var AnchorIdZ = z.object({
6
+ selector: z.string(),
7
+ route: z.union([z.string(), z.array(z.string())])
8
+ }).strict();
9
+ var AuthoringFieldsZ = {
10
+ title: z.string().max(200).optional().describe("Authoring-only: short label shown on the action plan dashboard. Stripped before serving to the runtime SDK."),
11
+ description: z.string().max(1e3).optional().describe("Authoring-only: one-sentence explanation of what this action does and why. Stripped before serving to the runtime SDK."),
12
+ validation: z.array(z.string().max(500)).max(10).optional().describe("Authoring-only: ordered steps a reviewer can follow to trigger this action and visually confirm it works. Each entry is one step. Stripped before serving to the runtime SDK.")
13
+ };
14
+ var COUNTABLE_EVENTS = [
15
+ // User interactions (from PostHog autocapture normalization)
16
+ "ui.click",
17
+ "ui.scroll",
18
+ "ui.input",
19
+ "ui.change",
20
+ "ui.submit",
21
+ // Behavioral detectors (from event-processor)
22
+ "ui.hover",
23
+ "ui.idle",
24
+ "ui.scroll_thrash",
25
+ "ui.focus_bounce",
26
+ // Navigation
27
+ "nav.page_view",
28
+ "nav.page_leave",
29
+ // Derived behavioral signals
30
+ "behavior.rage_click",
31
+ "behavior.hesitation",
32
+ "behavior.confusion"
33
+ ];
34
+ var CountableEventZ = z.enum(COUNTABLE_EVENTS).describe("Event name to count. ui.* = user interactions and behavioral detectors, nav.* = page navigation, behavior.* = derived behavioral signals.");
35
+ var SESSION_METRIC_KEYS = ["time_on_page", "page_views", "scroll_depth"];
36
+ var SessionMetricKeyZ = z.enum(SESSION_METRIC_KEYS).describe("Session metric key. time_on_page = seconds on current page, page_views = pages visited this session, scroll_depth = 0-100 percentage.");
37
+ var PageUrlConditionZ = z.object({
38
+ type: z.literal("page_url"),
39
+ url: z.string().describe('URL path to match (e.g. "/pricing", "/dashboard")')
40
+ }).describe('Fires when the current page URL matches. Use for page-specific actions. Example: {"type": "page_url", "url": "/pricing"}');
41
+ var RouteConditionZ = z.object({
42
+ type: z.literal("route"),
43
+ routeId: z.string().describe("Named route ID from the route filter")
44
+ }).describe("Fires when the current route matches a named route ID.");
45
+ var AnchorVisibleConditionZ = z.object({
46
+ type: z.literal("anchor_visible"),
47
+ anchorId: z.string().describe("CSS selector of the anchor element"),
48
+ state: z.enum(["visible", "present", "absent"]).describe('"visible" = in viewport, "present" = in DOM, "absent" = not in DOM')
49
+ }).describe(`Fires based on a DOM element's visibility state. Example: {"type": "anchor_visible", "anchorId": "#cta-button", "state": "visible"}`);
50
+ var EventOccurredConditionZ = z.object({
51
+ type: z.literal("event_occurred"),
52
+ eventName: z.string().describe('Event name (e.g. "ui.click", "$pageview")'),
53
+ withinMs: z.number().optional().describe("Time window in ms. Omit = any time this session.")
54
+ }).describe('Fires when a specific event has occurred during this session. Example: {"type": "event_occurred", "eventName": "ui.click", "withinMs": 5000}');
55
+ var StateEqualsConditionZ = z.object({
56
+ type: z.literal("state_equals"),
57
+ key: z.string().describe("Key in the SDK persistent state store (localStorage). Only valid for keys the host app explicitly sets via syntro.state.set()."),
58
+ value: z.unknown().describe("Expected value to match against")
59
+ }).describe("Checks the SDK persistent state store (localStorage). ONLY for host-app state set via syntro.state.set() \u2014 NOT for user attributes like region, device, or UTM params (those are handled by segment targeting). Do NOT use this for targeting. If you do not know the valid state keys, do not use this condition type.");
60
+ var ViewportConditionZ = z.object({
61
+ type: z.literal("viewport"),
62
+ minWidth: z.number().optional().describe("Minimum viewport width in pixels"),
63
+ maxWidth: z.number().optional().describe("Maximum viewport width in pixels"),
64
+ minHeight: z.number().optional().describe("Minimum viewport height in pixels"),
65
+ maxHeight: z.number().optional().describe("Maximum viewport height in pixels")
66
+ }).describe('Fires based on viewport (screen) size. Use for responsive behavior. Example: {"type": "viewport", "minWidth": 768} \u2014 fires on tablet and larger.');
67
+ var SessionMetricConditionZ = z.object({
68
+ type: z.literal("session_metric"),
69
+ key: SessionMetricKeyZ,
70
+ operator: z.enum(["gte", "lte", "eq", "gt", "lt"]),
71
+ threshold: z.number().describe("Numeric threshold to compare against")
72
+ }).describe('Fires when a session metric crosses a threshold. Valid keys: "time_on_page" (seconds), "page_views" (count), "scroll_depth" (0-100). Example: {"type": "session_metric", "key": "time_on_page", "operator": "gte", "threshold": 30}');
73
+ var DismissedConditionZ = z.object({
74
+ type: z.literal("dismissed"),
75
+ key: z.string().describe("Dismissal key (usually a tile or action ID)"),
76
+ inverted: z.boolean().optional().describe("When true, fires if NOT dismissed (default behavior)")
77
+ }).describe("Checks if an item has been dismissed by the user. Use with inverted: true to show only if not dismissed.");
78
+ var CooldownActiveConditionZ = z.object({
79
+ type: z.literal("cooldown_active"),
80
+ key: z.string().describe("Cooldown key"),
81
+ inverted: z.boolean().optional().describe("When true, fires if cooldown is NOT active")
82
+ }).describe("Checks if a cooldown timer is currently active. Use to prevent showing the same intervention too frequently.");
83
+ var FrequencyLimitConditionZ = z.object({
84
+ type: z.literal("frequency_limit"),
85
+ key: z.string().describe("Frequency counter key"),
86
+ limit: z.number().describe("Maximum allowed count"),
87
+ inverted: z.boolean().optional().describe("When true, fires if limit NOT reached")
88
+ }).describe("Checks if a frequency limit has been reached. Use to cap how many times an action fires per session.");
89
+ var MatchOpZ = z.object({
90
+ equals: z.union([z.string(), z.number(), z.boolean()]).optional(),
91
+ contains: z.string().optional()
92
+ }).describe("Match operator for counter filters. Exactly one of equals or contains must be specified.");
93
+ var CounterDefZ = z.object({
94
+ events: z.array(CountableEventZ).min(1).describe("Event names to count. Use values from the countable events enum."),
95
+ match: z.record(z.string(), MatchOpZ).optional().describe("Property filters. Keys are event prop names or element-chain fields (tag_name, $el_text, attr__*). All entries AND together.")
96
+ }).describe("Defines what events to count. Registered as an accumulator predicate at config-load time.");
97
+ var EventCountConditionZ = z.object({
98
+ type: z.literal("event_count"),
99
+ key: z.string().describe("Unique key for this counter (used for accumulator registration)"),
100
+ operator: z.enum(["gte", "lte", "eq", "gt", "lt"]),
101
+ count: z.number().int().min(0).describe("Target count threshold"),
102
+ withinMs: z.number().positive().optional().describe("Time window in ms. Omit = count across entire session."),
103
+ counter: CounterDefZ.optional().describe("Inline counter definition. Defines what events to count.")
104
+ }).describe('Fires when accumulated event count crosses a threshold. Most powerful trigger type. Example: {"type": "event_count", "key": "pricing-clicks", "operator": "gte", "count": 3, "counter": {"events": ["ui.click"], "match": {"attr__data-cta": {"contains": "pricing"}}}}');
105
+ var ConditionZ = z.discriminatedUnion("type", [
106
+ PageUrlConditionZ,
107
+ RouteConditionZ,
108
+ AnchorVisibleConditionZ,
109
+ EventOccurredConditionZ,
110
+ StateEqualsConditionZ,
111
+ ViewportConditionZ,
112
+ SessionMetricConditionZ,
113
+ DismissedConditionZ,
114
+ CooldownActiveConditionZ,
115
+ FrequencyLimitConditionZ,
116
+ EventCountConditionZ
117
+ ]);
118
+ var RuleZ = z.object({
119
+ conditions: z.array(ConditionZ).describe("Array of conditions \u2014 ALL must match (AND logic) for this rule to fire."),
120
+ value: z.unknown().describe("Value returned when all conditions match. For triggerWhen: true = fire the action.")
121
+ }).describe("A single rule. ALL conditions must match (AND logic). Rules in a strategy are evaluated top-to-bottom \u2014 first rule where all conditions match wins and returns its value.");
122
+ var RuleStrategyZ = z.object({
123
+ type: z.literal("rules"),
124
+ rules: z.array(RuleZ).describe("Ordered list of rules. Evaluated top-to-bottom \u2014 first match wins."),
125
+ default: z.unknown().describe("Fallback value when no rule matches. For triggerWhen: false = do not fire by default.")
126
+ }).describe("Rule-based strategy. Evaluates rules top-to-bottom. First rule where ALL conditions match returns its value. If no rule matches, returns default. For triggerWhen: set value=true on matching rules, default=false.");
127
+ var ScoreStrategyZ = z.object({
128
+ type: z.literal("score"),
129
+ field: z.string(),
130
+ threshold: z.number(),
131
+ above: z.unknown(),
132
+ below: z.unknown()
133
+ }).describe("Score-based strategy. Compares a field value against a threshold.");
134
+ var ModelStrategyZ = z.object({
135
+ type: z.literal("model"),
136
+ modelId: z.string(),
137
+ inputs: z.array(z.string()),
138
+ outputMapping: z.record(z.string(), z.unknown()),
139
+ default: z.unknown()
140
+ }).describe("ML model strategy. Sends inputs to a model and maps outputs.");
141
+ var ExternalStrategyZ = z.object({
142
+ type: z.literal("external"),
143
+ endpoint: z.string(),
144
+ method: z.enum(["GET", "POST"]).optional(),
145
+ default: z.unknown(),
146
+ timeoutMs: z.number().optional()
147
+ }).describe("External API strategy. Calls an endpoint to determine the value.");
148
+ var DecisionStrategyZ = z.discriminatedUnion("type", [
149
+ RuleStrategyZ,
150
+ ScoreStrategyZ,
151
+ ModelStrategyZ,
152
+ ExternalStrategyZ
153
+ ]);
154
+ var TriggerWhenZ = DecisionStrategyZ.nullable().optional();
155
+ var EventScopeZ = z.object({
156
+ events: z.array(z.string()),
157
+ urlContains: z.string().optional(),
158
+ props: z.record(z.union([z.string(), z.number(), z.boolean()])).optional()
159
+ });
160
+ var NotifyZ = z.object({
161
+ title: z.string().optional(),
162
+ body: z.string().optional(),
163
+ icon: z.string().optional()
164
+ }).nullable().optional();
165
+
166
+ // src/schema.ts
167
+ import { z as z2 } from "zod";
168
+ var configSchema = z2.object({
169
+ /** Highlight configurations */
170
+ highlights: z2.array(
171
+ z2.object({
172
+ anchorId: AnchorIdZ.describe("Route and CSS selector of the element to spotlight."),
173
+ summary: z2.string().describe(
174
+ "Human-readable description of this highlight, used for logging and debugging."
175
+ ),
176
+ style: z2.object({
177
+ color: z2.string().optional().describe(
178
+ 'Ring color as a CSS color string (e.g. "#5b8cff"). Defaults to brand blue.'
179
+ ),
180
+ paddingPx: z2.number().optional().describe(
181
+ "Space in pixels between the element edge and the spotlight ring. Defaults to 12."
182
+ ),
183
+ radiusPx: z2.number().optional().describe("Corner radius of the spotlight ring in pixels. Defaults to 12."),
184
+ scrimOpacity: z2.number().optional().describe(
185
+ "Opacity of the dark backdrop behind the spotlight (0\u20131). Set to 0 to show the ring without dimming the page. Defaults to 0.55."
186
+ )
187
+ }).optional().describe("Optional visual style overrides for the spotlight ring and backdrop.")
188
+ }).describe(
189
+ "A spotlight highlight that dims the page and draws a ring around a target element."
190
+ )
191
+ ).optional().describe(
192
+ "Spotlight highlights: draw attention to specific elements by ringing them with a colored border and dimming the rest of the page."
193
+ ),
194
+ /** Tooltip configurations */
195
+ tooltips: z2.array(
196
+ z2.object({
197
+ anchorId: AnchorIdZ.describe(
198
+ "Route and CSS selector of the element the tooltip is anchored to."
199
+ ),
200
+ summary: z2.string().describe(
201
+ "Human-readable description of this tooltip, used for logging and debugging."
202
+ ),
203
+ content: z2.object({
204
+ title: z2.string().optional().describe("Optional heading shown at the top of the tooltip."),
205
+ body: z2.string().describe(
206
+ "Main tooltip text (required). Explains the feature or provides guidance."
207
+ ),
208
+ cta: z2.object({
209
+ label: z2.string().describe("Button label text for the single CTA."),
210
+ action: z2.unknown().describe("Action step to execute when the CTA is clicked.")
211
+ }).optional().describe(
212
+ "Optional single CTA button shorthand. Use ctaButtons for multiple actions."
213
+ ),
214
+ ctaButtons: z2.array(
215
+ z2.object({
216
+ label: z2.string().describe("Button label text."),
217
+ actionId: z2.string().describe(
218
+ 'Action identifier published with the action.tooltip_cta_clicked event. Special values: "dismiss" closes the tooltip without publishing an event; "faq:open:<questionId>" opens the corresponding FAQ question in an adaptive-faq:accordion widget (companion tooltip pattern). Any other value publishes action.tooltip_cta_clicked with the actionId in event props for custom handling.'
219
+ ),
220
+ primary: z2.boolean().optional().describe(
221
+ "When true, renders as the primary (filled) button style. Defaults to false."
222
+ )
223
+ })
224
+ ).optional().describe(
225
+ "Optional multi-button CTA row. Preferred over the single cta shorthand when more than one action is needed. Each button publishes action.tooltip_cta_clicked with its actionId."
226
+ )
227
+ }).describe("Tooltip content including body text and optional title and CTA."),
228
+ trigger: z2.enum(["immediate", "hover", "click"]).optional().describe(
229
+ '"immediate" shows on mount; "hover" shows when the user hovers the anchor; "click" shows on click. Defaults to "immediate".'
230
+ ),
231
+ placement: z2.enum([
232
+ "top",
233
+ "top-start",
234
+ "top-end",
235
+ "bottom",
236
+ "bottom-start",
237
+ "bottom-end",
238
+ "left",
239
+ "left-start",
240
+ "left-end",
241
+ "right",
242
+ "right-start",
243
+ "right-end"
244
+ ]).optional().describe(
245
+ 'Preferred placement of the tooltip relative to the anchor element. The SDK flips to the opposite side if there is not enough space. Defaults to "top".'
246
+ )
247
+ }).describe(
248
+ "A tooltip anchored to a DOM element. Use for contextual help, feature discovery, or CTA prompts near specific UI elements."
249
+ )
250
+ ).optional().describe(
251
+ "Tooltips anchored to DOM elements. Use for contextual help, upsell prompts, or feature discovery near specific UI elements."
252
+ ),
253
+ /** Badge configurations */
254
+ badges: z2.array(
255
+ z2.object({
256
+ anchorId: AnchorIdZ.describe(
257
+ "Route and CSS selector of the element to attach the badge to."
258
+ ),
259
+ summary: z2.string().describe(
260
+ "Human-readable description of this badge, used for logging and debugging."
261
+ ),
262
+ content: z2.string().describe(
263
+ 'Badge text (e.g. "NEW", "3", "!"). Keep short \u2014 typically 1\u20134 characters.'
264
+ ),
265
+ position: z2.enum(["top-left", "top-right", "bottom-left", "bottom-right"]).optional().describe(
266
+ 'Corner of the anchor element where the badge is positioned. Defaults to "top-right".'
267
+ )
268
+ }).describe("A small badge indicator positioned at a corner of a target element.")
269
+ ).optional().describe(
270
+ 'Badge indicators overlaid on DOM elements. Use for notification counts ("3"), status labels ("NEW"), or attention markers ("!").'
271
+ ),
272
+ /** Pulse configurations */
273
+ pulses: z2.array(
274
+ z2.object({
275
+ anchorId: AnchorIdZ.describe("Route and CSS selector of the element to animate."),
276
+ summary: z2.string().describe(
277
+ "Human-readable description of this pulse, used for logging and debugging."
278
+ ),
279
+ duration: z2.number().optional().describe("Animation duration in milliseconds. Defaults to 2000ms.")
280
+ }).describe(
281
+ "A pulsing animation applied to a DOM element to draw subtle attention without blocking interaction."
282
+ )
283
+ ).optional().describe(
284
+ "Pulse animations on DOM elements. Use for subtle attention-grabbing when highlights would be too intrusive."
285
+ ),
286
+ /** Modal configurations */
287
+ modals: z2.array(
288
+ z2.object({
289
+ summary: z2.string().describe(
290
+ "Human-readable description of this modal, used for logging and debugging."
291
+ ),
292
+ content: z2.object({
293
+ title: z2.string().optional().describe("Optional modal heading shown at the top of the dialog."),
294
+ body: z2.string().describe("Main modal body text (required).")
295
+ }).describe("Modal content including body text and optional heading."),
296
+ size: z2.enum(["sm", "md", "lg"]).optional().describe(
297
+ 'Dialog width: "sm" is narrow, "md" is standard, "lg" is wide. Defaults to "md".'
298
+ ),
299
+ blocking: z2.boolean().optional().describe(
300
+ "When true, the modal blocks all page interaction until dismissed. Use sparingly \u2014 only for critical confirmations."
301
+ ),
302
+ scrim: z2.object({
303
+ opacity: z2.number().optional().describe("Backdrop opacity behind the modal (0\u20131). Defaults to 0.6.")
304
+ }).optional().describe("Scrim (backdrop) configuration for the modal overlay."),
305
+ dismiss: z2.object({
306
+ onEsc: z2.boolean().optional().describe("When true (default), pressing Escape closes the modal."),
307
+ closeButton: z2.boolean().optional().describe("When true (default), an X close button is shown in the modal header."),
308
+ timeoutMs: z2.number().optional().describe(
309
+ "Optional auto-close timeout in milliseconds. Omit to require explicit dismissal."
310
+ )
311
+ }).optional().describe("Controls how the modal can be dismissed by the user."),
312
+ ctaButtons: z2.array(
313
+ z2.object({
314
+ label: z2.string().describe("Button label text."),
315
+ actionId: z2.string().describe(
316
+ 'Action identifier published with the action.modal_cta_clicked event. Use "dismiss" to close the modal without publishing an event.'
317
+ ),
318
+ primary: z2.boolean().optional().describe(
319
+ "When true, renders as the primary (filled) button style. Defaults to false."
320
+ )
24
321
  })
25
- .optional(),
26
- }))
27
- .optional(),
28
- /** Tooltip configurations */
29
- tooltips: z
30
- .array(z.object({
31
- anchorId: AnchorIdZ,
32
- summary: z.string(),
33
- content: z.object({
34
- title: z.string().optional(),
35
- body: z.string(),
36
- cta: z
37
- .object({
38
- label: z.string(),
39
- action: z.unknown(), // ActionStep - validated separately
40
- })
41
- .optional(),
42
- }),
43
- trigger: z.enum(['immediate', 'hover', 'click']).optional(),
44
- placement: z
45
- .enum([
46
- 'top',
47
- 'top-start',
48
- 'top-end',
49
- 'bottom',
50
- 'bottom-start',
51
- 'bottom-end',
52
- 'left',
53
- 'left-start',
54
- 'left-end',
55
- 'right',
56
- 'right-start',
57
- 'right-end',
58
- ])
59
- .optional(),
60
- }))
61
- .optional(),
62
- /** Badge configurations */
63
- badges: z
64
- .array(z.object({
65
- anchorId: AnchorIdZ,
66
- summary: z.string(),
67
- content: z.string(),
68
- position: z.enum(['top-left', 'top-right', 'bottom-left', 'bottom-right']).optional(),
69
- }))
70
- .optional(),
71
- /** Pulse configurations */
72
- pulses: z
73
- .array(z.object({
74
- anchorId: AnchorIdZ,
75
- summary: z.string(),
76
- duration: z.number().optional(),
77
- }))
78
- .optional(),
79
- /** Modal configurations */
80
- modals: z
81
- .array(z.object({
82
- summary: z.string(),
83
- content: z.object({
84
- title: z.string().optional(),
85
- body: z.string(),
86
- }),
87
- size: z.enum(['sm', 'md', 'lg']).optional(),
88
- blocking: z.boolean().optional(),
89
- scrim: z.object({ opacity: z.number().optional() }).optional(),
90
- dismiss: z
91
- .object({
92
- onEsc: z.boolean().optional(),
93
- closeButton: z.boolean().optional(),
94
- timeoutMs: z.number().optional(),
322
+ ).optional().describe("Optional CTA buttons shown at the bottom of the modal.")
323
+ }).describe(
324
+ "A centered dialog modal. Use for announcements, onboarding prompts, or required confirmations."
325
+ )
326
+ ).optional().describe(
327
+ "Modal dialogs overlaid on the page. Use for announcements, onboarding prompts, or confirmations that require explicit user acknowledgement."
328
+ ),
329
+ /** Tour configurations */
330
+ tours: z2.array(
331
+ z2.object({
332
+ tourId: z2.string().describe(
333
+ "Unique identifier for this tour, used to start/resume it via action or deeplink."
334
+ ),
335
+ summary: z2.string().describe("Human-readable description of this tour, used for logging and debugging."),
336
+ steps: z2.array(
337
+ z2.object({
338
+ id: z2.string().describe("Unique step identifier within this tour."),
339
+ action: z2.record(z2.unknown()).describe(
340
+ "Action step config to execute for this tour step (e.g. a tooltip or highlight)."
341
+ ),
342
+ route: z2.string().optional().describe("Optional route the user must be on before this step executes."),
343
+ onAction: z2.record(z2.string()).optional().describe(
344
+ "Map of action event \u2192 next step ID. Defines transitions between steps based on user interaction."
345
+ )
95
346
  })
96
- .optional(),
97
- ctaButtons: z
98
- .array(z.object({
99
- label: z.string(),
100
- actionId: z.string(),
101
- primary: z.boolean().optional(),
102
- }))
103
- .optional(),
104
- }))
105
- .optional(),
106
- /** Tour configurations */
107
- tours: z
108
- .array(z.object({
109
- tourId: z.string(),
110
- summary: z.string(),
111
- steps: z.array(z.object({
112
- id: z.string(),
113
- action: z.record(z.unknown()),
114
- route: z.string().optional(),
115
- onAction: z.record(z.string()).optional(),
116
- })),
117
- startStep: z.string().optional(),
118
- autoStart: z.boolean().optional(),
119
- }))
120
- .optional(),
121
- });
122
- // ============================================================================
123
- // Celebrate Action Schema
124
- // ============================================================================
125
- const CelebrateActionZ = z
126
- .object({
127
- kind: z.literal('overlays:celebrate'),
128
- effect: z.string(),
129
- duration: z.number().optional(),
130
- intensity: z.enum(['light', 'medium', 'heavy']).optional(),
131
- colors: z.array(z.string()).optional(),
132
- props: z.record(z.unknown()).optional(),
133
- label: z.string().optional(),
134
- triggerWhen: TriggerWhenZ,
135
- })
136
- .strict();
137
- // ============================================================================
138
- // Unified Schema Export
139
- // ============================================================================
140
- export const actionStepSchemas = [{ defName: 'celebrate', schema: CelebrateActionZ }];
141
- // ============================================================================
142
- // Tile Widget Definitions
143
- // ============================================================================
144
- /**
145
- * Tile widget definitions for unified JSON Schema generation.
146
- * Maps widget IDs to their props validation schema so the build script
147
- * can inject if/then constraints on tile.props.
148
- */
149
- const WorkflowTrackerPropsZ = z.object({}).passthrough();
150
- export const tileWidgets = [
347
+ ).min(
348
+ 1,
349
+ `Tour must have at least one step \u2014 the executor throws Error('Tour "..." has no steps') when steps is empty.`
350
+ ).describe(
351
+ "Ordered list of tour steps. Each step executes one action and optionally transitions to the next."
352
+ ),
353
+ startStep: z2.string().optional().describe(
354
+ "ID of the step to begin the tour on. Defaults to the first step in the array."
355
+ ),
356
+ autoStart: z2.boolean().optional().describe(
357
+ "When true, the tour starts automatically when the config loads. Omit to require explicit triggering."
358
+ )
359
+ }).describe(
360
+ "A multi-step product tour. Steps execute sequentially (or via onAction transitions) to guide the user through a feature."
361
+ )
362
+ ).optional().describe(
363
+ "Multi-step product tours. Each tour chains overlay actions (tooltips, highlights) into a guided walkthrough of a feature or workflow."
364
+ )
365
+ }).describe(
366
+ "Props for adaptive-overlays visual overlay operations. Each field targets a list of overlay instances by type: highlights (spotlight), tooltips, badges, pulses, modals, and tours."
367
+ );
368
+ var CelebrateActionZ = z2.object({
369
+ ...AuthoringFieldsZ,
370
+ kind: z2.literal("overlays:celebrate").describe(
371
+ "Renders a fullscreen Canvas 2D celebration effect. Use to reward a user achievement (e.g. completing onboarding, first purchase)."
372
+ ),
373
+ effect: z2.enum(["confetti", "fireworks", "sparkles", "emoji-rain"]).describe(
374
+ 'Effect preset name: "confetti" (falling pieces), "fireworks" (burst particles), "sparkles" (twinkling diamonds), "emoji-rain" (falling emoji).'
375
+ ),
376
+ duration: z2.number().optional().describe("Animation duration in milliseconds. Defaults to 3000ms."),
377
+ intensity: z2.enum(["light", "medium", "heavy"]).optional().describe('Particle density: "light" is subtle, "heavy" is exuberant. Defaults to "medium".'),
378
+ colors: z2.array(z2.string()).optional().describe(
379
+ 'Optional color palette as CSS color strings (e.g. ["#ff0000", "#00ff00"]). Defaults to a rainbow palette.'
380
+ ),
381
+ props: z2.record(z2.unknown()).optional().describe(
382
+ 'Effect-specific properties. For "emoji-rain", use {"emoji": "\u{1F525}"} to set the falling character.'
383
+ ),
384
+ label: z2.string().optional().describe("Optional accessible label for the celebration (used for screen readers)."),
385
+ triggerWhen: TriggerWhenZ.describe(
386
+ "Conditional trigger strategy. When null, the celebration fires immediately. Use a rules strategy to fire on a specific behavioral event."
387
+ )
388
+ }).strict().describe(
389
+ "Fullscreen celebration effect action. Use to celebrate a user milestone. Pick an effect preset and optionally customize duration, intensity, and colors."
390
+ );
391
+ var actionStepSchemas = [{ defName: "celebrate", schema: CelebrateActionZ }];
392
+ var CAPABILITIES_DOCUMENTATION = {
393
+ packageId: "adaptive-overlays",
394
+ description: "Visual overlay capabilities including highlights, tooltips, badges, pulse animations, modals, tours, and celebrations.",
395
+ whenToUse: [
396
+ { goal: "Draw attention to an element (spotlight)", action: "overlays:highlight" },
397
+ { goal: "Show contextual help or guidance near an element", action: "overlays:tooltip" },
398
+ { goal: 'Add a notification indicator (count, "NEW")', action: "overlays:badge" },
399
+ { goal: "Subtle attention-grab animation", action: "overlays:pulse" },
400
+ { goal: "Show a blocking or non-blocking dialog", action: "overlays:modal" },
401
+ { goal: "Celebrate a user achievement", action: "overlays:celebrate" },
402
+ { goal: "Multi-step guided walkthrough", action: "overlays:tour" }
403
+ ],
404
+ conventions: [
405
+ {
406
+ name: 'Tooltip actionId: "dismiss"',
407
+ description: 'The special actionId "dismiss" closes the tooltip immediately without publishing an event. Use for "close" or "not now" buttons.'
408
+ },
151
409
  {
152
- widget: 'adaptive-overlays:workflow-tracker',
153
- defName: 'workflowTrackerProps',
154
- propsSchema: WorkflowTrackerPropsZ,
410
+ name: "Companion FAQ tooltips (faq:open:<questionId>)",
411
+ description: 'A tooltip CTA with actionId "faq:open:<questionId>" publishes action.tooltip_cta_clicked, which the adaptive-faq:accordion widget listens for. The matching FAQ question expands and scrolls into view. If the FAQ widget mounts after the click (e.g. canvas was closed), it checks EventBus history for recent faq:open:* events (within 10 seconds) and auto-expands on mount. The widget also publishes canvas.requestOpen to open the canvas panel if needed.'
155
412
  },
413
+ {
414
+ name: "Celebrate effect presets",
415
+ description: 'Available effects: "confetti" (falling rectangular/circular pieces with gravity and rotation), "fireworks" (burst centers with radiating particles and glow), "sparkles" (diamond shapes with sine-wave opacity and upward float), "emoji-rain" (emoji characters falling with horizontal wobble \u2014 set props.emoji to customize the character).'
416
+ }
417
+ ],
418
+ events: [
419
+ {
420
+ name: "action.tooltip_cta_clicked",
421
+ when: "User clicks a tooltip CTA button",
422
+ props: "{ actionId }"
423
+ },
424
+ {
425
+ name: "action.modal_cta_clicked",
426
+ when: "User clicks a modal CTA button",
427
+ props: "{ actionId }"
428
+ }
429
+ ]
430
+ };
431
+ var WorkflowTrackerPropsZ = z2.object({}).passthrough();
432
+ var tileWidgets = [
433
+ {
434
+ widget: "adaptive-overlays:workflow-tracker",
435
+ defName: "workflowTrackerProps",
436
+ propsSchema: WorkflowTrackerPropsZ
437
+ }
156
438
  ];
439
+ export {
440
+ CAPABILITIES_DOCUMENTATION,
441
+ actionStepSchemas,
442
+ configSchema,
443
+ tileWidgets
444
+ };
445
+ //# sourceMappingURL=schema.js.map