@syntrologie/runtime-sdk 2.1.0 → 2.2.0-canary.2

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 (356) hide show
  1. package/CAPABILITIES.md +50 -43
  2. package/README.md +7 -7
  3. package/dist/RuntimeProvider.d.ts +1 -1
  4. package/dist/ShadowRootContext.d.ts +19 -0
  5. package/dist/SmartCanvasApp.d.ts +3 -3
  6. package/dist/SmartCanvasElement.d.ts +7 -2
  7. package/dist/SmartCanvasPortal.d.ts +1 -1
  8. package/dist/actions/executors/index.d.ts +3 -3
  9. package/dist/actions/executors/tour.d.ts +1 -1
  10. package/dist/actions/index.d.ts +4 -3
  11. package/dist/actions/schema.d.ts +1229 -0
  12. package/dist/actions/schema.js +67 -0
  13. package/dist/actions/schema.js.map +7 -0
  14. package/dist/adaptives/adaptive-chatbot/index.js +4 -4
  15. package/dist/adaptives/adaptive-chatbot/index.js.map +4 -4
  16. package/dist/adaptives/adaptive-content/index.js +2 -2
  17. package/dist/adaptives/adaptive-content/index.js.map +4 -4
  18. package/dist/adaptives/adaptive-faq/index.js +23 -6
  19. package/dist/adaptives/adaptive-faq/index.js.map +4 -4
  20. package/dist/adaptives/adaptive-gamification/index.js.map +1 -1
  21. package/dist/adaptives/adaptive-nav/index.js +22 -7
  22. package/dist/adaptives/adaptive-nav/index.js.map +4 -4
  23. package/dist/adaptives/adaptive-overlays/index.js +13 -13
  24. package/dist/adaptives/adaptive-overlays/index.js.map +4 -4
  25. package/dist/api.d.ts +2 -2
  26. package/dist/apps/examples/gamification-app.example.d.ts +4 -4
  27. package/dist/apps/index.d.ts +7 -7
  28. package/dist/blocks/data/index.d.ts +1 -1
  29. package/dist/blocks/index.d.ts +2 -2
  30. package/dist/blocks/interactive/index.d.ts +1 -1
  31. package/dist/blocks/notification/NotificationBlock.d.ts +1 -1
  32. package/dist/blocks/notification/index.d.ts +1 -1
  33. package/dist/bootstrap.d.ts +4 -4
  34. package/dist/chunk-AYTRRBR5.js +251 -0
  35. package/dist/chunk-AYTRRBR5.js.map +7 -0
  36. package/dist/chunk-CU354JTM.js +7921 -0
  37. package/dist/chunk-CU354JTM.js.map +7 -0
  38. package/dist/components/ShadowCanvasOverlay.d.ts +2 -2
  39. package/dist/components/TileCard.d.ts +1 -1
  40. package/dist/context/ContextManager.d.ts +1 -1
  41. package/dist/context/index.d.ts +3 -3
  42. package/dist/decisions/engine.d.ts +1 -1
  43. package/dist/decisions/index.d.ts +3 -3
  44. package/dist/decisions/schema.d.ts +24 -24
  45. package/dist/decisions/strategies/rules.d.ts +1 -1
  46. package/dist/decisions/strategies/score.d.ts +1 -1
  47. package/dist/editorLoader.d.ts +4 -4
  48. package/dist/events/EventAccumulator.d.ts +1 -1
  49. package/dist/events/EventBus.d.ts +1 -1
  50. package/dist/events/index.d.ts +7 -6
  51. package/dist/events/registerConfigPredicates.d.ts +19 -0
  52. package/dist/experiments/adapters/growthbook.d.ts +1 -1
  53. package/dist/experiments/index.d.ts +2 -2
  54. package/dist/experiments/registry.d.ts +1 -1
  55. package/dist/fetchers/index.d.ts +2 -2
  56. package/dist/hooks/useShadowCanvasConfig.d.ts +1 -1
  57. package/dist/hostPatcher/index.d.ts +2 -2
  58. package/dist/index.d.ts +24 -21
  59. package/dist/index.js +816 -75
  60. package/dist/index.js.map +7 -1
  61. package/dist/metrics/index.d.ts +1 -1
  62. package/dist/notifications/index.d.ts +6 -6
  63. package/dist/overlays/runtime/index.d.ts +3 -3
  64. package/dist/overlays/runtime/overlay/root.d.ts +17 -1
  65. package/dist/overlays/runtime/overlay/tooltip.d.ts +1 -1
  66. package/dist/react.js +90 -134
  67. package/dist/react.js.map +7 -1
  68. package/dist/render/RenderContext.d.ts +2 -2
  69. package/dist/render/index.d.ts +2 -2
  70. package/dist/render/types.d.ts +2 -2
  71. package/dist/runtime.d.ts +8 -8
  72. package/dist/smart-canvas.esm.js +127 -124
  73. package/dist/smart-canvas.esm.js.map +4 -4
  74. package/dist/smart-canvas.js +17160 -16782
  75. package/dist/smart-canvas.js.map +4 -4
  76. package/dist/smart-canvas.min.js +127 -124
  77. package/dist/smart-canvas.min.js.map +4 -4
  78. package/dist/state/StateStore.d.ts +1 -1
  79. package/dist/state/helpers/cooldowns.d.ts +1 -1
  80. package/dist/state/helpers/dismissals.d.ts +1 -1
  81. package/dist/state/helpers/frequency.d.ts +1 -1
  82. package/dist/state/index.d.ts +3 -3
  83. package/dist/surfaces/index.d.ts +3 -3
  84. package/dist/surfaces/positioning.d.ts +1 -1
  85. package/dist/telemetry/adapters/posthog.d.ts +2 -2
  86. package/dist/telemetry/index.d.ts +3 -3
  87. package/dist/telemetry/registry.d.ts +1 -1
  88. package/dist/theme/ThemeProvider.d.ts +1 -1
  89. package/dist/theme/extractHostTheme.d.ts +1 -1
  90. package/dist/theme/index.d.ts +4 -4
  91. package/dist/types-only.d.ts +1 -1
  92. package/dist/types-only.js +1 -11
  93. package/dist/types-only.js.map +7 -1
  94. package/dist/types.d.ts +1 -1
  95. package/dist/version.d.ts +1 -1
  96. package/dist/widgets/index.d.ts +1 -1
  97. package/package.json +24 -17
  98. package/schema/canvas-config.base.schema.json +351 -0
  99. package/schema/canvas-config.schema.json +3202 -440
  100. package/scripts/validate-config.mjs +54 -58
  101. package/dist/RuntimeProvider.js +0 -113
  102. package/dist/RuntimeProvider.js.map +0 -1
  103. package/dist/SmartCanvasApp.js +0 -143
  104. package/dist/SmartCanvasApp.js.map +0 -1
  105. package/dist/SmartCanvasElement.js +0 -138
  106. package/dist/SmartCanvasElement.js.map +0 -1
  107. package/dist/SmartCanvasPortal.js +0 -17
  108. package/dist/SmartCanvasPortal.js.map +0 -1
  109. package/dist/actions/ActionEngine.js +0 -272
  110. package/dist/actions/ActionEngine.js.map +0 -1
  111. package/dist/actions/executors/index.js +0 -240
  112. package/dist/actions/executors/index.js.map +0 -1
  113. package/dist/actions/executors/tour.js +0 -332
  114. package/dist/actions/executors/tour.js.map +0 -1
  115. package/dist/actions/index.js +0 -12
  116. package/dist/actions/index.js.map +0 -1
  117. package/dist/actions/types.js +0 -8
  118. package/dist/actions/types.js.map +0 -1
  119. package/dist/actions/validation.js +0 -577
  120. package/dist/actions/validation.js.map +0 -1
  121. package/dist/antiFlicker.js +0 -39
  122. package/dist/antiFlicker.js.map +0 -1
  123. package/dist/api.js +0 -205
  124. package/dist/api.js.map +0 -1
  125. package/dist/apps/AppContext.js +0 -91
  126. package/dist/apps/AppContext.js.map +0 -1
  127. package/dist/apps/AppLoader.js +0 -293
  128. package/dist/apps/AppLoader.js.map +0 -1
  129. package/dist/apps/AppRegistry.js +0 -317
  130. package/dist/apps/AppRegistry.js.map +0 -1
  131. package/dist/apps/examples/gamification-app.example.js +0 -329
  132. package/dist/apps/examples/gamification-app.example.js.map +0 -1
  133. package/dist/apps/index.js +0 -16
  134. package/dist/apps/index.js.map +0 -1
  135. package/dist/apps/types.js +0 -8
  136. package/dist/apps/types.js.map +0 -1
  137. package/dist/blocks/data/ComparisonBlock.js +0 -95
  138. package/dist/blocks/data/ComparisonBlock.js.map +0 -1
  139. package/dist/blocks/data/StatsBlock.js +0 -102
  140. package/dist/blocks/data/StatsBlock.js.map +0 -1
  141. package/dist/blocks/data/index.js +0 -3
  142. package/dist/blocks/data/index.js.map +0 -1
  143. package/dist/blocks/index.js +0 -93
  144. package/dist/blocks/index.js.map +0 -1
  145. package/dist/blocks/interactive/ChecklistBlock.js +0 -111
  146. package/dist/blocks/interactive/ChecklistBlock.js.map +0 -1
  147. package/dist/blocks/interactive/RatingBlock.js +0 -147
  148. package/dist/blocks/interactive/RatingBlock.js.map +0 -1
  149. package/dist/blocks/interactive/index.js +0 -3
  150. package/dist/blocks/interactive/index.js.map +0 -1
  151. package/dist/blocks/notification/NotificationBlock.js +0 -171
  152. package/dist/blocks/notification/NotificationBlock.js.map +0 -1
  153. package/dist/blocks/notification/index.js +0 -2
  154. package/dist/blocks/notification/index.js.map +0 -1
  155. package/dist/blocks/theme-tokens.js +0 -25
  156. package/dist/blocks/theme-tokens.js.map +0 -1
  157. package/dist/bootstrap.js +0 -448
  158. package/dist/bootstrap.js.map +0 -1
  159. package/dist/bundle-entry.js +0 -9
  160. package/dist/bundle-entry.js.map +0 -1
  161. package/dist/components/ShadowCanvasOverlay.js +0 -327
  162. package/dist/components/ShadowCanvasOverlay.js.map +0 -1
  163. package/dist/components/TileCard.js +0 -103
  164. package/dist/components/TileCard.js.map +0 -1
  165. package/dist/components/TileWheel.js +0 -50
  166. package/dist/components/TileWheel.js.map +0 -1
  167. package/dist/config-validator.js +0 -173
  168. package/dist/config-validator.js.map +0 -1
  169. package/dist/configFetcher.js +0 -131
  170. package/dist/configFetcher.js.map +0 -1
  171. package/dist/context/ContextManager.js +0 -269
  172. package/dist/context/ContextManager.js.map +0 -1
  173. package/dist/context/index.js +0 -7
  174. package/dist/context/index.js.map +0 -1
  175. package/dist/context/schema.js +0 -50
  176. package/dist/context/schema.js.map +0 -1
  177. package/dist/context/types.js +0 -8
  178. package/dist/context/types.js.map +0 -1
  179. package/dist/controller.js +0 -34
  180. package/dist/controller.js.map +0 -1
  181. package/dist/decisions/engine.js +0 -117
  182. package/dist/decisions/engine.js.map +0 -1
  183. package/dist/decisions/index.js +0 -10
  184. package/dist/decisions/index.js.map +0 -1
  185. package/dist/decisions/schema.js +0 -151
  186. package/dist/decisions/schema.js.map +0 -1
  187. package/dist/decisions/strategies/rules.js +0 -166
  188. package/dist/decisions/strategies/rules.js.map +0 -1
  189. package/dist/decisions/strategies/score.js +0 -29
  190. package/dist/decisions/strategies/score.js.map +0 -1
  191. package/dist/decisions/types.js +0 -2
  192. package/dist/decisions/types.js.map +0 -1
  193. package/dist/earlyPatcher.js +0 -20
  194. package/dist/earlyPatcher.js.map +0 -1
  195. package/dist/editorLoader.js +0 -254
  196. package/dist/editorLoader.js.map +0 -1
  197. package/dist/events/EventAccumulator.js +0 -101
  198. package/dist/events/EventAccumulator.js.map +0 -1
  199. package/dist/events/EventBus.js +0 -152
  200. package/dist/events/EventBus.js.map +0 -1
  201. package/dist/events/index.js +0 -11
  202. package/dist/events/index.js.map +0 -1
  203. package/dist/events/normalizers/canvas.js +0 -116
  204. package/dist/events/normalizers/canvas.js.map +0 -1
  205. package/dist/events/normalizers/posthog.js +0 -171
  206. package/dist/events/normalizers/posthog.js.map +0 -1
  207. package/dist/events/schema.js +0 -30
  208. package/dist/events/schema.js.map +0 -1
  209. package/dist/events/types.js +0 -54
  210. package/dist/events/types.js.map +0 -1
  211. package/dist/experiments/adapters/growthbook.js +0 -81
  212. package/dist/experiments/adapters/growthbook.js.map +0 -1
  213. package/dist/experiments/index.js +0 -4
  214. package/dist/experiments/index.js.map +0 -1
  215. package/dist/experiments/registry.js +0 -30
  216. package/dist/experiments/registry.js.map +0 -1
  217. package/dist/experiments/types.js +0 -2
  218. package/dist/experiments/types.js.map +0 -1
  219. package/dist/fetchers/cdnFetcher.js +0 -96
  220. package/dist/fetchers/cdnFetcher.js.map +0 -1
  221. package/dist/fetchers/experimentsFetcher.js +0 -109
  222. package/dist/fetchers/experimentsFetcher.js.map +0 -1
  223. package/dist/fetchers/index.js +0 -5
  224. package/dist/fetchers/index.js.map +0 -1
  225. package/dist/fetchers/mergeConfigs.js +0 -38
  226. package/dist/fetchers/mergeConfigs.js.map +0 -1
  227. package/dist/fetchers/registry.js +0 -58
  228. package/dist/fetchers/registry.js.map +0 -1
  229. package/dist/fetchers/types.js +0 -2
  230. package/dist/fetchers/types.js.map +0 -1
  231. package/dist/hooks/useCanvasOverlays.js +0 -128
  232. package/dist/hooks/useCanvasOverlays.js.map +0 -1
  233. package/dist/hooks/useHostPatches.js +0 -40
  234. package/dist/hooks/useHostPatches.js.map +0 -1
  235. package/dist/hooks/useShadowCanvasConfig.js +0 -63
  236. package/dist/hooks/useShadowCanvasConfig.js.map +0 -1
  237. package/dist/hostPatcher/core/patcher.js +0 -181
  238. package/dist/hostPatcher/core/patcher.js.map +0 -1
  239. package/dist/hostPatcher/core/sanitizer.js +0 -66
  240. package/dist/hostPatcher/core/sanitizer.js.map +0 -1
  241. package/dist/hostPatcher/core/types.js +0 -2
  242. package/dist/hostPatcher/core/types.js.map +0 -1
  243. package/dist/hostPatcher/index.js +0 -7
  244. package/dist/hostPatcher/index.js.map +0 -1
  245. package/dist/hostPatcher/policy/defaultPolicy.js +0 -23
  246. package/dist/hostPatcher/policy/defaultPolicy.js.map +0 -1
  247. package/dist/hostPatcher/utils/anchors.js +0 -105
  248. package/dist/hostPatcher/utils/anchors.js.map +0 -1
  249. package/dist/hostPatcher/utils/observer.js +0 -11
  250. package/dist/hostPatcher/utils/observer.js.map +0 -1
  251. package/dist/logger.js +0 -81
  252. package/dist/logger.js.map +0 -1
  253. package/dist/metrics/index.js +0 -5
  254. package/dist/metrics/index.js.map +0 -1
  255. package/dist/metrics/sessionMetrics.js +0 -178
  256. package/dist/metrics/sessionMetrics.js.map +0 -1
  257. package/dist/notifications/NotificationToastStack.js +0 -118
  258. package/dist/notifications/NotificationToastStack.js.map +0 -1
  259. package/dist/notifications/index.js +0 -6
  260. package/dist/notifications/index.js.map +0 -1
  261. package/dist/notifications/matcher.js +0 -66
  262. package/dist/notifications/matcher.js.map +0 -1
  263. package/dist/notifications/types.js +0 -13
  264. package/dist/notifications/types.js.map +0 -1
  265. package/dist/notifications/useNotifications.js +0 -104
  266. package/dist/notifications/useNotifications.js.map +0 -1
  267. package/dist/notifications/useNotifyWatcher.js +0 -62
  268. package/dist/notifications/useNotifyWatcher.js.map +0 -1
  269. package/dist/overlays/fetcher.js +0 -15
  270. package/dist/overlays/fetcher.js.map +0 -1
  271. package/dist/overlays/recipeRegistry.js +0 -32
  272. package/dist/overlays/recipeRegistry.js.map +0 -1
  273. package/dist/overlays/runtime/anchor/resolve.js +0 -87
  274. package/dist/overlays/runtime/anchor/resolve.js.map +0 -1
  275. package/dist/overlays/runtime/index.js +0 -8
  276. package/dist/overlays/runtime/index.js.map +0 -1
  277. package/dist/overlays/runtime/overlay/highlight.js +0 -160
  278. package/dist/overlays/runtime/overlay/highlight.js.map +0 -1
  279. package/dist/overlays/runtime/overlay/modal.js +0 -78
  280. package/dist/overlays/runtime/overlay/modal.js.map +0 -1
  281. package/dist/overlays/runtime/overlay/root.js +0 -297
  282. package/dist/overlays/runtime/overlay/root.js.map +0 -1
  283. package/dist/overlays/runtime/overlay/runner.js +0 -602
  284. package/dist/overlays/runtime/overlay/runner.js.map +0 -1
  285. package/dist/overlays/runtime/overlay/tooltip.js +0 -232
  286. package/dist/overlays/runtime/overlay/tooltip.js.map +0 -1
  287. package/dist/overlays/runtime/utils/dom.js +0 -12
  288. package/dist/overlays/runtime/utils/dom.js.map +0 -1
  289. package/dist/overlays/schema.js +0 -52
  290. package/dist/overlays/schema.js.map +0 -1
  291. package/dist/overlays/types.js +0 -2
  292. package/dist/overlays/types.js.map +0 -1
  293. package/dist/render/RenderContext.js +0 -69
  294. package/dist/render/RenderContext.js.map +0 -1
  295. package/dist/render/index.js +0 -3
  296. package/dist/render/index.js.map +0 -1
  297. package/dist/render/types.js +0 -2
  298. package/dist/render/types.js.map +0 -1
  299. package/dist/runtime.js +0 -237
  300. package/dist/runtime.js.map +0 -1
  301. package/dist/state/StateStore.js +0 -176
  302. package/dist/state/StateStore.js.map +0 -1
  303. package/dist/state/helpers/cooldowns.js +0 -31
  304. package/dist/state/helpers/cooldowns.js.map +0 -1
  305. package/dist/state/helpers/dismissals.js +0 -34
  306. package/dist/state/helpers/dismissals.js.map +0 -1
  307. package/dist/state/helpers/frequency.js +0 -43
  308. package/dist/state/helpers/frequency.js.map +0 -1
  309. package/dist/state/index.js +0 -7
  310. package/dist/state/index.js.map +0 -1
  311. package/dist/state/schema.js +0 -25
  312. package/dist/state/schema.js.map +0 -1
  313. package/dist/state/types.js +0 -9
  314. package/dist/state/types.js.map +0 -1
  315. package/dist/store/example.js +0 -43
  316. package/dist/store/example.js.map +0 -1
  317. package/dist/store/mini-effector.js +0 -88
  318. package/dist/store/mini-effector.js.map +0 -1
  319. package/dist/surfaces/Surfaces.js +0 -361
  320. package/dist/surfaces/Surfaces.js.map +0 -1
  321. package/dist/surfaces/index.js +0 -12
  322. package/dist/surfaces/index.js.map +0 -1
  323. package/dist/surfaces/positioning.js +0 -228
  324. package/dist/surfaces/positioning.js.map +0 -1
  325. package/dist/surfaces/types.js +0 -23
  326. package/dist/surfaces/types.js.map +0 -1
  327. package/dist/telemetry/adapters/noop.js +0 -42
  328. package/dist/telemetry/adapters/noop.js.map +0 -1
  329. package/dist/telemetry/adapters/posthog.js +0 -180
  330. package/dist/telemetry/adapters/posthog.js.map +0 -1
  331. package/dist/telemetry/index.js +0 -4
  332. package/dist/telemetry/index.js.map +0 -1
  333. package/dist/telemetry/registry.js +0 -29
  334. package/dist/telemetry/registry.js.map +0 -1
  335. package/dist/telemetry/types.js +0 -2
  336. package/dist/telemetry/types.js.map +0 -1
  337. package/dist/theme/ThemeProvider.js +0 -109
  338. package/dist/theme/ThemeProvider.js.map +0 -1
  339. package/dist/theme/defaultTheme.js +0 -190
  340. package/dist/theme/defaultTheme.js.map +0 -1
  341. package/dist/theme/extractHostTheme.js +0 -259
  342. package/dist/theme/extractHostTheme.js.map +0 -1
  343. package/dist/theme/index.js +0 -7
  344. package/dist/theme/index.js.map +0 -1
  345. package/dist/theme/types.js +0 -6
  346. package/dist/theme/types.js.map +0 -1
  347. package/dist/token.js +0 -44
  348. package/dist/token.js.map +0 -1
  349. package/dist/types.js +0 -17
  350. package/dist/types.js.map +0 -1
  351. package/dist/version.js +0 -14
  352. package/dist/version.js.map +0 -1
  353. package/dist/widgets/WidgetRegistry.js +0 -190
  354. package/dist/widgets/WidgetRegistry.js.map +0 -1
  355. package/dist/widgets/index.js +0 -7
  356. package/dist/widgets/index.js.map +0 -1
