@syntrologie/runtime-sdk 0.2.21 → 1.0.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 (324) hide show
  1. package/CAPABILITIES.md +944 -440
  2. package/README.md +395 -66
  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 +47 -51
  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/SmartCanvasPortal.js.map +1 -1
  15. package/dist/actions/ActionEngine.d.ts +11 -0
  16. package/dist/actions/ActionEngine.js +272 -0
  17. package/dist/actions/ActionEngine.js.map +1 -0
  18. package/dist/actions/executors/index.d.ts +116 -0
  19. package/dist/actions/executors/index.js +240 -0
  20. package/dist/actions/executors/index.js.map +1 -0
  21. package/dist/actions/executors/tour.d.ts +18 -0
  22. package/dist/actions/executors/tour.js +332 -0
  23. package/dist/actions/executors/tour.js.map +1 -0
  24. package/dist/actions/index.d.ts +10 -0
  25. package/dist/actions/index.js +12 -0
  26. package/dist/actions/index.js.map +1 -0
  27. package/dist/actions/types.d.ts +399 -0
  28. package/dist/actions/types.js +8 -0
  29. package/dist/actions/types.js.map +1 -0
  30. package/dist/actions/validation.d.ts +14 -0
  31. package/dist/actions/validation.js +577 -0
  32. package/dist/actions/validation.js.map +1 -0
  33. package/dist/adaptives/adaptive-chatbot/index.js +9 -0
  34. package/dist/adaptives/adaptive-chatbot/index.js.map +7 -0
  35. package/dist/adaptives/adaptive-content/index.js +2 -0
  36. package/dist/adaptives/adaptive-content/index.js.map +7 -0
  37. package/dist/adaptives/adaptive-faq/index.js +11 -0
  38. package/dist/adaptives/adaptive-faq/index.js.map +7 -0
  39. package/dist/adaptives/adaptive-gamification/index.js +2 -0
  40. package/dist/adaptives/adaptive-gamification/index.js.map +7 -0
  41. package/dist/adaptives/adaptive-nav/index.js +11 -0
  42. package/dist/adaptives/adaptive-nav/index.js.map +7 -0
  43. package/dist/adaptives/adaptive-overlays/index.js +91 -0
  44. package/dist/adaptives/adaptive-overlays/index.js.map +7 -0
  45. package/dist/antiFlicker.js +1 -1
  46. package/dist/api.d.ts +40 -26
  47. package/dist/api.js +87 -60
  48. package/dist/api.js.map +1 -1
  49. package/dist/apps/AppContext.d.ts +31 -0
  50. package/dist/apps/AppContext.js +91 -0
  51. package/dist/apps/AppContext.js.map +1 -0
  52. package/dist/apps/AppLoader.d.ts +85 -0
  53. package/dist/apps/AppLoader.js +282 -0
  54. package/dist/apps/AppLoader.js.map +1 -0
  55. package/dist/apps/AppRegistry.d.ts +102 -0
  56. package/dist/apps/AppRegistry.js +317 -0
  57. package/dist/apps/AppRegistry.js.map +1 -0
  58. package/dist/apps/examples/gamification-app.example.d.ts +305 -0
  59. package/dist/apps/examples/gamification-app.example.js +329 -0
  60. package/dist/apps/examples/gamification-app.example.js.map +1 -0
  61. package/dist/apps/index.d.ts +14 -0
  62. package/dist/apps/index.js +16 -0
  63. package/dist/apps/index.js.map +1 -0
  64. package/dist/apps/types.d.ts +231 -0
  65. package/dist/apps/types.js +8 -0
  66. package/dist/apps/types.js.map +1 -0
  67. package/dist/blocks/data/ComparisonBlock.d.ts +1 -1
  68. package/dist/blocks/data/ComparisonBlock.js +40 -40
  69. package/dist/blocks/data/ComparisonBlock.js.map +1 -1
  70. package/dist/blocks/data/StatsBlock.d.ts +1 -1
  71. package/dist/blocks/data/StatsBlock.js +42 -44
  72. package/dist/blocks/data/StatsBlock.js.map +1 -1
  73. package/dist/blocks/data/index.d.ts +2 -2
  74. package/dist/blocks/data/index.js +2 -2
  75. package/dist/blocks/index.d.ts +5 -5
  76. package/dist/blocks/index.js +29 -30
  77. package/dist/blocks/index.js.map +1 -1
  78. package/dist/blocks/interactive/ChecklistBlock.d.ts +1 -1
  79. package/dist/blocks/interactive/ChecklistBlock.js +60 -60
  80. package/dist/blocks/interactive/ChecklistBlock.js.map +1 -1
  81. package/dist/blocks/interactive/RatingBlock.d.ts +1 -1
  82. package/dist/blocks/interactive/RatingBlock.js +73 -65
  83. package/dist/blocks/interactive/RatingBlock.js.map +1 -1
  84. package/dist/blocks/interactive/index.d.ts +2 -2
  85. package/dist/blocks/interactive/index.js +2 -2
  86. package/dist/blocks/notification/NotificationBlock.d.ts +2 -2
  87. package/dist/blocks/notification/NotificationBlock.js +68 -64
  88. package/dist/blocks/notification/NotificationBlock.js.map +1 -1
  89. package/dist/blocks/notification/index.d.ts +1 -1
  90. package/dist/blocks/notification/index.js +1 -1
  91. package/dist/bootstrap.d.ts +32 -8
  92. package/dist/bootstrap.js +218 -102
  93. package/dist/bootstrap.js.map +1 -1
  94. package/dist/components/ShadowCanvasOverlay.d.ts +6 -6
  95. package/dist/components/ShadowCanvasOverlay.js +156 -118
  96. package/dist/components/ShadowCanvasOverlay.js.map +1 -1
  97. package/dist/components/TileCard.d.ts +5 -5
  98. package/dist/components/TileCard.js +205 -154
  99. package/dist/components/TileCard.js.map +1 -1
  100. package/dist/components/TileWheel.d.ts +3 -3
  101. package/dist/components/TileWheel.js +29 -7
  102. package/dist/components/TileWheel.js.map +1 -1
  103. package/dist/config-validator.d.ts +49 -0
  104. package/dist/config-validator.js +173 -0
  105. package/dist/config-validator.js.map +1 -0
  106. package/dist/configFetcher.d.ts +7 -3
  107. package/dist/configFetcher.js +70 -29
  108. package/dist/configFetcher.js.map +1 -1
  109. package/dist/context/ContextManager.d.ts +3 -3
  110. package/dist/context/ContextManager.js +19 -18
  111. package/dist/context/ContextManager.js.map +1 -1
  112. package/dist/context/index.d.ts +4 -4
  113. package/dist/context/index.js +3 -3
  114. package/dist/context/schema.d.ts +9 -9
  115. package/dist/context/schema.js +2 -2
  116. package/dist/context/schema.js.map +1 -1
  117. package/dist/decisions/engine.d.ts +5 -5
  118. package/dist/decisions/engine.js +13 -13
  119. package/dist/decisions/engine.js.map +1 -1
  120. package/dist/decisions/index.d.ts +6 -6
  121. package/dist/decisions/index.js +5 -5
  122. package/dist/decisions/schema.d.ts +131 -131
  123. package/dist/decisions/schema.js +21 -21
  124. package/dist/decisions/schema.js.map +1 -1
  125. package/dist/decisions/strategies/rules.d.ts +1 -1
  126. package/dist/decisions/strategies/rules.js +24 -24
  127. package/dist/decisions/strategies/rules.js.map +1 -1
  128. package/dist/decisions/strategies/score.d.ts +1 -1
  129. package/dist/decisions/strategies/score.js +3 -3
  130. package/dist/decisions/types.d.ts +19 -19
  131. package/dist/earlyPatcher.d.ts +8 -20
  132. package/dist/earlyPatcher.js +13 -62
  133. package/dist/earlyPatcher.js.map +1 -1
  134. package/dist/editorLoader.d.ts +19 -7
  135. package/dist/editorLoader.js +154 -97
  136. package/dist/editorLoader.js.map +1 -1
  137. package/dist/events/EventBus.d.ts +3 -3
  138. package/dist/events/EventBus.js +5 -7
  139. package/dist/events/EventBus.js.map +1 -1
  140. package/dist/events/index.d.ts +6 -6
  141. package/dist/events/index.js +5 -5
  142. package/dist/events/normalizers/canvas.d.ts +2 -2
  143. package/dist/events/normalizers/canvas.js +3 -3
  144. package/dist/events/normalizers/canvas.js.map +1 -1
  145. package/dist/events/normalizers/posthog.d.ts +25 -1
  146. package/dist/events/normalizers/posthog.js +35 -27
  147. package/dist/events/normalizers/posthog.js.map +1 -1
  148. package/dist/events/schema.d.ts +13 -13
  149. package/dist/events/schema.js +3 -3
  150. package/dist/events/schema.js.map +1 -1
  151. package/dist/events/types.d.ts +7 -1
  152. package/dist/events/types.js +29 -21
  153. package/dist/events/types.js.map +1 -1
  154. package/dist/experiments/adapters/growthbook.d.ts +5 -4
  155. package/dist/experiments/adapters/growthbook.js +14 -6
  156. package/dist/experiments/adapters/growthbook.js.map +1 -1
  157. package/dist/experiments/index.d.ts +3 -3
  158. package/dist/experiments/index.js +1 -1
  159. package/dist/experiments/registry.d.ts +2 -2
  160. package/dist/experiments/registry.js +2 -2
  161. package/dist/experiments/types.d.ts +10 -1
  162. package/dist/fetchers/cdnFetcher.d.ts +1 -1
  163. package/dist/fetchers/cdnFetcher.js +4 -8
  164. package/dist/fetchers/cdnFetcher.js.map +1 -1
  165. package/dist/fetchers/experimentsFetcher.d.ts +25 -3
  166. package/dist/fetchers/experimentsFetcher.js +55 -8
  167. package/dist/fetchers/experimentsFetcher.js.map +1 -1
  168. package/dist/fetchers/index.d.ts +3 -3
  169. package/dist/fetchers/index.js +2 -2
  170. package/dist/fetchers/index.js.map +1 -1
  171. package/dist/fetchers/mergeConfigs.d.ts +29 -0
  172. package/dist/fetchers/mergeConfigs.js +38 -0
  173. package/dist/fetchers/mergeConfigs.js.map +1 -0
  174. package/dist/fetchers/registry.d.ts +1 -1
  175. package/dist/fetchers/registry.js +4 -4
  176. package/dist/fetchers/types.d.ts +1 -1
  177. package/dist/hooks/useCanvasOverlays.d.ts +8 -5
  178. package/dist/hooks/useCanvasOverlays.js +66 -17
  179. package/dist/hooks/useCanvasOverlays.js.map +1 -1
  180. package/dist/hooks/useHostPatches.d.ts +2 -2
  181. package/dist/hooks/useHostPatches.js +8 -8
  182. package/dist/hooks/useHostPatches.js.map +1 -1
  183. package/dist/hooks/useShadowCanvasConfig.d.ts +5 -9
  184. package/dist/hooks/useShadowCanvasConfig.js +7 -5
  185. package/dist/hooks/useShadowCanvasConfig.js.map +1 -1
  186. package/dist/hostPatcher/core/patcher.d.ts +1 -1
  187. package/dist/hostPatcher/core/patcher.js +18 -9
  188. package/dist/hostPatcher/core/patcher.js.map +1 -1
  189. package/dist/hostPatcher/core/sanitizer.js +24 -3
  190. package/dist/hostPatcher/core/sanitizer.js.map +1 -1
  191. package/dist/hostPatcher/policy/defaultPolicy.js +15 -5
  192. package/dist/hostPatcher/policy/defaultPolicy.js.map +1 -1
  193. package/dist/hostPatcher/utils/anchors.js +4 -6
  194. package/dist/hostPatcher/utils/anchors.js.map +1 -1
  195. package/dist/index.d.ts +34 -27
  196. package/dist/index.js +51 -24
  197. package/dist/index.js.map +1 -1
  198. package/dist/logger.d.ts +29 -0
  199. package/dist/logger.js +81 -0
  200. package/dist/logger.js.map +1 -0
  201. package/dist/metrics/index.d.ts +1 -1
  202. package/dist/metrics/index.js +1 -1
  203. package/dist/metrics/sessionMetrics.d.ts +1 -1
  204. package/dist/metrics/sessionMetrics.js +6 -6
  205. package/dist/overlays/fetcher.d.ts +2 -2
  206. package/dist/overlays/fetcher.js +13 -15
  207. package/dist/overlays/fetcher.js.map +1 -1
  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 +88 -28
  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 +13 -15
  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 +146 -146
  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 +32 -8
  239. package/dist/runtime.js +109 -13
  240. package/dist/runtime.js.map +1 -1
  241. package/dist/smart-canvas.esm.js +144 -55
  242. package/dist/smart-canvas.esm.js.map +4 -4
  243. package/dist/smart-canvas.js +14688 -11455
  244. package/dist/smart-canvas.js.map +4 -4
  245. package/dist/smart-canvas.min.js +145 -55
  246. package/dist/smart-canvas.min.js.map +4 -4
  247. package/dist/state/StateStore.d.ts +1 -7
  248. package/dist/state/StateStore.js +15 -9
  249. package/dist/state/StateStore.js.map +1 -1
  250. package/dist/state/helpers/cooldowns.d.ts +1 -1
  251. package/dist/state/helpers/cooldowns.js +1 -1
  252. package/dist/state/helpers/dismissals.d.ts +1 -1
  253. package/dist/state/helpers/dismissals.js +1 -1
  254. package/dist/state/helpers/frequency.d.ts +1 -1
  255. package/dist/state/helpers/frequency.js +1 -1
  256. package/dist/state/index.d.ts +4 -4
  257. package/dist/state/index.js +3 -3
  258. package/dist/state/schema.d.ts +1 -1
  259. package/dist/state/schema.js +1 -1
  260. package/dist/store/example.d.ts +1 -0
  261. package/dist/store/example.js +43 -0
  262. package/dist/store/example.js.map +1 -0
  263. package/dist/store/mini-effector.d.ts +46 -0
  264. package/dist/store/mini-effector.js +88 -0
  265. package/dist/store/mini-effector.js.map +1 -0
  266. package/dist/surfaces/Surfaces.d.ts +11 -0
  267. package/dist/surfaces/Surfaces.js +361 -0
  268. package/dist/surfaces/Surfaces.js.map +1 -0
  269. package/dist/surfaces/index.d.ts +9 -0
  270. package/dist/surfaces/index.js +12 -0
  271. package/dist/surfaces/index.js.map +1 -0
  272. package/dist/surfaces/positioning.d.ts +50 -0
  273. package/dist/surfaces/positioning.js +228 -0
  274. package/dist/surfaces/positioning.js.map +1 -0
  275. package/dist/surfaces/types.d.ts +167 -0
  276. package/dist/surfaces/types.js +23 -0
  277. package/dist/surfaces/types.js.map +1 -0
  278. package/dist/telemetry/adapters/noop.d.ts +12 -0
  279. package/dist/telemetry/adapters/noop.js +42 -0
  280. package/dist/telemetry/adapters/noop.js.map +1 -0
  281. package/dist/telemetry/adapters/posthog.d.ts +8 -2
  282. package/dist/telemetry/adapters/posthog.js +36 -14
  283. package/dist/telemetry/adapters/posthog.js.map +1 -1
  284. package/dist/telemetry/index.d.ts +4 -3
  285. package/dist/telemetry/index.js +3 -2
  286. package/dist/telemetry/index.js.map +1 -1
  287. package/dist/telemetry/registry.d.ts +2 -9
  288. package/dist/telemetry/registry.js +4 -2
  289. package/dist/telemetry/registry.js.map +1 -1
  290. package/dist/telemetry/types.d.ts +1 -1
  291. package/dist/theme/ThemeProvider.d.ts +2 -2
  292. package/dist/theme/ThemeProvider.js +21 -21
  293. package/dist/theme/ThemeProvider.js.map +1 -1
  294. package/dist/theme/defaultTheme.d.ts +4 -5
  295. package/dist/theme/defaultTheme.js +127 -118
  296. package/dist/theme/defaultTheme.js.map +1 -1
  297. package/dist/theme/extractHostTheme.d.ts +1 -1
  298. package/dist/theme/extractHostTheme.js +43 -45
  299. package/dist/theme/extractHostTheme.js.map +1 -1
  300. package/dist/theme/index.d.ts +5 -5
  301. package/dist/theme/index.js +3 -3
  302. package/dist/theme/index.js.map +1 -1
  303. package/dist/theme/types.d.ts +2 -2
  304. package/dist/token.d.ts +2 -0
  305. package/dist/token.js +3 -6
  306. package/dist/token.js.map +1 -1
  307. package/dist/types-only.d.ts +32 -0
  308. package/dist/types-only.js +11 -0
  309. package/dist/types-only.js.map +1 -0
  310. package/dist/types.d.ts +89 -56
  311. package/dist/types.js +14 -2
  312. package/dist/types.js.map +1 -1
  313. package/dist/version.d.ts +13 -0
  314. package/dist/version.js +14 -0
  315. package/dist/version.js.map +1 -0
  316. package/dist/widgets/WidgetRegistry.d.ts +145 -0
  317. package/dist/widgets/WidgetRegistry.js +191 -0
  318. package/dist/widgets/WidgetRegistry.js.map +1 -0
  319. package/dist/widgets/index.d.ts +7 -0
  320. package/dist/widgets/index.js +7 -0
  321. package/dist/widgets/index.js.map +1 -0
  322. package/package.json +35 -15
  323. package/schema/canvas-config.schema.json +488 -254
  324. package/schema/runtime-context.schema.json +1 -5
