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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/CAPABILITIES.md +721 -460
  2. package/README.md +310 -68
  3. package/dist/RuntimeProvider.d.ts +51 -0
  4. package/dist/RuntimeProvider.js +113 -0
  5. package/dist/RuntimeProvider.js.map +1 -0
  6. package/dist/SmartCanvasApp.d.ts +16 -10
  7. package/dist/SmartCanvasApp.js +45 -49
  8. package/dist/SmartCanvasApp.js.map +1 -1
  9. package/dist/SmartCanvasElement.d.ts +5 -5
  10. package/dist/SmartCanvasElement.js +24 -14
  11. package/dist/SmartCanvasElement.js.map +1 -1
  12. package/dist/SmartCanvasPortal.d.ts +2 -2
  13. package/dist/SmartCanvasPortal.js +2 -2
  14. package/dist/actions/ActionEngine.d.ts +11 -0
  15. package/dist/actions/ActionEngine.js +274 -0
  16. package/dist/actions/ActionEngine.js.map +1 -0
  17. package/dist/actions/executors/index.d.ts +117 -0
  18. package/dist/actions/executors/index.js +242 -0
  19. package/dist/actions/executors/index.js.map +1 -0
  20. package/dist/actions/executors/tour.d.ts +18 -0
  21. package/dist/actions/executors/tour.js +332 -0
  22. package/dist/actions/executors/tour.js.map +1 -0
  23. package/dist/actions/index.d.ts +10 -0
  24. package/dist/actions/index.js +12 -0
  25. package/dist/actions/index.js.map +1 -0
  26. package/dist/actions/types.d.ts +399 -0
  27. package/dist/actions/types.js +8 -0
  28. package/dist/actions/types.js.map +1 -0
  29. package/dist/actions/validation.d.ts +14 -0
  30. package/dist/actions/validation.js +602 -0
  31. package/dist/actions/validation.js.map +1 -0
  32. package/dist/antiFlicker.js +1 -1
  33. package/dist/api.d.ts +40 -26
  34. package/dist/api.js +86 -56
  35. package/dist/api.js.map +1 -1
  36. package/dist/apps/AppContext.d.ts +31 -0
  37. package/dist/apps/AppContext.js +93 -0
  38. package/dist/apps/AppContext.js.map +1 -0
  39. package/dist/apps/AppLoader.d.ts +84 -0
  40. package/dist/apps/AppLoader.js +256 -0
  41. package/dist/apps/AppLoader.js.map +1 -0
  42. package/dist/apps/AppRegistry.d.ts +102 -0
  43. package/dist/apps/AppRegistry.js +317 -0
  44. package/dist/apps/AppRegistry.js.map +1 -0
  45. package/dist/apps/adaptive-chatbot/index.js +7 -0
  46. package/dist/apps/adaptive-chatbot/index.js.map +7 -0
  47. package/dist/apps/examples/gamification-app.example.d.ts +305 -0
  48. package/dist/apps/examples/gamification-app.example.js +329 -0
  49. package/dist/apps/examples/gamification-app.example.js.map +1 -0
  50. package/dist/apps/faq/index.js +11 -0
  51. package/dist/apps/faq/index.js.map +7 -0
  52. package/dist/apps/gamification/index.js +2 -0
  53. package/dist/apps/gamification/index.js.map +7 -0
  54. package/dist/apps/index.d.ts +15 -0
  55. package/dist/apps/index.js +17 -0
  56. package/dist/apps/index.js.map +1 -0
  57. package/dist/apps/nav/index.js +11 -0
  58. package/dist/apps/nav/index.js.map +7 -0
  59. package/dist/apps/types.d.ts +231 -0
  60. package/dist/apps/types.js +8 -0
  61. package/dist/apps/types.js.map +1 -0
  62. package/dist/blocks/data/ComparisonBlock.d.ts +1 -1
  63. package/dist/blocks/data/ComparisonBlock.js +40 -40
  64. package/dist/blocks/data/ComparisonBlock.js.map +1 -1
  65. package/dist/blocks/data/StatsBlock.d.ts +1 -1
  66. package/dist/blocks/data/StatsBlock.js +41 -41
  67. package/dist/blocks/data/StatsBlock.js.map +1 -1
  68. package/dist/blocks/data/index.d.ts +2 -2
  69. package/dist/blocks/data/index.js +2 -2
  70. package/dist/blocks/index.d.ts +5 -5
  71. package/dist/blocks/index.js +29 -29
  72. package/dist/blocks/index.js.map +1 -1
  73. package/dist/blocks/interactive/ChecklistBlock.d.ts +1 -1
  74. package/dist/blocks/interactive/ChecklistBlock.js +60 -60
  75. package/dist/blocks/interactive/ChecklistBlock.js.map +1 -1
  76. package/dist/blocks/interactive/RatingBlock.d.ts +1 -1
  77. package/dist/blocks/interactive/RatingBlock.js +75 -65
  78. package/dist/blocks/interactive/RatingBlock.js.map +1 -1
  79. package/dist/blocks/interactive/index.d.ts +2 -2
  80. package/dist/blocks/interactive/index.js +2 -2
  81. package/dist/blocks/notification/NotificationBlock.d.ts +2 -2
  82. package/dist/blocks/notification/NotificationBlock.js +67 -63
  83. package/dist/blocks/notification/NotificationBlock.js.map +1 -1
  84. package/dist/blocks/notification/index.d.ts +1 -1
  85. package/dist/blocks/notification/index.js +1 -1
  86. package/dist/bootstrap.d.ts +32 -8
  87. package/dist/bootstrap.js +204 -85
  88. package/dist/bootstrap.js.map +1 -1
  89. package/dist/components/ShadowCanvasOverlay.d.ts +6 -6
  90. package/dist/components/ShadowCanvasOverlay.js +144 -107
  91. package/dist/components/ShadowCanvasOverlay.js.map +1 -1
  92. package/dist/components/TileCard.d.ts +5 -5
  93. package/dist/components/TileCard.js +204 -154
  94. package/dist/components/TileCard.js.map +1 -1
  95. package/dist/components/TileWheel.d.ts +3 -3
  96. package/dist/components/TileWheel.js +7 -7
  97. package/dist/components/TileWheel.js.map +1 -1
  98. package/dist/config-validator.d.ts +49 -0
  99. package/dist/config-validator.js +173 -0
  100. package/dist/config-validator.js.map +1 -0
  101. package/dist/configFetcher.d.ts +2 -2
  102. package/dist/configFetcher.js +20 -8
  103. package/dist/configFetcher.js.map +1 -1
  104. package/dist/context/ContextManager.d.ts +3 -3
  105. package/dist/context/ContextManager.js +15 -15
  106. package/dist/context/ContextManager.js.map +1 -1
  107. package/dist/context/index.d.ts +4 -4
  108. package/dist/context/index.js +3 -3
  109. package/dist/context/schema.d.ts +17 -17
  110. package/dist/context/schema.js +1 -1
  111. package/dist/decisions/engine.d.ts +5 -5
  112. package/dist/decisions/engine.js +13 -13
  113. package/dist/decisions/index.d.ts +6 -6
  114. package/dist/decisions/index.js +5 -5
  115. package/dist/decisions/schema.d.ts +97 -97
  116. package/dist/decisions/schema.js +20 -20
  117. package/dist/decisions/strategies/rules.d.ts +1 -1
  118. package/dist/decisions/strategies/rules.js +24 -24
  119. package/dist/decisions/strategies/rules.js.map +1 -1
  120. package/dist/decisions/strategies/score.d.ts +1 -1
  121. package/dist/decisions/strategies/score.js +3 -3
  122. package/dist/decisions/types.d.ts +19 -19
  123. package/dist/earlyPatcher.d.ts +8 -20
  124. package/dist/earlyPatcher.js +13 -62
  125. package/dist/earlyPatcher.js.map +1 -1
  126. package/dist/editorLoader.d.ts +2 -0
  127. package/dist/editorLoader.js +104 -58
  128. package/dist/editorLoader.js.map +1 -1
  129. package/dist/events/EventBus.d.ts +3 -3
  130. package/dist/events/EventBus.js +5 -7
  131. package/dist/events/EventBus.js.map +1 -1
  132. package/dist/events/index.d.ts +6 -6
  133. package/dist/events/index.js +5 -5
  134. package/dist/events/normalizers/canvas.d.ts +2 -2
  135. package/dist/events/normalizers/canvas.js +3 -3
  136. package/dist/events/normalizers/canvas.js.map +1 -1
  137. package/dist/events/normalizers/posthog.d.ts +25 -1
  138. package/dist/events/normalizers/posthog.js +35 -27
  139. package/dist/events/normalizers/posthog.js.map +1 -1
  140. package/dist/events/schema.d.ts +13 -13
  141. package/dist/events/schema.js +2 -2
  142. package/dist/events/types.d.ts +7 -1
  143. package/dist/events/types.js +29 -21
  144. package/dist/events/types.js.map +1 -1
  145. package/dist/experiments/adapters/growthbook.d.ts +4 -4
  146. package/dist/experiments/adapters/growthbook.js +5 -5
  147. package/dist/experiments/adapters/growthbook.js.map +1 -1
  148. package/dist/experiments/index.d.ts +3 -3
  149. package/dist/experiments/index.js +1 -1
  150. package/dist/experiments/registry.d.ts +2 -2
  151. package/dist/experiments/registry.js +2 -2
  152. package/dist/experiments/types.d.ts +5 -1
  153. package/dist/fetchers/cdnFetcher.d.ts +1 -1
  154. package/dist/fetchers/cdnFetcher.js +4 -8
  155. package/dist/fetchers/cdnFetcher.js.map +1 -1
  156. package/dist/fetchers/experimentsFetcher.d.ts +2 -2
  157. package/dist/fetchers/experimentsFetcher.js +7 -7
  158. package/dist/fetchers/experimentsFetcher.js.map +1 -1
  159. package/dist/fetchers/index.d.ts +3 -3
  160. package/dist/fetchers/index.js +2 -2
  161. package/dist/fetchers/index.js.map +1 -1
  162. package/dist/fetchers/registry.d.ts +1 -1
  163. package/dist/fetchers/registry.js +4 -4
  164. package/dist/fetchers/types.d.ts +1 -1
  165. package/dist/hooks/useCanvasOverlays.d.ts +8 -5
  166. package/dist/hooks/useCanvasOverlays.js +66 -17
  167. package/dist/hooks/useCanvasOverlays.js.map +1 -1
  168. package/dist/hooks/useHostPatches.d.ts +2 -2
  169. package/dist/hooks/useHostPatches.js +8 -8
  170. package/dist/hooks/useHostPatches.js.map +1 -1
  171. package/dist/hooks/useShadowCanvasConfig.d.ts +5 -9
  172. package/dist/hooks/useShadowCanvasConfig.js +7 -5
  173. package/dist/hooks/useShadowCanvasConfig.js.map +1 -1
  174. package/dist/hostPatcher/core/patcher.d.ts +1 -1
  175. package/dist/hostPatcher/core/patcher.js +18 -9
  176. package/dist/hostPatcher/core/patcher.js.map +1 -1
  177. package/dist/hostPatcher/core/sanitizer.js +24 -3
  178. package/dist/hostPatcher/core/sanitizer.js.map +1 -1
  179. package/dist/hostPatcher/policy/defaultPolicy.js +15 -5
  180. package/dist/hostPatcher/policy/defaultPolicy.js.map +1 -1
  181. package/dist/hostPatcher/utils/anchors.js +4 -6
  182. package/dist/hostPatcher/utils/anchors.js.map +1 -1
  183. package/dist/index.d.ts +34 -27
  184. package/dist/index.js +36 -24
  185. package/dist/index.js.map +1 -1
  186. package/dist/logger.d.ts +29 -0
  187. package/dist/logger.js +81 -0
  188. package/dist/logger.js.map +1 -0
  189. package/dist/metrics/index.d.ts +1 -1
  190. package/dist/metrics/index.js +1 -1
  191. package/dist/metrics/sessionMetrics.d.ts +1 -1
  192. package/dist/metrics/sessionMetrics.js +6 -6
  193. package/dist/overlays/fetcher.d.ts +2 -2
  194. package/dist/overlays/fetcher.js +4 -4
  195. package/dist/overlays/recipeRegistry.js +2 -2
  196. package/dist/overlays/recipeRegistry.js.map +1 -1
  197. package/dist/overlays/runtime/anchor/resolve.js +1 -1
  198. package/dist/overlays/runtime/anchor/resolve.js.map +1 -1
  199. package/dist/overlays/runtime/index.d.ts +7 -7
  200. package/dist/overlays/runtime/index.js +7 -7
  201. package/dist/overlays/runtime/overlay/highlight.js +39 -39
  202. package/dist/overlays/runtime/overlay/highlight.js.map +1 -1
  203. package/dist/overlays/runtime/overlay/modal.js +5 -5
  204. package/dist/overlays/runtime/overlay/modal.js.map +1 -1
  205. package/dist/overlays/runtime/overlay/root.js +1 -1
  206. package/dist/overlays/runtime/overlay/runner.js +70 -23
  207. package/dist/overlays/runtime/overlay/runner.js.map +1 -1
  208. package/dist/overlays/runtime/overlay/tooltip.d.ts +1 -1
  209. package/dist/overlays/runtime/overlay/tooltip.js +10 -10
  210. package/dist/overlays/runtime/overlay/tooltip.js.map +1 -1
  211. package/dist/overlays/runtime/utils/dom.js +4 -1
  212. package/dist/overlays/runtime/utils/dom.js.map +1 -1
  213. package/dist/overlays/schema.d.ts +146 -146
  214. package/dist/overlays/schema.js +12 -8
  215. package/dist/overlays/schema.js.map +1 -1
  216. package/dist/react.d.ts +7 -7
  217. package/dist/react.js +4 -4
  218. package/dist/react.js.map +1 -1
  219. package/dist/render/RenderContext.d.ts +2 -2
  220. package/dist/render/RenderContext.js +5 -5
  221. package/dist/render/RenderContext.js.map +1 -1
  222. package/dist/render/index.d.ts +3 -3
  223. package/dist/render/index.js +1 -1
  224. package/dist/render/types.d.ts +4 -4
  225. package/dist/runtime.d.ts +32 -8
  226. package/dist/runtime.js +87 -13
  227. package/dist/runtime.js.map +1 -1
  228. package/dist/smart-canvas.esm.js +155 -78
  229. package/dist/smart-canvas.esm.js.map +4 -4
  230. package/dist/smart-canvas.js +38776 -33216
  231. package/dist/smart-canvas.js.map +4 -4
  232. package/dist/smart-canvas.min.js +156 -78
  233. package/dist/smart-canvas.min.js.map +4 -4
  234. package/dist/state/StateStore.d.ts +1 -1
  235. package/dist/state/StateStore.js +9 -9
  236. package/dist/state/StateStore.js.map +1 -1
  237. package/dist/state/helpers/cooldowns.d.ts +1 -1
  238. package/dist/state/helpers/cooldowns.js +1 -1
  239. package/dist/state/helpers/dismissals.d.ts +1 -1
  240. package/dist/state/helpers/dismissals.js +1 -1
  241. package/dist/state/helpers/frequency.d.ts +1 -1
  242. package/dist/state/helpers/frequency.js +1 -1
  243. package/dist/state/index.d.ts +4 -4
  244. package/dist/state/index.js +3 -3
  245. package/dist/state/schema.d.ts +1 -1
  246. package/dist/state/schema.js +1 -1
  247. package/dist/store/example.d.ts +1 -0
  248. package/dist/store/example.js +43 -0
  249. package/dist/store/example.js.map +1 -0
  250. package/dist/store/mini-effector.d.ts +46 -0
  251. package/dist/store/mini-effector.js +88 -0
  252. package/dist/store/mini-effector.js.map +1 -0
  253. package/dist/surfaces/Surfaces.d.ts +11 -0
  254. package/dist/surfaces/Surfaces.js +361 -0
  255. package/dist/surfaces/Surfaces.js.map +1 -0
  256. package/dist/surfaces/index.d.ts +9 -0
  257. package/dist/surfaces/index.js +12 -0
  258. package/dist/surfaces/index.js.map +1 -0
  259. package/dist/surfaces/positioning.d.ts +50 -0
  260. package/dist/surfaces/positioning.js +228 -0
  261. package/dist/surfaces/positioning.js.map +1 -0
  262. package/dist/surfaces/types.d.ts +167 -0
  263. package/dist/surfaces/types.js +23 -0
  264. package/dist/surfaces/types.js.map +1 -0
  265. package/dist/telemetry/adapters/noop.d.ts +12 -0
  266. package/dist/telemetry/adapters/noop.js +42 -0
  267. package/dist/telemetry/adapters/noop.js.map +1 -0
  268. package/dist/telemetry/adapters/posthog.d.ts +8 -2
  269. package/dist/telemetry/adapters/posthog.js +36 -14
  270. package/dist/telemetry/adapters/posthog.js.map +1 -1
  271. package/dist/telemetry/index.d.ts +4 -3
  272. package/dist/telemetry/index.js +3 -2
  273. package/dist/telemetry/index.js.map +1 -1
  274. package/dist/telemetry/registry.d.ts +2 -2
  275. package/dist/telemetry/registry.js +4 -2
  276. package/dist/telemetry/registry.js.map +1 -1
  277. package/dist/telemetry/types.d.ts +1 -1
  278. package/dist/theme/ThemeProvider.d.ts +2 -2
  279. package/dist/theme/ThemeProvider.js +21 -21
  280. package/dist/theme/ThemeProvider.js.map +1 -1
  281. package/dist/theme/defaultTheme.d.ts +2 -2
  282. package/dist/theme/defaultTheme.js +111 -111
  283. package/dist/theme/defaultTheme.js.map +1 -1
  284. package/dist/theme/extractHostTheme.d.ts +1 -1
  285. package/dist/theme/extractHostTheme.js +42 -44
  286. package/dist/theme/extractHostTheme.js.map +1 -1
  287. package/dist/theme/index.d.ts +5 -5
  288. package/dist/theme/index.js +3 -3
  289. package/dist/theme/index.js.map +1 -1
  290. package/dist/theme/types.d.ts +2 -2
  291. package/dist/token.d.ts +2 -0
  292. package/dist/token.js +3 -6
  293. package/dist/token.js.map +1 -1
  294. package/dist/types-only.d.ts +32 -0
  295. package/dist/types-only.js +11 -0
  296. package/dist/types-only.js.map +1 -0
  297. package/dist/types.d.ts +89 -56
  298. package/dist/types.js +15 -2
  299. package/dist/types.js.map +1 -1
  300. package/dist/version.d.ts +13 -0
  301. package/dist/version.js +14 -0
  302. package/dist/version.js.map +1 -0
  303. package/dist/widgets/WidgetRegistry.d.ts +139 -0
  304. package/dist/widgets/WidgetRegistry.js +182 -0
  305. package/dist/widgets/WidgetRegistry.js.map +1 -0
  306. package/dist/widgets/index.d.ts +7 -0
  307. package/dist/widgets/index.js +7 -0
  308. package/dist/widgets/index.js.map +1 -0
  309. package/package.json +26 -10
  310. package/schema/canvas-config.schema.json +488 -254
  311. package/schema/runtime-context.schema.json +1 -5