package/CAPABILITIES.md CHANGED
@@ -742,38 +742,38 @@ Accordion of contextual navigation tips. Each tip has a collapsible header and e
742
742
 
743
743
  ### Tile Config
744
744
 
745
- | Property | Type | Required | Default | Description |
746
- | ------------------------ | -------------------------- | -------- | ---------- | ------------------------------- |
747
- | `widget` | `"adaptive-nav:tips"` | Yes | | Widget identifier |
748
- | `props.expandBehavior` | `"single"` \| `"multiple"` | No | `"single"` | Accordion expand mode |
749
- | `props.theme` | `"light"` \| `"dark"` \| `"auto"` | No | `"auto"` | Color theme |
750
- | `props.actions` | `NavTipAction[]` | Yes | | Navigation tip items |
745
+ | Property | Type | Required | Default | Description |
746
+ | ---------------------- | --------------------------------- | -------- | ---------- | --------------------- |
747
+ | `widget` | `"adaptive-nav:tips"` | Yes | | Widget identifier |
748
+ | `props.expandBehavior` | `"single"` \| `"multiple"` | No | `"single"` | Accordion expand mode |
749
+ | `props.theme` | `"light"` \| `"dark"` \| `"auto"` | No | `"auto"` | Color theme |
750
+ | `props.actions` | `NavTipAction[]` | Yes | | Navigation tip items |
751
751
 
