@syntrologie/runtime-sdk 1.0.1-canary.3 → 2.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 (122) hide show
  1. package/CAPABILITIES.md +630 -463
  2. package/README.md +285 -62
  3. package/dist/RuntimeProvider.d.ts +51 -0
  4. package/dist/RuntimeProvider.js +114 -0
  5. package/dist/RuntimeProvider.js.map +1 -0
  6. package/dist/SmartCanvasApp.d.ts +9 -3
  7. package/dist/SmartCanvasApp.js +36 -38
  8. package/dist/SmartCanvasApp.js.map +1 -1
  9. package/dist/actions/ActionEngine.d.ts +11 -0
  10. package/dist/actions/ActionEngine.js +274 -0
  11. package/dist/actions/ActionEngine.js.map +1 -0
  12. package/dist/actions/executors/index.d.ts +118 -0
  13. package/dist/actions/executors/index.js +242 -0
  14. package/dist/actions/executors/index.js.map +1 -0
  15. package/dist/actions/executors/tour.d.ts +18 -0
  16. package/dist/actions/executors/tour.js +332 -0
  17. package/dist/actions/executors/tour.js.map +1 -0
  18. package/dist/actions/index.d.ts +10 -0
  19. package/dist/actions/index.js +12 -0
  20. package/dist/actions/index.js.map +1 -0
  21. package/dist/actions/types.d.ts +399 -0
  22. package/dist/actions/types.js +8 -0
  23. package/dist/actions/types.js.map +1 -0
  24. package/dist/actions/validation.d.ts +14 -0
  25. package/dist/actions/validation.js +603 -0
  26. package/dist/actions/validation.js.map +1 -0
  27. package/dist/api.d.ts +32 -18
  28. package/dist/api.js +56 -39
  29. package/dist/api.js.map +1 -1
  30. package/dist/apps/AppContext.d.ts +31 -0
  31. package/dist/apps/AppContext.js +93 -0
  32. package/dist/apps/AppContext.js.map +1 -0
  33. package/dist/apps/AppLoader.d.ts +84 -0
  34. package/dist/apps/AppLoader.js +250 -0
  35. package/dist/apps/AppLoader.js.map +1 -0
  36. package/dist/apps/AppRegistry.d.ts +102 -0
  37. package/dist/apps/AppRegistry.js +317 -0
  38. package/dist/apps/AppRegistry.js.map +1 -0
  39. package/dist/apps/examples/gamification-app.example.d.ts +305 -0
  40. package/dist/apps/examples/gamification-app.example.js +329 -0
  41. package/dist/apps/examples/gamification-app.example.js.map +1 -0
  42. package/dist/apps/index.d.ts +18 -0
  43. package/dist/apps/index.js +26 -0
  44. package/dist/apps/index.js.map +1 -0
  45. package/dist/apps/types.d.ts +231 -0
  46. package/dist/apps/types.js +8 -0
  47. package/dist/apps/types.js.map +1 -0
  48. package/dist/bootstrap.d.ts +24 -0
  49. package/dist/bootstrap.js +133 -33
  50. package/dist/bootstrap.js.map +1 -1
  51. package/dist/components/ShadowCanvasOverlay.js +36 -9
  52. package/dist/components/ShadowCanvasOverlay.js.map +1 -1
  53. package/dist/components/TileCard.js +37 -18
  54. package/dist/components/TileCard.js.map +1 -1
  55. package/dist/context/schema.d.ts +16 -16
  56. package/dist/decisions/schema.d.ts +96 -96
  57. package/dist/earlyPatcher.d.ts +8 -20
  58. package/dist/earlyPatcher.js +13 -62
  59. package/dist/earlyPatcher.js.map +1 -1
  60. package/dist/editorLoader.d.ts +2 -0
  61. package/dist/editorLoader.js +46 -7
  62. package/dist/editorLoader.js.map +1 -1
  63. package/dist/events/normalizers/posthog.d.ts +24 -0
  64. package/dist/events/normalizers/posthog.js.map +1 -1
  65. package/dist/events/schema.d.ts +8 -8
  66. package/dist/events/types.d.ts +6 -0
  67. package/dist/events/types.js +8 -0
  68. package/dist/events/types.js.map +1 -1
  69. package/dist/hooks/useCanvasOverlays.d.ts +4 -1
  70. package/dist/hooks/useCanvasOverlays.js +53 -6
  71. package/dist/hooks/useCanvasOverlays.js.map +1 -1
  72. package/dist/hooks/useShadowCanvasConfig.d.ts +3 -7
  73. package/dist/hooks/useShadowCanvasConfig.js +2 -3
  74. package/dist/hooks/useShadowCanvasConfig.js.map +1 -1
  75. package/dist/index.d.ts +5 -0
  76. package/dist/index.js +10 -0
  77. package/dist/index.js.map +1 -1
  78. package/dist/overlays/schema.d.ts +153 -153
  79. package/dist/runtime.d.ts +24 -0
  80. package/dist/runtime.js +75 -1
  81. package/dist/runtime.js.map +1 -1
  82. package/dist/smart-canvas.esm.js +162 -55
  83. package/dist/smart-canvas.esm.js.map +4 -4
  84. package/dist/smart-canvas.js +21133 -17957
  85. package/dist/smart-canvas.js.map +4 -4
  86. package/dist/smart-canvas.min.js +162 -55
  87. package/dist/smart-canvas.min.js.map +4 -4
  88. package/dist/store/example.d.ts +1 -0
  89. package/dist/store/example.js +43 -0
  90. package/dist/store/example.js.map +1 -0
  91. package/dist/store/mini-effector.d.ts +46 -0
  92. package/dist/store/mini-effector.js +90 -0
  93. package/dist/store/mini-effector.js.map +1 -0
  94. package/dist/surfaces/Surfaces.d.ts +11 -0
  95. package/dist/surfaces/Surfaces.js +361 -0
  96. package/dist/surfaces/Surfaces.js.map +1 -0
  97. package/dist/surfaces/index.d.ts +9 -0
  98. package/dist/surfaces/index.js +12 -0
  99. package/dist/surfaces/index.js.map +1 -0
  100. package/dist/surfaces/positioning.d.ts +50 -0
  101. package/dist/surfaces/positioning.js +231 -0
  102. package/dist/surfaces/positioning.js.map +1 -0
  103. package/dist/surfaces/types.d.ts +167 -0
  104. package/dist/surfaces/types.js +23 -0
  105. package/dist/surfaces/types.js.map +1 -0
  106. package/dist/telemetry/adapters/posthog.d.ts +6 -0
  107. package/dist/telemetry/adapters/posthog.js +9 -0
  108. package/dist/telemetry/adapters/posthog.js.map +1 -1
  109. package/dist/types-only.d.ts +32 -0
  110. package/dist/types-only.js +11 -0
  111. package/dist/types-only.js.map +1 -0
  112. package/dist/types.d.ts +26 -14
  113. package/dist/types.js +1 -1
  114. package/dist/types.js.map +1 -1
  115. package/dist/widgets/WidgetRegistry.d.ts +139 -0
  116. package/dist/widgets/WidgetRegistry.js +182 -0
  117. package/dist/widgets/WidgetRegistry.js.map +1 -0
  118. package/dist/widgets/index.d.ts +7 -0
  119. package/dist/widgets/index.js +7 -0
  120. package/dist/widgets/index.js.map +1 -0
  121. package/package.json +13 -3
  122. package/schema/canvas-config.schema.json +444 -254