package/dist/token.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * It bundles all necessary credentials (experiments, telemetry, config) into
6
6
  * a single string that clients can use to initialize the SDK.
7
7
  */
8
- const TOKEN_PREFIX = "syn_";
8
+ const TOKEN_PREFIX = 'syn_';
9
9
  /**
10
10
  * Decode a Syntro token into its payload.
11
11
  *
@@ -19,7 +19,7 @@ export function decodeToken(token) {
19
19
  }
20
20
  const base64 = token.slice(TOKEN_PREFIX.length);
21
21
  // Convert base64url to standard base64
22
- const standardBase64 = base64.replace(/-/g, "+").replace(/_/g, "/");
22
+ const standardBase64 = base64.replace(/-/g, '+').replace(/_/g, '/');
23
23
  const json = atob(standardBase64);
24
24
  const payload = JSON.parse(json);
25
25
  if (payload.v !== 1) {
@@ -38,10 +38,7 @@ export function decodeToken(token) {
38
38
  export function encodeToken(payload) {
39
39
  const json = JSON.stringify(payload);
40
40
  // Convert to base64url (URL-safe, no padding)
41
- const base64 = btoa(json)
42
- .replace(/\+/g, "-")
43
- .replace(/\//g, "_")
44
- .replace(/=+$/, "");
41
+ const base64 = btoa(json).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
45
42
  return TOKEN_PREFIX + base64;
46
43
  }
47
44
  //# sourceMappingURL=token.js.map
package/dist/token.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"token.js","sourceRoot":"","sources":["../src/token.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,YAAY,GAAG,MAAM,CAAC;AAyB5B;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAChD,uCAAuC;IACvC,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACpE,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC;IAClC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAuB,CAAC;IAEvD,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,OAA2B;IACrD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACrC,8CAA8C;IAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC;SACtB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACtB,OAAO,YAAY,GAAG,MAAM,CAAC;AAC/B,CAAC"}
1
+ {"version":3,"file":"token.js","sourceRoot":"","sources":["../src/token.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,YAAY,GAAG,MAAM,CAAC;AA4B5B;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAChD,uCAAuC;IACvC,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACpE,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC;IAClC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAuB,CAAC;IAEvD,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,OAA2B;IACrD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACrC,8CAA8C;IAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACrF,OAAO,YAAY,GAAG,MAAM,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Types-only export for app packages.
3
+ *
4
+ * This file re-exports action types without importing any runtime code,
5
+ * allowing app packages to import types without circular dependency issues.
6
+ *
7
+ * Apps should import from "@syntrologie/runtime-sdk/types" instead of
8
+ * the main entry point when they only need type definitions.
9
+ */
10
+ /**
11
+ * Props passed to editor panel components.
12
+ */
13
+ export interface EditorPanelProps {
14
+ /** The current config for this app's portion */
15
+ config: Record<string, unknown>;
16
+ /** Callback when config changes */
17
+ onChange: (config: Record<string, unknown>) => void;
18
+ /** Editor utilities */
19
+ editor: {
20
+ /** Mark the editor as dirty (has unsaved changes) */
21
+ setDirty: (dirty: boolean) => void;
22
+ /** Navigate back to home */
23
+ navigateHome: () => Promise<boolean>;
24
+ /** Save the current config */
25
+ save: () => Promise<void>;
26
+ /** Publish the current config */
27
+ publish: (captureScreenshot?: boolean) => Promise<void>;
28
+ };
29
+ /** Platform client for API calls (optional) */
30
+ platformClient?: unknown;
31
+ }
32
+ export type { StaticSurfaceSlot, InlineSurfaceSlot, AdjacentSurfaceSlot, SurfaceSlot, HighlightStyle, BadgePosition, TooltipContent, TooltipTrigger, InsertPosition, WidgetConfig, HighlightAction, PulseAction, BadgeAction, TooltipAction, InsertHtmlAction, SetTextAction, SetAttrAction, AddClassAction, RemoveClassAction, SetStyleAction, MountWidgetAction, ScrollToAction, NavigateAction, ActionStep, ActionKind, ActionState, ActionHandle, BatchActionHandle, ActiveAction, ValidationError, ValidationWarning, ValidationResult, ExecutorCleanup, ExecutorUpdate, ExecutorResult, ActionExecutor, ExecutorContext, } from './actions/types';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Types-only export for app packages.
3
+ *
4
+ * This file re-exports action types without importing any runtime code,
5
+ * allowing app packages to import types without circular dependency issues.
6
+ *
7
+ * Apps should import from "@syntrologie/runtime-sdk/types" instead of
8
+ * the main entry point when they only need type definitions.
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=types-only.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-only.js","sourceRoot":"","sources":["../src/types-only.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
package/dist/types.d.ts CHANGED
@@ -1,11 +1,25 @@
1
+ export { SDK_VERSION } from './version';
2
+ /**
3
+ * SDK schema version in Major.Minor format (e.g., "2.0", "2.1").
4
+ * Used for compatibility checking between SDK and backend configs.
5
+ * Sent in X-SDK-Schema-Version header.
6
+ *
7
+ * Bump rules:
8
+ * - Major: Breaking changes (field removal, type changes)
9
+ * - Minor: Backwards-compatible additions (new optional fields)
10
+ *
11
+ * @since 2.0.0
12
+ */
13
+ export declare const SDK_SCHEMA_VERSION = "2.0";
14
+ export type { ActionStep } from './actions/types';
1
15
  /**
2
16
  * Props passed to every tile component when mounted
3
17
  */