752
752
  ### Nav Tip Action (`nav:tip`)
753
753
 
754
754
  Compositional action — rendered as an accordion item by the parent widget.
755
755
 
756
- | Property | Type | Required | Description |
757
- | ---------------------- | ---------------------------- | -------- | ------------------------------------ |
758
- | `kind` | `"nav:tip"` | Yes | Action type |
759
- | `config.id` | string | Yes | Unique tip identifier |
760
- | `config.title` | string | Yes | Accordion header text |
761
- | `config.description` | string | Yes | Expanded body text |
762
- | `config.href` | string | No | Optional CTA link URL |
763
- | `config.icon` | string | No | Icon (emoji or icon key) |
764
- | `config.external` | boolean | No | Open link in new tab |
765
- | `config.category` | string | No | Category for grouping |
766
- | `showWhen` | `DecisionStrategy<boolean>` | No | Conditional visibility |
767
- | `notify` | `{ title?, body?, icon? }` | No | Toast config for showWhen transition |
768
- | `rationale` | `{ why, confidence? }` | No | AI reasoning for recommendation |
756
+ | Property | Type | Required | Description |
757
+ | -------------------- | --------------------------- | -------- | ------------------------------------ |
758
+ | `kind` | `"nav:tip"` | Yes | Action type |
759
+ | `config.id` | string | Yes | Unique tip identifier |
760
+ | `config.title` | string | Yes | Accordion header text |
761
+ | `config.description` | string | Yes | Expanded body text |
762
+ | `config.href` | string | No | Optional CTA link URL |
763
+ | `config.icon` | string | No | Icon (emoji or icon key) |
764
+ | `config.external` | boolean | No | Open link in new tab |
765
+ | `config.category` | string | No | Category for grouping |
766
+ | `showWhen` | `DecisionStrategy<boolean>` | No | Conditional visibility |
767
+ | `notify` | `{ title?, body?, icon? }` | No | Toast config for showWhen transition |
768
+ | `rationale` | `{ why, confidence? }` | No | AI reasoning for recommendation |
769
769
 
