@syntrologie/adapt-overlays 2.16.0 → 2.18.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 -481
  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
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../sdk-contracts/dist/schemas.js", "../src/schema.ts"],
4
+ "sourcesContent": ["/**\n * Shared Zod schemas for decision strategies, conditions, and event scoping.\n *\n * These are the canonical definitions \u2014 runtime-sdk and all adaptive packages\n * should import from here instead of duplicating.\n */\nimport { z } from 'zod';\n// =============================================================================\n// ANCHOR ID SCHEMA\n// =============================================================================\nexport const AnchorIdZ = z\n .object({\n selector: z.string(),\n route: z.union([z.string(), z.array(z.string())]),\n})\n .strict();\n// =============================================================================\n// AUTHORING FIELDS \u2014 title / description / validation\n//\n// These live on every action *during authoring* (LLM produces them; dashboard\n// displays them; reviewers QA-verify with them) but are stripped before the\n// runtime SDK receives the config. Stripping happens server-side in\n// `to_runtime_config` (platform/backend/app/domains/experiments/helpers.py).\n// They appear in the JSON Schema (and therefore in the tactician's prompt)\n// because the LLM needs to know they are valid action properties \u2014 otherwise\n// schema validation would reject what the prompt commands.\n//\n// Each action variant should `.extend(AuthoringFieldsZ)` alongside any\n// triggerWhen/condition extensions. Validation is an ordered list of\n// human-readable step strings \u2014 reviewers scan it as a checklist.\n// =============================================================================\nexport const AuthoringFieldsZ = {\n title: z\n .string()\n .max(200)\n .optional()\n .describe('Authoring-only: short label shown on the action plan dashboard. Stripped before serving to the runtime SDK.'),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe('Authoring-only: one-sentence explanation of what this action does and why. Stripped before serving to the runtime SDK.'),\n validation: z\n .array(z.string().max(500))\n .max(10)\n .optional()\n .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.'),\n};\n// =============================================================================\n// TRIGGER VOCABULARY \u2014 canonical lists of valid event names, metric keys, etc.\n// These flow through to the JSON schema as enums and are used by the LLM prompt.\n// =============================================================================\n/** Events that can be counted in event_count conditions. */\nexport const COUNTABLE_EVENTS = [\n // User interactions (from PostHog autocapture normalization)\n 'ui.click',\n 'ui.scroll',\n 'ui.input',\n 'ui.change',\n 'ui.submit',\n // Behavioral detectors (from event-processor)\n 'ui.hover',\n 'ui.idle',\n 'ui.scroll_thrash',\n 'ui.focus_bounce',\n // Navigation\n 'nav.page_view',\n 'nav.page_leave',\n // Derived behavioral signals\n 'behavior.rage_click',\n 'behavior.hesitation',\n 'behavior.confusion',\n];\nexport const CountableEventZ = z\n .enum(COUNTABLE_EVENTS)\n .describe('Event name to count. ui.* = user interactions and behavioral detectors, nav.* = page navigation, behavior.* = derived behavioral signals.');\n/** Valid session metric keys. */\nexport const SESSION_METRIC_KEYS = ['time_on_page', 'page_views', 'scroll_depth'];\nexport const SessionMetricKeyZ = z\n .enum(SESSION_METRIC_KEYS)\n .describe('Session metric key. time_on_page = seconds on current page, page_views = pages visited this session, scroll_depth = 0-100 percentage.');\n/** Element chain match field prefixes for counter filters. */\nexport const ELEMENT_MATCH_FIELDS = ['tag_name', '$el_text'];\n// Note: attr__* is a dynamic prefix (attr__data-id, attr__class, attr__href, etc.)\n// and cannot be enumerated. The match key is either one of ELEMENT_MATCH_FIELDS\n// or starts with \"attr__\".\n// =============================================================================\n// CONDITION SCHEMAS\n// =============================================================================\nexport const PageUrlConditionZ = z\n .object({\n type: z.literal('page_url'),\n url: z.string().describe('URL path to match (e.g. \"/pricing\", \"/dashboard\")'),\n})\n .describe('Fires when the current page URL matches. Use for page-specific actions. ' +\n 'Example: {\"type\": \"page_url\", \"url\": \"/pricing\"}');\nexport const RouteConditionZ = z\n .object({\n type: z.literal('route'),\n routeId: z.string().describe('Named route ID from the route filter'),\n})\n .describe('Fires when the current route matches a named route ID.');\nexport const AnchorVisibleConditionZ = z\n .object({\n type: z.literal('anchor_visible'),\n anchorId: z.string().describe('CSS selector of the anchor element'),\n state: z\n .enum(['visible', 'present', 'absent'])\n .describe('\"visible\" = in viewport, \"present\" = in DOM, \"absent\" = not in DOM'),\n})\n .describe(\"Fires based on a DOM element's visibility state. \" +\n 'Example: {\"type\": \"anchor_visible\", \"anchorId\": \"#cta-button\", \"state\": \"visible\"}');\nexport const EventOccurredConditionZ = z\n .object({\n type: z.literal('event_occurred'),\n eventName: z.string().describe('Event name (e.g. \"ui.click\", \"$pageview\")'),\n withinMs: z.number().optional().describe('Time window in ms. Omit = any time this session.'),\n})\n .describe('Fires when a specific event has occurred during this session. ' +\n 'Example: {\"type\": \"event_occurred\", \"eventName\": \"ui.click\", \"withinMs\": 5000}');\nexport const StateEqualsConditionZ = z\n .object({\n type: z.literal('state_equals'),\n key: z\n .string()\n .describe('Key in the SDK persistent state store (localStorage). Only valid for keys the host app explicitly sets via syntro.state.set().'),\n value: z.unknown().describe('Expected value to match against'),\n})\n .describe('Checks the SDK persistent state store (localStorage). ONLY for host-app state set via syntro.state.set() \u2014 ' +\n 'NOT for user attributes like region, device, or UTM params (those are handled by segment targeting). ' +\n 'Do NOT use this for targeting. If you do not know the valid state keys, do not use this condition type.');\nexport const ViewportConditionZ = z\n .object({\n type: z.literal('viewport'),\n minWidth: z.number().optional().describe('Minimum viewport width in pixels'),\n maxWidth: z.number().optional().describe('Maximum viewport width in pixels'),\n minHeight: z.number().optional().describe('Minimum viewport height in pixels'),\n maxHeight: z.number().optional().describe('Maximum viewport height in pixels'),\n})\n .describe('Fires based on viewport (screen) size. Use for responsive behavior. ' +\n 'Example: {\"type\": \"viewport\", \"minWidth\": 768} \u2014 fires on tablet and larger.');\nexport const SessionMetricConditionZ = z\n .object({\n type: z.literal('session_metric'),\n key: SessionMetricKeyZ,\n operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),\n threshold: z.number().describe('Numeric threshold to compare against'),\n})\n .describe('Fires when a session metric crosses a threshold. Valid keys: \"time_on_page\" (seconds), ' +\n '\"page_views\" (count), \"scroll_depth\" (0-100). ' +\n 'Example: {\"type\": \"session_metric\", \"key\": \"time_on_page\", \"operator\": \"gte\", \"threshold\": 30}');\nexport const DismissedConditionZ = z\n .object({\n type: z.literal('dismissed'),\n key: z.string().describe('Dismissal key (usually a tile or action ID)'),\n inverted: z\n .boolean()\n .optional()\n .describe('When true, fires if NOT dismissed (default behavior)'),\n})\n .describe('Checks if an item has been dismissed by the user. Use with inverted: true to show only if not dismissed.');\nexport const CooldownActiveConditionZ = z\n .object({\n type: z.literal('cooldown_active'),\n key: z.string().describe('Cooldown key'),\n inverted: z.boolean().optional().describe('When true, fires if cooldown is NOT active'),\n})\n .describe('Checks if a cooldown timer is currently active. Use to prevent showing the same intervention too frequently.');\nexport const FrequencyLimitConditionZ = z\n .object({\n type: z.literal('frequency_limit'),\n key: z.string().describe('Frequency counter key'),\n limit: z.number().describe('Maximum allowed count'),\n inverted: z.boolean().optional().describe('When true, fires if limit NOT reached'),\n})\n .describe('Checks if a frequency limit has been reached. Use to cap how many times an action fires per session.');\nexport const MatchOpZ = z\n .object({\n equals: z.union([z.string(), z.number(), z.boolean()]).optional(),\n contains: z.string().optional(),\n})\n .describe('Match operator for counter filters. Exactly one of equals or contains must be specified.');\nexport const CounterDefZ = z\n .object({\n events: z\n .array(CountableEventZ)\n .min(1)\n .describe('Event names to count. Use values from the countable events enum.'),\n match: z\n .record(z.string(), MatchOpZ)\n .optional()\n .describe('Property filters. Keys are event prop names or element-chain fields ' +\n '(tag_name, $el_text, attr__*). All entries AND together.'),\n})\n .describe('Defines what events to count. Registered as an accumulator predicate at config-load time.');\nexport const EventCountConditionZ = z\n .object({\n type: z.literal('event_count'),\n key: z.string().describe('Unique key for this counter (used for accumulator registration)'),\n operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),\n count: z.number().int().min(0).describe('Target count threshold'),\n withinMs: z\n .number()\n .positive()\n .optional()\n .describe('Time window in ms. Omit = count across entire session.'),\n counter: CounterDefZ.optional().describe('Inline counter definition. Defines what events to count.'),\n})\n .describe('Fires when accumulated event count crosses a threshold. Most powerful trigger type. ' +\n 'Example: {\"type\": \"event_count\", \"key\": \"pricing-clicks\", \"operator\": \"gte\", \"count\": 3, ' +\n '\"counter\": {\"events\": [\"ui.click\"], \"match\": {\"attr__data-cta\": {\"contains\": \"pricing\"}}}}');\nexport const ConditionZ = z.discriminatedUnion('type', [\n PageUrlConditionZ,\n RouteConditionZ,\n AnchorVisibleConditionZ,\n EventOccurredConditionZ,\n StateEqualsConditionZ,\n ViewportConditionZ,\n SessionMetricConditionZ,\n DismissedConditionZ,\n CooldownActiveConditionZ,\n FrequencyLimitConditionZ,\n EventCountConditionZ,\n]);\n// =============================================================================\n// STRATEGY SCHEMAS\n// =============================================================================\nexport const RuleZ = z\n .object({\n conditions: z\n .array(ConditionZ)\n .describe('Array of conditions \u2014 ALL must match (AND logic) for this rule to fire.'),\n value: z\n .unknown()\n .describe('Value returned when all conditions match. For triggerWhen: true = fire the action.'),\n})\n .describe('A single rule. ALL conditions must match (AND logic). Rules in a strategy are evaluated ' +\n 'top-to-bottom \u2014 first rule where all conditions match wins and returns its value.');\nexport const RuleStrategyZ = z\n .object({\n type: z.literal('rules'),\n rules: z\n .array(RuleZ)\n .describe('Ordered list of rules. Evaluated top-to-bottom \u2014 first match wins.'),\n default: z\n .unknown()\n .describe('Fallback value when no rule matches. For triggerWhen: false = do not fire by default.'),\n})\n .describe('Rule-based strategy. Evaluates rules top-to-bottom. First rule where ALL conditions match ' +\n 'returns its value. If no rule matches, returns default. ' +\n 'For triggerWhen: set value=true on matching rules, default=false.');\nexport const ScoreStrategyZ = z\n .object({\n type: z.literal('score'),\n field: z.string(),\n threshold: z.number(),\n above: z.unknown(),\n below: z.unknown(),\n})\n .describe('Score-based strategy. Compares a field value against a threshold.');\nexport const ModelStrategyZ = z\n .object({\n type: z.literal('model'),\n modelId: z.string(),\n inputs: z.array(z.string()),\n outputMapping: z.record(z.string(), z.unknown()),\n default: z.unknown(),\n})\n .describe('ML model strategy. Sends inputs to a model and maps outputs.');\nexport const ExternalStrategyZ = z\n .object({\n type: z.literal('external'),\n endpoint: z.string(),\n method: z.enum(['GET', 'POST']).optional(),\n default: z.unknown(),\n timeoutMs: z.number().optional(),\n})\n .describe('External API strategy. Calls an endpoint to determine the value.');\nexport const DecisionStrategyZ = z.discriminatedUnion('type', [\n RuleStrategyZ,\n ScoreStrategyZ,\n ModelStrategyZ,\n ExternalStrategyZ,\n]);\n/** Canonical Zod schema for the optional triggerWhen field on actions and adaptive items. */\nexport const TriggerWhenZ = DecisionStrategyZ.nullable().optional();\n// =============================================================================\n// TRIGGER DOCUMENTATION \u2014 examples and match field docs\n// Exported as constants so the schema generator can inject them into the\n// JSON schema. The Python prompt builder reads them from the schema.\n// =============================================================================\n/** Complete triggerWhen examples showing the full rules wrapper structure. */\nexport const TRIGGER_EXAMPLES = [\n {\n name: 'Click count on a specific element',\n description: 'Fire when user clicks an element with data-id=\"hero-cta\" 2+ times',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'event_count',\n key: 'cta-clicks',\n operator: 'gte',\n count: 2,\n counter: {\n events: ['ui.click'],\n match: { 'attr__data-id': { equals: 'hero-cta' } },\n },\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'Time on page threshold',\n description: 'Fire after user spends 30+ seconds on the page',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'session_metric',\n key: 'time_on_page',\n operator: 'gte',\n threshold: 30,\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'Element visible in viewport',\n description: 'Fire when a DOM element becomes visible',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'anchor_visible',\n anchorId: '#pricing-section',\n state: 'visible',\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'No trigger (fire immediately)',\n description: 'Action fires as soon as the segment matches \u2014 no in-session condition needed',\n triggerWhen: null,\n },\n];\n/** Documentation for counter.match field keys. */\nexport const MATCH_FIELD_DOCS = {\n tag_name: 'HTML tag name (e.g. \"button\", \"a\", \"input\")',\n $el_text: 'Visible text content of the element',\n 'attr__*': 'HTML attribute prefixed with attr__. Example: attr__data-id matches the data-id attribute, ' +\n 'attr__class matches the class attribute, attr__href matches the href attribute.',\n};\n// =============================================================================\n// EVENT SCOPE SCHEMA\n// =============================================================================\n/** Scopes a widget to specific events/URLs. */\nexport const EventScopeZ = z.object({\n events: z.array(z.string()),\n urlContains: z.string().optional(),\n props: z.record(z.union([z.string(), z.number(), z.boolean()])).optional(),\n});\n// =============================================================================\n// NOTIFY SCHEMA\n// =============================================================================\n/** Toast notification config for triggerWhen transitions. */\nexport const NotifyZ = z\n .object({\n title: z.string().optional(),\n body: z.string().optional(),\n icon: z.string().optional(),\n})\n .nullable()\n .optional();\n", "/**\n * Adaptive Overlays - Config Schema\n *\n * Zod schema for validating overlays app configuration.\n */\n\nimport { AnchorIdZ, AuthoringFieldsZ, TriggerWhenZ } from '@syntrologie/sdk-contracts';\nimport { z } from 'zod';\n\n/**\n * Overlays app config schema.\n * Defines the structure for overlay configurations in a canvas config.\n */\nexport const configSchema = z\n .object({\n /** Highlight configurations */\n highlights: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe('Route and CSS selector of the element to spotlight.'),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this highlight, used for logging and debugging.'\n ),\n style: z\n .object({\n color: z\n .string()\n .optional()\n .describe(\n 'Ring color as a CSS color string (e.g. \"#5b8cff\"). Defaults to brand blue.'\n ),\n paddingPx: z\n .number()\n .optional()\n .describe(\n 'Space in pixels between the element edge and the spotlight ring. Defaults to 12.'\n ),\n radiusPx: z\n .number()\n .optional()\n .describe('Corner radius of the spotlight ring in pixels. Defaults to 12.'),\n scrimOpacity: z\n .number()\n .optional()\n .describe(\n '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.'\n ),\n })\n .optional()\n .describe('Optional visual style overrides for the spotlight ring and backdrop.'),\n })\n .describe(\n 'A spotlight highlight that dims the page and draws a ring around a target element.'\n )\n )\n .optional()\n .describe(\n 'Spotlight highlights: draw attention to specific elements by ringing them with a colored border and dimming the rest of the page.'\n ),\n\n /** Tooltip configurations */\n tooltips: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector of the element the tooltip is anchored to.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this tooltip, used for logging and debugging.'\n ),\n content: z\n .object({\n title: z\n .string()\n .optional()\n .describe('Optional heading shown at the top of the tooltip.'),\n body: z\n .string()\n .describe(\n 'Main tooltip text (required). Explains the feature or provides guidance.'\n ),\n cta: z\n .object({\n label: z.string().describe('Button label text for the single CTA.'),\n action: z.unknown().describe('Action step to execute when the CTA is clicked.'),\n })\n .optional()\n .describe(\n 'Optional single CTA button shorthand. Use ctaButtons for multiple actions.'\n ),\n ctaButtons: z\n .array(\n z.object({\n label: z.string().describe('Button label text.'),\n actionId: z\n .string()\n .describe(\n '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.'\n ),\n primary: z\n .boolean()\n .optional()\n .describe(\n 'When true, renders as the primary (filled) button style. Defaults to false.'\n ),\n })\n )\n .optional()\n .describe(\n '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.'\n ),\n })\n .describe('Tooltip content including body text and optional title and CTA.'),\n trigger: z\n .enum(['immediate', 'hover', 'click'])\n .optional()\n .describe(\n '\"immediate\" shows on mount; \"hover\" shows when the user hovers the anchor; \"click\" shows on click. Defaults to \"immediate\".'\n ),\n placement: z\n .enum([\n 'top',\n 'top-start',\n 'top-end',\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n 'left',\n 'left-start',\n 'left-end',\n 'right',\n 'right-start',\n 'right-end',\n ])\n .optional()\n .describe(\n '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\".'\n ),\n })\n .describe(\n 'A tooltip anchored to a DOM element. Use for contextual help, feature discovery, or CTA prompts near specific UI elements.'\n )\n )\n .optional()\n .describe(\n 'Tooltips anchored to DOM elements. Use for contextual help, upsell prompts, or feature discovery near specific UI elements.'\n ),\n\n /** Badge configurations */\n badges: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector of the element to attach the badge to.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this badge, used for logging and debugging.'\n ),\n content: z\n .string()\n .describe(\n 'Badge text (e.g. \"NEW\", \"3\", \"!\"). Keep short \u2014 typically 1\u20134 characters.'\n ),\n position: z\n .enum(['top-left', 'top-right', 'bottom-left', 'bottom-right'])\n .optional()\n .describe(\n 'Corner of the anchor element where the badge is positioned. Defaults to \"top-right\".'\n ),\n })\n .describe('A small badge indicator positioned at a corner of a target element.')\n )\n .optional()\n .describe(\n 'Badge indicators overlaid on DOM elements. Use for notification counts (\"3\"), status labels (\"NEW\"), or attention markers (\"!\").'\n ),\n\n /** Pulse configurations */\n pulses: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe('Route and CSS selector of the element to animate.'),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this pulse, used for logging and debugging.'\n ),\n duration: z\n .number()\n .optional()\n .describe('Animation duration in milliseconds. Defaults to 2000ms.'),\n })\n .describe(\n 'A pulsing animation applied to a DOM element to draw subtle attention without blocking interaction.'\n )\n )\n .optional()\n .describe(\n 'Pulse animations on DOM elements. Use for subtle attention-grabbing when highlights would be too intrusive.'\n ),\n\n /** Modal configurations */\n modals: z\n .array(\n z\n .object({\n summary: z\n .string()\n .describe(\n 'Human-readable description of this modal, used for logging and debugging.'\n ),\n content: z\n .object({\n title: z\n .string()\n .optional()\n .describe('Optional modal heading shown at the top of the dialog.'),\n body: z.string().describe('Main modal body text (required).'),\n })\n .describe('Modal content including body text and optional heading.'),\n size: z\n .enum(['sm', 'md', 'lg'])\n .optional()\n .describe(\n 'Dialog width: \"sm\" is narrow, \"md\" is standard, \"lg\" is wide. Defaults to \"md\".'\n ),\n blocking: z\n .boolean()\n .optional()\n .describe(\n 'When true, the modal blocks all page interaction until dismissed. Use sparingly \u2014 only for critical confirmations.'\n ),\n scrim: z\n .object({\n opacity: z\n .number()\n .optional()\n .describe('Backdrop opacity behind the modal (0\u20131). Defaults to 0.6.'),\n })\n .optional()\n .describe('Scrim (backdrop) configuration for the modal overlay.'),\n dismiss: z\n .object({\n onEsc: z\n .boolean()\n .optional()\n .describe('When true (default), pressing Escape closes the modal.'),\n closeButton: z\n .boolean()\n .optional()\n .describe('When true (default), an X close button is shown in the modal header.'),\n timeoutMs: z\n .number()\n .optional()\n .describe(\n 'Optional auto-close timeout in milliseconds. Omit to require explicit dismissal.'\n ),\n })\n .optional()\n .describe('Controls how the modal can be dismissed by the user.'),\n ctaButtons: z\n .array(\n z.object({\n label: z.string().describe('Button label text.'),\n actionId: z\n .string()\n .describe(\n 'Action identifier published with the action.modal_cta_clicked event. Use \"dismiss\" to close the modal without publishing an event.'\n ),\n primary: z\n .boolean()\n .optional()\n .describe(\n 'When true, renders as the primary (filled) button style. Defaults to false.'\n ),\n })\n )\n .optional()\n .describe('Optional CTA buttons shown at the bottom of the modal.'),\n })\n .describe(\n 'A centered dialog modal. Use for announcements, onboarding prompts, or required confirmations.'\n )\n )\n .optional()\n .describe(\n 'Modal dialogs overlaid on the page. Use for announcements, onboarding prompts, or confirmations that require explicit user acknowledgement.'\n ),\n\n /** Tour configurations */\n tours: z\n .array(\n z\n .object({\n tourId: z\n .string()\n .describe(\n 'Unique identifier for this tour, used to start/resume it via action or deeplink.'\n ),\n summary: z\n .string()\n .describe('Human-readable description of this tour, used for logging and debugging.'),\n steps: z\n .array(\n z.object({\n id: z.string().describe('Unique step identifier within this tour.'),\n action: z\n .record(z.unknown())\n .describe(\n 'Action step config to execute for this tour step (e.g. a tooltip or highlight).'\n ),\n route: z\n .string()\n .optional()\n .describe('Optional route the user must be on before this step executes.'),\n onAction: z\n .record(z.string())\n .optional()\n .describe(\n 'Map of action event \u2192 next step ID. Defines transitions between steps based on user interaction.'\n ),\n })\n )\n .min(\n 1,\n 'Tour must have at least one step \u2014 the executor throws Error(\\'Tour \"...\" has no steps\\') when steps is empty.'\n )\n .describe(\n 'Ordered list of tour steps. Each step executes one action and optionally transitions to the next.'\n ),\n startStep: z\n .string()\n .optional()\n .describe(\n 'ID of the step to begin the tour on. Defaults to the first step in the array.'\n ),\n autoStart: z\n .boolean()\n .optional()\n .describe(\n 'When true, the tour starts automatically when the config loads. Omit to require explicit triggering.'\n ),\n })\n .describe(\n 'A multi-step product tour. Steps execute sequentially (or via onAction transitions) to guide the user through a feature.'\n )\n )\n .optional()\n .describe(\n 'Multi-step product tours. Each tour chains overlay actions (tooltips, highlights) into a guided walkthrough of a feature or workflow.'\n ),\n })\n .describe(\n '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.'\n );\n\nexport type OverlaysConfig = z.infer<typeof configSchema>;\n\n// ============================================================================\n// Celebrate Action Schema\n// ============================================================================\n\nconst CelebrateActionZ = z\n .object({\n ...AuthoringFieldsZ,\n kind: z\n .literal('overlays:celebrate')\n .describe(\n 'Renders a fullscreen Canvas 2D celebration effect. Use to reward a user achievement (e.g. completing onboarding, first purchase).'\n ),\n effect: z\n .enum(['confetti', 'fireworks', 'sparkles', 'emoji-rain'])\n .describe(\n 'Effect preset name: \"confetti\" (falling pieces), \"fireworks\" (burst particles), \"sparkles\" (twinkling diamonds), \"emoji-rain\" (falling emoji).'\n ),\n duration: z\n .number()\n .optional()\n .describe('Animation duration in milliseconds. Defaults to 3000ms.'),\n intensity: z\n .enum(['light', 'medium', 'heavy'])\n .optional()\n .describe('Particle density: \"light\" is subtle, \"heavy\" is exuberant. Defaults to \"medium\".'),\n colors: z\n .array(z.string())\n .optional()\n .describe(\n 'Optional color palette as CSS color strings (e.g. [\"#ff0000\", \"#00ff00\"]). Defaults to a rainbow palette.'\n ),\n props: z\n .record(z.unknown())\n .optional()\n .describe(\n 'Effect-specific properties. For \"emoji-rain\", use {\"emoji\": \"\uD83D\uDD25\"} to set the falling character.'\n ),\n label: z\n .string()\n .optional()\n .describe('Optional accessible label for the celebration (used for screen readers).'),\n triggerWhen: TriggerWhenZ.describe(\n 'Conditional trigger strategy. When null, the celebration fires immediately. Use a rules strategy to fire on a specific behavioral event.'\n ),\n })\n .strict()\n .describe(\n 'Fullscreen celebration effect action. Use to celebrate a user milestone. Pick an effect preset and optionally customize duration, intensity, and colors.'\n );\n\n// ============================================================================\n// Unified Schema Export\n// ============================================================================\n\nexport const actionStepSchemas = [{ defName: 'celebrate', schema: CelebrateActionZ }];\n\n// ============================================================================\n// Capabilities Documentation (injected into JSON Schema for LLM prompts)\n// ============================================================================\n\nexport const CAPABILITIES_DOCUMENTATION = {\n packageId: 'adaptive-overlays',\n description:\n 'Visual overlay capabilities including highlights, tooltips, badges, pulse animations, modals, tours, and celebrations.',\n whenToUse: [\n { goal: 'Draw attention to an element (spotlight)', action: 'overlays:highlight' },\n { goal: 'Show contextual help or guidance near an element', action: 'overlays:tooltip' },\n { goal: 'Add a notification indicator (count, \"NEW\")', action: 'overlays:badge' },\n { goal: 'Subtle attention-grab animation', action: 'overlays:pulse' },\n { goal: 'Show a blocking or non-blocking dialog', action: 'overlays:modal' },\n { goal: 'Celebrate a user achievement', action: 'overlays:celebrate' },\n { goal: 'Multi-step guided walkthrough', action: 'overlays:tour' },\n ],\n conventions: [\n {\n name: 'Tooltip actionId: \"dismiss\"',\n description:\n 'The special actionId \"dismiss\" closes the tooltip immediately without publishing an event. Use for \"close\" or \"not now\" buttons.',\n },\n {\n name: 'Companion FAQ tooltips (faq:open:<questionId>)',\n description:\n '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.',\n },\n {\n name: 'Celebrate effect presets',\n description:\n '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).',\n },\n ],\n events: [\n {\n name: 'action.tooltip_cta_clicked',\n when: 'User clicks a tooltip CTA button',\n props: '{ actionId }',\n },\n {\n name: 'action.modal_cta_clicked',\n when: 'User clicks a modal CTA button',\n props: '{ actionId }',\n },\n ],\n};\n\n// ============================================================================\n// Tile Widget Definitions\n// ============================================================================\n\n/**\n * Tile widget definitions for unified JSON Schema generation.\n * Maps widget IDs to their props validation schema so the build script\n * can inject if/then constraints on tile.props.\n */\nconst WorkflowTrackerPropsZ = z.object({}).passthrough();\n\nexport const tileWidgets = [\n {\n widget: 'adaptive-overlays:workflow-tracker',\n defName: 'workflowTrackerProps',\n propsSchema: WorkflowTrackerPropsZ,\n },\n];\n"],
5
+ "mappings": ";;;AAMA,SAAS,SAAS;AAIX,IAAM,YAAY,EACpB,OAAO;AAAA,EACR,UAAU,EAAE,OAAO;AAAA,EACnB,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACpD,CAAC,EACI,OAAO;AAgBL,IAAM,mBAAmB;AAAA,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C,WAAW;AAAA,EACX,aACE;AAAA,EACF,WAAW;AAAA,IACT,EAAE,MAAM,4CAA4C,QAAQ,qBAAqB;AAAA,IACjF,EAAE,MAAM,oDAAoD,QAAQ,mBAAmB;AAAA,IACvF,EAAE,MAAM,+CAA+C,QAAQ,iBAAiB;AAAA,IAChF,EAAE,MAAM,mCAAmC,QAAQ,iBAAiB;AAAA,IACpE,EAAE,MAAM,0CAA0C,QAAQ,iBAAiB;AAAA,IAC3E,EAAE,MAAM,gCAAgC,QAAQ,qBAAqB;AAAA,IACrE,EAAE,MAAM,iCAAiC,QAAQ,gBAAgB;AAAA,EACnE;AAAA,EACA,aAAa;AAAA,IACX;AAAA,MACE,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,EACF;AAAA,EACA,QAAQ;AAAA,IACN;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,EACF;AACF;AAWA,IAAM,wBAAwBA,GAAE,OAAO,CAAC,CAAC,EAAE,YAAY;AAEhD,IAAM,cAAc;AAAA,EACzB;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AACF;",
6
+ "names": ["z"]
7
+ }
package/dist/types.d.ts CHANGED
@@ -62,7 +62,7 @@ export interface ModalAction extends BaseAction {
62
62
  }
