@syntrologie/runtime-sdk 2.8.0-canary.183 → 2.8.0-canary.185
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/dist/defaults/clickIds.d.ts +14 -0
- package/dist/defaults/identifyOnEmail.d.ts +23 -0
- package/dist/defaults/identifyOnUrlParam.d.ts +29 -0
- package/dist/defaults/index.d.ts +51 -0
- package/dist/defaults/initialProperties.d.ts +26 -0
- package/dist/defaults/jsonLd.d.ts +17 -0
- package/dist/index.js +729 -1
- package/dist/index.js.map +4 -4
- package/dist/smart-canvas.esm.js +100 -100
- package/dist/smart-canvas.esm.js.map +4 -4
- package/dist/smart-canvas.js +711 -2
- package/dist/smart-canvas.js.map +4 -4
- package/dist/smart-canvas.min.js +101 -101
- package/dist/smart-canvas.min.js.map +4 -4
- package/dist/telemetry/adapters/posthog.d.ts +26 -0
- package/dist/telemetry/consent/ConsentDetector.d.ts +26 -0
- package/dist/telemetry/{consent.d.ts → consent/ConsentGate.d.ts} +33 -1
- package/dist/telemetry/consent/adapters/gtmConsentMode.d.ts +18 -0
- package/dist/telemetry/consent/adapters/iabTcf.d.ts +21 -0
- package/dist/telemetry/consent/adapters/shopify.d.ts +17 -0
- package/dist/telemetry/consent/index.d.ts +17 -0
- package/dist/telemetry/consent/types.d.ts +47 -0
- package/dist/telemetry/types.d.ts +24 -0
- package/dist/version.d.ts +1 -1
- package/package.json +3 -5
- package/schema/canvas-config.schema.json +352 -1
- package/CAPABILITIES.md +0 -1450
|
@@ -4989,7 +4989,7 @@
|
|
|
4989
4989
|
"additionalProperties": false
|
|
4990
4990
|
},
|
|
4991
4991
|
"default": [],
|
|
4992
|
-
"description": "The FAQ items rendered by the accordion. Each item is a faq:question compositional action."
|
|
4992
|
+
"description": "The FAQ items rendered by the accordion. Each item is a faq:question compositional action — these are configuration data rendered by the widget, not actions executed by the runtime. This compositional pattern enables per-item conditional visibility via triggerWhen, category grouping, and dynamic injection."
|
|
4993
4993
|
},
|
|
4994
4994
|
"feedback": {
|
|
4995
4995
|
"anyOf": [
|
|
@@ -7429,5 +7429,356 @@
|
|
|
7429
7429
|
"$el_text": "Visible text content of the element",
|
|
7430
7430
|
"attr__*": "HTML attribute prefixed with attr__. Example: attr__data-id matches the data-id attribute, attr__class matches the class attribute, attr__href matches the href attribute."
|
|
7431
7431
|
}
|
|
7432
|
+
},
|
|
7433
|
+
"_capabilitiesDocumentation": {
|
|
7434
|
+
"adaptive-content": {
|
|
7435
|
+
"packageId": "adaptive-content",
|
|
7436
|
+
"description": "DOM content modification capabilities for text, attributes, styles, HTML, and classes.",
|
|
7437
|
+
"whenToUse": [
|
|
7438
|
+
{
|
|
7439
|
+
"goal": "Replace an element's text",
|
|
7440
|
+
"action": "content:setText"
|
|
7441
|
+
},
|
|
7442
|
+
{
|
|
7443
|
+
"goal": "Change an HTML attribute (href, src, data-*)",
|
|
7444
|
+
"action": "content:setAttr"
|
|
7445
|
+
},
|
|
7446
|
+
{
|
|
7447
|
+
"goal": "Modify inline styles (color, size, spacing)",
|
|
7448
|
+
"action": "content:setStyle"
|
|
7449
|
+
},
|
|
7450
|
+
{
|
|
7451
|
+
"goal": "Inject new HTML before/after/inside an element",
|
|
7452
|
+
"action": "content:insertHtml"
|
|
7453
|
+
},
|
|
7454
|
+
{
|
|
7455
|
+
"goal": "Add a CSS class (show/hide, animate)",
|
|
7456
|
+
"action": "content:addClass"
|
|
7457
|
+
},
|
|
7458
|
+
{
|
|
7459
|
+
"goal": "Remove a CSS class",
|
|
7460
|
+
"action": "content:removeClass"
|
|
7461
|
+
}
|
|
7462
|
+
],
|
|
7463
|
+
"conventions": [
|
|
7464
|
+
{
|
|
7465
|
+
"name": "Deep-linking inserted content to canvas tiles",
|
|
7466
|
+
"description": "Use the deepLink property on content:insertHtml to make inserted elements open the canvas panel and navigate to a specific tile when clicked. NEVER use onclick handlers or window.SynOS in HTML strings — they are sanitized and stripped. deepLink is the only supported mechanism."
|
|
7467
|
+
},
|
|
7468
|
+
{
|
|
7469
|
+
"name": "Blocked attributes",
|
|
7470
|
+
"description": "Event handler attributes (onclick, onerror, onload, etc.) are blocked by content:setAttr. Use data-* attributes for experiment markers instead."
|
|
7471
|
+
}
|
|
7472
|
+
],
|
|
7473
|
+
"events": []
|
|
7474
|
+
},
|
|
7475
|
+
"adaptive-faq": {
|
|
7476
|
+
"packageId": "adaptive-faq",
|
|
7477
|
+
"description": "Collapsible Q&A accordion with actions, rich content, feedback, and personalization.",
|
|
7478
|
+
"whenToUse": [
|
|
7479
|
+
{
|
|
7480
|
+
"goal": "Add an FAQ accordion widget",
|
|
7481
|
+
"action": "Add a tile with widget: \"adaptive-faq:accordion\""
|
|
7482
|
+
},
|
|
7483
|
+
{
|
|
7484
|
+
"goal": "Scroll to and expand a specific FAQ item",
|
|
7485
|
+
"action": "faq:scroll_to"
|
|
7486
|
+
},
|
|
7487
|
+
{
|
|
7488
|
+
"goal": "Open, close, or toggle a FAQ item",
|
|
7489
|
+
"action": "faq:toggle_item"
|
|
7490
|
+
},
|
|
7491
|
+
{
|
|
7492
|
+
"goal": "Add, remove, reorder, or replace FAQ items",
|
|
7493
|
+
"action": "faq:update"
|
|
7494
|
+
}
|
|
7495
|
+
],
|
|
7496
|
+
"conventions": [
|
|
7497
|
+
{
|
|
7498
|
+
"name": "Compositional action pattern",
|
|
7499
|
+
"description": "faq:question actions are configuration data rendered by the accordion widget, not actions executed by the runtime. This allows per-item conditional visibility via triggerWhen, category grouping under collapsible section headers, and dynamic injection of contextual items."
|
|
7500
|
+
},
|
|
7501
|
+
{
|
|
7502
|
+
"name": "Rich answer content formats",
|
|
7503
|
+
"description": "FAQ answers support three formats: plain string (simple text with basic markdown), rich HTML ({ \"type\": \"rich\", \"html\": \"<p>...</p>\" } for pre-rendered content), or enhanced markdown ({ \"type\": \"markdown\", \"content\": \"...\", \"assets\": [...] } with embedded media via asset:<id> URIs)."
|
|
7504
|
+
},
|
|
7505
|
+
{
|
|
7506
|
+
"name": "Companion overlay tooltips",
|
|
7507
|
+
"description": "FAQ questions can be surfaced proactively using overlays:tooltip with ctaButtons. Set the CTA actionId to \"faq:open:<questionId>\" — the FAQ widget listens for action.tooltip_cta_clicked events with this pattern and expands the matching question. Late-mount support: if the widget mounts after the click, it checks EventBus history (within 10 seconds) and auto-expands."
|
|
7508
|
+
},
|
|
7509
|
+
{
|
|
7510
|
+
"name": "Feedback events",
|
|
7511
|
+
"description": "When feedback is enabled, user feedback events are published via context.publishEvent for analytics integration."
|
|
7512
|
+
}
|
|
7513
|
+
],
|
|
7514
|
+
"events": [
|
|
7515
|
+
{
|
|
7516
|
+
"name": "faq:feedback_submitted",
|
|
7517
|
+
"when": "User submits feedback on a FAQ answer",
|
|
7518
|
+
"props": "{ questionId, style, value }"
|
|
7519
|
+
}
|
|
7520
|
+
]
|
|
7521
|
+
},
|
|
7522
|
+
"adaptive-mcp": {
|
|
7523
|
+
"packageId": "adaptive-mcp",
|
|
7524
|
+
"description": "Loader adaptive for the MCP Apps protocol. Currently a pure loader — no actions, widgets, or surfaces yet.",
|
|
7525
|
+
"whenToUse": [],
|
|
7526
|
+
"conventions": [],
|
|
7527
|
+
"events": []
|
|
7528
|
+
},
|
|
7529
|
+
"adaptive-nav": {
|
|
7530
|
+
"packageId": "adaptive-nav",
|
|
7531
|
+
"description": "Navigation tips accordion widget with conditional item visibility and toast notifications.",
|
|
7532
|
+
"whenToUse": [
|
|
7533
|
+
{
|
|
7534
|
+
"goal": "Show contextual navigation tips widget",
|
|
7535
|
+
"action": "Add a tile with widget: \"adaptive-nav:tips\""
|
|
7536
|
+
},
|
|
7537
|
+
{
|
|
7538
|
+
"goal": "Scroll to an element on the page",
|
|
7539
|
+
"action": "navigation:scrollTo"
|
|
7540
|
+
},
|
|
7541
|
+
{
|
|
7542
|
+
"goal": "Navigate to a different URL",
|
|
7543
|
+
"action": "navigation:navigate"
|
|
7544
|
+
}
|
|
7545
|
+
],
|
|
7546
|
+
"conventions": [
|
|
7547
|
+
{
|
|
7548
|
+
"name": "Notify watchers",
|
|
7549
|
+
"description": "Tips with both triggerWhen and notify are registered as notify watchers. The runtime evaluates these continuously even when the drawer is closed. When triggerWhen transitions false → true, the widget publishes nav:tip_revealed which can trigger toast notifications via tile-level notifications rules."
|
|
7550
|
+
}
|
|
7551
|
+
],
|
|
7552
|
+
"events": [
|
|
7553
|
+
{
|
|
7554
|
+
"name": "nav:toggled",
|
|
7555
|
+
"when": "User expands or collapses a tip",
|
|
7556
|
+
"props": "{ instanceId, tipId, expanded }"
|
|
7557
|
+
},
|
|
7558
|
+
{
|
|
7559
|
+
"name": "nav:tip_clicked",
|
|
7560
|
+
"when": "User clicks a tip's CTA link",
|
|
7561
|
+
"props": "{ instanceId, href, external }"
|
|
7562
|
+
},
|
|
7563
|
+
{
|
|
7564
|
+
"name": "nav:tip_revealed",
|
|
7565
|
+
"when": "triggerWhen transitions false → true",
|
|
7566
|
+
"props": "{ tipId, title, body, icon }"
|
|
7567
|
+
}
|
|
7568
|
+
]
|
|
7569
|
+
},
|
|
7570
|
+
"adaptive-overlays": {
|
|
7571
|
+
"packageId": "adaptive-overlays",
|
|
7572
|
+
"description": "Visual overlay capabilities including highlights, tooltips, badges, pulse animations, modals, tours, and celebrations.",
|
|
7573
|
+
"whenToUse": [
|
|
7574
|
+
{
|
|
7575
|
+
"goal": "Draw attention to an element (spotlight)",
|
|
7576
|
+
"action": "overlays:highlight"
|
|
7577
|
+
},
|
|
7578
|
+
{
|
|
7579
|
+
"goal": "Show contextual help or guidance near an element",
|
|
7580
|
+
"action": "overlays:tooltip"
|
|
7581
|
+
},
|
|
7582
|
+
{
|
|
7583
|
+
"goal": "Add a notification indicator (count, \"NEW\")",
|
|
7584
|
+
"action": "overlays:badge"
|
|
7585
|
+
},
|
|
7586
|
+
{
|
|
7587
|
+
"goal": "Subtle attention-grab animation",
|
|
7588
|
+
"action": "overlays:pulse"
|
|
7589
|
+
},
|
|
7590
|
+
{
|
|
7591
|
+
"goal": "Show a blocking or non-blocking dialog",
|
|
7592
|
+
"action": "overlays:modal"
|
|
7593
|
+
},
|
|
7594
|
+
{
|
|
7595
|
+
"goal": "Celebrate a user achievement",
|
|
7596
|
+
"action": "overlays:celebrate"
|
|
7597
|
+
},
|
|
7598
|
+
{
|
|
7599
|
+
"goal": "Multi-step guided walkthrough",
|
|
7600
|
+
"action": "overlays:tour"
|
|
7601
|
+
}
|
|
7602
|
+
],
|
|
7603
|
+
"conventions": [
|
|
7604
|
+
{
|
|
7605
|
+
"name": "Tooltip actionId: \"dismiss\"",
|
|
7606
|
+
"description": "The special actionId \"dismiss\" closes the tooltip immediately without publishing an event. Use for \"close\" or \"not now\" buttons."
|
|
7607
|
+
},
|
|
7608
|
+
{
|
|
7609
|
+
"name": "Companion FAQ tooltips (faq:open:<questionId>)",
|
|
7610
|
+
"description": "A tooltip CTA with actionId \"faq:open:<questionId>\" publishes action.tooltip_cta_clicked, which the adaptive-faq:accordion widget listens for. The matching FAQ question expands and scrolls into view. If the FAQ widget mounts after the click (e.g. canvas was closed), it checks EventBus history for recent faq:open:* events (within 10 seconds) and auto-expands on mount. The widget also publishes canvas.requestOpen to open the canvas panel if needed."
|
|
7611
|
+
},
|
|
7612
|
+
{
|
|
7613
|
+
"name": "Celebrate effect presets",
|
|
7614
|
+
"description": "Available effects: \"confetti\" (falling rectangular/circular pieces with gravity and rotation), \"fireworks\" (burst centers with radiating particles and glow), \"sparkles\" (diamond shapes with sine-wave opacity and upward float), \"emoji-rain\" (emoji characters falling with horizontal wobble — set props.emoji to customize the character)."
|
|
7615
|
+
}
|
|
7616
|
+
],
|
|
7617
|
+
"events": [
|
|
7618
|
+
{
|
|
7619
|
+
"name": "action.tooltip_cta_clicked",
|
|
7620
|
+
"when": "User clicks a tooltip CTA button",
|
|
7621
|
+
"props": "{ actionId }"
|
|
7622
|
+
},
|
|
7623
|
+
{
|
|
7624
|
+
"name": "action.modal_cta_clicked",
|
|
7625
|
+
"when": "User clicks a modal CTA button",
|
|
7626
|
+
"props": "{ actionId }"
|
|
7627
|
+
}
|
|
7628
|
+
]
|
|
7629
|
+
},
|
|
7630
|
+
"adaptive-viz": {
|
|
7631
|
+
"packageId": "adaptive-viz",
|
|
7632
|
+
"description": "Charts and tables for visualizing data — bar, line, table, and pie layouts.",
|
|
7633
|
+
"whenToUse": [
|
|
7634
|
+
{
|
|
7635
|
+
"goal": "Show a bar chart (categorical x, quantitative y)",
|
|
7636
|
+
"action": "Add a tile with widget: \"adaptive-viz:chart\" and layout: \"bar\""
|
|
7637
|
+
},
|
|
7638
|
+
{
|
|
7639
|
+
"goal": "Show a line chart (continuous x, quantitative y)",
|
|
7640
|
+
"action": "Add a tile with widget: \"adaptive-viz:chart\" and layout: \"line\""
|
|
7641
|
+
},
|
|
7642
|
+
{
|
|
7643
|
+
"goal": "Show tabular data with rich cell renderers",
|
|
7644
|
+
"action": "Add a tile with widget: \"adaptive-viz:chart\" and layout: \"table\""
|
|
7645
|
+
},
|
|
7646
|
+
{
|
|
7647
|
+
"goal": "Show a pie/donut chart (part-of-whole)",
|
|
7648
|
+
"action": "Add a tile with widget: \"adaptive-viz:chart\" and layout: \"pie\""
|
|
7649
|
+
}
|
|
7650
|
+
],
|
|
7651
|
+
"conventions": [
|
|
7652
|
+
{
|
|
7653
|
+
"name": "Theme tokens",
|
|
7654
|
+
"description": "Charts consume CSS custom properties from the canvas theme: --sc-color-primary, --sc-color-primary-hover, --sc-overlay-text-color, --sc-font-family, --sc-tile-background. These map to Vega-Lite config properties internally."
|
|
7655
|
+
},
|
|
7656
|
+
{
|
|
7657
|
+
"name": "Inline data only",
|
|
7658
|
+
"description": "All data must be provided inline in the data array. External URLs are not supported by design — data must be self-contained."
|
|
7659
|
+
}
|
|
7660
|
+
],
|
|
7661
|
+
"events": []
|
|
7662
|
+
}
|
|
7663
|
+
},
|
|
7664
|
+
"_sdkDocumentation": {
|
|
7665
|
+
"surfaces": {
|
|
7666
|
+
"description": "Surfaces are named slots where widgets can be mounted.",
|
|
7667
|
+
"staticSlots": [
|
|
7668
|
+
{
|
|
7669
|
+
"slot": "drawer_right",
|
|
7670
|
+
"position": "Right edge, full height",
|
|
7671
|
+
"useCase": "Settings panels, details"
|
|
7672
|
+
},
|
|
7673
|
+
{
|
|
7674
|
+
"slot": "drawer_left",
|
|
7675
|
+
"position": "Left edge, full height",
|
|
7676
|
+
"useCase": "Navigation, filters"
|
|
7677
|
+
},
|
|
7678
|
+
{
|
|
7679
|
+
"slot": "drawer_bottom",
|
|
7680
|
+
"position": "Bottom edge, full width",
|
|
7681
|
+
"useCase": "Action sheets, keyboards"
|
|
7682
|
+
},
|
|
7683
|
+
{
|
|
7684
|
+
"slot": "overlay_center",
|
|
7685
|
+
"position": "Centered modal",
|
|
7686
|
+
"useCase": "Dialogs, confirmations"
|
|
7687
|
+
},
|
|
7688
|
+
{
|
|
7689
|
+
"slot": "overlay_corner_br",
|
|
7690
|
+
"position": "Bottom-right corner",
|
|
7691
|
+
"useCase": "Chat widgets, help"
|
|
7692
|
+
},
|
|
7693
|
+
{
|
|
7694
|
+
"slot": "overlay_corner_bl",
|
|
7695
|
+
"position": "Bottom-left corner",
|
|
7696
|
+
"useCase": "Notifications"
|
|
7697
|
+
},
|
|
7698
|
+
{
|
|
7699
|
+
"slot": "toast_top",
|
|
7700
|
+
"position": "Top center",
|
|
7701
|
+
"useCase": "Success/error messages"
|
|
7702
|
+
},
|
|
7703
|
+
{
|
|
7704
|
+
"slot": "toast_bottom",
|
|
7705
|
+
"position": "Bottom center",
|
|
7706
|
+
"useCase": "Snackbar notifications"
|
|
7707
|
+
}
|
|
7708
|
+
]
|
|
7709
|
+
},
|
|
7710
|
+
"anchorResolution": {
|
|
7711
|
+
"description": "The anchorId field identifies which DOM element to target. It is always an object with { selector, route } — never a plain string.",
|
|
7712
|
+
"selectorFormats": [
|
|
7713
|
+
{
|
|
7714
|
+
"format": "Class",
|
|
7715
|
+
"example": ".hero-title",
|
|
7716
|
+
"matches": "<h1 class=\"hero-title\">"
|
|
7717
|
+
},
|
|
7718
|
+
{
|
|
7719
|
+
"format": "ID",
|
|
7720
|
+
"example": "#signup-button",
|
|
7721
|
+
"matches": "<button id=\"signup-button\">"
|
|
7722
|
+
},
|
|
7723
|
+
{
|
|
7724
|
+
"format": "Attribute",
|
|
7725
|
+
"example": "[data-testid='cta']",
|
|
7726
|
+
"matches": "<button data-testid=\"cta\">"
|
|
7727
|
+
},
|
|
7728
|
+
{
|
|
7729
|
+
"format": "Tag + class",
|
|
7730
|
+
"example": "h1.page-title",
|
|
7731
|
+
"matches": "<h1 class=\"page-title\">"
|
|
7732
|
+
},
|
|
7733
|
+
{
|
|
7734
|
+
"format": "Nested",
|
|
7735
|
+
"example": ".card .title",
|
|
7736
|
+
"matches": "<div class=\"title\"> inside .card"
|
|
7737
|
+
}
|
|
7738
|
+
],
|
|
7739
|
+
"bestPractices": [
|
|
7740
|
+
"Prefer stable selectors: [data-testid], IDs over classes",
|
|
7741
|
+
"Test across states: element may not exist on all pages",
|
|
7742
|
+
"Be specific: avoid selectors matching multiple elements"
|
|
7743
|
+
]
|
|
7744
|
+
},
|
|
7745
|
+
"routeScoping": {
|
|
7746
|
+
"description": "Every tile and action must declare which pages it applies to via activation.routes.",
|
|
7747
|
+
"patterns": [
|
|
7748
|
+
{
|
|
7749
|
+
"pattern": "/dashboard/income",
|
|
7750
|
+
"matches": "Exact path only",
|
|
7751
|
+
"useCase": "Page-specific"
|
|
7752
|
+
},
|
|
7753
|
+
{
|
|
7754
|
+
"pattern": "/dashboard/**",
|
|
7755
|
+
"matches": "/dashboard and all sub-paths",
|
|
7756
|
+
"useCase": "Section-wide"
|
|
7757
|
+
},
|
|
7758
|
+
{
|
|
7759
|
+
"pattern": "/**",
|
|
7760
|
+
"matches": "All pages",
|
|
7761
|
+
"useCase": "Global (always active)"
|
|
7762
|
+
},
|
|
7763
|
+
{
|
|
7764
|
+
"pattern": "/dashboard/:id",
|
|
7765
|
+
"matches": "Any single segment after /dashboard/",
|
|
7766
|
+
"useCase": "Dynamic routes"
|
|
7767
|
+
}
|
|
7768
|
+
],
|
|
7769
|
+
"rules": [
|
|
7770
|
+
"Patterns match against pathname only (no domain, no query string)",
|
|
7771
|
+
"** matches anything (including /)",
|
|
7772
|
+
"* matches within a single path segment (not /)",
|
|
7773
|
+
"exclude takes priority over include"
|
|
7774
|
+
]
|
|
7775
|
+
},
|
|
7776
|
+
"bestPractices": [
|
|
7777
|
+
"NEVER use onclick handlers or window.SynOS in HTML strings — use deepLink instead",
|
|
7778
|
+
"Batch related actions together for atomic rollback",
|
|
7779
|
+
"Use validate() to check actions before applying",
|
|
7780
|
+
"Listen for action.failed to handle errors",
|
|
7781
|
+
"Track action.applied for analytics"
|
|
7782
|
+
]
|
|
7432
7783
|
}
|
|
7433
7784
|
}
|