@@ -2,346 +2,580 @@
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
21
  },
22
- "overlayRecipe": {
23
- "type": "object",
24
- "description": "Inline overlay recipe (for testing)",
25
- "properties": {
26
- "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
- }
36
- },
37
- "required": ["id", "version", "steps"],
38
- "additionalProperties": false
39
- },
40
- "patches": {
22
+ "tiles": {
41
23
  "type": "array",
42
- "description": "Optional host DOM patches to apply when the canvas renders",
43
- "items": {
44
- "$ref": "#/$defs/patch"
45
- }
24
+ "description": "Tiles to display in the canvas drawer",
25
+ "items": { "$ref": "#/$defs/tile" }
46
26
  },
47
- "rectangles": {
27
+ "actions": {
48
28
  "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": {
70
- "type": "object",
71
- "required": ["type"],
72
- "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
- }
96
- },
97
- "additionalProperties": false
98
- },
99
- "experiment": {
100
- "type": "object",
101
- "description": "DEPRECATED: Use activation.strategy instead",
102
- "properties": {
103
- "featureKey": { "type": "string" },
104
- "variationId": { "type": "number" },
105
- "variationValue": {},
106
- "predicate": {}
107
- },
108
- "additionalProperties": true
109
- },
110
- "activation": {
111
- "$ref": "#/$defs/activationConfig",
112
- "description": "v2 activation config for conditional rendering"
113
- },
114
- "analyticsKey": { "type": "string" }
115
- },
116
- "additionalProperties": false
117
- }
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" }
31
+ },
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"
118
43
  }
