@syntrologie/runtime-sdk 2.3.0 → 2.4.0-canary.10
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 +50 -0
- package/dist/SmartCanvasApp.d.ts +4 -3
- package/dist/actions/schema.d.ts +26972 -8
- package/dist/actions/schema.js +2 -1
- package/dist/api.d.ts +3 -8
- package/dist/chunk-4NYS7GAW.js +180 -0
- package/dist/chunk-4NYS7GAW.js.map +7 -0
- package/dist/{chunk-AYTRRBR5.js → chunk-OGTCFYR3.js} +23 -33
- package/dist/chunk-OGTCFYR3.js.map +7 -0
- package/dist/{chunk-RUKIPJEJ.js → chunk-RC5YIJSP.js} +578 -421
- package/dist/chunk-RC5YIJSP.js.map +7 -0
- package/dist/components/ShadowCanvasOverlay.d.ts +1 -20
- package/dist/config/schema.d.ts +5229 -0
- package/dist/config/schema.js +125 -0
- package/dist/config/schema.js.map +7 -0
- package/dist/context/ContextManager.d.ts +3 -3
- package/dist/context/schema.d.ts +8 -8
- package/dist/context/types.d.ts +1 -1
- package/dist/decisions/schema.d.ts +1505 -67
- package/dist/decisions/schema.js +53 -0
- package/dist/decisions/schema.js.map +7 -0
- package/dist/decisions/types.d.ts +1 -1
- package/dist/hooks/useShadowCanvasConfig.d.ts +4 -4
- package/dist/index.js +50 -154
- package/dist/index.js.map +4 -4
- package/dist/overlays/schema.d.ts +22 -22
- package/dist/react.js +3 -2
- package/dist/react.js.map +1 -1
- package/dist/runtime.d.ts +4 -4
- package/dist/smart-canvas.esm.js +44 -47
- package/dist/smart-canvas.esm.js.map +4 -4
- package/dist/smart-canvas.js +813 -645
- package/dist/smart-canvas.js.map +4 -4
- package/dist/smart-canvas.min.js +41 -44
- package/dist/smart-canvas.min.js.map +4 -4
- package/dist/theme/ThemeProvider.d.ts +11 -16
- package/dist/theme/defaultTheme.d.ts +6 -1
- package/dist/theme/index.d.ts +3 -4
- package/dist/theme/types.d.ts +10 -0
- package/dist/types.d.ts +17 -76
- package/dist/version.d.ts +1 -1
- package/package.json +7 -7
- package/schema/canvas-config.schema.json +2679 -408
- package/scripts/validate-config.mjs +37 -0
- package/dist/chunk-AYTRRBR5.js.map +0 -7
- package/dist/chunk-RUKIPJEJ.js.map +0 -7
- package/dist/theme/extractHostTheme.d.ts +0 -14
- package/schema/canvas-config.base.schema.json +0 -351
package/CAPABILITIES.md
CHANGED
|
@@ -10,6 +10,7 @@ This document describes all available operations and capabilities of the SmartCa
|
|
|
10
10
|
- [Adaptive Packages](#adaptive-packages)
|
|
11
11
|
- [Surfaces](#surfaces)
|
|
12
12
|
- [Anchor Resolution](#anchor-resolution)
|
|
13
|
+
- [Route Scoping](#route-scoping)
|
|
13
14
|
- [Decision Strategies](#decision-strategies)
|
|
14
15
|
- [Best Practices](#best-practices)
|
|
15
16
|
|
|
@@ -1092,6 +1093,55 @@ Then reference by the anchor name:
|
|
|
1092
1093
|
|
|
1093
1094
|
---
|
|
1094
1095
|
|
|
1096
|
+
## Route Scoping
|
|
1097
|
+
|
|
1098
|
+
Every tile and action **must** declare which pages it applies to via `activation.routes`. The config itself is always active — individual tiles and actions decide independently whether to render.
|
|
1099
|
+
|
|
1100
|
+
### Per-Tile Activation
|
|
1101
|
+
|
|
1102
|
+
```json
|
|
1103
|
+
{
|
|
1104
|
+
"id": "faq-w2-boxes",
|
|
1105
|
+
"widget": "adaptive-faq:accordion",
|
|
1106
|
+
"activation": {
|
|
1107
|
+
"routes": { "include": ["/dashboard/income"] }
|
|
1108
|
+
},
|
|
1109
|
+
"props": { ... }
|
|
1110
|
+
}
|
|
1111
|
+
```
|
|
1112
|
+
|
|
1113
|
+
### Per-Action Activation
|
|
1114
|
+
|
|
1115
|
+
```json
|
|
1116
|
+
{
|
|
1117
|
+
"kind": "content:insertHtml",
|
|
1118
|
+
"anchorId": "[data-section='refund-estimate']",
|
|
1119
|
+
"activation": {
|
|
1120
|
+
"routes": { "include": ["/dashboard"] }
|
|
1121
|
+
},
|
|
1122
|
+
"html": "...",
|
|
1123
|
+
"position": "after"
|
|
1124
|
+
}
|
|
1125
|
+
```
|
|
1126
|
+
|
|
1127
|
+
### Route Patterns
|
|
1128
|
+
|
|
1129
|
+
| Pattern | Matches | Use Case |
|
|
1130
|
+
|---------|---------|----------|
|
|
1131
|
+
| `"/dashboard/income"` | Exact path only | Page-specific |
|
|
1132
|
+
| `"/dashboard/**"` | `/dashboard` and all sub-paths | Section-wide |
|
|
1133
|
+
| `"/**"` | All pages | Global (always active) |
|
|
1134
|
+
| `"/dashboard/:id"` | Any single segment after `/dashboard/` | Dynamic routes |
|
|
1135
|
+
|
|
1136
|
+
### Pattern Matching Rules
|
|
1137
|
+
|
|
1138
|
+
- Patterns match against **pathname only** (no domain, no query string)
|
|
1139
|
+
- `**` matches anything (including `/`)
|
|
1140
|
+
- `*` matches within a single path segment (not `/`)
|
|
1141
|
+
- `exclude` takes priority over `include`
|
|
1142
|
+
|
|
1143
|
+
---
|
|
1144
|
+
|
|
1095
1145
|
## Decision Strategies
|
|
1096
1146
|
|
|
1097
1147
|
Control when adaptives activate using `DecisionStrategy`:
|
package/dist/SmartCanvasApp.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import type { BatchActionHandle } from './actions/types';
|
|
3
|
-
import { type CanvasTheme } from './components/ShadowCanvasOverlay';
|
|
4
3
|
import type { SmartCanvasController } from './controller';
|
|
5
4
|
import type { ExperimentClient } from './experiments/types';
|
|
6
5
|
import type { SmartCanvasRuntime } from './runtime';
|
|
7
6
|
import type { TelemetryClient } from './telemetry/types';
|
|
7
|
+
import type { CanvasThemeConfig } from './theme';
|
|
8
8
|
import type { CanvasConfigFetcher } from './types';
|
|
9
9
|
export interface SmartCanvasAppProps {
|
|
10
10
|
controller: SmartCanvasController;
|
|
@@ -29,8 +29,9 @@ export interface SmartCanvasAppProps {
|
|
|
29
29
|
footerSlot?: ReactNode;
|
|
30
30
|
launcherLabel?: string;
|
|
31
31
|
canvasHost?: HTMLElement | null;
|
|
32
|
-
theme?: Partial<CanvasTheme>;
|
|
33
32
|
/** Batch handle from eager action application in createSmartCanvas(). Prevents double-apply. */
|
|
34
33
|
initialBatchHandle?: BatchActionHandle | null;
|
|
34
|
+
/** Workspace-level theme for 3-layer inheritance (defaults → workspace → config) */
|
|
35
|
+
workspaceTheme?: CanvasThemeConfig;
|
|
35
36
|
}
|
|
36
|
-
export declare function SmartCanvasApp({ controller, fetcher, configUri, configUriFeatureKey, configFeatureKey, fetchCredentials, pollIntervalMs, experiments, telemetry, runtime, overlayFetcher, overlayConfigUri, overlayConfigFeatureKey, overlayFetchCredentials, footerSlot, launcherLabel, canvasHost,
|
|
37
|
+
export declare function SmartCanvasApp({ controller, fetcher, configUri, configUriFeatureKey, configFeatureKey, fetchCredentials, pollIntervalMs, experiments, telemetry, runtime, overlayFetcher, overlayConfigUri, overlayConfigFeatureKey, overlayFetchCredentials, footerSlot, launcherLabel, canvasHost, initialBatchHandle, workspaceTheme, }: SmartCanvasAppProps): import("react/jsx-runtime").JSX.Element;
|