770
770
  ### Events Published
771
771
 
772
- | Event | When | Props |
773
- | ------------------ | ------------------------------------- | ------------------------------------ |
774
- | `nav:toggled` | User expands/collapses a tip | `{ instanceId, tipId, expanded }` |
775
- | `nav:tip_clicked` | User clicks a tip's CTA link | `{ instanceId, href, external }` |
776
- | `nav:tip_revealed` | `showWhen` transitions false → true | `{ tipId, title, body, icon }` |
772
+ | Event | When | Props |
773
+ | ------------------ | ----------------------------------- | --------------------------------- |
774
+ | `nav:toggled` | User expands/collapses a tip | `{ instanceId, tipId, expanded }` |
775
+ | `nav:tip_clicked` | User clicks a tip's CTA link | `{ instanceId, href, external }` |
776
+ | `nav:tip_revealed` | `showWhen` transitions false → true | `{ tipId, title, body, icon }` |
777
777
 
778
778
  ### Notify Watchers
779
779
 
@@ -808,7 +808,14 @@ Tips with both `showWhen` and `notify` are registered as notify watchers. The ru
808
808
  "notify": { "title": "New Tip", "body": "Advanced Analytics", "icon": "📊" },
809
809
  "showWhen": {
810
810
  "type": "rules",
811
- "rules": [{ "conditions": [{ "type": "event_count", "key": "link-clicks", "operator": "gte", "count": 3 }], "value": true }],
811
+ "rules": [
812
+ {
813
+ "conditions": [
814
+ { "type": "event_count", "key": "link-clicks", "operator": "gte", "count": 3 }
815
+ ],
816
+ "value": true
817
+ }
818
+ ],
812
819
  "default": false
813
820
  }