4
18
  export interface TileComponentProps {
5
19
  config: TileConfig;
6
20
  isExpanded: boolean;
7
- surface: "overlay" | "wheel";
8
- telemetry?: import("./telemetry/types").TelemetryClient;
21
+ surface: 'overlay' | 'wheel';
22
+ telemetry?: import('./telemetry/types').TelemetryClient;
9
23
  }
10
24
  /**
11
25
  * Interface for registering custom tile components
@@ -16,15 +30,15 @@ export interface TileComponent {
16
30
  /**
17
31
  * All available block types organized by category
18
32
  */
19
- export type NotificationBlockType = "alert" | "success" | "warning" | "info" | "error";
20
- export type MediaBlockType = "video" | "gallery" | "code";
21
- export type InteractiveBlockType = "form" | "rating" | "progress" | "survey" | "checklist";
22
- export type DataBlockType = "stats" | "comparison" | "chart" | "table";
23
- export type LegacyBlockType = "text" | "metric" | "chatbot" | "embed";
33
+ export type NotificationBlockType = 'alert' | 'success' | 'warning' | 'info' | 'error';
34
+ export type MediaBlockType = 'video' | 'gallery' | 'code';
35
+ export type InteractiveBlockType = 'form' | 'rating' | 'progress' | 'survey' | 'checklist';
36
+ export type DataBlockType = 'stats' | 'comparison' | 'chart' | 'table';
37
+ export type LegacyBlockType = 'text' | 'metric' | 'chatbot' | 'embed';
24
38
  /**
25
39
  * Union of all block types
26
40
  */