@@ -2,346 +2,536 @@
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": ["text", "metric", "chatbot", "embed", "custom", "alert", "success", "warning", "info", "error", "video", "gallery", "code", "form", "rating", "progress", "survey", "checklist", "stats", "comparison", "chart", "table"]
158
85
  },
159
- {
160
- "required": ["type"],
161
- "properties": {
162
- "type": { "const": "ref" },
163
- "el": {}
164
- },
165
- "additionalProperties": false
86
+ "headline": { "type": "string" },
87
+ "body": { "type": "string" },
88
+ "metricValue": { "type": "string" },
89
+ "metricUnit": { "type": "string" },
90
+ "embedUrl": { "type": "string" },
91
+ "component": { "type": "string", "description": "Custom component name" },
92
+ "actions": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "object",
96
+ "required": ["label"],
97
+ "properties": {
98
+ "label": { "type": "string" },
99
+ "href": { "type": "string" },
100
+ "onClickId": { "type": "string" }
101
+ },
102
+ "additionalProperties": false
103
+ }
166
104
  }
167
- ]
105
+ },
106
+ "additionalProperties": true
168
107
  },
169
- "operation": {
108
+ "actionStep": {
170
109
  "oneOf": [
171
- {
110
+ { "$ref": "#/$defs/setText" },
111
+ { "$ref": "#/$defs/setAttr" },
112
+ { "$ref": "#/$defs/addClass" },
113
+ { "$ref": "#/$defs/removeClass" },
114
+ { "$ref": "#/$defs/setStyle" },
115
+ { "$ref": "#/$defs/insertHtml" },
116
+ { "$ref": "#/$defs/tooltip" },
117
+ { "$ref": "#/$defs/highlight" },
118
+ { "$ref": "#/$defs/pulse" },
119
+ { "$ref": "#/$defs/badge" },
120
+ { "$ref": "#/$defs/modal" },
121
+ { "$ref": "#/$defs/scrollTo" },
122
+ { "$ref": "#/$defs/navigate" },
123
+ { "$ref": "#/$defs/mountWidget" },
124
+ { "$ref": "#/$defs/wait" },
125
+ { "$ref": "#/$defs/sequence" },
126
+ { "$ref": "#/$defs/parallel" },
127
+ { "$ref": "#/$defs/tour" }
128
+ ]
129
+ },
130
+ "setText": {
131
+ "type": "object",
132
+ "required": ["kind", "anchorId", "text"],
133
+ "properties": {
134
+ "kind": { "const": "content:setText" },
135
+ "anchorId": { "type": "string", "description": "CSS selector for target element" },
136
+ "text": { "type": "string" },
137
+ "label": { "type": "string", "description": "Identifier for this action" }
138
+ },
139
+ "additionalProperties": false
140
+ },
141
+ "setAttr": {
142
+ "type": "object",
143
+ "required": ["kind", "anchorId", "attr", "value"],
144
+ "properties": {
145
+ "kind": { "const": "content:setAttr" },
146
+ "anchorId": { "type": "string" },
147
+ "attr": { "type": "string" },
148
+ "value": { "type": ["string", "null"] },
149
+ "label": { "type": "string" }
150
+ },
151
+ "additionalProperties": false
152
+ },
153
+ "addClass": {
154
+ "type": "object",
155
+ "required": ["kind", "anchorId", "className"],
156
+ "properties": {
157
+ "kind": { "const": "content:addClass" },
158
+ "anchorId": { "type": "string" },
159
+ "className": { "type": "string" },
160
+ "label": { "type": "string" }
161
+ },
162
+ "additionalProperties": false
163
+ },
164
+ "removeClass": {
165
+ "type": "object",
166
+ "required": ["kind", "anchorId", "className"],
167
+ "properties": {
168
+ "kind": { "const": "content:removeClass" },
169
+ "anchorId": { "type": "string" },
170
+ "className": { "type": "string" },
171
+ "label": { "type": "string" }
172
+ },
173
+ "additionalProperties": false
174
+ },
175
+ "setStyle": {
176
+ "type": "object",
177
+ "required": ["kind", "anchorId", "styles"],
178
+ "properties": {
179
+ "kind": { "const": "content:setStyle" },
180
+ "anchorId": { "type": "string" },
181
+ "styles": {
172
182
  "type": "object",
173
- "required": ["kind"],
174
- "properties": {
175
- "kind": { "const": "append" },
176
- "html": { "type": "string" },
177
- "position": { "type": "string" }
178
- },
179
- "additionalProperties": false
183
+ "additionalProperties": { "type": "string" }
180
184
  },
181
- {
182
- "type": "object",
183
- "required": ["kind"],
184
- "properties": {
185
- "kind": { "const": "prepend" },
186
- "html": { "type": "string" }
187
- },
188
- "additionalProperties": false
185
+ "label": { "type": "string" }
186
+ },
187
+ "additionalProperties": false
188
+ },
189
+ "insertHtml": {
190
+ "type": "object",
191
+ "required": ["kind", "anchorId", "html"],
192
+ "properties": {
193
+ "kind": { "const": "content:insertHtml" },
194
+ "anchorId": { "type": "string" },
195
+ "html": { "type": "string" },
196
+ "position": {
197
+ "type": "string",
198
+ "enum": ["beforebegin", "afterbegin", "beforeend", "afterend", "replace"],
199
+ "default": "beforeend"
189
200
  },
190
- {
201
+ "label": { "type": "string" }
202
+ },
203
+ "additionalProperties": false
204
+ },
205
+ "ctaButton": {
206
+ "type": "object",
207
+ "required": ["label", "actionId"],
208
+ "properties": {
209
+ "label": { "type": "string", "description": "Button text" },
210
+ "actionId": { "type": "string", "description": "Identifier for the action" },
211
+ "primary": { "type": "boolean", "description": "Whether this is a primary button", "default": false }
212
+ },
213
+ "additionalProperties": false
214
+ },
215
+ "tooltip": {
216
+ "type": "object",
217
+ "required": ["kind", "anchorId", "content"],
218
+ "properties": {
219
+ "kind": { "const": "overlays:tooltip" },
220
+ "anchorId": { "type": "string" },
221
+ "content": {
191
222
  "type": "object",
192
- "required": ["kind", "where"],
223
+ "required": ["body"],
193
224
  "properties": {
194
- "kind": { "const": "insertAdjacent" },
195
- "where": {
196
- "enum": ["beforebegin", "afterbegin", "beforeend", "afterend"]
197
- },
198
- "html": { "type": "string" }
225
+ "title": { "type": "string" },
226
+ "body": { "type": "string" },
227
+ "ctaButtons": {
228
+ "type": "array",
229
+ "items": { "$ref": "#/$defs/ctaButton" },
230
+ "description": "Multiple CTA buttons for tours"
231
+ }
199
232
  },
200
233
  "additionalProperties": false
201
234
  },
202
- {
235
+ "placement": {
236
+ "type": "string",
237
+ "enum": ["top", "bottom", "left", "right"],
238
+ "default": "top"
239
+ },
240
+ "trigger": {
241
+ "type": "string",
242
+ "enum": ["immediate", "hover", "click"],
243
+ "default": "immediate"
244
+ },
245
+ "waitFor": {
246
+ "type": "string",
247
+ "description": "When the action completes (for sequences). Options: 'dismissed', 'cta-click', 'timeout:N' (ms)"
248
+ },
249
+ "label": { "type": "string" }
250
+ },
251
+ "additionalProperties": false
252
+ },
253
+ "highlight": {
254
+ "type": "object",
255
+ "required": ["kind", "anchorId"],
256
+ "properties": {
257
+ "kind": { "const": "overlays:highlight" },
258
+ "anchorId": { "type": "string" },
259
+ "style": {
203
260
  "type": "object",
204
- "required": ["kind", "className"],
205
261
  "properties": {
206
- "kind": { "enum": ["addClass", "removeClass"] },
207
- "className": { "type": "string" }
262
+ "color": { "type": "string" },
263
+ "scrimOpacity": { "type": "number", "minimum": 0, "maximum": 1 },
264
+ "paddingPx": { "type": "number" },
265
+ "radiusPx": { "type": "number" }
208
266
  },
209
267
  "additionalProperties": false
210
268
  },
211
- {
269
+ "duration": { "type": "number", "description": "Duration in ms before auto-cleanup (for sequences)" },
270
+ "label": { "type": "string" }
271
+ },
272
+ "additionalProperties": false
273
+ },
274
+ "pulse": {
275
+ "type": "object",
276
+ "required": ["kind", "anchorId"],
277
+ "properties": {
278
+ "kind": { "const": "overlays:pulse" },
279
+ "anchorId": { "type": "string" },
280
+ "color": { "type": "string" },
281
+ "durationMs": { "type": "number" },
282
+ "label": { "type": "string" }
283
+ },
284
+ "additionalProperties": false
285
+ },
286
+ "badge": {
287
+ "type": "object",
288
+ "required": ["kind", "anchorId", "text"],
289
+ "properties": {
290
+ "kind": { "const": "overlays:badge" },
291
+ "anchorId": { "type": "string" },
292
+ "text": { "type": "string" },
293
+ "variant": {
294
+ "type": "string",
295
+ "enum": ["info", "success", "warning", "error"],
296
+ "default": "info"
297
+ },
298
+ "position": {
299
+ "type": "string",
300
+ "enum": ["top-right", "top-left", "bottom-right", "bottom-left"],
301
+ "default": "top-right"
302
+ },
303
+ "label": { "type": "string" }
304
+ },
305
+ "additionalProperties": false
306
+ },
307
+ "modal": {
308
+ "type": "object",
309
+ "required": ["kind", "content"],
310
+ "properties": {
311
+ "kind": { "const": "overlays:modal" },
312
+ "content": {
212
313
  "type": "object",
213
- "required": ["kind", "name"],
314
+ "required": ["body"],
214
315
  "properties": {
215
- "kind": { "const": "setAttr" },
216
- "name": { "type": "string" },
217
- "value": { "type": ["string", "null"] }
316
+ "title": { "type": "string" },
317
+ "body": { "type": "string" }
218
318
  },
219
319
  "additionalProperties": false
220
320
  },
221
- {
321
+ "size": {
322
+ "type": "string",
323
+ "enum": ["sm", "md", "lg"],
324
+ "default": "md",
325
+ "description": "Modal size"
326
+ },
327
+ "blocking": {
328
+ "type": "boolean",
329
+ "default": false,
330
+ "description": "Whether the modal blocks interaction with the page"
331
+ },
332
+ "scrim": {
222
333
  "type": "object",
223
- "required": ["kind", "prop"],
224
334
  "properties": {
225
- "kind": { "const": "setStyle" },
226
- "prop": { "type": "string" },
227
- "value": { "type": ["string", "null"] },
228
- "important": { "type": "boolean" }
335
+ "opacity": { "type": "number", "minimum": 0, "maximum": 1, "default": 0.6 }
229
336
  },
230
337
  "additionalProperties": false
231
338
  },
232
- {
339
+ "dismiss": {
233
340
  "type": "object",
234
- "required": ["kind", "text"],
235
341
  "properties": {
236
- "kind": { "const": "setText" },
237
- "text": { "type": "string" }
342
+ "onEsc": { "type": "boolean", "default": true },
343
+ "closeButton": { "type": "boolean", "default": true },
344
+ "timeoutMs": { "type": "number", "minimum": 0 }
238
345
  },
239
346
  "additionalProperties": false
240
- }
241
- ]
347
+ },
348
+ "ctaButtons": {
349
+ "type": "array",
350
+ "items": { "$ref": "#/$defs/ctaButton" }
351
+ },
352
+ "waitFor": {
353
+ "type": "string",
354
+ "description": "When the action completes (for sequences). Options: 'dismissed', 'cta-click', 'timeout:N' (ms)"
355
+ },
356
+ "label": { "type": "string" }
357
+ },
358
+ "additionalProperties": false
242
359
  },
243
- "patch": {
360
+ "scrollTo": {
244
361
  "type": "object",
245
- "required": ["id", "anchor", "operations"],
362
+ "required": ["kind", "anchorId"],
246
363
  "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."
364
+ "kind": { "const": "navigation:scrollTo" },
365
+ "anchorId": { "type": "string" },
366
+ "behavior": {
367
+ "type": "string",
368
+ "enum": ["smooth", "instant"],
369
+ "default": "smooth"
252
370
  },
253
- "anchor": { "$ref": "#/$defs/anchorSelector" },
254
- "operations": {
255
- "type": "array",
256
- "items": { "$ref": "#/$defs/operation" }
257
- }
371
+ "block": {
372
+ "type": "string",
373
+ "enum": ["start", "center", "end"],
374
+ "default": "center"
375
+ },
376
+ "label": { "type": "string" }
258
377
  },
259
378
  "additionalProperties": false
260
379
  },
261
- "tooltipStep": {
380
+ "navigate": {
262
381
  "type": "object",
263
- "required": ["kind", "id", "anchor", "content"],
382
+ "required": ["kind", "url"],
264
383
  "properties": {
265
- "kind": { "const": "tooltip" },
266
- "id": { "type": "string" },
267
- "anchor": { "$ref": "#/$defs/anchorSelector" },
268
- "content": {
384
+ "kind": { "const": "navigation:navigate" },
385
+ "url": { "type": "string" },
386
+ "target": {
387
+ "type": "string",
388
+ "enum": ["_self", "_blank"],
389
+ "default": "_self"
390
+ },
391
+ "label": { "type": "string" }
392
+ },
393
+ "additionalProperties": false
394
+ },
395
+ "mountWidget": {
396
+ "type": "object",
397
+ "required": ["kind", "slot", "widget"],
398
+ "properties": {
399
+ "kind": { "const": "core:mountWidget" },
400
+ "slot": {
401
+ "type": "string",
402
+ "description": "Surface slot to mount to (e.g., overlay_center, sidebar_top)"
403
+ },
404
+ "widget": {
269
405
  "type": "object",
406
+ "required": ["widgetId"],
270
407
  "properties": {
271
- "title": { "type": "string" },
272
- "body": { "type": "string" }
408
+ "widgetId": { "type": "string" },
409
+ "props": { "type": "object", "additionalProperties": true }
273
410
  },
274
- "required": ["body"],
275
411
  "additionalProperties": false
276
412
  },
277
- "placement": { "enum": ["top","bottom","left","right","auto"] },
278
- "offsetPx": { "type": "number" },
279
- "blocking": { "type": "boolean" },
280
- "trigger": { "enum": ["immediate","hover","click"] },
281
- "ctaButtons": {
413
+ "label": { "type": "string" }
414
+ },
415
+ "additionalProperties": false
416
+ },
417
+ "wait": {
418
+ "type": "object",
419
+ "required": ["kind"],
420
+ "properties": {
421
+ "kind": { "const": "core:wait" },
422
+ "durationMs": { "type": "number", "minimum": 0, "description": "Wait for a duration in milliseconds" },
423
+ "event": { "type": "string", "description": "Wait for an event on the EventBus" },
424
+ "label": { "type": "string" }
425
+ },
426
+ "additionalProperties": false
427
+ },
428
+ "sequence": {
429
+ "type": "object",
430
+ "required": ["kind", "actions"],
431
+ "properties": {
432
+ "kind": { "const": "core:sequence" },
433
+ "actions": {
282
434
  "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
- }
435
+ "items": { "$ref": "#/$defs/actionStep" }
292
436
  },
293
- "dismiss": {
437
+ "label": { "type": "string" }
438
+ },
439
+ "additionalProperties": false
440
+ },
441
+ "parallel": {
442
+ "type": "object",
443
+ "required": ["kind", "actions"],
444
+ "properties": {
445
+ "kind": { "const": "core:parallel" },
446
+ "actions": {
447
+ "type": "array",
448
+ "items": { "$ref": "#/$defs/actionStep" }
449
+ },
450
+ "waitFor": {
451
+ "type": "string",
452
+ "enum": ["all", "any"],
453
+ "default": "all",
454
+ "description": "How to determine completion: 'all' waits for all, 'any' completes when first finishes"
455
+ },
456
+ "label": { "type": "string" }
457
+ },
458
+ "additionalProperties": false
459
+ },
460
+ "tourStep": {
461
+ "type": "object",
462
+ "required": ["id", "action"],
463
+ "properties": {
464
+ "id": { "type": "string", "description": "Unique identifier for this step" },
465
+ "action": { "$ref": "#/$defs/actionStep", "description": "Action to execute for this step" },
466
+ "route": { "type": "string", "description": "Route this step appears on" },
467
+ "onAction": {
294
468
  "type": "object",
295
- "properties": {
296
- "onEsc": { "type": "boolean" },
297
- "closeButton": { "type": "boolean" },
298
- "timeoutMs": { "type": "number" }
469
+ "additionalProperties": {
470
+ "type": "string",
471
+ "description": "Target step ID or 'end' to finish the tour"
299
472
  },
300
- "additionalProperties": false
473
+ "description": "Map of actionId to next step ID"
301
474
  }
302
475
  },
303
476
  "additionalProperties": false
304
477
  },
305
- "highlightStep": {
478
+ "tour": {
306
479
  "type": "object",
307
- "required": ["kind", "id", "anchor"],
480
+ "required": ["kind", "tourId", "steps"],
308
481
  "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
482
+ "kind": { "const": "core:tour" },
483
+ "tourId": { "type": "string", "description": "Unique identifier for this tour" },
484
+ "steps": {
485
+ "type": "array",
486
+ "items": { "$ref": "#/$defs/tourStep" },
487
+ "minItems": 1,
488
+ "description": "Sequential tour steps"
320
489
  },
321
- "scrim": {
322
- "type": "object",
323
- "properties": {
324
- "opacity": { "type": "number" }
325
- },
326
- "additionalProperties": false
490
+ "startStep": { "type": "string", "description": "ID of the step to start at (defaults to first step)" },
491
+ "autoStart": { "type": "boolean", "default": true, "description": "Whether to start the tour automatically" },
492
+ "label": { "type": "string" }
493
+ },
494
+ "additionalProperties": false
495
+ },
496
+ "themeConfig": {
497
+ "type": "object",
498
+ "properties": {
499
+ "name": { "type": "string" },
500
+ "mode": { "type": "string", "enum": ["dark", "light"] },
501
+ "position": { "type": "string", "enum": ["left", "right"] },
502
+ "colorPrimary": { "type": "string" },
503
+ "colorBackground": { "type": "string" },
504
+ "colorText": { "type": "string" },
505
+ "borderRadius": { "type": "string" }
506
+ },
507
+ "additionalProperties": false
508
+ },
509
+ "launcherConfig": {
510
+ "type": "object",
511
+ "properties": {
512
+ "enabled": { "type": "boolean" },
513
+ "label": { "type": "string" },
514
+ "position": { "type": "string" }
515
+ },
516
+ "additionalProperties": false
517
+ },
518
+ "routesConfig": {
519
+ "type": "object",
520
+ "properties": {
521
+ "exclude": {
522
+ "type": "array",
523
+ "items": { "type": "string" }
327
524
  },
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
525
+ "include": {
526
+ "type": "array",
527
+ "items": { "type": "string" }
338
528
  }
339
529
  },
340
530
  "additionalProperties": false
341
531
  },
342
532
  "activationConfig": {
343
533
  "type": "object",
344
- "description": "v2 activation configuration for conditional tile rendering",
534
+ "description": "Activation configuration for conditional tile rendering",
345
535
  "properties": {
346
536
  "routes": { "$ref": "#/$defs/routeFilter" },
347
537
  "strategy": { "$ref": "#/$defs/decisionStrategy" }