@syntrologie/runtime-sdk 2.8.0-canary.1 → 2.8.0-canary.11

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.
package/CAPABILITIES.md CHANGED
@@ -233,6 +233,7 @@ Inserts HTML content relative to an element.
233
233
  | `anchorId` | string | Yes | Element selector |
234
234
  | `html` | string | Yes | HTML content (sanitized) |
235
235
  | `position` | string | Yes | `"before"`, `"after"`, `"prepend"`, `"append"`, `"replace"` |
236
+ | `deepLink` | object | No | Makes the entire inserted element clickable to open the canvas panel and navigate to a specific tile |
236
237
 
237
238
  **Positions:**
238
239
 
@@ -251,6 +252,27 @@ Inserts HTML content relative to an element.
251
252
  }
252
253
  ```
253
254
 
255
+ **Deep-linking to canvas tiles:**
256
+
257
+ Use `deepLink` to make inserted content open the canvas panel and navigate to a specific tile when clicked. This is the correct way to connect inserted buttons/links to canvas tiles — do NOT use `onclick` handlers with `window.SynOS`.
258
+
259
+ | Property | Type | Required | Description |
260
+ | ---------------- | ------ | -------- | ---------------------------------- |
261
+ | `deepLink.tileId` | string | Yes | ID of the tile to open |
262
+ | `deepLink.itemId` | string | No | Specific item within the tile |
263
+
264
+ ```json
265
+ {
266
+ "kind": "insert_html",
267
+ "anchorId": "[data-id='pricing-heading']",
268
+ "html": "<button style='background: #4a90e2; color: white; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer;'>Help Me Choose</button>",
269
+ "position": "after",
270
+ "deepLink": { "tileId": "plan_selector_faq" }
271
+ }
272
+ ```
273
+
274
+ The SDK automatically handles opening the canvas, setting the cursor to pointer, and publishing a `notification.deep_link` event. The click handler is wired up and cleaned up by the SDK — no JavaScript in the HTML is needed.
275
+
254
276
  ### add_class
255
277
 
256
278
  Adds a CSS class to an element.
@@ -292,7 +314,7 @@ Removes a CSS class from an element.
292
314
 
293
315
  # @syntrologie/adapt-faq
294
316
 
295
- Collapsible Q&A accordion with actions, rich content, feedback, and personalization. Supports mounting a full FAQ widget, scrolling to specific items, toggling item state, and dynamically updating the item list at runtime.
317
+ Collapsible Q&A accordion with actions, rich content, feedback, and personalization.
296
318
 
297
319
  ## Actions
298
320
 
@@ -1284,3 +1306,25 @@ Control when adaptives activate using `DecisionStrategy`:
1284
1306
  - Listen for `action.failed` to handle errors
1285
1307
  - Track `action.applied` for analytics
1286
1308
  - Use EventBus for cross-adaptive coordination
1309
+
1310
+ ### 6. Opening the Canvas from Inserted Content
1311
+
1312
+ When `content:insertHtml` needs to open the canvas panel (e.g., a "Help Me Choose" button that opens an FAQ tile), use the `deepLink` property — **never write `onclick` handlers or reference `window.SynOS` in HTML**.
1313
+
1314
+ ```json
1315
+ {
1316
+ "kind": "insert_html",
1317
+ "anchorId": "[data-id='pricing-heading']",
1318
+ "html": "<button style='background: #4a90e2; color: white; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer;'>Help Me Choose</button>",
1319
+ "position": "after",
1320
+ "deepLink": { "tileId": "plan_selector_faq" }
1321
+ }
1322
+ ```
1323
+
1324
+ The `deepLink` object:
1325
+ - `tileId` (required) — ID of the canvas tile to navigate to
1326
+ - `itemId` (optional) — specific item within the tile (e.g., a FAQ question ID)
1327
+
1328
+ The SDK automatically opens the canvas, navigates to the tile, sets cursor to pointer, and wires up click/cleanup handlers.
1329
+
1330
+ **NEVER use `onclick`, `window.SynOS`, or any JavaScript in `insert_html` HTML strings.** The HTML is sanitized and event handlers are stripped. Use `deepLink` instead.