63
63
  export interface CelebrateAction extends BaseAction {
64
64
  kind: 'overlays:celebrate';
65
- effect: string;
65
+ effect: 'confetti' | 'fireworks' | 'sparkles' | 'emoji-rain';
66
66
  duration?: number;
67
67
  intensity?: 'light' | 'medium' | 'heavy';
68
68
  colors?: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRo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CAAC,EAAE,MAAM,EAAE,CAAA;SAAE,CAAA;KAAE,CAAC;CACtE;AAMD,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAMvE,YAAY,EACV,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,cAAc,GACf,MAAM,4BAA4B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syntrologie/adapt-overlays",
3
- "version": "2.16.0",
3
+ "version": "2.18.0",
4
4
  "description": "Adaptive Overlays app - Visual overlays for tooltips, highlights, badges, and pulses",
5
5
  "license": "Proprietary",
6
6
  "private": false,
@@ -19,17 +19,9 @@
19
19
  "types": "./dist/runtime.d.ts",
20
20
  "import": "./dist/runtime.js"
21
21
  },
22
- "./runtime-lit": {
23
- "types": "./src/runtime-lit.ts",
24
- "import": "./src/runtime-lit.ts"
25
- },
26
22
  "./schema": {
27
23
  "types": "./dist/schema.d.ts",
28
24
  "import": "./dist/schema.js"
29
- },
30
- "./editor": {
31
- "types": "./dist/editor.d.ts",
32
- "import": "./dist/editor.js"
33
25
  }