119
44
  },
120
45
  "additionalProperties": false,
121
46
  "$defs": {
122
- "anchorSelector": {
47
+ "tile": {
123
48
  "type": "object",
124
- "oneOf": [
125
- {
126
- "required": ["type", "value"],
127
- "properties": {
128
- "type": { "const": "css" },
129
- "value": { "type": "string" }
130
- },
131
- "additionalProperties": false
132
- },
133
- {
134
- "required": ["type", "key"],
49
+ "required": ["id", "title", "content"],
50
+ "properties": {
51
+ "id": { "type": "string" },
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",
135
61
  "properties": {
136
- "type": { "const": "data" },
137
- "key": { "type": "string" },
138
- "value": { "type": "string" }
62
+ "background": { "type": "string" },
63
+ "borderColor": { "type": "string" },
64
+ "textColor": { "type": "string" },
65
+ "accentColor": { "type": "string" }
139
66
  },
140
67
  "additionalProperties": false
141
68
  },
142
- {
143
- "required": ["type"],
144
- "properties": {
145
- "type": { "const": "aria" },
146
- "role": { "type": "string" },
147
- "label": { "type": "string" }
148
- },
149
- "additionalProperties": false
69
+ "content": { "$ref": "#/$defs/tileContent" },
70
+ "activation": {
71
+ "$ref": "#/$defs/activationConfig",
72
+ "description": "Activation config for conditional rendering"
150
73
  },
151
- {
152
- "required": ["type", "value"],
153
- "properties": {
154
- "type": { "const": "shadow-css" },
155
- "value": { "type": "string" }
156
- },
157
- "additionalProperties": false
74
+ "analyticsKey": { "type": "string" }
75
+ },
76
+ "additionalProperties": false
77
+ },
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
+ ]
158
108
  },
159
- {
160
- "required": ["type"],
161
- "properties": {
162
- "type": { "const": "ref" },
163
- "el": {}
164
- },
165
- "additionalProperties": false
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": {
118
+ "type": "object",
119
+ "required": ["label"],
120
+ "properties": {
121
+ "label": { "type": "string" },
122
+ "href": { "type": "string" },
123
+ "onClickId": { "type": "string" }
124
+ },
125
+ "additionalProperties": false
126
+ }
166
127
  }
167
- ]
128
+ },
129
+ "additionalProperties": true
168
130
  },
