@syntrologie/runtime-sdk 2.3.0 → 2.4.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.
- package/dist/actions/schema.js +2 -1
- package/dist/chunk-BIYMC56J.js +165 -0
- package/dist/chunk-BIYMC56J.js.map +7 -0
- package/dist/{chunk-AYTRRBR5.js → chunk-DOJR7R46.js} +1 -16
- package/dist/{chunk-AYTRRBR5.js.map → chunk-DOJR7R46.js.map} +1 -1
- package/dist/chunk-JMHRHAEL.js +18 -0
- package/dist/chunk-JMHRHAEL.js.map +7 -0
- package/dist/{chunk-RUKIPJEJ.js → chunk-ZDZ3IYFN.js} +16 -41
- package/dist/chunk-ZDZ3IYFN.js.map +7 -0
- package/dist/config/schema.d.ts +4107 -0
- package/dist/config/schema.js +73 -0
- package/dist/config/schema.js.map +7 -0
- package/dist/context/ContextManager.d.ts +3 -3
- package/dist/context/types.d.ts +1 -1
- package/dist/decisions/schema.d.ts +1487 -49
- package/dist/decisions/schema.js +54 -0
- package/dist/decisions/schema.js.map +7 -0
- package/dist/decisions/types.d.ts +1 -1
- package/dist/hooks/useShadowCanvasConfig.d.ts +1 -3
- package/dist/index.js +48 -149
- package/dist/index.js.map +4 -4
- 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 +27 -27
- package/dist/smart-canvas.esm.js.map +3 -3
- package/dist/smart-canvas.js +22 -36
- package/dist/smart-canvas.js.map +3 -3
- package/dist/smart-canvas.min.js +27 -27
- package/dist/smart-canvas.min.js.map +3 -3
- 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 +2044 -299
- package/dist/chunk-RUKIPJEJ.js.map +0 -7
- package/schema/canvas-config.base.schema.json +0 -351
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://syntropyforge.com/schemas/smart-canvas-config.json",
|
|
4
|
-
"title": "Smart Canvas Configuration",
|
|
5
|
-
"description": "Action-based configuration for Smart Canvas. All interventions are unified as ActionStep.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["fetchedAt", "tiles", "actions"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"fetchedAt": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"format": "date-time",
|
|
12
|
-
"description": "When the config was fetched"
|
|
13
|
-
},
|
|
14
|
-
"configVersion": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "Version string for cache invalidation"
|
|
17
|
-
},
|
|
18
|
-
"canvasTitle": {
|
|
19
|
-
"type": "string",
|
|
20
|
-
"description": "Display title for the canvas"
|
|
21
|
-
},
|
|
22
|
-
"tiles": {
|
|
23
|
-
"type": "array",
|
|
24
|
-
"description": "Tiles to display in the canvas drawer",
|
|
25
|
-
"items": { "$ref": "#/$defs/tile" }
|
|
26
|
-
},
|
|
27
|
-
"actions": {
|
|
28
|
-
"type": "array",
|
|
29
|
-
"description": "Actions to execute. This is the unified intervention format - every DOM change, tooltip, highlight, or modal is an ActionStep.",
|
|
30
|
-
"items": { "$ref": "#/$defs/actionStep" }
|
|
31
|
-
},
|
|
32
|
-
"theme": {
|
|
33
|
-
"$ref": "#/$defs/themeConfig",
|
|
34
|
-
"description": "Theme configuration"
|
|
35
|
-
},
|
|
36
|
-
"launcher": {
|
|
37
|
-
"$ref": "#/$defs/launcherConfig",
|
|
38
|
-
"description": "Launcher button configuration"
|
|
39
|
-
},
|
|
40
|
-
"routes": {
|
|
41
|
-
"$ref": "#/$defs/routesConfig",
|
|
42
|
-
"description": "Route filtering"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"additionalProperties": false,
|
|
46
|
-
"$defs": {
|
|
47
|
-
"tile": {
|
|
48
|
-
"type": "object",
|
|
49
|
-
"required": ["id", "widget"],
|
|
50
|
-
"properties": {
|
|
51
|
-
"id": { "type": "string" },
|
|
52
|
-
"title": { "type": "string" },
|
|
53
|
-
"priority": { "type": "number" },
|
|
54
|
-
"widget": { "type": "string" },
|
|
55
|
-
"props": { "type": "object" },
|
|
56
|
-
"notifications": {
|
|
57
|
-
"type": "array",
|
|
58
|
-
"description": "Declarative rules mapping EventBus events to toast notifications",
|
|
59
|
-
"items": {
|
|
60
|
-
"type": "object",
|
|
61
|
-
"required": ["on", "title"],
|
|
62
|
-
"properties": {
|
|
63
|
-
"on": { "type": "string", "description": "EventBus event name (exact or regex)" },
|
|
64
|
-
"title": { "type": "string", "description": "Toast title (supports {{props.x}})" },
|
|
65
|
-
"body": { "type": "string", "description": "Toast body (supports {{props.x}})" },
|
|
66
|
-
"icon": { "type": "string", "description": "Icon name or emoji" },
|
|
67
|
-
"ttl": {
|
|
68
|
-
"type": "number",
|
|
69
|
-
"description": "Auto-dismiss ms (default 8000)",
|
|
70
|
-
"default": 8000
|
|
71
|
-
},
|
|
72
|
-
"cooldown": {
|
|
73
|
-
"type": "number",
|
|
74
|
-
"description": "Cooldown ms (default 30000)",
|
|
75
|
-
"default": 30000
|
|
76
|
-
},
|
|
77
|
-
"deepLink": {
|
|
78
|
-
"type": "object",
|
|
79
|
-
"properties": {
|
|
80
|
-
"tileId": { "type": "string" },
|
|
81
|
-
"itemId": { "type": "string", "description": "Supports {{props.x}}" }
|
|
82
|
-
},
|
|
83
|
-
"required": ["tileId"]
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"additionalProperties": false
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
"additionalProperties": false
|
|
91
|
-
},
|
|
92
|
-
"actionStep": {
|
|
93
|
-
"oneOf": []
|
|
94
|
-
},
|
|
95
|
-
"themeConfig": {
|
|
96
|
-
"type": "object",
|
|
97
|
-
"properties": {
|
|
98
|
-
"name": { "type": "string" },
|
|
99
|
-
"mode": { "type": "string", "enum": ["dark", "light"] },
|
|
100
|
-
"position": { "type": "string", "enum": ["left", "right"] },
|
|
101
|
-
"colorPrimary": { "type": "string" },
|
|
102
|
-
"colorBackground": { "type": "string" },
|
|
103
|
-
"colorText": { "type": "string" },
|
|
104
|
-
"borderRadius": { "type": "string" }
|
|
105
|
-
},
|
|
106
|
-
"additionalProperties": false
|
|
107
|
-
},
|
|
108
|
-
"launcherConfig": {
|
|
109
|
-
"type": "object",
|
|
110
|
-
"properties": {
|
|
111
|
-
"enabled": { "type": "boolean" },
|
|
112
|
-
"label": { "type": "string" },
|
|
113
|
-
"position": { "type": "string" }
|
|
114
|
-
},
|
|
115
|
-
"additionalProperties": false
|
|
116
|
-
},
|
|
117
|
-
"routesConfig": {
|
|
118
|
-
"type": "object",
|
|
119
|
-
"properties": {
|
|
120
|
-
"exclude": {
|
|
121
|
-
"type": "array",
|
|
122
|
-
"items": { "type": "string" }
|
|
123
|
-
},
|
|
124
|
-
"include": {
|
|
125
|
-
"type": "array",
|
|
126
|
-
"items": { "type": "string" }
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"additionalProperties": false
|
|
130
|
-
},
|
|
131
|
-
"activationConfig": {
|
|
132
|
-
"type": "object",
|
|
133
|
-
"description": "Activation configuration for conditional tile rendering",
|
|
134
|
-
"properties": {
|
|
135
|
-
"routes": { "$ref": "#/$defs/routeFilter" },
|
|
136
|
-
"strategy": { "$ref": "#/$defs/decisionStrategy" }
|
|
137
|
-
},
|
|
138
|
-
"additionalProperties": false
|
|
139
|
-
},
|
|
140
|
-
"routeFilter": {
|
|
141
|
-
"type": "object",
|
|
142
|
-
"properties": {
|
|
143
|
-
"include": {
|
|
144
|
-
"type": "array",
|
|
145
|
-
"items": { "type": "string" },
|
|
146
|
-
"description": "Routes where the tile should appear"
|
|
147
|
-
},
|
|
148
|
-
"exclude": {
|
|
149
|
-
"type": "array",
|
|
150
|
-
"items": { "type": "string" },
|
|
151
|
-
"description": "Routes where the tile should NOT appear"
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
"additionalProperties": false
|
|
155
|
-
},
|
|
156
|
-
"decisionStrategy": {
|
|
157
|
-
"oneOf": [
|
|
158
|
-
{ "$ref": "#/$defs/ruleStrategy" },
|
|
159
|
-
{ "$ref": "#/$defs/scoreStrategy" },
|
|
160
|
-
{ "$ref": "#/$defs/modelStrategy" },
|
|
161
|
-
{ "$ref": "#/$defs/externalStrategy" }
|
|
162
|
-
]
|
|
163
|
-
},
|
|
164
|
-
"ruleStrategy": {
|
|
165
|
-
"type": "object",
|
|
166
|
-
"required": ["type", "rules", "default"],
|
|
167
|
-
"properties": {
|
|
168
|
-
"type": { "const": "rules" },
|
|
169
|
-
"rules": {
|
|
170
|
-
"type": "array",
|
|
171
|
-
"items": { "$ref": "#/$defs/rule" }
|
|
172
|
-
},
|
|
173
|
-
"default": {}
|
|
174
|
-
},
|
|
175
|
-
"additionalProperties": false
|
|
176
|
-
},
|
|
177
|
-
"scoreStrategy": {
|
|
178
|
-
"type": "object",
|
|
179
|
-
"required": ["type", "field", "threshold", "above", "below"],
|
|
180
|
-
"properties": {
|
|
181
|
-
"type": { "const": "score" },
|
|
182
|
-
"field": { "type": "string" },
|
|
183
|
-
"threshold": { "type": "number" },
|
|
184
|
-
"above": {},
|
|
185
|
-
"below": {}
|
|
186
|
-
},
|
|
187
|
-
"additionalProperties": false
|
|
188
|
-
},
|
|
189
|
-
"modelStrategy": {
|
|
190
|
-
"type": "object",
|
|
191
|
-
"required": ["type", "modelId", "inputs", "outputMapping", "default"],
|
|
192
|
-
"properties": {
|
|
193
|
-
"type": { "const": "model" },
|
|
194
|
-
"modelId": { "type": "string" },
|
|
195
|
-
"inputs": { "type": "array", "items": { "type": "string" } },
|
|
196
|
-
"outputMapping": { "type": "object" },
|
|
197
|
-
"default": {}
|
|
198
|
-
},
|
|
199
|
-
"additionalProperties": false
|
|
200
|
-
},
|
|
201
|
-
"externalStrategy": {
|
|
202
|
-
"type": "object",
|
|
203
|
-
"required": ["type", "endpoint", "default"],
|
|
204
|
-
"properties": {
|
|
205
|
-
"type": { "const": "external" },
|
|
206
|
-
"endpoint": { "type": "string" },
|
|
207
|
-
"method": { "enum": ["GET", "POST"] },
|
|
208
|
-
"default": {},
|
|
209
|
-
"timeoutMs": { "type": "number" }
|
|
210
|
-
},
|
|
211
|
-
"additionalProperties": false
|
|
212
|
-
},
|
|
213
|
-
"rule": {
|
|
214
|
-
"type": "object",
|
|
215
|
-
"required": ["conditions", "value"],
|
|
216
|
-
"properties": {
|
|
217
|
-
"conditions": {
|
|
218
|
-
"type": "array",
|
|
219
|
-
"items": { "$ref": "#/$defs/condition" }
|
|
220
|
-
},
|
|
221
|
-
"value": {}
|
|
222
|
-
},
|
|
223
|
-
"additionalProperties": false
|
|
224
|
-
},
|
|
225
|
-
"condition": {
|
|
226
|
-
"oneOf": [
|
|
227
|
-
{
|
|
228
|
-
"type": "object",
|
|
229
|
-
"required": ["type", "url"],
|
|
230
|
-
"properties": {
|
|
231
|
-
"type": { "const": "page_url" },
|
|
232
|
-
"url": { "type": "string" }
|
|
233
|
-
},
|
|
234
|
-
"additionalProperties": false
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
"type": "object",
|
|
238
|
-
"required": ["type", "routeId"],
|
|
239
|
-
"properties": {
|
|
240
|
-
"type": { "const": "route" },
|
|
241
|
-
"routeId": { "type": "string" }
|
|
242
|
-
},
|
|
243
|
-
"additionalProperties": false
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
"type": "object",
|
|
247
|
-
"required": ["type", "anchorId", "state"],
|
|
248
|
-
"properties": {
|
|
249
|
-
"type": { "const": "anchor_visible" },
|
|
250
|
-
"anchorId": { "type": "string" },
|
|
251
|
-
"state": { "enum": ["visible", "present", "absent"] }
|
|
252
|
-
},
|
|
253
|
-
"additionalProperties": false
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
"type": "object",
|
|
257
|
-
"required": ["type", "eventName"],
|
|
258
|
-
"properties": {
|
|
259
|
-
"type": { "const": "event_occurred" },
|
|
260
|
-
"eventName": { "type": "string" },
|
|
261
|
-
"withinMs": { "type": "number" }
|
|
262
|
-
},
|
|
263
|
-
"additionalProperties": false
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
"type": "object",
|
|
267
|
-
"required": ["type", "key"],
|
|
268
|
-
"properties": {
|
|
269
|
-
"type": { "const": "state_equals" },
|
|
270
|
-
"key": { "type": "string" },
|
|
271
|
-
"value": {}
|
|
272
|
-
},
|
|
273
|
-
"additionalProperties": false
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
"type": "object",
|
|
277
|
-
"required": ["type"],
|
|
278
|
-
"properties": {
|
|
279
|
-
"type": { "const": "viewport" },
|
|
280
|
-
"minWidth": { "type": "number" },
|
|
281
|
-
"maxWidth": { "type": "number" },
|
|
282
|
-
"minHeight": { "type": "number" },
|
|
283
|
-
"maxHeight": { "type": "number" }
|
|
284
|
-
},
|
|
285
|
-
"additionalProperties": false
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
"type": "object",
|
|
289
|
-
"required": ["type", "key", "operator", "threshold"],
|
|
290
|
-
"properties": {
|
|
291
|
-
"type": { "const": "session_metric" },
|
|
292
|
-
"key": { "type": "string" },
|
|
293
|
-
"operator": { "enum": ["gte", "lte", "eq", "gt", "lt"] },
|
|
294
|
-
"threshold": { "type": "number" }
|
|
295
|
-
},
|
|
296
|
-
"additionalProperties": false
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
"type": "object",
|
|
300
|
-
"required": ["type", "key"],
|
|
301
|
-
"properties": {
|
|
302
|
-
"type": { "const": "dismissed" },
|
|
303
|
-
"key": { "type": "string" },
|
|
304
|
-
"inverted": { "type": "boolean" }
|
|
305
|
-
},
|
|
306
|
-
"additionalProperties": false
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
"type": "object",
|
|
310
|
-
"required": ["type", "key"],
|
|
311
|
-
"properties": {
|
|
312
|
-
"type": { "const": "cooldown_active" },
|
|
313
|
-
"key": { "type": "string" },
|
|
314
|
-
"inverted": { "type": "boolean" }
|
|
315
|
-
},
|
|
316
|
-
"additionalProperties": false
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
"type": "object",
|
|
320
|
-
"required": ["type", "key", "limit"],
|
|
321
|
-
"properties": {
|
|
322
|
-
"type": { "const": "frequency_limit" },
|
|
323
|
-
"key": { "type": "string" },
|
|
324
|
-
"limit": { "type": "number" },
|
|
325
|
-
"inverted": { "type": "boolean" }
|
|
326
|
-
},
|
|
327
|
-
"additionalProperties": false
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
"type": "object",
|
|
331
|
-
"required": ["type", "key", "operator", "count"],
|
|
332
|
-
"properties": {
|
|
333
|
-
"type": { "const": "event_count" },
|
|
334
|
-
"key": {
|
|
335
|
-
"type": "string",
|
|
336
|
-
"description": "Key referencing a callback registered by the adaptive via accumulator.register()"
|
|
337
|
-
},
|
|
338
|
-
"operator": { "enum": ["gte", "lte", "eq", "gt", "lt"] },
|
|
339
|
-
"count": { "type": "integer", "minimum": 0 },
|
|
340
|
-
"withinMs": {
|
|
341
|
-
"type": "number",
|
|
342
|
-
"exclusiveMinimum": 0,
|
|
343
|
-
"description": "Only count events within this time window (ms). Omit = session lifetime."
|
|
344
|
-
}
|
|
345
|
-
},
|
|
346
|
-
"additionalProperties": false
|
|
347
|
-
}
|
|
348
|
-
]
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|