@syntrologie/runtime-sdk 0.2.20 → 1.0.0-canary.1

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 (332) hide show
  1. package/CAPABILITIES.md +756 -284
  2. package/README.md +310 -68
  3. package/dist/RuntimeProvider.d.ts +51 -0
  4. package/dist/RuntimeProvider.js +113 -0
  5. package/dist/RuntimeProvider.js.map +1 -0
  6. package/dist/SmartCanvasApp.d.ts +16 -10
  7. package/dist/SmartCanvasApp.js +45 -49
  8. package/dist/SmartCanvasApp.js.map +1 -1
  9. package/dist/SmartCanvasElement.d.ts +5 -5
  10. package/dist/SmartCanvasElement.js +24 -14
  11. package/dist/SmartCanvasElement.js.map +1 -1
  12. package/dist/SmartCanvasPortal.d.ts +2 -2
  13. package/dist/SmartCanvasPortal.js +2 -2
  14. package/dist/actions/ActionEngine.d.ts +11 -0
  15. package/dist/actions/ActionEngine.js +274 -0
  16. package/dist/actions/ActionEngine.js.map +1 -0
  17. package/dist/actions/executors/index.d.ts +117 -0
  18. package/dist/actions/executors/index.js +242 -0
  19. package/dist/actions/executors/index.js.map +1 -0
  20. package/dist/actions/executors/tour.d.ts +18 -0
  21. package/dist/actions/executors/tour.js +332 -0
  22. package/dist/actions/executors/tour.js.map +1 -0
  23. package/dist/actions/index.d.ts +10 -0
  24. package/dist/actions/index.js +12 -0
  25. package/dist/actions/index.js.map +1 -0
  26. package/dist/actions/types.d.ts +399 -0
  27. package/dist/actions/types.js +8 -0
  28. package/dist/actions/types.js.map +1 -0
  29. package/dist/actions/validation.d.ts +14 -0
  30. package/dist/actions/validation.js +602 -0
  31. package/dist/actions/validation.js.map +1 -0
  32. package/dist/antiFlicker.js +1 -1
  33. package/dist/api.d.ts +40 -26
  34. package/dist/api.js +90 -59
  35. package/dist/api.js.map +1 -1
  36. package/dist/apps/AppContext.d.ts +31 -0
  37. package/dist/apps/AppContext.js +93 -0
  38. package/dist/apps/AppContext.js.map +1 -0
  39. package/dist/apps/AppLoader.d.ts +84 -0
  40. package/dist/apps/AppLoader.js +256 -0
  41. package/dist/apps/AppLoader.js.map +1 -0
  42. package/dist/apps/AppRegistry.d.ts +102 -0
  43. package/dist/apps/AppRegistry.js +317 -0
  44. package/dist/apps/AppRegistry.js.map +1 -0
  45. package/dist/apps/adaptive-chatbot/index.js +7 -0
  46. package/dist/apps/adaptive-chatbot/index.js.map +7 -0
  47. package/dist/apps/examples/gamification-app.example.d.ts +305 -0
  48. package/dist/apps/examples/gamification-app.example.js +329 -0
  49. package/dist/apps/examples/gamification-app.example.js.map +1 -0
  50. package/dist/apps/faq/index.js +11 -0
  51. package/dist/apps/faq/index.js.map +7 -0
  52. package/dist/apps/gamification/index.js +2 -0
  53. package/dist/apps/gamification/index.js.map +7 -0
  54. package/dist/apps/index.d.ts +15 -0
  55. package/dist/apps/index.js +17 -0
  56. package/dist/apps/index.js.map +1 -0
  57. package/dist/apps/nav/index.js +11 -0
  58. package/dist/apps/nav/index.js.map +7 -0
  59. package/dist/apps/types.d.ts +231 -0
  60. package/dist/apps/types.js +8 -0
  61. package/dist/apps/types.js.map +1 -0
  62. package/dist/blocks/data/ComparisonBlock.d.ts +1 -1
  63. package/dist/blocks/data/ComparisonBlock.js +40 -40
  64. package/dist/blocks/data/ComparisonBlock.js.map +1 -1
  65. package/dist/blocks/data/StatsBlock.d.ts +1 -1
  66. package/dist/blocks/data/StatsBlock.js +41 -41
  67. package/dist/blocks/data/StatsBlock.js.map +1 -1
  68. package/dist/blocks/data/index.d.ts +2 -2
  69. package/dist/blocks/data/index.js +2 -2
  70. package/dist/blocks/index.d.ts +5 -5
  71. package/dist/blocks/index.js +29 -29
  72. package/dist/blocks/index.js.map +1 -1
  73. package/dist/blocks/interactive/ChecklistBlock.d.ts +1 -1
  74. package/dist/blocks/interactive/ChecklistBlock.js +60 -60
  75. package/dist/blocks/interactive/ChecklistBlock.js.map +1 -1
  76. package/dist/blocks/interactive/RatingBlock.d.ts +1 -1
  77. package/dist/blocks/interactive/RatingBlock.js +75 -65
  78. package/dist/blocks/interactive/RatingBlock.js.map +1 -1
  79. package/dist/blocks/interactive/index.d.ts +2 -2
  80. package/dist/blocks/interactive/index.js +2 -2
  81. package/dist/blocks/notification/NotificationBlock.d.ts +2 -2
  82. package/dist/blocks/notification/NotificationBlock.js +67 -63
  83. package/dist/blocks/notification/NotificationBlock.js.map +1 -1
  84. package/dist/blocks/notification/index.d.ts +1 -1
  85. package/dist/blocks/notification/index.js +1 -1
  86. package/dist/bootstrap.d.ts +47 -9
  87. package/dist/bootstrap.js +237 -69
  88. package/dist/bootstrap.js.map +1 -1
  89. package/dist/components/ShadowCanvasOverlay.d.ts +6 -6
  90. package/dist/components/ShadowCanvasOverlay.js +144 -107
  91. package/dist/components/ShadowCanvasOverlay.js.map +1 -1
  92. package/dist/components/TileCard.d.ts +5 -5
  93. package/dist/components/TileCard.js +204 -154
  94. package/dist/components/TileCard.js.map +1 -1
  95. package/dist/components/TileWheel.d.ts +3 -3
  96. package/dist/components/TileWheel.js +7 -7
  97. package/dist/components/TileWheel.js.map +1 -1
  98. package/dist/config-validator.d.ts +49 -0
  99. package/dist/config-validator.js +173 -0
  100. package/dist/config-validator.js.map +1 -0
  101. package/dist/configFetcher.d.ts +2 -2
  102. package/dist/configFetcher.js +20 -8
  103. package/dist/configFetcher.js.map +1 -1
  104. package/dist/context/ContextManager.d.ts +66 -0
  105. package/dist/context/ContextManager.js +268 -0
  106. package/dist/context/ContextManager.js.map +1 -0
  107. package/dist/context/index.d.ts +7 -0
  108. package/dist/context/index.js +7 -0
  109. package/dist/context/index.js.map +1 -0
  110. package/dist/context/schema.d.ts +360 -0
  111. package/dist/context/schema.js +50 -0
  112. package/dist/context/schema.js.map +1 -0
  113. package/dist/context/types.d.ts +101 -0
  114. package/dist/context/types.js +8 -0
  115. package/dist/context/types.js.map +1 -0
  116. package/dist/decisions/engine.d.ts +43 -0
  117. package/dist/decisions/engine.js +112 -0
  118. package/dist/decisions/engine.js.map +1 -0
  119. package/dist/decisions/index.d.ts +9 -0
  120. package/dist/decisions/index.js +10 -0
  121. package/dist/decisions/index.js.map +1 -0
  122. package/dist/decisions/schema.d.ts +2166 -0
  123. package/dist/decisions/schema.js +143 -0
  124. package/dist/decisions/schema.js.map +1 -0
  125. package/dist/decisions/strategies/rules.d.ts +24 -0
  126. package/dist/decisions/strategies/rules.js +152 -0
  127. package/dist/decisions/strategies/rules.js.map +1 -0
  128. package/dist/decisions/strategies/score.d.ts +10 -0
  129. package/dist/decisions/strategies/score.js +29 -0
  130. package/dist/decisions/strategies/score.js.map +1 -0
  131. package/dist/decisions/types.d.ts +242 -0
  132. package/dist/decisions/types.js +2 -0
  133. package/dist/decisions/types.js.map +1 -0
  134. package/dist/earlyPatcher.d.ts +8 -20
  135. package/dist/earlyPatcher.js +13 -62
  136. package/dist/earlyPatcher.js.map +1 -1
  137. package/dist/editorLoader.d.ts +12 -0
  138. package/dist/editorLoader.js +132 -48
  139. package/dist/editorLoader.js.map +1 -1
  140. package/dist/events/EventBus.d.ts +59 -0
  141. package/dist/events/EventBus.js +152 -0
  142. package/dist/events/EventBus.js.map +1 -0
  143. package/dist/events/index.d.ts +9 -0
  144. package/dist/events/index.js +10 -0
  145. package/dist/events/index.js.map +1 -0
  146. package/dist/events/normalizers/canvas.d.ts +67 -0
  147. package/dist/events/normalizers/canvas.js +116 -0
  148. package/dist/events/normalizers/canvas.js.map +1 -0
  149. package/dist/events/normalizers/posthog.d.ts +53 -0
  150. package/dist/events/normalizers/posthog.js +163 -0
  151. package/dist/events/normalizers/posthog.js.map +1 -0
  152. package/dist/events/schema.d.ts +70 -0
  153. package/dist/events/schema.js +30 -0
  154. package/dist/events/schema.js.map +1 -0
  155. package/dist/events/types.d.ts +79 -0
  156. package/dist/events/types.js +49 -0
  157. package/dist/events/types.js.map +1 -0
  158. package/dist/experiments/adapters/growthbook.d.ts +4 -4
  159. package/dist/experiments/adapters/growthbook.js +5 -5
  160. package/dist/experiments/adapters/growthbook.js.map +1 -1
  161. package/dist/experiments/index.d.ts +3 -3
  162. package/dist/experiments/index.js +1 -1
  163. package/dist/experiments/registry.d.ts +2 -2
  164. package/dist/experiments/registry.js +2 -2
  165. package/dist/experiments/types.d.ts +5 -1
  166. package/dist/fetchers/cdnFetcher.d.ts +1 -1
  167. package/dist/fetchers/cdnFetcher.js +4 -8
  168. package/dist/fetchers/cdnFetcher.js.map +1 -1
  169. package/dist/fetchers/experimentsFetcher.d.ts +2 -2
  170. package/dist/fetchers/experimentsFetcher.js +7 -7
  171. package/dist/fetchers/experimentsFetcher.js.map +1 -1
  172. package/dist/fetchers/index.d.ts +3 -3
  173. package/dist/fetchers/index.js +2 -2
  174. package/dist/fetchers/index.js.map +1 -1
  175. package/dist/fetchers/registry.d.ts +1 -1
  176. package/dist/fetchers/registry.js +4 -4
  177. package/dist/fetchers/types.d.ts +1 -1
  178. package/dist/hooks/useCanvasOverlays.d.ts +8 -5
  179. package/dist/hooks/useCanvasOverlays.js +66 -17
  180. package/dist/hooks/useCanvasOverlays.js.map +1 -1
  181. package/dist/hooks/useHostPatches.d.ts +2 -2
  182. package/dist/hooks/useHostPatches.js +8 -8
  183. package/dist/hooks/useHostPatches.js.map +1 -1
  184. package/dist/hooks/useShadowCanvasConfig.d.ts +9 -9
  185. package/dist/hooks/useShadowCanvasConfig.js +24 -8
  186. package/dist/hooks/useShadowCanvasConfig.js.map +1 -1
  187. package/dist/hostPatcher/core/patcher.d.ts +1 -1
  188. package/dist/hostPatcher/core/patcher.js +18 -9
  189. package/dist/hostPatcher/core/patcher.js.map +1 -1
  190. package/dist/hostPatcher/core/sanitizer.js +24 -3
  191. package/dist/hostPatcher/core/sanitizer.js.map +1 -1
  192. package/dist/hostPatcher/policy/defaultPolicy.js +15 -5
  193. package/dist/hostPatcher/policy/defaultPolicy.js.map +1 -1
  194. package/dist/hostPatcher/utils/anchors.js +4 -6
  195. package/dist/hostPatcher/utils/anchors.js.map +1 -1
  196. package/dist/index.d.ts +34 -21
  197. package/dist/index.js +46 -19
  198. package/dist/index.js.map +1 -1
  199. package/dist/logger.d.ts +29 -0
  200. package/dist/logger.js +81 -0
  201. package/dist/logger.js.map +1 -0
  202. package/dist/metrics/index.d.ts +1 -1
  203. package/dist/metrics/index.js +1 -1
  204. package/dist/metrics/sessionMetrics.d.ts +1 -1
  205. package/dist/metrics/sessionMetrics.js +6 -6
  206. package/dist/overlays/fetcher.d.ts +2 -2
  207. package/dist/overlays/fetcher.js +4 -4
  208. package/dist/overlays/recipeRegistry.js +2 -2
  209. package/dist/overlays/recipeRegistry.js.map +1 -1
  210. package/dist/overlays/runtime/anchor/resolve.js +1 -1
  211. package/dist/overlays/runtime/anchor/resolve.js.map +1 -1
  212. package/dist/overlays/runtime/index.d.ts +7 -7
  213. package/dist/overlays/runtime/index.js +7 -7
  214. package/dist/overlays/runtime/overlay/highlight.js +39 -39
  215. package/dist/overlays/runtime/overlay/highlight.js.map +1 -1
  216. package/dist/overlays/runtime/overlay/modal.js +5 -5
  217. package/dist/overlays/runtime/overlay/modal.js.map +1 -1
  218. package/dist/overlays/runtime/overlay/root.js +1 -1
  219. package/dist/overlays/runtime/overlay/runner.js +70 -23
  220. package/dist/overlays/runtime/overlay/runner.js.map +1 -1
  221. package/dist/overlays/runtime/overlay/tooltip.d.ts +1 -1
  222. package/dist/overlays/runtime/overlay/tooltip.js +10 -10
  223. package/dist/overlays/runtime/overlay/tooltip.js.map +1 -1
  224. package/dist/overlays/runtime/utils/dom.js +4 -1
  225. package/dist/overlays/runtime/utils/dom.js.map +1 -1
  226. package/dist/overlays/schema.d.ts +98 -98
  227. package/dist/overlays/schema.js +12 -8
  228. package/dist/overlays/schema.js.map +1 -1
  229. package/dist/react.d.ts +7 -7
  230. package/dist/react.js +4 -4
  231. package/dist/react.js.map +1 -1
  232. package/dist/render/RenderContext.d.ts +2 -2
  233. package/dist/render/RenderContext.js +5 -5
  234. package/dist/render/RenderContext.js.map +1 -1
  235. package/dist/render/index.d.ts +3 -3
  236. package/dist/render/index.js +1 -1
  237. package/dist/render/types.d.ts +4 -4
  238. package/dist/runtime.d.ts +110 -0
  239. package/dist/runtime.js +206 -0
  240. package/dist/runtime.js.map +1 -0
  241. package/dist/smart-canvas.esm.js +155 -78
  242. package/dist/smart-canvas.esm.js.map +4 -4
  243. package/dist/smart-canvas.js +44390 -37343
  244. package/dist/smart-canvas.js.map +4 -4
  245. package/dist/smart-canvas.min.js +156 -78
  246. package/dist/smart-canvas.min.js.map +4 -4
  247. package/dist/state/StateStore.d.ts +41 -0
  248. package/dist/state/StateStore.js +170 -0
  249. package/dist/state/StateStore.js.map +1 -0
  250. package/dist/state/helpers/cooldowns.d.ts +7 -0
  251. package/dist/state/helpers/cooldowns.js +31 -0
  252. package/dist/state/helpers/cooldowns.js.map +1 -0
  253. package/dist/state/helpers/dismissals.d.ts +7 -0
  254. package/dist/state/helpers/dismissals.js +34 -0
  255. package/dist/state/helpers/dismissals.js.map +1 -0
  256. package/dist/state/helpers/frequency.d.ts +8 -0
  257. package/dist/state/helpers/frequency.js +43 -0
  258. package/dist/state/helpers/frequency.js.map +1 -0
  259. package/dist/state/index.d.ts +7 -0
  260. package/dist/state/index.js +7 -0
  261. package/dist/state/index.js.map +1 -0
  262. package/dist/state/schema.d.ts +49 -0
  263. package/dist/state/schema.js +25 -0
  264. package/dist/state/schema.js.map +1 -0
  265. package/dist/state/types.d.ts +137 -0
  266. package/dist/state/types.js +9 -0
  267. package/dist/state/types.js.map +1 -0
  268. package/dist/store/example.d.ts +1 -0
  269. package/dist/store/example.js +43 -0
  270. package/dist/store/example.js.map +1 -0
  271. package/dist/store/mini-effector.d.ts +46 -0
  272. package/dist/store/mini-effector.js +88 -0
  273. package/dist/store/mini-effector.js.map +1 -0
  274. package/dist/surfaces/Surfaces.d.ts +11 -0
  275. package/dist/surfaces/Surfaces.js +361 -0
  276. package/dist/surfaces/Surfaces.js.map +1 -0
  277. package/dist/surfaces/index.d.ts +9 -0
  278. package/dist/surfaces/index.js +12 -0
  279. package/dist/surfaces/index.js.map +1 -0
  280. package/dist/surfaces/positioning.d.ts +50 -0
  281. package/dist/surfaces/positioning.js +228 -0
  282. package/dist/surfaces/positioning.js.map +1 -0
  283. package/dist/surfaces/types.d.ts +167 -0
  284. package/dist/surfaces/types.js +23 -0
  285. package/dist/surfaces/types.js.map +1 -0
  286. package/dist/telemetry/adapters/noop.d.ts +12 -0
  287. package/dist/telemetry/adapters/noop.js +42 -0
  288. package/dist/telemetry/adapters/noop.js.map +1 -0
  289. package/dist/telemetry/adapters/posthog.d.ts +9 -3
  290. package/dist/telemetry/adapters/posthog.js +36 -14
  291. package/dist/telemetry/adapters/posthog.js.map +1 -1
  292. package/dist/telemetry/index.d.ts +4 -3
  293. package/dist/telemetry/index.js +3 -2
  294. package/dist/telemetry/index.js.map +1 -1
  295. package/dist/telemetry/registry.d.ts +2 -2
  296. package/dist/telemetry/registry.js +4 -2
  297. package/dist/telemetry/registry.js.map +1 -1
  298. package/dist/telemetry/types.d.ts +1 -1
  299. package/dist/theme/ThemeProvider.d.ts +2 -2
  300. package/dist/theme/ThemeProvider.js +21 -21
  301. package/dist/theme/ThemeProvider.js.map +1 -1
  302. package/dist/theme/defaultTheme.d.ts +2 -2
  303. package/dist/theme/defaultTheme.js +111 -111
  304. package/dist/theme/defaultTheme.js.map +1 -1
  305. package/dist/theme/extractHostTheme.d.ts +1 -1
  306. package/dist/theme/extractHostTheme.js +42 -44
  307. package/dist/theme/extractHostTheme.js.map +1 -1
  308. package/dist/theme/index.d.ts +5 -5
  309. package/dist/theme/index.js +3 -3
  310. package/dist/theme/index.js.map +1 -1
  311. package/dist/theme/types.d.ts +2 -2
  312. package/dist/token.d.ts +2 -0
  313. package/dist/token.js +3 -6
  314. package/dist/token.js.map +1 -1
  315. package/dist/types-only.d.ts +32 -0
  316. package/dist/types-only.js +11 -0
  317. package/dist/types-only.js.map +1 -0
  318. package/dist/types.d.ts +95 -54
  319. package/dist/types.js +15 -2
  320. package/dist/types.js.map +1 -1
  321. package/dist/version.d.ts +13 -0
  322. package/dist/version.js +14 -0
  323. package/dist/version.js.map +1 -0
  324. package/dist/widgets/WidgetRegistry.d.ts +139 -0
  325. package/dist/widgets/WidgetRegistry.js +182 -0
  326. package/dist/widgets/WidgetRegistry.js.map +1 -0
  327. package/dist/widgets/index.d.ts +7 -0
  328. package/dist/widgets/index.js +7 -0
  329. package/dist/widgets/index.js.map +1 -0
  330. package/package.json +27 -11
  331. package/schema/canvas-config.schema.json +666 -227
  332. package/schema/runtime-context.schema.json +127 -0