34
26
  },
35
27
  "files": [
@@ -42,7 +34,7 @@
42
34
  ],
43
35
  "scripts": {
44
36
  "prepack": "node ../../../scripts/prepare-bundled-deps.mjs",
45
- "build": "tsc",
37
+ "build": "tsc --emitDeclarationOnly && node ../scripts/build-lib.mjs",
46
38
  "typecheck": "tsc --noEmit",
47
39
  "clean": "rm -rf dist",
48
40
  "test": "vitest run",
@@ -50,28 +42,19 @@
50
42
  },
51
43
  "dependencies": {
52
44
  "@floating-ui/dom": "1.7.5",
53
- "@syntrologie/sdk-contracts": "*",
54
- "@syntrologie/shared-editor-ui": "*",
55
- "@syntro/design-system": "*",
56
45
  "lit": "3.3.2"
57
46
  },
58
47
  "peerDependencies": {
59
- "lucide-react": ">=0.400.0",
60
- "react": ">=18.0.0",
61
- "react-dom": ">=18.0.0",
48
+ "lit": "^3.0.0",
62
49
  "zod": "^3.0.0"
63
50
  },
64
51
  "devDependencies": {
65
52
  "@open-wc/testing": "4.0.0",
66
53
  "@open-wc/testing-helpers": "3.0.1",
67
- "lucide-react": "0.576.0",
54
+ "@syntro/design-system": "*",
68
55
  "@syntrologie/sdk-contracts": "*",
69
- "@testing-library/react": "16.3.2",
70
- "@types/react": "19.2.14",
71
- "@types/react-dom": "19.2.3",
56
+ "@syntrologie/shared-editor-ui": "*",
72
57
  "jsdom": "26.1.0",
73
- "react": "19.2.1",
74
- "react-dom": "19.2.1",
75
58
  "typescript": "5.9.3",
76
59
  "vitest": "4.0.18",
77
60
  "zod": "3.25.76"
@@ -1,10 +0,0 @@
1
- import type { WorkflowEntry } from './workflow-types';
2
- interface WorkflowTrackerProps {
3
- workflows: WorkflowEntry[];
4
- expanded?: boolean;
5
- onStepClick: (tourId: string, stepId: string) => void;
6
- onDismiss: (tourId: string) => void;
7
- }
8
- export declare function WorkflowTracker({ workflows, expanded, onStepClick, onDismiss, }: WorkflowTrackerProps): import("react/jsx-runtime").JSX.Element;
9
- export {};
10
- //# sourceMappingURL=WorkflowTracker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WorkflowTracker.d.ts","sourceRoot":"","sources":["../src/WorkflowTracker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,UAAU,oBAAoB;IAC5B,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAkID,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,QAAQ,EACR,WAAW,EACX,SAAS,GACV,EAAE,oBAAoB,2CAsBtB"}
@@ -1,19 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- function ProgressBar({ completed, total }) {
3
- const percent = total > 0 ? Math.round((completed / total) * 100) : 0;
4
- return (_jsx("div", { className: "se-w-full se-h-1.5 se-rounded-full se-bg-white/[0.08] se-overflow-hidden", children: _jsx("div", { role: "progressbar", "aria-valuenow": percent, "aria-valuemin": 0, "aria-valuemax": 100, className: "se-h-full se-rounded-full se-bg-blue-5 se-transition-all se-duration-300", style: { width: `${percent}%` } }) }));
5
- }
6
- function StepItem({ step, isCompleted, isCurrent, tourId, onStepClick, }) {
7
- return (_jsxs("button", { type: "button", "data-testid": `step-${step.id}`, "data-current": isCurrent ? 'true' : undefined, "data-completed": isCompleted ? 'true' : undefined, "aria-current": isCurrent ? 'step' : undefined, className: `se-flex se-items-center se-gap-2 se-w-full se-py-1.5 se-px-2 se-rounded se-border-none se-bg-transparent se-cursor-pointer se-text-left se-text-xs ${isCurrent ? 'se-font-semibold se-text-slate-grey-10' : 'se-text-slate-grey-8'}`, onClick: () => onStepClick(tourId, step.id), children: [_jsx("span", { className: "se-shrink-0 se-w-4 se-text-center", children: isCompleted ? (_jsx("span", { role: "img", "aria-label": "completed", className: "se-text-green-5", children: "\u2713" })) : isCurrent ? (_jsx("span", { className: "se-inline-block se-w-1.5 se-h-1.5 se-rounded-full se-bg-blue-5" })) : (_jsx("span", { className: "se-inline-block se-w-1.5 se-h-1.5 se-rounded-full se-bg-white/[0.12]" })) }), _jsx("span", { className: "se-flex-1 se-overflow-hidden se-text-ellipsis se-whitespace-nowrap", children: step.title })] }));
8
- }
9
- function WorkflowCard({ workflow, expanded, onStepClick, onDismiss, }) {
10
- const completedCount = workflow.completedSteps.length;
11
- const totalSteps = workflow.steps.length;
12
- return (_jsxs("div", { className: "se-p-3 se-rounded-lg se-border se-border-white/[0.08] se-bg-white/[0.02]", children: [_jsxs("div", { className: "se-flex se-items-center se-gap-2 se-mb-2", children: [workflow.meta.icon && (_jsx("span", { "data-testid": "workflow-icon", className: "se-shrink-0 se-text-sm", children: workflow.meta.icon })), _jsx("span", { className: "se-flex-1 se-text-[13px] se-font-semibold se-text-slate-grey-10 se-overflow-hidden se-text-ellipsis se-whitespace-nowrap", children: workflow.meta.title }), _jsx("button", { type: "button", "data-testid": `dismiss-${workflow.tourId}`, className: "se-shrink-0 se-py-0.5 se-px-1.5 se-rounded se-border-none se-bg-transparent se-text-slate-grey-7 se-text-xs se-cursor-pointer se-leading-none", onClick: () => onDismiss(workflow.tourId), "aria-label": `Dismiss ${workflow.meta.title}`, children: "\u2715" })] }), _jsxs("div", { className: "se-mb-2", children: [_jsx(ProgressBar, { completed: completedCount, total: totalSteps }), _jsxs("div", { className: "se-text-[10px] se-text-slate-grey-7 se-mt-1", children: [completedCount, " of ", totalSteps, " steps"] })] }), _jsx("div", { className: "se-flex se-flex-col", children: workflow.steps.map((step) => (_jsx(StepItem, { step: step, isCompleted: workflow.completedSteps.includes(step.id), isCurrent: workflow.currentStepId === step.id, tourId: workflow.tourId, onStepClick: onStepClick }, step.id))) }), expanded && workflow.meta.description && (_jsx("div", { className: "se-mt-2 se-text-[11px] se-text-slate-grey-7", children: workflow.meta.description }))] }));
13
- }
14
- export function WorkflowTracker({ workflows, expanded, onStepClick, onDismiss, }) {
15
- if (workflows.length === 0) {
16
- return (_jsx("div", { className: "se-flex se-items-center se-justify-center se-py-6 se-text-xs se-text-slate-grey-7", children: "No active workflows" }));
17
- }
18
- return (_jsx("div", { className: "se-flex se-flex-col se-gap-2", children: workflows.map((workflow) => (_jsx(WorkflowCard, { workflow: workflow, expanded: expanded, onStepClick: onStepClick, onDismiss: onDismiss }, workflow.tourId))) }));
19
- }
@@ -1,70 +0,0 @@
1
- /**
2
- * Workflow Widget - MountableWidget for the WorkflowTracker
3
- *
4
- * Bridges runtime.actions.getActive() (tour actions with workflow metadata),
5
- * runtime events (tour.started, tour.step_started, etc.), and the
6
- * WorkflowTracker presentational component.
7
- *
8
- * Responsibilities:
9
- * 1. Scan runtime.actions.getActive() for tours with `workflow` field
10
- * 2. Re-scan on tour.started events (tiles render before actions are applied)
11
- * 3. Load persisted state from runtime.state.user namespace
12
- * 4. Subscribe to tour.* events and update workflow entries
13
- * 5. Render WorkflowTracker with derived workflow entries
14
- * 6. Handle step clicks (publish workflow:jump_to_step)
15
- * 7. Handle dismiss (persist and re-render)
16
- */
17
- interface ActiveAction {
18
- id: string;
19
- action: Record<string, unknown>;
20
- adaptiveId?: string;
21
- appliedTs: number;
22
- state: string;
23
- }
24
- interface WorkflowRuntime {
25
- events: {
26
- subscribe: (filter: {
27
- patterns?: string[];
28
- names?: string[];
29
- }, callback: (event: {
30
- name: string;
31
- props?: Record<string, unknown>;
32
- ts: number;
33
- }) => void) => () => void;
34
- publish: (name: string, props?: Record<string, unknown>) => void;
35
- };
36
- actions: {
37
- getActive: () => ActiveAction[];
38
- };
39
- state?: {
40
- user?: {
41
- ns?: (namespace: string) => {
42
- get: (key: string) => unknown;
43
- set: (key: string, value: unknown) => void;
44
- };
45
- };
46
- };
47
- }
48
- /**
49
- * MountableWidget contract — matches the interface from @syntrologie/runtime-sdk
50
- * Defined locally to avoid adding runtime-sdk as a dependency (same pattern as other adaptives).
51
- */
52
- export interface MountableWidget {
53
- mount(container: HTMLElement, config?: Record<string, unknown>): (() => void) | void;
54
- update?(container: HTMLElement, config?: Record<string, unknown>): void;
55
- }
56
- interface WorkflowWidgetInnerProps {
57
- runtime: WorkflowRuntime | null;
58
- }
59
- export declare function WorkflowWidgetInner({ runtime }: WorkflowWidgetInnerProps): import("react/jsx-runtime").JSX.Element;
60
- /**
61
- * Mountable widget interface for the runtime's WidgetRegistry.
62
- *
63
- * Follows the MountableWidget contract:
64
- * mount(container, config?) -> cleanup | void
65
- *
66
- * Config is enriched with `runtime` by WidgetRegistry.bindRuntime().
67
- */
68
- export declare const WorkflowMountableWidget: MountableWidget;
69
- export {};
70
- //# sourceMappingURL=WorkflowWidget.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WorkflowWid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