814
821
  }
@@ -823,12 +830,12 @@ Tips with both `showWhen` and `notify` are registered as notify watchers. The ru
823
830
 
824
831
  Scrolls the viewport to bring an element into view.
825
832
 
826
- | Property | Type | Required | Default | Description |
827
- | ---------- | ------------- | -------- | ----------- | ------------------------------------------- |
828
- | `kind` | `"navigation:scrollTo"` | Yes | | Action type |
829
- | `anchorId` | string | Yes | | Element selector |
830
- | `behavior` | string | No | `"smooth"` | `"smooth"`, `"instant"`, `"auto"` |
831
- | `block` | string | No | `"center"` | `"start"`, `"center"`, `"end"`, `"nearest"` |
833
+ | Property | Type | Required | Default | Description |
834
+ | ---------- | ----------------------- | -------- | ---------- | ------------------------------------------- |
835
+ | `kind` | `"navigation:scrollTo"` | Yes | | Action type |
836
+ | `anchorId` | string | Yes | | Element selector |
837
+ | `behavior` | string | No | `"smooth"` | `"smooth"`, `"instant"`, `"auto"` |
838
+ | `block` | string | No | `"center"` | `"start"`, `"center"`, `"end"`, `"nearest"` |
832
839
 
833
840
  ### `navigation:navigate`