@@ -2,337 +2,776 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://syntropyforge.com/schemas/smart-canvas-config.json",
4
4
  "title": "Smart Canvas Configuration",
5
+ "description": "Action-based configuration for Smart Canvas. All interventions are unified as ActionStep.",
5
6
  "type": "object",
6
- "required": ["fetchedAt", "rectangles"],
7
+ "required": ["fetchedAt", "tiles", "actions"],
7
8
  "properties": {
8
9
  "fetchedAt": {
9
10
  "type": "string",
10
- "format": "date-time"
11
+ "format": "date-time",
12
+ "description": "When the config was fetched"
11
13
  },
12
14
  "configVersion": {
13
- "type": "string"
15
+ "type": "string",
16
+ "description": "Version string for cache invalidation"
14
17
  },
15
18
  "canvasTitle": {
16
- "type": "string"
17
- },
18
- "overlayRecipeUri": {
19
19
  "type": "string",
20
- "description": "Optional URI pointing to tooltip/highlight recipe"
20
+ "description": "Display title for the canvas"
21
+ },
22
+ "tiles": {
23
+ "type": "array",
24
+ "description": "Tiles to display in the canvas drawer",
25
+ "items": { "$ref": "#/$defs/tile" }
26
+ },
27
+ "actions": {
28
+ "type": "array",
29
+ "description": "Actions to execute. This is the unified intervention format - every DOM change, tooltip, highlight, or modal is an ActionStep.",
30
+ "items": { "$ref": "#/$defs/actionStep" }
21
31
  },
22
- "overlayRecipe": {
32
+ "theme": {
33
+ "$ref": "#/$defs/themeConfig",
34
+ "description": "Theme configuration"
35
+ },
36
+ "launcher": {
37
+ "$ref": "#/$defs/launcherConfig",
38
+ "description": "Launcher button configuration"
39
+ },
40
+ "routes": {
41
+ "$ref": "#/$defs/routesConfig",
42
+ "description": "Route filtering"
43
+ }
44
+ },
45
+ "additionalProperties": false,
46
+ "$defs": {
47
+ "tile": {
23
48
  "type": "object",
24
- "description": "Inline overlay recipe (for testing)",
49
+ "required": ["id", "title", "content"],
25
50
  "properties": {
26
51
  "id": { "type": "string" },
27
- "version": { "type": "number" },
28
- "routes": { "type": "array", "items": { "type": "string" } },
29
- "steps": {
30
- "type": "array",
31
- "items": { "oneOf": [
32
- { "$ref": "#/$defs/tooltipStep" },
33
- { "$ref": "#/$defs/highlightStep" }
34
- ] }
35
- }
52
+ "title": { "type": "string" },
53
+ "subtitle": { "type": "string" },
54
+ "icon": { "type": "string" },
55
+ "size": { "type": "string", "enum": ["full", "half", "quarter"] },
56
+ "order": { "type": "number" },
57
+ "expandable": { "type": "boolean" },
58
+ "defaultExpanded": { "type": "boolean" },
59
+ "style": {
60
+ "type": "object",
61
+ "properties": {
62
+ "background": { "type": "string" },
63
+ "borderColor": { "type": "string" },
64
+ "textColor": { "type": "string" },
65
+ "accentColor": { "type": "string" }
66
+ },
67
+ "additionalProperties": false
68
+ },
69
+ "content": { "$ref": "#/$defs/tileContent" },
70
+ "activation": {
71
+ "$ref": "#/$defs/activationConfig",
72
+ "description": "Activation config for conditional rendering"
73
+ },
74
+ "analyticsKey": { "type": "string" }
36
75
  },
37
- "required": ["id", "version", "steps"],
38
76
  "additionalProperties": false
39
77
  },
40
- "patches": {
41
- "type": "array",
42
- "description": "Optional host DOM patches to apply when the canvas renders",
43
- "items": {
44
- "$ref": "#/$defs/patch"
45
- }
46
- },
47
- "rectangles": {
48
- "type": "array",
49
- "items": {
50
- "type": "object",
51
- "required": ["id", "title", "content"],
52
- "properties": {
53
- "id": { "type": "string" },
54
- "title": { "type": "string" },
55
- "subtitle": { "type": "string" },
56
- "icon": { "type": "string" },
57
- "size": { "type": "string", "enum": ["half", "quarter"] },
58
- "order": { "type": "number" },
59
- "style": {
60
- "type": "object",
61
- "properties": {
62
- "background": { "type": "string" },
63
- "borderColor": { "type": "string" },
64
- "textColor": { "type": "string" },
65
- "accentColor": { "type": "string" }
66
- },
67
- "additionalProperties": false
68
- },
69
- "content": {
78
+ "tileContent": {
79
+ "type": "object",
80
+ "required": ["type"],
81
+ "properties": {
82
+ "type": {
83
+ "type": "string",
84
+ "enum": [
85
+ "text",
86
+ "metric",
87
+ "chatbot",
88
+ "embed",
89
+ "custom",
90
+ "alert",
91
+ "success",
92
+ "warning",
93
+ "info",
94
+ "error",
95
+ "video",
96
+ "gallery",
97
+ "code",
98
+ "form",
99
+ "rating",
100
+ "progress",
101
+ "survey",
102
+ "checklist",
103
+ "stats",
104
+ "comparison",
105
+ "chart",
106
+ "table"
107
+ ]
108
+ },
109
+ "headline": { "type": "string" },
110
+ "body": { "type": "string" },
111
+ "metricValue": { "type": "string" },
112
+ "metricUnit": { "type": "string" },
113
+ "embedUrl": { "type": "string" },
114
+ "component": { "type": "string", "description": "Custom component name" },
115
+ "actions": {
116
+ "type": "array",
117
+ "items": {
70
118
  "type": "object",
71
- "required": ["type"],
119
+ "required": ["label"],
72
120
  "properties": {
73
- "type": {
74
- "type": "string",
75
- "enum": ["text", "metric", "chatbot", "embed", "custom"]
76
- },
77
- "headline": { "type": "string" },
78
- "body": { "type": "string" },
79
- "metricValue": { "type": "string" },
80
- "metricUnit": { "type": "string" },
81
- "embedUrl": { "type": "string" },
82
- "customRendererKey": { "type": "string" },
83
- "actions": {
84
- "type": "array",
85
- "items": {
86
- "type": "object",
87
- "required": ["label"],
88
- "properties": {
89
- "label": { "type": "string" },
90
- "href": { "type": "string" },
91
- "onClickId": { "type": "string" }
92
- },
93
- "additionalProperties": false
94
- }
95
- }
121
+ "label": { "type": "string" },
122
+ "href": { "type": "string" },
123
+ "onClickId": { "type": "string" }
96
124
  },
97
125
  "additionalProperties": false
98
- },
99
- "experiment": {
100
- "type": "object",
101
- "properties": {
102
- "featureKey": { "type": "string" },
103
- "variationId": { "type": "number" },
104
- "variationValue": {},
105
- "predicate": {}
106
- },
107
- "additionalProperties": true
108
- },
109
- "analyticsKey": { "type": "string" }
126
+ }
127
+ }
128
+ },
129
+ "additionalProperties": true
130
+ },
131
+ "actionStep": {
132
+ "oneOf": [
133
+ { "$ref": "#/$defs/setText" },
134
+ { "$ref": "#/$defs/setAttr" },
135
+ { "$ref": "#/$defs/addClass" },
136
+ { "$ref": "#/$defs/removeClass" },
137
+ { "$ref": "#/$defs/setStyle" },
138
+ { "$ref": "#/$defs/insertHtml" },
139
+ { "$ref": "#/$defs/tooltip" },
140
+ { "$ref": "#/$defs/highlight" },
141
+ { "$ref": "#/$defs/pulse" },
142
+ { "$ref": "#/$defs/badge" },
143
+ { "$ref": "#/$defs/modal" },
144
+ { "$ref": "#/$defs/scrollTo" },
145
+ { "$ref": "#/$defs/navigate" },
146
+ { "$ref": "#/$defs/mountWidget" },
147
+ { "$ref": "#/$defs/wait" },
148
+ { "$ref": "#/$defs/sequence" },
149
+ { "$ref": "#/$defs/parallel" },
150
+ { "$ref": "#/$defs/tour" }
151
+ ]
152
+ },
153
+ "setText": {
154
+ "type": "object",
155
+ "required": ["kind", "anchorId", "text"],
156
+ "properties": {
157
+ "kind": { "const": "content:setText" },
158
+ "anchorId": { "type": "string", "description": "CSS selector for target element" },
159
+ "text": { "type": "string" },
160
+ "label": { "type": "string", "description": "Identifier for this action" }
161
+ },
162
+ "additionalProperties": false
163
+ },
164
+ "setAttr": {
165
+ "type": "object",
166
+ "required": ["kind", "anchorId", "attr", "value"],
167
+ "properties": {
168
+ "kind": { "const": "content:setAttr" },
169
+ "anchorId": { "type": "string" },
170
+ "attr": { "type": "string" },
171
+ "value": { "type": ["string", "null"] },
172
+ "label": { "type": "string" }
173
+ },
174
+ "additionalProperties": false
175
+ },
176
+ "addClass": {
177
+ "type": "object",
178
+ "required": ["kind", "anchorId", "className"],
179
+ "properties": {
180
+ "kind": { "const": "content:addClass" },
181
+ "anchorId": { "type": "string" },
182
+ "className": { "type": "string" },
183
+ "label": { "type": "string" }
184
+ },
185
+ "additionalProperties": false
186
+ },
187
+ "removeClass": {
188
+ "type": "object",
189
+ "required": ["kind", "anchorId", "className"],
190
+ "properties": {
191
+ "kind": { "const": "content:removeClass" },
192
+ "anchorId": { "type": "string" },
193
+ "className": { "type": "string" },
194
+ "label": { "type": "string" }
195
+ },
196
+ "additionalProperties": false
197
+ },
198
+ "setStyle": {
199
+ "type": "object",
200
+ "required": ["kind", "anchorId", "styles"],
201
+ "properties": {
202
+ "kind": { "const": "content:setStyle" },
203
+ "anchorId": { "type": "string" },
204
+ "styles": {
205
+ "type": "object",
206
+ "additionalProperties": { "type": "string" }
110
207
  },
111
- "additionalProperties": false
112
- }
113
- }
114
- },
115
- "additionalProperties": false,
116
- "$defs": {
117
- "anchorSelector": {
208
+ "label": { "type": "string" }
209
+ },
210
+ "additionalProperties": false
211
+ },
212
+ "insertHtml": {
118
213
  "type": "object",
119
- "oneOf": [
120
- {
121
- "required": ["type", "value"],
214
+ "required": ["kind", "anchorId", "html"],
215
+ "properties": {
216
+ "kind": { "const": "content:insertHtml" },
217
+ "anchorId": { "type": "string" },
218
+ "html": { "type": "string" },
219
+ "position": {
220
+ "type": "string",
221
+ "enum": ["beforebegin", "afterbegin", "beforeend", "afterend", "replace"],
222
+ "default": "beforeend"
223
+ },
224
+ "label": { "type": "string" }
225
+ },
226
+ "additionalProperties": false
227
+ },
228
+ "ctaButton": {
229
+ "type": "object",
230
+ "required": ["label", "actionId"],
231
+ "properties": {
232
+ "label": { "type": "string", "description": "Button text" },
233
+ "actionId": { "type": "string", "description": "Identifier for the action" },
234
+ "primary": {
235
+ "type": "boolean",
236
+ "description": "Whether this is a primary button",
237
+ "default": false
238
+ }
239
+ },
240
+ "additionalProperties": false
241
+ },
242
+ "tooltip": {
243
+ "type": "object",
244
+ "required": ["kind", "anchorId", "content"],
245
+ "properties": {
246
+ "kind": { "const": "overlays:tooltip" },
247
+ "anchorId": { "type": "string" },
248
+ "content": {
249
+ "type": "object",
250
+ "required": ["body"],
122
251
  "properties": {
123
- "type": { "const": "css" },
124
- "value": { "type": "string" }
252
+ "title": { "type": "string" },
253
+ "body": { "type": "string" },
254
+ "ctaButtons": {
255
+ "type": "array",
256
+ "items": { "$ref": "#/$defs/ctaButton" },
257
+ "description": "Multiple CTA buttons for tours"
258
+ }
125
259
  },
126
260
  "additionalProperties": false
127
261
  },
128
- {
129
- "required": ["type", "key"],
262
+ "placement": {
263
+ "type": "string",
264
+ "enum": ["top", "bottom", "left", "right"],
265
+ "default": "top"
266
+ },
267
+ "trigger": {
268
+ "type": "string",
269
+ "enum": ["immediate", "hover", "click"],
270
+ "default": "immediate"
271
+ },
272
+ "waitFor": {
273
+ "type": "string",
274
+ "description": "When the action completes (for sequences). Options: 'dismissed', 'cta-click', 'timeout:N' (ms)"
275
+ },
276
+ "label": { "type": "string" }
277
+ },
278
+ "additionalProperties": false
279
+ },
280
+ "highlight": {
281
+ "type": "object",
282
+ "required": ["kind", "anchorId"],
283
+ "properties": {
284
+ "kind": { "const": "overlays:highlight" },
285
+ "anchorId": { "type": "string" },
286
+ "style": {
287
+ "type": "object",
130
288
  "properties": {
131
- "type": { "const": "data" },
132
- "key": { "type": "string" },
133
- "value": { "type": "string" }
289
+ "color": { "type": "string" },
290
+ "scrimOpacity": { "type": "number", "minimum": 0, "maximum": 1 },
291
+ "paddingPx": { "type": "number" },
292
+ "radiusPx": { "type": "number" }
134
293
  },
135
294
  "additionalProperties": false
136
295
  },
137
- {
138
- "required": ["type"],
296
+ "duration": {
297
+ "type": "number",
298
+ "description": "Duration in ms before auto-cleanup (for sequences)"
299
+ },
300
+ "label": { "type": "string" }
301
+ },
302
+ "additionalProperties": false
303
+ },
304
+ "pulse": {
305
+ "type": "object",
306
+ "required": ["kind", "anchorId"],
307
+ "properties": {
308
+ "kind": { "const": "overlays:pulse" },
309
+ "anchorId": { "type": "string" },
310
+ "color": { "type": "string" },
311
+ "durationMs": { "type": "number" },
312
+ "label": { "type": "string" }
313
+ },
314
+ "additionalProperties": false
315
+ },
316
+ "badge": {
317
+ "type": "object",
318
+ "required": ["kind", "anchorId", "text"],
319
+ "properties": {
320
+ "kind": { "const": "overlays:badge" },
321
+ "anchorId": { "type": "string" },
322
+ "text": { "type": "string" },
323
+ "variant": {
324
+ "type": "string",
325
+ "enum": ["info", "success", "warning", "error"],
326
+ "default": "info"
327
+ },
328
+ "position": {
329
+ "type": "string",
330
+ "enum": ["top-right", "top-left", "bottom-right", "bottom-left"],
331
+ "default": "top-right"
332
+ },
333
+ "label": { "type": "string" }
334
+ },
335
+ "additionalProperties": false
336
+ },
337
+ "modal": {
338
+ "type": "object",
339
+ "required": ["kind", "content"],
340
+ "properties": {
341
+ "kind": { "const": "overlays:modal" },
342
+ "content": {
343
+ "type": "object",
344
+ "required": ["body"],
139
345
  "properties": {
140
- "type": { "const": "aria" },
141
- "role": { "type": "string" },
142
- "label": { "type": "string" }
346
+ "title": { "type": "string" },
347
+ "body": { "type": "string" }
143
348
  },
144
349
  "additionalProperties": false
145
350
  },
146
- {
147
- "required": ["type", "value"],
351
+ "size": {
352
+ "type": "string",
353
+ "enum": ["sm", "md", "lg"],
354
+ "default": "md",
355
+ "description": "Modal size"
356
+ },
357
+ "blocking": {
358
+ "type": "boolean",
359
+ "default": false,
360
+ "description": "Whether the modal blocks interaction with the page"
361
+ },
362
+ "scrim": {
363
+ "type": "object",
148
364
  "properties": {
149
- "type": { "const": "shadow-css" },
150
- "value": { "type": "string" }
365
+ "opacity": { "type": "number", "minimum": 0, "maximum": 1, "default": 0.6 }
151
366
  },
152
367
  "additionalProperties": false
153
368
  },
154
- {
155
- "required": ["type"],
369
+ "dismiss": {
370
+ "type": "object",
156
371
  "properties": {
157
- "type": { "const": "ref" },
158
- "el": {}
372
+ "onEsc": { "type": "boolean", "default": true },
373
+ "closeButton": { "type": "boolean", "default": true },
374
+ "timeoutMs": { "type": "number", "minimum": 0 }
159
375
  },
160
376
  "additionalProperties": false
161
- }
162
- ]
377
+ },
378
+ "ctaButtons": {
379
+ "type": "array",
380
+ "items": { "$ref": "#/$defs/ctaButton" }
381
+ },
382
+ "waitFor": {
383
+ "type": "string",
384
+ "description": "When the action completes (for sequences). Options: 'dismissed', 'cta-click', 'timeout:N' (ms)"
385
+ },
386
+ "label": { "type": "string" }
387
+ },
388
+ "additionalProperties": false
163
389
  },
164
- "operation": {
165
- "oneOf": [
166
- {
390
+ "scrollTo": {
391
+ "type": "object",
392
+ "required": ["kind", "anchorId"],
393
+ "properties": {
394
+ "kind": { "const": "navigation:scrollTo" },
395
+ "anchorId": { "type": "string" },
396
+ "behavior": {
397
+ "type": "string",
398
+ "enum": ["smooth", "instant"],
399
+ "default": "smooth"
400
+ },
401
+ "block": {
402
+ "type": "string",
403
+ "enum": ["start", "center", "end"],
404
+ "default": "center"
405
+ },
406
+ "label": { "type": "string" }
407
+ },
408
+ "additionalProperties": false
409
+ },
410
+ "navigate": {
411
+ "type": "object",
412
+ "required": ["kind", "url"],
413
+ "properties": {
414
+ "kind": { "const": "navigation:navigate" },
415
+ "url": { "type": "string" },
416
+ "target": {
417
+ "type": "string",
418
+ "enum": ["_self", "_blank"],
419
+ "default": "_self"
420
+ },
421
+ "label": { "type": "string" }
422
+ },
423
+ "additionalProperties": false
424
+ },
425
+ "mountWidget": {
426
+ "type": "object",
427
+ "required": ["kind", "slot", "widget"],
428
+ "properties": {
429
+ "kind": { "const": "core:mountWidget" },
430
+ "slot": {
431
+ "type": "string",
432
+ "description": "Surface slot to mount to (e.g., overlay_center, sidebar_top)"
433
+ },
434
+ "widget": {
167
435
  "type": "object",
168
- "required": ["kind"],
436
+ "required": ["widgetId"],
169
437
  "properties": {
170
- "kind": { "const": "append" },
171
- "html": { "type": "string" },
172
- "position": { "type": "string" }
438
+ "widgetId": { "type": "string" },
439
+ "props": { "type": "object", "additionalProperties": true }
173
440
  },
174
441
  "additionalProperties": false
175
442
  },
176
- {
443
+ "label": { "type": "string" }
444
+ },
445
+ "additionalProperties": false
446
+ },
447
+ "wait": {
448
+ "type": "object",
449
+ "required": ["kind"],
450
+ "properties": {
451
+ "kind": { "const": "core:wait" },
452
+ "durationMs": {
453
+ "type": "number",
454
+ "minimum": 0,
455
+ "description": "Wait for a duration in milliseconds"
456
+ },
457
+ "event": { "type": "string", "description": "Wait for an event on the EventBus" },
458
+ "label": { "type": "string" }
459
+ },
460
+ "additionalProperties": false
461
+ },
462
+ "sequence": {
463
+ "type": "object",
464
+ "required": ["kind", "actions"],
465
+ "properties": {
466
+ "kind": { "const": "core:sequence" },
467
+ "actions": {
468
+ "type": "array",
469
+ "items": { "$ref": "#/$defs/actionStep" }
470
+ },
471
+ "label": { "type": "string" }
472
+ },
473
+ "additionalProperties": false
474
+ },
475
+ "parallel": {
476
+ "type": "object",
477
+ "required": ["kind", "actions"],
478
+ "properties": {
479
+ "kind": { "const": "core:parallel" },
480
+ "actions": {
481
+ "type": "array",
482
+ "items": { "$ref": "#/$defs/actionStep" }
483
+ },
484
+ "waitFor": {
485
+ "type": "string",
486
+ "enum": ["all", "any"],
487
+ "default": "all",
488
+ "description": "How to determine completion: 'all' waits for all, 'any' completes when first finishes"
489
+ },
490
+ "label": { "type": "string" }
491
+ },
492
+ "additionalProperties": false
493
+ },
494
+ "tourStep": {
495
+ "type": "object",
496
+ "required": ["id", "action"],
497
+ "properties": {
498
+ "id": { "type": "string", "description": "Unique identifier for this step" },
499
+ "action": {
500
+ "$ref": "#/$defs/actionStep",
501
+ "description": "Action to execute for this step"
502
+ },
503
+ "route": { "type": "string", "description": "Route this step appears on" },
504
+ "onAction": {
177
505
  "type": "object",
178
- "required": ["kind"],
179
- "properties": {
180
- "kind": { "const": "prepend" },
181
- "html": { "type": "string" }
506
+ "additionalProperties": {
507
+ "type": "string",
508
+ "description": "Target step ID or 'end' to finish the tour"
182
509
  },
183
- "additionalProperties": false
510
+ "description": "Map of actionId to next step ID"
511
+ }
512
+ },
513
+ "additionalProperties": false
514
+ },
515
+ "tour": {
516
+ "type": "object",
517
+ "required": ["kind", "tourId", "steps"],
518
+ "properties": {
519
+ "kind": { "const": "core:tour" },
520
+ "tourId": { "type": "string", "description": "Unique identifier for this tour" },
521
+ "steps": {
522
+ "type": "array",
523
+ "items": { "$ref": "#/$defs/tourStep" },
524
+ "minItems": 1,
525
+ "description": "Sequential tour steps"
526
+ },
527
+ "startStep": {
528
+ "type": "string",
529
+ "description": "ID of the step to start at (defaults to first step)"
530
+ },
531
+ "autoStart": {
532
+ "type": "boolean",
533
+ "default": true,
534
+ "description": "Whether to start the tour automatically"
535
+ },
536
+ "label": { "type": "string" }
537
+ },
538
+ "additionalProperties": false
539
+ },
540
+ "themeConfig": {
541
+ "type": "object",
542
+ "properties": {
543
+ "name": { "type": "string" },
544
+ "mode": { "type": "string", "enum": ["dark", "light"] },
545
+ "position": { "type": "string", "enum": ["left", "right"] },
546
+ "colorPrimary": { "type": "string" },
547
+ "colorBackground": { "type": "string" },
548
+ "colorText": { "type": "string" },
549
+ "borderRadius": { "type": "string" }
550
+ },
551
+ "additionalProperties": false
552
+ },
553
+ "launcherConfig": {
554
+ "type": "object",
555
+ "properties": {
556
+ "enabled": { "type": "boolean" },
557
+ "label": { "type": "string" },
558
+ "position": { "type": "string" }
559
+ },
560
+ "additionalProperties": false
561
+ },
562
+ "routesConfig": {
563
+ "type": "object",
564
+ "properties": {
565
+ "exclude": {
566
+ "type": "array",
567
+ "items": { "type": "string" }
184
568
  },
569
+ "include": {
570
+ "type": "array",
571
+ "items": { "type": "string" }
572
+ }
573
+ },
574
+ "additionalProperties": false
575
+ },
576
+ "activationConfig": {
577
+ "type": "object",
578
+ "description": "Activation configuration for conditional tile rendering",
579
+ "properties": {
580
+ "routes": { "$ref": "#/$defs/routeFilter" },
581
+ "strategy": { "$ref": "#/$defs/decisionStrategy" }
582
+ },
583
+ "additionalProperties": false
584
+ },
585
+ "routeFilter": {
586
+ "type": "object",
587
+ "properties": {
588
+ "include": {
589
+ "type": "array",
590
+ "items": { "type": "string" },
591
+ "description": "Routes where the tile should appear"
592
+ },
593
+ "exclude": {
594
+ "type": "array",
595
+ "items": { "type": "string" },
596
+ "description": "Routes where the tile should NOT appear"
597
+ }
598
+ },
599
+ "additionalProperties": false
600
+ },
601
+ "decisionStrategy": {
602
+ "oneOf": [
603
+ { "$ref": "#/$defs/ruleStrategy" },
604
+ { "$ref": "#/$defs/scoreStrategy" },
605
+ { "$ref": "#/$defs/modelStrategy" },
606
+ { "$ref": "#/$defs/externalStrategy" }
607
+ ]
608
+ },
609
+ "ruleStrategy": {
610
+ "type": "object",
611
+ "required": ["type", "rules", "default"],
612
+ "properties": {
613
+ "type": { "const": "rules" },
614
+ "rules": {
615
+ "type": "array",
616
+ "items": { "$ref": "#/$defs/rule" }
617
+ },
618
+ "default": {}
619
+ },
620
+ "additionalProperties": false
621
+ },
622
+ "scoreStrategy": {
623
+ "type": "object",
624
+ "required": ["type", "field", "threshold", "above", "below"],
625
+ "properties": {
626
+ "type": { "const": "score" },
627
+ "field": { "type": "string" },
628
+ "threshold": { "type": "number" },
629
+ "above": {},
630
+ "below": {}
631
+ },
632
+ "additionalProperties": false
633
+ },
634
+ "modelStrategy": {
635
+ "type": "object",
636
+ "required": ["type", "modelId", "inputs", "outputMapping", "default"],
637
+ "properties": {
638
+ "type": { "const": "model" },
639
+ "modelId": { "type": "string" },
640
+ "inputs": { "type": "array", "items": { "type": "string" } },
641
+ "outputMapping": { "type": "object" },
642
+ "default": {}
643
+ },
644
+ "additionalProperties": false
645
+ },
646
+ "externalStrategy": {
647
+ "type": "object",
648
+ "required": ["type", "endpoint", "default"],
649
+ "properties": {
650
+ "type": { "const": "external" },
651
+ "endpoint": { "type": "string" },
652
+ "method": { "enum": ["GET", "POST"] },
653
+ "default": {},
654
+ "timeoutMs": { "type": "number" }
655
+ },
656
+ "additionalProperties": false
657
+ },
658
+ "rule": {
659
+ "type": "object",
660
+ "required": ["conditions", "value"],
661
+ "properties": {
662
+ "conditions": {
663
+ "type": "array",
664
+ "items": { "$ref": "#/$defs/condition" }
665
+ },
666
+ "value": {}
667
+ },
668
+ "additionalProperties": false
669
+ },
670
+ "condition": {
671
+ "oneOf": [
185
672
  {
186
673
  "type": "object",
187
- "required": ["kind", "where"],
674
+ "required": ["type", "url"],
188
675
  "properties": {
189
- "kind": { "const": "insertAdjacent" },
190
- "where": {
191
- "enum": ["beforebegin", "afterbegin", "beforeend", "afterend"]
192
- },
193
- "html": { "type": "string" }
676
+ "type": { "const": "page_url" },
677
+ "url": { "type": "string" }
194
678
  },
195
679
  "additionalProperties": false
196
680
  },
197
681
  {
198
682
  "type": "object",
199
- "required": ["kind", "className"],
683
+ "required": ["type", "routeId"],
200
684
  "properties": {
201
- "kind": { "enum": ["addClass", "removeClass"] },
202
- "className": { "type": "string" }
685
+ "type": { "const": "route" },
686
+ "routeId": { "type": "string" }
203
687
  },
204
688
  "additionalProperties": false
205
689
  },
206
690
  {
207
691
  "type": "object",
208
- "required": ["kind", "name"],
692
+ "required": ["type", "anchorId", "state"],
209
693
  "properties": {
210
- "kind": { "const": "setAttr" },
211
- "name": { "type": "string" },
212
- "value": { "type": ["string", "null"] }
694
+ "type": { "const": "anchor_visible" },
695
+ "anchorId": { "type": "string" },
696
+ "state": { "enum": ["visible", "present", "absent"] }
213
697
  },
214
698
  "additionalProperties": false
215
699
  },
216
700
  {
217
701
  "type": "object",
218
- "required": ["kind", "prop"],
702
+ "required": ["type", "eventName"],
219
703
  "properties": {
220
- "kind": { "const": "setStyle" },
221
- "prop": { "type": "string" },
222
- "value": { "type": ["string", "null"] },
223
- "important": { "type": "boolean" }
704
+ "type": { "const": "event_occurred" },
705
+ "eventName": { "type": "string" },
706
+ "withinMs": { "type": "number" }
224
707
  },
225
708
  "additionalProperties": false
226
709
  },
227
710
  {
228
711
  "type": "object",
229
- "required": ["kind", "text"],
712
+ "required": ["type", "key"],
230
713
  "properties": {
231
- "kind": { "const": "setText" },
232
- "text": { "type": "string" }
714
+ "type": { "const": "state_equals" },
715
+ "key": { "type": "string" },
716
+ "value": {}
233
717
  },
234
718
  "additionalProperties": false
235
- }
236
- ]
237
- },
238
- "patch": {
239
- "type": "object",
240
- "required": ["id", "anchor", "operations"],
241
- "properties": {
242
- "id": { "type": "string" },
243
- "routes": {
244
- "type": "array",
245
- "items": { "type": "string" },
246
- "description": "URL path patterns where this patch should apply. Supports wildcards (e.g., '/', '/pricing', '/products/*'). If omitted, patch applies on all pages."
247
719
  },
248
- "anchor": { "$ref": "#/$defs/anchorSelector" },
249
- "operations": {
250
- "type": "array",
251
- "items": { "$ref": "#/$defs/operation" }
252
- }
253
- },
254
- "additionalProperties": false
255
- },
256
- "tooltipStep": {
257
- "type": "object",
258
- "required": ["kind", "id", "anchor", "content"],
259
- "properties": {
260
- "kind": { "const": "tooltip" },
261
- "id": { "type": "string" },
262
- "anchor": { "$ref": "#/$defs/anchorSelector" },
263
- "content": {
720
+ {
264
721
  "type": "object",
722
+ "required": ["type"],
265
723
  "properties": {
266
- "title": { "type": "string" },
267
- "body": { "type": "string" }
724
+ "type": { "const": "viewport" },
725
+ "minWidth": { "type": "number" },
726
+ "maxWidth": { "type": "number" },
727
+ "minHeight": { "type": "number" },
728
+ "maxHeight": { "type": "number" }
268
729
  },
269
- "required": ["body"],
270
730
  "additionalProperties": false
271
731
  },
272
- "placement": { "enum": ["top","bottom","left","right","auto"] },
273
- "offsetPx": { "type": "number" },
274
- "blocking": { "type": "boolean" },
275
- "trigger": { "enum": ["immediate","hover","click"] },
276
- "ctaButtons": {
277
- "type": "array",
278
- "items": {
279
- "type": "object",
280
- "properties": {
281
- "label": { "type": "string" },
282
- "actionId": { "type": "string" }
283
- },
284
- "required": ["label","actionId"],
285
- "additionalProperties": false
286
- }
287
- },
288
- "dismiss": {
732
+ {
289
733
  "type": "object",
734
+ "required": ["type", "key", "operator", "threshold"],
290
735
  "properties": {
291
- "onEsc": { "type": "boolean" },
292
- "closeButton": { "type": "boolean" },
293
- "timeoutMs": { "type": "number" }
736
+ "type": { "const": "session_metric" },
737
+ "key": { "type": "string" },
738
+ "operator": { "enum": ["gte", "lte", "eq", "gt", "lt"] },
739
+ "threshold": { "type": "number" }
294
740
  },
295
741
  "additionalProperties": false
296
- }
297
- },
298
- "additionalProperties": false
299
- },
300
- "highlightStep": {
301
- "type": "object",
302
- "required": ["kind", "id", "anchor"],
303
- "properties": {
304
- "kind": { "const": "highlight" },
305
- "id": { "type": "string" },
306
- "anchor": { "$ref": "#/$defs/anchorSelector" },
307
- "copy": { "type": "string" },
308
- "ring": {
742
+ },
743
+ {
309
744
  "type": "object",
745
+ "required": ["type", "key"],
310
746
  "properties": {
311
- "paddingPx": { "type": "number" },
312
- "radiusPx": { "type": "number" }
747
+ "type": { "const": "dismissed" },
748
+ "key": { "type": "string" },
749
+ "inverted": { "type": "boolean" }
313
750
  },
314
751
  "additionalProperties": false
315
752
  },
316
- "scrim": {
753
+ {
317
754
  "type": "object",
755
+ "required": ["type", "key"],
318
756
  "properties": {
319
- "opacity": { "type": "number" }
757
+ "type": { "const": "cooldown_active" },
758
+ "key": { "type": "string" },
759
+ "inverted": { "type": "boolean" }
320
760
  },
321
761
  "additionalProperties": false
322
762
  },
323
- "ringColor": { "type": "string" },
324
- "blocking": { "type": "boolean" },
325
- "dismiss": {
763
+ {
326
764
  "type": "object",
765
+ "required": ["type", "key", "limit"],
327
766
  "properties": {
328
- "onClickOutside": { "type": "boolean" },
329
- "onEsc": { "type": "boolean" },
330
- "timeoutMs": { "type": "number" }
767
+ "type": { "const": "frequency_limit" },
768
+ "key": { "type": "string" },
769
+ "limit": { "type": "number" },
770
+ "inverted": { "type": "boolean" }
331
771
  },
332
772
  "additionalProperties": false
333
773
  }
334
- },
335
- "additionalProperties": false
774
+ ]
336
775
  }
337
776
  }
338
777
  }