27
- export type BlockType = NotificationBlockType | MediaBlockType | InteractiveBlockType | DataBlockType | LegacyBlockType | "custom";
41
+ export type BlockType = NotificationBlockType | MediaBlockType | InteractiveBlockType | DataBlockType | LegacyBlockType | 'custom';
28
42
  export interface NotificationContentBase {
29
43
  title: string;
30
44
  body?: string;
@@ -33,49 +47,49 @@ export interface NotificationContentBase {
33
47
  timestamp?: string;
34
48
  }
35
49
  export interface AlertContent extends NotificationContentBase {
36
- type: "alert";
37
- severity?: "low" | "medium" | "high" | "critical";
50
+ type: 'alert';
51
+ severity?: 'low' | 'medium' | 'high' | 'critical';
38
52
  }
39
53
  export interface SuccessContent extends NotificationContentBase {
40
- type: "success";
54
+ type: 'success';
41
55
  confetti?: boolean;
42
56
  }
43
57
  export interface WarningContent extends NotificationContentBase {
44
- type: "warning";
58
+ type: 'warning';
45
59
  countdown?: number;
46
60
  }
47
61
  export interface InfoContent extends NotificationContentBase {
48
- type: "info";
62
+ type: 'info';
49
63
  learnMoreUrl?: string;
50
64
  }
51
65
  export interface ErrorContent extends NotificationContentBase {
52
- type: "error";
66
+ type: 'error';
53
67
  errorCode?: string;
54
68
  retryable?: boolean;
55
69
  }
56
70
  export type NotificationContent = AlertContent | SuccessContent | WarningContent | InfoContent | ErrorContent;
57
71
  export interface VideoContent {
58
- type: "video";
72
+ type: 'video';
59
73
  src: string;
60
- provider?: "youtube" | "vimeo" | "custom";
74
+ provider?: 'youtube' | 'vimeo' | 'custom';
61
75
  poster?: string;
62
76
  autoplay?: boolean;
63
77
  muted?: boolean;
64
78
  loop?: boolean;
65
- aspectRatio?: "16:9" | "4:3" | "1:1" | "9:16";
79
+ aspectRatio?: '16:9' | '4:3' | '1:1' | '9:16';
66
80
  }
67
81
  export interface GalleryContent {
68
- type: "gallery";
82
+ type: 'gallery';
69
83
  images: Array<{
70
84
  src: string;
71
85
  alt?: string;
72
86
  caption?: string;
73
87
  }>;
74
- layout?: "carousel" | "grid" | "masonry";
88
+ layout?: 'carousel' | 'grid' | 'masonry';
75
89
  columns?: 2 | 3 | 4;
76
90
  }
77
91
  export interface CodeContent {
78
- type: "code";
92
+ type: 'code';
79
93
  code: string;
80
94
  language?: string;
81
95
  lineNumbers?: boolean;
@@ -86,7 +100,7 @@ export interface CodeContent {
86
100
  export type MediaContent = VideoContent | GalleryContent | CodeContent;
87
101
  export interface FormField {
88
102
  id: string;
89
- type: "text" | "email" | "select" | "checkbox" | "radio" | "textarea";
103
+ type: 'text' | 'email' | 'select' | 'checkbox' | 'radio' | 'textarea';
90
104
  label: string;
91
105
  placeholder?: string;
92
106
  required?: boolean;
@@ -97,21 +111,21 @@ export interface FormField {
97
111
  defaultValue?: string | boolean;
98
112
  }
99
113
  export interface FormContent {
100
- type: "form";
114
+ type: 'form';
101
115
  fields: FormField[];
102
116
  submitLabel?: string;
103
117
  submitActionId?: string;
104
118
  }
105
119
  export interface RatingContent {
106
- type: "rating";
107
- variant: "stars" | "thumbs" | "nps" | "emoji";
120
+ type: 'rating';
121
+ variant: 'stars' | 'thumbs' | 'nps' | 'emoji';
108
122
  question?: string;
109
123
  maxValue?: number;
110
124
  submitActionId?: string;
111
125
  }
112
126
  export interface ProgressContent {
113
- type: "progress";
114
- variant: "bar" | "steps" | "circular";
127
+ type: 'progress';
128
+ variant: 'bar' | 'steps' | 'circular';
115
129
  value: number;
116
130
  max?: number;
117
131
  steps?: Array<{
@@ -126,7 +140,7 @@ export interface SurveyChoice {
126
140
  icon?: string;
127
141
  }
128
142
  export interface SurveyContent {
129
- type: "survey";
143
+ type: 'survey';
130
144
  question: string;
131
145
  choices: SurveyChoice[];
132
146
  multiSelect?: boolean;
@@ -143,19 +157,19 @@ export interface ChecklistItem {
143
157
  completed?: boolean;
144
158
  }
145
159
  export interface ChecklistContent {
146
- type: "checklist";
160
+ type: 'checklist';
147
161
  items: ChecklistItem[];
148
162
  title?: string;
149
163
  showProgress?: boolean;
150
164
  }
151
165
  export type InteractiveContent = FormContent | RatingContent | ProgressContent | SurveyContent | ChecklistContent;
152
166
  export interface TrendIndicator {
153
- direction: "up" | "down" | "neutral";
167
+ direction: 'up' | 'down' | 'neutral';
154
168
  value: string;
155
169
  timeframe?: string;
156
170
  }
157
171
  export interface StatsContent {
158
- type: "stats";
172
+ type: 'stats';
159
173
  value: string;
160
174
  label: string;
161
175
  trend?: TrendIndicator;
@@ -170,15 +184,15 @@ export interface ComparisonItem {
170
184
  icon?: string;
171
185
  }
172
186
  export interface ComparisonContent {
173
- type: "comparison";
187
+ type: 'comparison';
174
188
  items: ComparisonItem[];
175
- layout?: "grid" | "list" | "table";
189
+ layout?: 'grid' | 'list' | 'table';
176
190
  columns?: 2 | 3 | 4;
177
191
  highlightBest?: boolean;
178
192
  }
179
193
  export interface ChartContent {
180
- type: "chart";
181
- chartType: "bar" | "line" | "pie" | "donut";
194
+ type: 'chart';
195
+ chartType: 'bar' | 'line' | 'pie' | 'donut';
182
196
  data: Array<{
183
197
  label: string;
184
198
  value: number;
@@ -195,7 +209,7 @@ export interface TableColumn {
195
209
  width?: string;
196
210
  }
197
211
  export interface TableContent {
198
- type: "table";
212
+ type: 'table';
199
213
  columns: TableColumn[];
200
214
  rows: Array<Record<string, string | number>>;
201
215
  sortable?: boolean;
@@ -206,12 +220,12 @@ export type DataContent = StatsContent | ComparisonContent | ChartContent | Tabl
206
220
  /**
207
221
  * Grid width: "full" = spans both columns, "half" = one column
208
222
  */
209
- export type TileSize = "full" | "half";
223
+ export type TileSize = 'full' | 'half';
210
224
  /**
211
225
  * Built-in tile types (convenience components we ship)
212
226
  * @deprecated Use BlockType instead
213
227
  */
214
- export type BuiltInTileType = "text" | "metric" | "chatbot" | "embed";
228
+ export type BuiltInTileType = 'text' | 'metric' | 'chatbot' | 'embed';
215
229
  /**
216
230
  * Content configuration for built-in tile types
217
231
  * @deprecated Use specific content types (NotificationContent, MediaContent, etc.)
@@ -229,7 +243,7 @@ export interface BuiltInTileContent {
229
243
  * Content configuration for custom tile components
230
244
  */
231
245
  export interface CustomTileContent {
232
- type: "custom";
246
+ type: 'custom';
233
247
  component: string;
234
248
  props?: Record<string, unknown>;
235
249
  actions?: TileAction[];
@@ -249,7 +263,7 @@ export interface TileAction {
249
263
  label: string;
250
264
  href?: string;
251
265
  onClickId?: string;
252
- style?: "primary" | "secondary";
266
+ style?: 'primary' | 'secondary';
253
267
  }
254
268
  /**
255
269
  * Visual styling for tile chrome
@@ -269,7 +283,7 @@ export interface TileExperiment {
269
283
  variationValue?: string | number | boolean;
270
284
  predicate?: (value: unknown) => boolean;
271
285
  }
272
- export type { ActivationConfig, RouteFilter, DecisionStrategy } from "./decisions/types";
286
+ export type { ActivationConfig, RouteFilter, DecisionStrategy } from './decisions/types';
273
287
  /**
274
288
  * Full tile configuration
275
289
  */
@@ -292,12 +306,11 @@ export interface TileConfig {
292
306
  * Activation configuration for conditional rendering.
293
307
  * Replaces the experiment field with more flexible context-aware decisions.
294
308
  */
295
- activation?: import("./decisions/types").ActivationConfig;
309
+ activation?: import('./decisions/types').ActivationConfig;
296
310
  }
297
- import type { Patch } from "./hostPatcher/core/types";
311
+ import type { ActionStep } from './actions/types';
298
312
  /**
299
313
  * Theme configuration for the SmartCanvas overlay.
300
- * These values are typically set from workspace settings after style selection.
301
314
  */
302
315
  export interface CanvasThemeConfig {
303
316
  name?: string;
@@ -310,35 +323,55 @@ export interface CanvasThemeConfig {
310
323
  borderRadius?: string;
311
324
  position?: 'left' | 'right';
312
325
  }
326
+ /**
327
+ * Launcher button configuration.
328
+ */
313
329
  export interface LauncherConfig {
314
- /** Label shown on the launcher button (default: "Adaptives") */
315
330
  label?: string;
316
- /** Whether to animate the launcher to draw attention */
317
331
  animate?: boolean;
318
- /** Animation style: "pulse" (default), "bounce", "glow" */
319
- animationStyle?: "pulse" | "bounce" | "glow";
332
+ animationStyle?: 'pulse' | 'bounce' | 'glow';
320
333
  }
334
+ /**
335
+ * Route filtering - control where canvas appears.
336
+ */
321
337
  export interface RoutesConfig {
322
- /** Routes where the canvas should NOT appear (e.g., ["/login", "/signup"]) */
323
338
  exclude?: string[];
324
- /** If specified, canvas ONLY appears on these routes */
325
339
  include?: string[];
326
340
  }
341
+ /**
342
+ * Canvas configuration response.
343
+ *
344
+ * This is the complete config format. Actions are the single mechanism
345
+ * for all interventions: DOM modifications, tooltips, highlights, modals.
346
+ */
327
347
  export interface CanvasConfigResponse {
348
+ /**
349
+ * Schema version this config conforms to (e.g., "2.0", "2.1").
350
+ * Used for compatibility checking and automatic migration between versions.
351
+ * If omitted, defaults to "1.0" for backwards compatibility.
352
+ *
353
+ * @since 2.0.0
354
+ */
355
+ schemaVersion?: string;
356
+ /** Tiles to display in the canvas drawer */
328
357
  tiles: TileConfig[];
358
+ /**
359
+ * Actions to execute.
360
+ * This is the unified intervention format. Every DOM change, tooltip,
361
+ * highlight, or modal is an ActionStep.
362
+ */
363
+ actions: ActionStep[];
364
+ /** When the config was fetched */
329
365
  fetchedAt: string;
366
+ /** Optional version string for cache invalidation */
330
367
  configVersion?: string;
368
+ /** Display title for the canvas */
331
369
  canvasTitle?: string;
332
- patches?: Patch[];
333
- /** @deprecated Use overlayRecipes instead */
334
- overlayRecipe?: import('./overlays/types').CanvasRecipe;
335
- /** Multiple overlay recipes (tours) */
336
- overlayRecipes?: import('./overlays/types').CanvasRecipe[];
337
- /** SmartCanvas theme configuration from workspace settings */
370
+ /** Theme configuration */
338
371
  theme?: CanvasThemeConfig;
339
372
  /** Launcher button configuration */
340
373
  launcher?: LauncherConfig;
341
- /** Route filtering - control where canvas appears */
374
+ /** Route filtering */
342
375
  routes?: RoutesConfig;
343
376
  }
344
377
  export type CanvasConfigFetcher = () => Promise<CanvasConfigResponse>;
package/dist/types.js CHANGED
@@ -1,5 +1,18 @@
1
1
  // =============================================================================
2
- // TILE COMPONENT API
2
+ // SDK VERSION CONSTANTS
3
3
  // =============================================================================
4
- export {};
4
+ // Re-export SDK_VERSION from the auto-generated version file
5
+ export { SDK_VERSION } from './version';
6
+ /**
7
+ * SDK schema version in Major.Minor format (e.g., "2.0", "2.1").
8
+ * Used for compatibility checking between SDK and backend configs.
9
+ * Sent in X-SDK-Schema-Version header.
10
+ *
11
+ * Bump rules:
12
+ * - Major: Breaking changes (field removal, type changes)
13
+ * - Minor: Backwards-compatible additions (new optional fields)
14
+ *
15
+ * @since 2.0.0
16
+ */
17
+ export const SDK_SCHEMA_VERSION = '2.0';
5
18
  //# sourceMappingURL=types.js.map
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wBAAwB;AACxB,gFAAgF;AAEhF,6DAA6D;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * SDK package version.
3
+ *
4
+ * This file is auto-generated at release time by `scripts/prepare-release.mjs`.
5
+ * The sentinel value below is overwritten with the real semver version
6
+ * during the semantic-release prepare phase.
7
+ *
8
+ * DO NOT import version from package.json — this constant is the single
9
+ * source of truth for the runtime bundle.
10
+ *
11
+ * @since 2.0.0
12
+ */
13
+ export declare const SDK_VERSION = "1.0.0-canary.1";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * SDK package version.
3
+ *
4
+ * This file is auto-generated at release time by `scripts/prepare-release.mjs`.
5
+ * The sentinel value below is overwritten with the real semver version
6
+ * during the semantic-release prepare phase.
7
+ *
8
+ * DO NOT import version from package.json — this constant is the single
9
+ * source of truth for the runtime bundle.
10
+ *
11
+ * @since 2.0.0
12
+ */
13
+ export const SDK_VERSION = '1.0.0-canary.1';
14
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAC"}
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Widget Registry
3
+ *
4
+ * Extensible registry for mountable widget components.
5
+ * Apps can register custom widgets that can be rendered via mountWidget actions.
6
+ */
7
+ /**
8
+ * Cleanup function returned when unmounting a widget.
9
+ */
10
+ export type WidgetCleanup = () => void;
11
+ /**
12
+ * Mountable widget component interface.
13
+ *
14
+ * Widgets must implement this interface to be registered and mounted
15
+ * via the Surfaces system or mountWidget actions.
16
+ */
17
+ export interface MountableWidget {
18
+ /**
19
+ * Mount the widget into a container element.
20
+ *
21
+ * @param container - The DOM element to mount into
22
+ * @param config - Configuration/props for the widget
23
+ * @returns A cleanup function to unmount the widget, or void
24
+ */
25
+ mount(container: HTMLElement, config?: Record<string, unknown>): WidgetCleanup | void;
26
+ /**
27
+ * Optional: Update the widget with new config.
28
+ * If not provided, the widget will be unmounted and remounted on updates.
29
+ *
30
+ * @param container - The DOM element containing the widget
31
+ * @param config - New configuration/props
32
+ */
33
+ update?(container: HTMLElement, config?: Record<string, unknown>): void;
34
+ }
35
+ /**
36
+ * Widget registration entry.
37
+ */
38
+ export interface WidgetRegistration {
39
+ /** Widget ID (e.g., "gamification:leaderboard") */
40
+ id: string;
41
+ /** The widget component */
42
+ widget: MountableWidget;
43
+ /** Source app ID or "built-in" */
44
+ source: 'built-in' | string;
45
+ /** Optional metadata */
46
+ metadata?: {
47
+ name?: string;
48
+ description?: string;
49
+ icon?: string;
50
+ };
51
+ }
52
+ /**
53
+ * Mounted widget handle.
54
+ */
55
+ export interface MountedWidgetHandle {
56
+ /** The widget ID */
57
+ widgetId: string;
58
+ /** The container element */
59
+ container: HTMLElement;
60
+ /** Unmount the widget */
61
+ unmount: () => void;
62
+ /** Update the widget config */
63
+ update: (config?: Record<string, unknown>) => void;
64
+ }
65
+ /**
66
+ * Extensible registry for widget components.
67
+ *
68
+ * Allows apps to register custom widgets that can be rendered via
69
+ * mountWidget actions or directly through the Surfaces system.
70
+ */
71
+ export declare class WidgetRegistry {
72
+ private widgets;
73
+ private mountedWidgets;
74
+ private mountIdCounter;
75
+ constructor();
76
+ /**
77
+ * Register a widget.
78
+ *
79
+ * @param id - The widget ID (e.g., "gamification:leaderboard")
80
+ * @param widget - The widget component
81
+ * @param source - The source app ID (for tracking)
82
+ * @param metadata - Optional metadata about the widget
83
+ */
84
+ register(id: string, widget: MountableWidget, source?: string, metadata?: WidgetRegistration['metadata']): void;
85
+ /**
86
+ * Unregister a widget.
87
+ *
88
+ * @param id - The widget ID to unregister
89
+ * @returns true if the widget was unregistered, false if not found or built-in
90
+ */
91
+ unregister(id: string): boolean;
92
+ /**
93
+ * Unregister all widgets from a specific source.
94
+ *
95
+ * @param source - The source app ID
96
+ */
97
+ unregisterBySource(source: string): void;
98
+ /**
99
+ * Get a widget by ID.
100
+ */
101
+ get(id: string): MountableWidget | undefined;
102
+ /**
103
+ * Get the full registration for a widget.
104
+ */
105
+ getRegistration(id: string): WidgetRegistration | undefined;
106
+ /**
107
+ * Check if a widget exists.
108
+ */
109
+ has(id: string): boolean;
110
+ /**
111
+ * Mount a widget into a container.
112
+ *
113
+ * @param id - The widget ID
114
+ * @param container - The DOM element to mount into
115
+ * @param config - Configuration/props for the widget
116
+ * @returns A handle for managing the mounted widget
117
+ */
118
+ mount(id: string, container: HTMLElement, config?: Record<string, unknown>): MountedWidgetHandle;
119
+ /**
120
+ * List all registered widget IDs.
121
+ */
122
+ list(): string[];
123
+ /**
124
+ * List all registrations.
125
+ */
126
+ listRegistrations(): WidgetRegistration[];
127
+ /**
128
+ * Get all widgets from a specific source.
129
+ */
130
+ getBySource(source: string): WidgetRegistration[];
131
+ /**
132
+ * Clean up all mounted widgets.
133
+ */
134
+ destroy(): void;
135
+ }
136
+ /**
137
+ * Default singleton instance of WidgetRegistry.
138
+ */
139
+ export declare const widgetRegistry: WidgetRegistry;