834
841
 
@@ -836,7 +843,7 @@ Navigates to a URL.
836
843
 
837
844
  | Property | Type | Required | Default | Description |
838
845
  | -------- | ----------------------- | -------- | --------- | ----------------------- |
839
- | `kind` | `"navigation:navigate"` | Yes | | Action type |
846
+ | `kind` | `"navigation:navigate"` | Yes | | Action type |
840
847
  | `url` | string | Yes | | Destination URL |
841
848
  | `target` | string | No | `"_self"` | `"_self"` or `"_blank"` |
842
849
 
@@ -879,17 +886,17 @@ Creates a spotlight effect around an element with a scrim overlay.
879
886
 
880
887
  Shows a tooltip near an element with optional title, body, and CTA.
881
888
 
882
- | Property | Type | Required | Default | Description |
883
- | -------------------- | ----------- | -------- | ------------- | ----------------------------------- |
884
- | `kind` | `"tooltip"` | Yes | | Action type |
885
- | `anchorId` | string | Yes | | Element selector |
886
- | `content.title` | string | No | | Tooltip heading |
887
- | `content.body` | string | Yes | | Tooltip text |
888
- | `content.cta.label` | string | No | | CTA button text (single-CTA shorthand) |
889
- | `content.cta.action` | Action | No | | Action to execute on CTA click |
890
- | `content.ctaButtons` | array | No | | Multiple CTA buttons (see below) |
891
- | `trigger` | string | No | `"immediate"` | `"immediate"`, `"hover"`, `"click"` |
892
- | `placement` | string | No | `"top"` | See placement options below |
889
+ | Property | Type | Required | Default | Description |
890
+ | -------------------- | ----------- | -------- | ------------- | -------------------------------------- |
891
+ | `kind` | `"tooltip"` | Yes | | Action type |
892
+ | `anchorId` | string | Yes | | Element selector |
893
+ | `content.title` | string | No | | Tooltip heading |
894
+ | `content.body` | string | Yes | | Tooltip text |
895
+ | `content.cta.label` | string | No | | CTA button text (single-CTA shorthand) |
896
+ | `content.cta.action` | Action | No | | Action to execute on CTA click |
897
+ | `content.ctaButtons` | array | No | | Multiple CTA buttons (see below) |
898
+ | `trigger` | string | No | `"immediate"` | `"immediate"`, `"hover"`, `"click"` |
899
+ | `placement` | string | No | `"top"` | See placement options below |
893
900
 
894
901
  **Placement options:** `top`, `top-start`, `top-end`, `bottom`, `bottom-start`, `bottom-end`, `left`, `left-start`, `left-end`, `right`, `right-start`, `right-end`
895
902
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Syntrologie Smart Canvas SDK
1
+ # Smart Canvas Runtime SDK
2
2
 