169
- "operation": {
131
+ "actionStep": {
170
132
  "oneOf": [
171
- {
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": {
172
205
  "type": "object",
173
- "required": ["kind"],
174
- "properties": {
175
- "kind": { "const": "append" },
176
- "html": { "type": "string" },
177
- "position": { "type": "string" }
178
- },
179
- "additionalProperties": false
206
+ "additionalProperties": { "type": "string" }
180
207
  },
181
- {
182
- "type": "object",
183
- "required": ["kind"],
184
- "properties": {
185
- "kind": { "const": "prepend" },
186
- "html": { "type": "string" }
187
- },
188
- "additionalProperties": false
208
+ "label": { "type": "string" }
209
+ },
210
+ "additionalProperties": false
211
+ },
212
+ "insertHtml": {
213
+ "type": "object",
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"
189
223
  },
190
- {
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": {
191
249
  "type": "object",
192
- "required": ["kind", "where"],
250
+ "required": ["body"],
193
251
  "properties": {
194
- "kind": { "const": "insertAdjacent" },
195
- "where": {
196
- "enum": ["beforebegin", "afterbegin", "beforeend", "afterend"]
197
- },
198
- "html": { "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
+ }
199
259
  },
200
260
  "additionalProperties": false
201
261
  },
202
- {
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": {
203
287
  "type": "object",
204
- "required": ["kind", "className"],
205
288
  "properties": {
206
- "kind": { "enum": ["addClass", "removeClass"] },
207
- "className": { "type": "string" }
289
+ "color": { "type": "string" },
290
+ "scrimOpacity": { "type": "number", "minimum": 0, "maximum": 1 },
291
+ "paddingPx": { "type": "number" },
292
+ "radiusPx": { "type": "number" }
208
293
  },
209
294
  "additionalProperties": false
210
295
  },
211
- {
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": {
212
343
  "type": "object",
213
- "required": ["kind", "name"],
344
+ "required": ["body"],
214
345
  "properties": {
215
- "kind": { "const": "setAttr" },
216
- "name": { "type": "string" },
217
- "value": { "type": ["string", "null"] }
346
+ "title": { "type": "string" },
347
+ "body": { "type": "string" }
218
348
  },
219
349
  "additionalProperties": false
220
350
  },
221
- {
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": {
222
363
  "type": "object",
223
- "required": ["kind", "prop"],
224
364
  "properties": {
225
- "kind": { "const": "setStyle" },
226
- "prop": { "type": "string" },
227
- "value": { "type": ["string", "null"] },
228
- "important": { "type": "boolean" }
365
+ "opacity": { "type": "number", "minimum": 0, "maximum": 1, "default": 0.6 }
229
366
  },
230
367
  "additionalProperties": false
231
368
  },
232
- {
369
+ "dismiss": {
233
370
  "type": "object",
234
- "required": ["kind", "text"],
235
371
  "properties": {
236
- "kind": { "const": "setText" },
237
- "text": { "type": "string" }
372
+ "onEsc": { "type": "boolean", "default": true },
373
+ "closeButton": { "type": "boolean", "default": true },
374
+ "timeoutMs": { "type": "number", "minimum": 0 }
238
375
  },
239
376
  "additionalProperties": false
240
- }
241
- ]
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
242
389
  },
243
- "patch": {
390
+ "scrollTo": {
244
391
  "type": "object",
245
- "required": ["id", "anchor", "operations"],
392
+ "required": ["kind", "anchorId"],
246
393
  "properties": {
247
- "id": { "type": "string" },
248
- "routes": {
249
- "type": "array",
250
- "items": { "type": "string" },
251
- "description": "URL path patterns where this patch should apply. Supports wildcards (e.g., '/', '/pricing', '/products/*'). If omitted, patch applies on all pages."
394
+ "kind": { "const": "navigation:scrollTo" },
395
+ "anchorId": { "type": "string" },
396
+ "behavior": {
397
+ "type": "string",
398
+ "enum": ["smooth", "instant"],
399
+ "default": "smooth"
252
400
  },
253
- "anchor": { "$ref": "#/$defs/anchorSelector" },
254
- "operations": {
255
- "type": "array",
256
- "items": { "$ref": "#/$defs/operation" }
257
- }
401
+ "block": {
402
+ "type": "string",
403
+ "enum": ["start", "center", "end"],
404
+ "default": "center"
405
+ },
406
+ "label": { "type": "string" }
258
407
  },
259
408
  "additionalProperties": false
260
409
  },
261
- "tooltipStep": {
410
+ "navigate": {
262
411
  "type": "object",
263
- "required": ["kind", "id", "anchor", "content"],
412
+ "required": ["kind", "url"],
264
413
  "properties": {
265
- "kind": { "const": "tooltip" },
266
- "id": { "type": "string" },
267
- "anchor": { "$ref": "#/$defs/anchorSelector" },
268
- "content": {
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": {
269
435
  "type": "object",
436
+ "required": ["widgetId"],
270
437
  "properties": {
271
- "title": { "type": "string" },
272
- "body": { "type": "string" }
438
+ "widgetId": { "type": "string" },
439
+ "props": { "type": "object", "additionalProperties": true }
273
440
  },
274
- "required": ["body"],
275
441
  "additionalProperties": false
276
442
  },
277
- "placement": { "enum": ["top","bottom","left","right","auto"] },
278
- "offsetPx": { "type": "number" },
279
- "blocking": { "type": "boolean" },
280
- "trigger": { "enum": ["immediate","hover","click"] },
281
- "ctaButtons": {
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": {
282
468
  "type": "array",
283
- "items": {
284
- "type": "object",
285
- "properties": {
286
- "label": { "type": "string" },
287
- "actionId": { "type": "string" }
288
- },
289
- "required": ["label","actionId"],
290
- "additionalProperties": false
291
- }
469
+ "items": { "$ref": "#/$defs/actionStep" }
292
470
  },
293
- "dismiss": {
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": {
294
505
  "type": "object",
295
- "properties": {
296
- "onEsc": { "type": "boolean" },
297
- "closeButton": { "type": "boolean" },
298
- "timeoutMs": { "type": "number" }
506
+ "additionalProperties": {
507
+ "type": "string",
508
+ "description": "Target step ID or 'end' to finish the tour"
299
509
  },
300
- "additionalProperties": false
510
+ "description": "Map of actionId to next step ID"
301
511
  }
302
512
  },
303
513
  "additionalProperties": false
304
514
  },
305
- "highlightStep": {
515
+ "tour": {
306
516
  "type": "object",
307
- "required": ["kind", "id", "anchor"],
517
+ "required": ["kind", "tourId", "steps"],
308
518
  "properties": {
309
- "kind": { "const": "highlight" },
310
- "id": { "type": "string" },
311
- "anchor": { "$ref": "#/$defs/anchorSelector" },
312
- "copy": { "type": "string" },
313
- "ring": {
314
- "type": "object",
315
- "properties": {
316
- "paddingPx": { "type": "number" },
317
- "radiusPx": { "type": "number" }
318
- },
319
- "additionalProperties": false
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"
320
526
  },
321
- "scrim": {
322
- "type": "object",
323
- "properties": {
324
- "opacity": { "type": "number" }
325
- },
326
- "additionalProperties": false
527
+ "startStep": {
528
+ "type": "string",
529
+ "description": "ID of the step to start at (defaults to first step)"
327
530
  },
328
- "ringColor": { "type": "string" },
329
- "blocking": { "type": "boolean" },
330
- "dismiss": {
331
- "type": "object",
332
- "properties": {
333
- "onClickOutside": { "type": "boolean" },
334
- "onEsc": { "type": "boolean" },
335
- "timeoutMs": { "type": "number" }
336
- },
337
- "additionalProperties": false
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" }
568
+ },
569
+ "include": {
570
+ "type": "array",
571
+ "items": { "type": "string" }
338
572
  }
339
573
  },
340
574
  "additionalProperties": false
341
575
  },
342
576
  "activationConfig": {
343
577
  "type": "object",
344
- "description": "v2 activation configuration for conditional tile rendering",
578
+ "description": "Activation configuration for conditional tile rendering",
345
579
  "properties": {
346
580
  "routes": { "$ref": "#/$defs/routeFilter" },
347
581
  "strategy": { "$ref": "#/$defs/decisionStrategy" }