3
- ## Smart Canvas SDK (React + Shadow DOM)
3
+ ## Smart Canvas Runtime SDK (React + Shadow DOM)
4
4
 
5
5
  The SDK ships a framework-agnostic `<smart-canvas>` custom element with an **open shadow root**. We render everything with React, but the canvas is encapsulated so host Tailwind configs, resets, or stacking contexts can't break the UI.
6
6
 
@@ -73,7 +73,7 @@ For quick setup without a build process:
73
73
  ### Local Development
74
74
 
75
75
  ```bash
76
- cd tech-core/sdks/runtime-sdk
76
+ cd packages/runtime-sdk
77
77
  npm run build
78
78
  ```
79
79
 
@@ -322,7 +322,7 @@ if (result.value) {
322
322
  - Validate a config file locally:
323
323
 
324
324
  ```bash
325
- cd tech-core/sdks/runtime-sdk
325
+ cd packages/runtime-sdk
326
326
  npm run validate-config -- path/to/config.json
327
327
  ```
328
328
 
@@ -336,7 +336,7 @@ The SDK uses [semantic-release](https://github.com/semantic-release/semantic-rel
336
336
 
337
337
  | Channel | Trigger | npm dist-tag | CDN path |
338
338
  | ---------- | ---------------------------------------------- | ------------ | ----------------------------- |
339
- | **Canary** | Push to `develop` touching `tech-core/sdks/**` | `develop` | `/v2/canary/` |
339
+ | **Canary** | Push to `develop` touching `packages/**` | `develop` | `/v2/canary/` |
340
340
  | **Stable** | Manual workflow dispatch from `main` | `latest` | `/v2/latest/` + `/{VERSION}/` |
341
341
 
342
342
  ### Commit Messages → Version Bumps
@@ -411,7 +411,7 @@ https://cdn.syntrologie.com/runtime-sdk/v2/latest/adaptives/{appId}/index.js
411
411
 
412
412
  - **"No new version is released"** — 0 relevant commits since last tag. Push a `fix:` or `feat:` commit touching SDK paths.
413
413
  - **npm 404 / auth error** — package missing trusted publisher config on npmjs.com.
414
- - **Format check fails** — run `npx prettier --write <file>` locally before pushing.
414
+ - **Format check fails** — run `npx biome check --fix <file>` locally before pushing.
415
415
 
416
416
  ---
417
417
 
@@ -426,7 +426,7 @@ https://cdn.syntrologie.com/runtime-sdk/v2/latest/adaptives/{appId}/index.js
426
426
  ## Directory Overview
427
427
 
428
428
  ```
429
- tech-core/sdks/runtime-sdk
429
+ packages/runtime-sdk
430
430
  ├─ src
431
431
  │ ├─ actions/ # ActionEngine (interventions)
432
432
  │ │ ├─ types.ts
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Provides access to the SmartCanvasRuntime from any component in the tree.
5
5
  */
6
- import { ReactNode } from 'react';
6
+ import { type ReactNode } from 'react';
7
7
  import type { RuntimeContext } from './context/types';
8
8
  import type { SmartCanvasRuntime } from './runtime';
9
9
  export interface RuntimeProviderProps {
@@ -0,0 +1,19 @@
1
+ import { type ReactNode } from 'react';
2
+ interface ShadowRootContextValue {
3
+ shadowRoot: ShadowRoot;
4
+ portalRoot: HTMLElement;
5
+ overlayContainer: HTMLElement;
6
+ }
7
+ export interface ShadowRootProviderProps {
8
+ shadowRoot: ShadowRoot;
9
+ portalRoot: HTMLElement;
10
+ overlayContainer: HTMLElement;
11
+ children: ReactNode;
12
+ }
13
+ export declare function ShadowRootProvider({ shadowRoot, portalRoot, overlayContainer, children, }: ShadowRootProviderProps): import("react/jsx-runtime").JSX.Element;
14
+ /**
15
+ * Access the shadow root context. Always available — SmartCanvasElement
16
+ * wraps the React tree in ShadowRootProvider, and tests use the helper.
17
+ */
18
+ export declare function useShadowRoot(): ShadowRootContextValue;
19
+ export {};
@@ -1,6 +1,6 @@
1
- import { ReactNode } from 'react';
2
- import { CanvasTheme } from './components/ShadowCanvasOverlay';
3
- import { SmartCanvasController } from './controller';
1
+ import { type ReactNode } from 'react';
2
+ import { type CanvasTheme } from './components/ShadowCanvasOverlay';
3
+ import type { SmartCanvasController } from './controller';
4
4
  import type { ExperimentClient } from './experiments/types';
5
5
  import type { SmartCanvasRuntime } from './runtime';
6
6
  import type { TelemetryClient } from './telemetry/types';
@@ -1,4 +1,4 @@
1
- import { SmartCanvasController } from './controller';
1
+ import { type SmartCanvasController } from './controller';
2
2
  import { type SmartCanvasAppProps } from './SmartCanvasApp';
3
3
  export declare class SmartCanvasElement extends HTMLElement {
4
4
  #private;
@@ -7,7 +7,12 @@ export declare class SmartCanvasElement extends HTMLElement {
7
7
  disconnectedCallback(): void;
8
8
  getMountNode(): HTMLDivElement;
9
9
  getController(): SmartCanvasController;
10
- getOverlayRoot(): HTMLElement;
10
+ /** React portal target inside shadow root (launcher, drawer, toasts) */
11
+ getPortalRoot(): HTMLDivElement;
12
+ /** Vanilla JS overlay container inside shadow root (tooltips, modals, spotlights) */
13
+ getOverlayContainer(): HTMLDivElement;
14
+ /** Direct access to the shadow root (for style injection) */
15
+ getShadowRoot(): ShadowRoot;
11
16
  open(): void;
12
17
  close(): void;
13
18
  toggle(): void;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  import type { SmartCanvasElement } from './SmartCanvasElement';
3
3
  export interface SmartCanvasPortalProps {
4
4
  element: SmartCanvasElement | null;
@@ -7,7 +7,7 @@
7
7
  * Core app executors are imported from their respective app packages.
8
8
  */
9
9
  import type { ZodSchema } from 'zod';
10
- import type { ActionStep, ActionKind, ActionExecutor, ValidationResult } from '../types';
10
+ import type { ActionExecutor, ActionKind, ActionStep, ValidationResult } from '../types';
11
11
  /**
12
12
  * Registration entry for an executor.
13
13
  */
@@ -111,6 +111,6 @@ export declare function getExecutor(kind: ActionKind | string): ActionExecutor<A
111
111
  * @deprecated Use executorRegistry.has() instead
112
112
  */
113
113
  export declare function hasExecutor(kind: ActionKind | string): boolean;
114
- export { executeInsertHtml, executeSetText, executeSetAttr, executeAddClass, executeRemoveClass, executeSetStyle, } from '@syntrologie/adapt-content/runtime';
115
- export { executeHighlight, executePulse, executeBadge, executeTooltip, executeModal, } from '@syntrologie/adapt-overlays/runtime';
114
+ export { executeAddClass, executeInsertHtml, executeRemoveClass, executeSetAttr, executeSetStyle, executeSetText, } from '@syntrologie/adapt-content/runtime';
115
+ export { executeBadge, executeHighlight, executeModal, executePulse, executeTooltip, } from '@syntrologie/adapt-overlays/runtime';
116
116
  export { executeTour } from './tour';
@@ -7,7 +7,7 @@
7
7
  * Each step contains an inner action (modal, tooltip) that gets executed.
8
8
  * The tour listens for CTA click events to advance to the next step.
9
9
  */
10
- import type { TourAction, ActionExecutor } from '../types';
10
+ import type { ActionExecutor, TourAction } from '../types';
11
11
  /**
12
12
  * Execute a tour action
13
13
  *
@@ -4,7 +4,8 @@
4
4
  * Unified execution layer for interventions (highlight, tooltip, badge, DOM modifications).
5
5
  */
6
6
  export { createActionEngine } from './ActionEngine';
7
- export type { ActionEngine, ActionEngineOptions, ActionEngineExecutorRegistry, ActionHandle, BatchActionHandle, ActiveAction, ActionStep, ActionKind, HighlightAction, PulseAction, BadgeAction, TooltipAction, InsertHtmlAction, SetTextAction, SetAttrAction, AddClassAction, RemoveClassAction, SetStyleAction, MountWidgetAction, ScrollToAction, NavigateAction, HighlightStyle, BadgePosition, TooltipContent, TooltipTrigger, InsertPosition, WidgetConfig, ActionState, ValidationResult, ValidationError, ValidationWarning, ExecutorResult, ExecutorContext, ExecutorCleanup, ExecutorUpdate, ActionExecutor, } from './types';
8
- export { validateAction, validateActions } from './validation';
9
- export { ExecutorRegistry, executorRegistry, getExecutor, hasExecutor } from './executors';
10
7
  export type { ExecutorRegistration } from './executors';
8
+ export { ExecutorRegistry, executorRegistry, getExecutor, hasExecutor } from './executors';
9
+ export { AddClassZ, BadgePositionZ, BadgeZ, CtaButtonZ, coreActionStepSchemas, HighlightStyleZ, HighlightZ, InsertHtmlZ, InsertPositionZ, ModalContentZ, ModalZ, MountWidgetZ, NavigateZ, ParallelZ, PlacementZ, PulseZ, RemoveClassZ, ScrollBehaviorZ, ScrollLogicalPositionZ, ScrollToZ, SequenceZ, SetAttrZ, SetStyleZ, SetTextZ, TooltipContentZ, TooltipTriggerZ, TooltipZ, TourStepForSchemaZ, TourZ, WaitZ, WidgetConfigZ, } from './schema';
10
+ export type { ActionEngine, ActionEngineExecutorRegistry, ActionEngineOptions, ActionExecutor, ActionHandle, ActionKind, ActionState, ActionStep, ActiveAction, AddClassAction, BadgeAction, BadgePosition, BatchActionHandle, ExecutorCleanup, ExecutorContext, ExecutorResult, ExecutorUpdate, HighlightAction, HighlightStyle, InsertHtmlAction, InsertPosition, MountWidgetAction, NavigateAction, PulseAction, RemoveClassAction, ScrollToAction, SetAttrAction, SetStyleAction, SetTextAction, TooltipAction, TooltipContent, TooltipTrigger, ValidationError, ValidationResult, ValidationWarning, WidgetConfig, } from './types';
11
+ export { validateAction, validateActions } from './validation';