@syntrologie/adapt-gamification 2.41.3 → 2.42.0
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/schema.d.ts +42 -42
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +131 -1
- package/dist/schema.js.map +4 -4
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -147,7 +147,7 @@ export declare const AwardBadgeSchema: z.ZodObject<{
|
|
|
147
147
|
badgeId: z.ZodString;
|
|
148
148
|
anchorId: z.ZodOptional<z.ZodObject<{
|
|
149
149
|
selector: z.ZodString;
|
|
150
|
-
route: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
150
|
+
route: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string | string[], string | string[]>;
|
|
151
151
|
}, "strict", z.ZodTypeAny, {
|
|
152
152
|
selector: string;
|
|
153
153
|
route: string | string[];
|
|
@@ -311,13 +311,13 @@ export declare const AwardBadgeSchema: z.ZodObject<{
|
|
|
311
311
|
contains?: string | undefined;
|
|
312
312
|
}>>>;
|
|
313
313
|
}, "strip", z.ZodTypeAny, {
|
|
314
|
-
events: ("ui.
|
|
314
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
315
315
|
match?: Record<string, {
|
|
316
316
|
equals?: string | number | boolean | undefined;
|
|
317
317
|
contains?: string | undefined;
|
|
318
318
|
}> | undefined;
|
|
319
319
|
}, {
|
|
320
|
-
events: ("ui.
|
|
320
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
321
321
|
match?: Record<string, {
|
|
322
322
|
equals?: string | number | boolean | undefined;
|
|
323
323
|
contains?: string | undefined;
|
|
@@ -330,7 +330,7 @@ export declare const AwardBadgeSchema: z.ZodObject<{
|
|
|
330
330
|
count: number;
|
|
331
331
|
withinMs?: number | undefined;
|
|
332
332
|
counter?: {
|
|
333
|
-
events: ("ui.
|
|
333
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
334
334
|
match?: Record<string, {
|
|
335
335
|
equals?: string | number | boolean | undefined;
|
|
336
336
|
contains?: string | undefined;
|
|
@@ -343,7 +343,7 @@ export declare const AwardBadgeSchema: z.ZodObject<{
|
|
|
343
343
|
count: number;
|
|
344
344
|
withinMs?: number | undefined;
|
|
345
345
|
counter?: {
|
|
346
|
-
events: ("ui.
|
|
346
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
347
347
|
match?: Record<string, {
|
|
348
348
|
equals?: string | number | boolean | undefined;
|
|
349
349
|
contains?: string | undefined;
|
|
@@ -401,7 +401,7 @@ export declare const AwardBadgeSchema: z.ZodObject<{
|
|
|
401
401
|
count: number;
|
|
402
402
|
withinMs?: number | undefined;
|
|
403
403
|
counter?: {
|
|
404
|
-
events: ("ui.
|
|
404
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
405
405
|
match?: Record<string, {
|
|
406
406
|
equals?: string | number | boolean | undefined;
|
|
407
407
|
contains?: string | undefined;
|
|
@@ -459,7 +459,7 @@ export declare const AwardBadgeSchema: z.ZodObject<{
|
|
|
459
459
|
count: number;
|
|
460
460
|
withinMs?: number | undefined;
|
|
461
461
|
counter?: {
|
|
462
|
-
events: ("ui.
|
|
462
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
463
463
|
match?: Record<string, {
|
|
464
464
|
equals?: string | number | boolean | undefined;
|
|
465
465
|
contains?: string | undefined;
|
|
@@ -521,7 +521,7 @@ export declare const AwardBadgeSchema: z.ZodObject<{
|
|
|
521
521
|
count: number;
|
|
522
522
|
withinMs?: number | undefined;
|
|
523
523
|
counter?: {
|
|
524
|
-
events: ("ui.
|
|
524
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
525
525
|
match?: Record<string, {
|
|
526
526
|
equals?: string | number | boolean | undefined;
|
|
527
527
|
contains?: string | undefined;
|
|
@@ -583,7 +583,7 @@ export declare const AwardBadgeSchema: z.ZodObject<{
|
|
|
583
583
|
count: number;
|
|
584
584
|
withinMs?: number | undefined;
|
|
585
585
|
counter?: {
|
|
586
|
-
events: ("ui.
|
|
586
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
587
587
|
match?: Record<string, {
|
|
588
588
|
equals?: string | number | boolean | undefined;
|
|
589
589
|
contains?: string | undefined;
|
|
@@ -716,7 +716,7 @@ export declare const AwardBadgeSchema: z.ZodObject<{
|
|
|
716
716
|
count: number;
|
|
717
717
|
withinMs?: number | undefined;
|
|
718
718
|
counter?: {
|
|
719
|
-
events: ("ui.
|
|
719
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
720
720
|
match?: Record<string, {
|
|
721
721
|
equals?: string | number | boolean | undefined;
|
|
722
722
|
contains?: string | undefined;
|
|
@@ -809,7 +809,7 @@ export declare const AwardBadgeSchema: z.ZodObject<{
|
|
|
809
809
|
count: number;
|
|
810
810
|
withinMs?: number | undefined;
|
|
811
811
|
counter?: {
|
|
812
|
-
events: ("ui.
|
|
812
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
813
813
|
match?: Record<string, {
|
|
814
814
|
equals?: string | number | boolean | undefined;
|
|
815
815
|
contains?: string | undefined;
|
|
@@ -1003,13 +1003,13 @@ export declare const AddPointsSchema: z.ZodObject<{
|
|
|
1003
1003
|
contains?: string | undefined;
|
|
1004
1004
|
}>>>;
|
|
1005
1005
|
}, "strip", z.ZodTypeAny, {
|
|
1006
|
-
events: ("ui.
|
|
1006
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1007
1007
|
match?: Record<string, {
|
|
1008
1008
|
equals?: string | number | boolean | undefined;
|
|
1009
1009
|
contains?: string | undefined;
|
|
1010
1010
|
}> | undefined;
|
|
1011
1011
|
}, {
|
|
1012
|
-
events: ("ui.
|
|
1012
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1013
1013
|
match?: Record<string, {
|
|
1014
1014
|
equals?: string | number | boolean | undefined;
|
|
1015
1015
|
contains?: string | undefined;
|
|
@@ -1022,7 +1022,7 @@ export declare const AddPointsSchema: z.ZodObject<{
|
|
|
1022
1022
|
count: number;
|
|
1023
1023
|
withinMs?: number | undefined;
|
|
1024
1024
|
counter?: {
|
|
1025
|
-
events: ("ui.
|
|
1025
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1026
1026
|
match?: Record<string, {
|
|
1027
1027
|
equals?: string | number | boolean | undefined;
|
|
1028
1028
|
contains?: string | undefined;
|
|
@@ -1035,7 +1035,7 @@ export declare const AddPointsSchema: z.ZodObject<{
|
|
|
1035
1035
|
count: number;
|
|
1036
1036
|
withinMs?: number | undefined;
|
|
1037
1037
|
counter?: {
|
|
1038
|
-
events: ("ui.
|
|
1038
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1039
1039
|
match?: Record<string, {
|
|
1040
1040
|
equals?: string | number | boolean | undefined;
|
|
1041
1041
|
contains?: string | undefined;
|
|
@@ -1093,7 +1093,7 @@ export declare const AddPointsSchema: z.ZodObject<{
|
|
|
1093
1093
|
count: number;
|
|
1094
1094
|
withinMs?: number | undefined;
|
|
1095
1095
|
counter?: {
|
|
1096
|
-
events: ("ui.
|
|
1096
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1097
1097
|
match?: Record<string, {
|
|
1098
1098
|
equals?: string | number | boolean | undefined;
|
|
1099
1099
|
contains?: string | undefined;
|
|
@@ -1151,7 +1151,7 @@ export declare const AddPointsSchema: z.ZodObject<{
|
|
|
1151
1151
|
count: number;
|
|
1152
1152
|
withinMs?: number | undefined;
|
|
1153
1153
|
counter?: {
|
|
1154
|
-
events: ("ui.
|
|
1154
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1155
1155
|
match?: Record<string, {
|
|
1156
1156
|
equals?: string | number | boolean | undefined;
|
|
1157
1157
|
contains?: string | undefined;
|
|
@@ -1213,7 +1213,7 @@ export declare const AddPointsSchema: z.ZodObject<{
|
|
|
1213
1213
|
count: number;
|
|
1214
1214
|
withinMs?: number | undefined;
|
|
1215
1215
|
counter?: {
|
|
1216
|
-
events: ("ui.
|
|
1216
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1217
1217
|
match?: Record<string, {
|
|
1218
1218
|
equals?: string | number | boolean | undefined;
|
|
1219
1219
|
contains?: string | undefined;
|
|
@@ -1275,7 +1275,7 @@ export declare const AddPointsSchema: z.ZodObject<{
|
|
|
1275
1275
|
count: number;
|
|
1276
1276
|
withinMs?: number | undefined;
|
|
1277
1277
|
counter?: {
|
|
1278
|
-
events: ("ui.
|
|
1278
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1279
1279
|
match?: Record<string, {
|
|
1280
1280
|
equals?: string | number | boolean | undefined;
|
|
1281
1281
|
contains?: string | undefined;
|
|
@@ -1405,7 +1405,7 @@ export declare const AddPointsSchema: z.ZodObject<{
|
|
|
1405
1405
|
count: number;
|
|
1406
1406
|
withinMs?: number | undefined;
|
|
1407
1407
|
counter?: {
|
|
1408
|
-
events: ("ui.
|
|
1408
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1409
1409
|
match?: Record<string, {
|
|
1410
1410
|
equals?: string | number | boolean | undefined;
|
|
1411
1411
|
contains?: string | undefined;
|
|
@@ -1495,7 +1495,7 @@ export declare const AddPointsSchema: z.ZodObject<{
|
|
|
1495
1495
|
count: number;
|
|
1496
1496
|
withinMs?: number | undefined;
|
|
1497
1497
|
counter?: {
|
|
1498
|
-
events: ("ui.
|
|
1498
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1499
1499
|
match?: Record<string, {
|
|
1500
1500
|
equals?: string | number | boolean | undefined;
|
|
1501
1501
|
contains?: string | undefined;
|
|
@@ -1538,7 +1538,7 @@ export declare const actionStepSchemas: ({
|
|
|
1538
1538
|
badgeId: z.ZodString;
|
|
1539
1539
|
anchorId: z.ZodOptional<z.ZodObject<{
|
|
1540
1540
|
selector: z.ZodString;
|
|
1541
|
-
route: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
1541
|
+
route: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string | string[], string | string[]>;
|
|
1542
1542
|
}, "strict", z.ZodTypeAny, {
|
|
1543
1543
|
selector: string;
|
|
1544
1544
|
route: string | string[];
|
|
@@ -1702,13 +1702,13 @@ export declare const actionStepSchemas: ({
|
|
|
1702
1702
|
contains?: string | undefined;
|
|
1703
1703
|
}>>>;
|
|
1704
1704
|
}, "strip", z.ZodTypeAny, {
|
|
1705
|
-
events: ("ui.
|
|
1705
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1706
1706
|
match?: Record<string, {
|
|
1707
1707
|
equals?: string | number | boolean | undefined;
|
|
1708
1708
|
contains?: string | undefined;
|
|
1709
1709
|
}> | undefined;
|
|
1710
1710
|
}, {
|
|
1711
|
-
events: ("ui.
|
|
1711
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1712
1712
|
match?: Record<string, {
|
|
1713
1713
|
equals?: string | number | boolean | undefined;
|
|
1714
1714
|
contains?: string | undefined;
|
|
@@ -1721,7 +1721,7 @@ export declare const actionStepSchemas: ({
|
|
|
1721
1721
|
count: number;
|
|
1722
1722
|
withinMs?: number | undefined;
|
|
1723
1723
|
counter?: {
|
|
1724
|
-
events: ("ui.
|
|
1724
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1725
1725
|
match?: Record<string, {
|
|
1726
1726
|
equals?: string | number | boolean | undefined;
|
|
1727
1727
|
contains?: string | undefined;
|
|
@@ -1734,7 +1734,7 @@ export declare const actionStepSchemas: ({
|
|
|
1734
1734
|
count: number;
|
|
1735
1735
|
withinMs?: number | undefined;
|
|
1736
1736
|
counter?: {
|
|
1737
|
-
events: ("ui.
|
|
1737
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1738
1738
|
match?: Record<string, {
|
|
1739
1739
|
equals?: string | number | boolean | undefined;
|
|
1740
1740
|
contains?: string | undefined;
|
|
@@ -1792,7 +1792,7 @@ export declare const actionStepSchemas: ({
|
|
|
1792
1792
|
count: number;
|
|
1793
1793
|
withinMs?: number | undefined;
|
|
1794
1794
|
counter?: {
|
|
1795
|
-
events: ("ui.
|
|
1795
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1796
1796
|
match?: Record<string, {
|
|
1797
1797
|
equals?: string | number | boolean | undefined;
|
|
1798
1798
|
contains?: string | undefined;
|
|
@@ -1850,7 +1850,7 @@ export declare const actionStepSchemas: ({
|
|
|
1850
1850
|
count: number;
|
|
1851
1851
|
withinMs?: number | undefined;
|
|
1852
1852
|
counter?: {
|
|
1853
|
-
events: ("ui.
|
|
1853
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1854
1854
|
match?: Record<string, {
|
|
1855
1855
|
equals?: string | number | boolean | undefined;
|
|
1856
1856
|
contains?: string | undefined;
|
|
@@ -1912,7 +1912,7 @@ export declare const actionStepSchemas: ({
|
|
|
1912
1912
|
count: number;
|
|
1913
1913
|
withinMs?: number | undefined;
|
|
1914
1914
|
counter?: {
|
|
1915
|
-
events: ("ui.
|
|
1915
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1916
1916
|
match?: Record<string, {
|
|
1917
1917
|
equals?: string | number | boolean | undefined;
|
|
1918
1918
|
contains?: string | undefined;
|
|
@@ -1974,7 +1974,7 @@ export declare const actionStepSchemas: ({
|
|
|
1974
1974
|
count: number;
|
|
1975
1975
|
withinMs?: number | undefined;
|
|
1976
1976
|
counter?: {
|
|
1977
|
-
events: ("ui.
|
|
1977
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
1978
1978
|
match?: Record<string, {
|
|
1979
1979
|
equals?: string | number | boolean | undefined;
|
|
1980
1980
|
contains?: string | undefined;
|
|
@@ -2107,7 +2107,7 @@ export declare const actionStepSchemas: ({
|
|
|
2107
2107
|
count: number;
|
|
2108
2108
|
withinMs?: number | undefined;
|
|
2109
2109
|
counter?: {
|
|
2110
|
-
events: ("ui.
|
|
2110
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
2111
2111
|
match?: Record<string, {
|
|
2112
2112
|
equals?: string | number | boolean | undefined;
|
|
2113
2113
|
contains?: string | undefined;
|
|
@@ -2200,7 +2200,7 @@ export declare const actionStepSchemas: ({
|
|
|
2200
2200
|
count: number;
|
|
2201
2201
|
withinMs?: number | undefined;
|
|
2202
2202
|
counter?: {
|
|
2203
|
-
events: ("ui.
|
|
2203
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
2204
2204
|
match?: Record<string, {
|
|
2205
2205
|
equals?: string | number | boolean | undefined;
|
|
2206
2206
|
contains?: string | undefined;
|
|
@@ -2393,13 +2393,13 @@ export declare const actionStepSchemas: ({
|
|
|
2393
2393
|
contains?: string | undefined;
|
|
2394
2394
|
}>>>;
|
|
2395
2395
|
}, "strip", z.ZodTypeAny, {
|
|
2396
|
-
events: ("ui.
|
|
2396
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
2397
2397
|
match?: Record<string, {
|
|
2398
2398
|
equals?: string | number | boolean | undefined;
|
|
2399
2399
|
contains?: string | undefined;
|
|
2400
2400
|
}> | undefined;
|
|
2401
2401
|
}, {
|
|
2402
|
-
events: ("ui.
|
|
2402
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
2403
2403
|
match?: Record<string, {
|
|
2404
2404
|
equals?: string | number | boolean | undefined;
|
|
2405
2405
|
contains?: string | undefined;
|
|
@@ -2412,7 +2412,7 @@ export declare const actionStepSchemas: ({
|
|
|
2412
2412
|
count: number;
|
|
2413
2413
|
withinMs?: number | undefined;
|
|
2414
2414
|
counter?: {
|
|
2415
|
-
events: ("ui.
|
|
2415
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
2416
2416
|
match?: Record<string, {
|
|
2417
2417
|
equals?: string | number | boolean | undefined;
|
|
2418
2418
|
contains?: string | undefined;
|
|
@@ -2425,7 +2425,7 @@ export declare const actionStepSchemas: ({
|
|
|
2425
2425
|
count: number;
|
|
2426
2426
|
withinMs?: number | undefined;
|
|
2427
2427
|
counter?: {
|
|
2428
|
-
events: ("ui.
|
|
2428
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
2429
2429
|
match?: Record<string, {
|
|
2430
2430
|
equals?: string | number | boolean | undefined;
|
|
2431
2431
|
contains?: string | undefined;
|
|
@@ -2483,7 +2483,7 @@ export declare const actionStepSchemas: ({
|
|
|
2483
2483
|
count: number;
|
|
2484
2484
|
withinMs?: number | undefined;
|
|
2485
2485
|
counter?: {
|
|
2486
|
-
events: ("ui.
|
|
2486
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
2487
2487
|
match?: Record<string, {
|
|
2488
2488
|
equals?: string | number | boolean | undefined;
|
|
2489
2489
|
contains?: string | undefined;
|
|
@@ -2541,7 +2541,7 @@ export declare const actionStepSchemas: ({
|
|
|
2541
2541
|
count: number;
|
|
2542
2542
|
withinMs?: number | undefined;
|
|
2543
2543
|
counter?: {
|
|
2544
|
-
events: ("ui.
|
|
2544
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
2545
2545
|
match?: Record<string, {
|
|
2546
2546
|
equals?: string | number | boolean | undefined;
|
|
2547
2547
|
contains?: string | undefined;
|
|
@@ -2603,7 +2603,7 @@ export declare const actionStepSchemas: ({
|
|
|
2603
2603
|
count: number;
|
|
2604
2604
|
withinMs?: number | undefined;
|
|
2605
2605
|
counter?: {
|
|
2606
|
-
events: ("ui.
|
|
2606
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
2607
2607
|
match?: Record<string, {
|
|
2608
2608
|
equals?: string | number | boolean | undefined;
|
|
2609
2609
|
contains?: string | undefined;
|
|
@@ -2665,7 +2665,7 @@ export declare const actionStepSchemas: ({
|
|
|
2665
2665
|
count: number;
|
|
2666
2666
|
withinMs?: number | undefined;
|
|
2667
2667
|
counter?: {
|
|
2668
|
-
events: ("ui.
|
|
2668
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
2669
2669
|
match?: Record<string, {
|
|
2670
2670
|
equals?: string | number | boolean | undefined;
|
|
2671
2671
|
contains?: string | undefined;
|
|
@@ -2795,7 +2795,7 @@ export declare const actionStepSchemas: ({
|
|
|
2795
2795
|
count: number;
|
|
2796
2796
|
withinMs?: number | undefined;
|
|
2797
2797
|
counter?: {
|
|
2798
|
-
events: ("ui.
|
|
2798
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
2799
2799
|
match?: Record<string, {
|
|
2800
2800
|
equals?: string | number | boolean | undefined;
|
|
2801
2801
|
contains?: string | undefined;
|
|
@@ -2885,7 +2885,7 @@ export declare const actionStepSchemas: ({
|
|
|
2885
2885
|
count: number;
|
|
2886
2886
|
withinMs?: number | undefined;
|
|
2887
2887
|
counter?: {
|
|
2888
|
-
events: ("ui.
|
|
2888
|
+
events: ("ui.hover" | "ui.idle" | "ui.hesitate" | "ui.rage_click" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "nav.page_view" | "nav.page_leave")[];
|
|
2889
2889
|
match?: Record<string, {
|
|
2890
2890
|
equals?: string | number | boolean | undefined;
|
|
2891
2891
|
contains?: string | undefined;
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAStB,CAAC;AAUH;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASvB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAM9D;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;GAEG;AACH,eAA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ologie:canvas-runtime");
|
|
8
8
|
|
|
9
|
+
// ../../sdk-contracts/dist/detector-events.js
|
|
10
|
+
var DETECTOR_EVENT_NAMES = [
|
|
11
|
+
"ui.hover",
|
|
12
|
+
"ui.idle",
|
|
13
|
+
"ui.hesitate",
|
|
14
|
+
"ui.rage_click",
|
|
15
|
+
"ui.scroll_thrash",
|
|
16
|
+
"ui.focus_bounce"
|
|
17
|
+
];
|
|
18
|
+
var CANONICAL_BUS_EVENT_NAMES = [
|
|
19
|
+
...DETECTOR_EVENT_NAMES,
|
|
20
|
+
"nav.section_viewed",
|
|
21
|
+
"nav.scroll_depth"
|
|
22
|
+
];
|
|
23
|
+
|
|
9
24
|
// ../../sdk-contracts/dist/routes.js
|
|
25
|
+
var RESERVED_BYTES = /* @__PURE__ */ new Set([
|
|
26
|
+
33,
|
|
27
|
+
// !
|
|
28
|
+
35,
|
|
29
|
+
// #
|
|
30
|
+
36,
|
|
31
|
+
// $
|
|
32
|
+
38,
|
|
33
|
+
// &
|
|
34
|
+
39,
|
|
35
|
+
// '
|
|
36
|
+
40,
|
|
37
|
+
// (
|
|
38
|
+
41,
|
|
39
|
+
// )
|
|
40
|
+
42,
|
|
41
|
+
// *
|
|
42
|
+
43,
|
|
43
|
+
// +
|
|
44
|
+
44,
|
|
45
|
+
// ,
|
|
46
|
+
47,
|
|
47
|
+
// /
|
|
48
|
+
58,
|
|
49
|
+
// :
|
|
50
|
+
59,
|
|
51
|
+
// ;
|
|
52
|
+
61,
|
|
53
|
+
// =
|
|
54
|
+
63,
|
|
55
|
+
// ?
|
|
56
|
+
64,
|
|
57
|
+
// @
|
|
58
|
+
91,
|
|
59
|
+
// [
|
|
60
|
+
93
|
|
61
|
+
// ]
|
|
62
|
+
]);
|
|
10
63
|
var utf8Decoder = new TextDecoder("utf-8", { fatal: false });
|
|
64
|
+
function decodeUnreservedOnly(input) {
|
|
65
|
+
let out = "";
|
|
66
|
+
let pending = [];
|
|
67
|
+
const flushPending = () => {
|
|
68
|
+
if (pending.length === 0)
|
|
69
|
+
return;
|
|
70
|
+
const bytes = new Uint8Array(pending);
|
|
71
|
+
out += utf8Decoder.decode(bytes);
|
|
72
|
+
pending = [];
|
|
73
|
+
};
|
|
74
|
+
let i2 = 0;
|
|
75
|
+
while (i2 < input.length) {
|
|
76
|
+
const ch = input[i2];
|
|
77
|
+
if (ch === "%" && i2 + 2 < input.length && isHex(input[i2 + 1]) && isHex(input[i2 + 2])) {
|
|
78
|
+
const byte = parseInt(input.slice(i2 + 1, i2 + 3), 16);
|
|
79
|
+
if (RESERVED_BYTES.has(byte)) {
|
|
80
|
+
flushPending();
|
|
81
|
+
out += `%${input.slice(i2 + 1, i2 + 3).toUpperCase()}`;
|
|
82
|
+
i2 += 3;
|
|
83
|
+
} else {
|
|
84
|
+
pending.push(byte);
|
|
85
|
+
i2 += 3;
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
flushPending();
|
|
89
|
+
out += ch;
|
|
90
|
+
i2 += 1;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
flushPending();
|
|
94
|
+
return out;
|
|
95
|
+
}
|
|
96
|
+
function isHex(c2) {
|
|
97
|
+
return c2 >= "0" && c2 <= "9" || c2 >= "a" && c2 <= "f" || c2 >= "A" && c2 <= "F";
|
|
98
|
+
}
|
|
99
|
+
function stripQueryAndHash(s4) {
|
|
100
|
+
const q = s4.indexOf("?");
|
|
101
|
+
if (q !== -1)
|
|
102
|
+
s4 = s4.slice(0, q);
|
|
103
|
+
const h = s4.indexOf("#");
|
|
104
|
+
if (h !== -1)
|
|
105
|
+
s4 = s4.slice(0, h);
|
|
106
|
+
return s4;
|
|
107
|
+
}
|
|
108
|
+
function normalizeRoute(path) {
|
|
109
|
+
if (typeof path !== "string" || path.length === 0) {
|
|
110
|
+
throw new TypeError("normalizeRoute: input must be a non-empty string");
|
|
111
|
+
}
|
|
112
|
+
if (!path.startsWith("/")) {
|
|
113
|
+
throw new TypeError(`normalizeRoute: input must be absolute (start with '/'); got ${JSON.stringify(path)}`);
|
|
114
|
+
}
|
|
115
|
+
let s4 = stripQueryAndHash(path);
|
|
116
|
+
s4 = decodeUnreservedOnly(s4);
|
|
117
|
+
s4 = s4.replace(/\/+/g, "/");
|
|
118
|
+
if (s4.length > 1 && s4.endsWith("/"))
|
|
119
|
+
s4 = s4.slice(0, -1);
|
|
120
|
+
return s4;
|
|
121
|
+
}
|
|
11
122
|
|
|
12
123
|
// ../../sdk-contracts/dist/schemas.js
|
|
13
124
|
import { z } from "zod";
|
|
@@ -16,7 +127,26 @@ var AnchorIdZ = z.object({
|
|
|
16
127
|
selector: z.string().regex(NO_CSS_BREAKOUT_PATTERN, {
|
|
17
128
|
message: 'selector must not contain "{" or "}" \u2014 not valid CSS selector syntax, and content:hideBySelector injects this value directly into a <style> element where these characters would break out of the generated rule.'
|
|
18
129
|
}).describe("CSS selector for the target element"),
|
|
19
|
-
route: z.union([z.string(), z.array(z.string())]).
|
|
130
|
+
route: z.union([z.string(), z.array(z.string())]).superRefine((value, ctx) => {
|
|
131
|
+
for (const route of Array.isArray(value) ? value : [value]) {
|
|
132
|
+
let canonical;
|
|
133
|
+
try {
|
|
134
|
+
canonical = normalizeRoute(route);
|
|
135
|
+
} catch (err) {
|
|
136
|
+
ctx.addIssue({
|
|
137
|
+
code: z.ZodIssueCode.custom,
|
|
138
|
+
message: `route must be an absolute path starting with "/" (got ${JSON.stringify(route)}): ${err instanceof Error ? err.message : String(err)}`
|
|
139
|
+
});
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
if (canonical !== route) {
|
|
143
|
+
ctx.addIssue({
|
|
144
|
+
code: z.ZodIssueCode.custom,
|
|
145
|
+
message: `route ${JSON.stringify(route)} is not canonical \u2014 use ${JSON.stringify(canonical)} (this must match what the backend's RouteCanonicalityCheck accepts)`
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}).describe("URL path(s) where this element exists")
|
|
20
150
|
}).strict().describe("DOM element target. selector = CSS selector, route = URL path(s) where the element exists.");
|
|
21
151
|
var AuthoringFieldsZ = {
|
|
22
152
|
id: z.string().optional().describe('Stable action identifier (e.g. "act_3db6a14d2ab0").'),
|
package/dist/schema.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../node_modules/@lit/context/src/lib/create-context.ts", "../../../sdk-contracts/dist/canvas-context.js", "../../../sdk-contracts/dist/routes.js", "../../../sdk-contracts/dist/schemas.js", "../src/schema.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * The Context type defines a type brand to associate a key value with the context value type\n */\nexport type Context<KeyType, ValueType> = KeyType & {__context__: ValueType};\n\n/**\n * @deprecated use Context instead\n */\nexport type ContextKey<KeyType, ValueType> = Context<KeyType, ValueType>;\n\n/**\n * A helper type which can extract a Context value type from a Context type\n */\nexport type ContextType<Key extends Context<unknown, unknown>> =\n Key extends Context<unknown, infer ValueType> ? ValueType : never;\n\n/**\n * Creates a typed Context.\n *\n * Contexts are compared with strict equality.\n *\n * If you want two separate `createContext()` calls to referer to the same\n * context, then use a key that will by equal under strict equality like a\n * string for `Symbol.for()`:\n *\n * ```ts\n * // true\n * createContext('my-context') === createContext('my-context')\n * // true\n * createContext(Symbol.for('my-context')) === createContext(Symbol.for('my-context'))\n * ```\n *\n * If you want a context to be unique so that it's guaranteed to not collide\n * with other contexts, use a key that's unique under strict equality, like\n * a `Symbol()` or object.:\n *\n * ```\n * // false\n * createContext({}) === createContext({})\n * // false\n * createContext(Symbol('my-context')) === createContext(Symbol('my-context'))\n * ```\n *\n * @param key a context key value\n * @template ValueType the type of value that can be provided by this context.\n * @returns the context key value cast to `Context<K, ValueType>`\n */\nexport function createContext<ValueType, K = unknown>(key: K) {\n return key as Context<K, ValueType>;\n}\n", "/**\n * Canvas runtime context \u2014 the shared @lit/context symbol both\n * runtime-sdk (the provider) and canvas-sdk / canvas authors (the\n * consumers) use to thread a narrow runtime handle through the canvas\n * element tree.\n *\n * Living here keeps the symbol identity stable across both packages.\n * If canvas-sdk created its own symbol with `createContext(...)`, it\n * would never match the one runtime-sdk publishes, and `<sc-mount>`\n * would silently see `undefined` instead of the widget registry.\n *\n * The shape declared here is a NARROW VIEW of `SmartCanvasRuntime`.\n * Canvas-side code reads only this subset. The runtime-sdk's\n * `SmartCanvasRuntime` type is a structural superset.\n */\nimport { createContext } from '@lit/context';\n/**\n * The @lit/context symbol. Both runtime-sdk's ContextProvider and\n * canvas-sdk's ContextConsumer must import THIS exact symbol \u2014 not a\n * symbol with the same string name \u2014 for context propagation to work.\n */\nexport const canvasRuntimeContext = createContext('syntrologie:canvas-runtime');\n", "/**\n * Canonical route normalization. See `routes.md` for rules and\n * `normalize-route.cases.json` for the parity corpus shared with the\n * Python implementation in syntrologie_common/sdk/routing.py.\n *\n * Two exports \u2014 `normalizeRoute` for literal paths, `normalizeRoutePattern`\n * for activation patterns containing `*`, `**`, `:param`. Today they share\n * an implementation because the rules happen to be wildcard-safe (no\n * lowercase, unreserved-only decode, slash collapse preserves `**`).\n * The seam is preserved as separate exports so the API can diverge\n * without consumer churn if rules change.\n */\n// RFC 3986 reserved characters (gen-delims + sub-delims). When a `%XX`\n// sequence decodes to one of these bytes, we keep the percent-encoded\n// form \u2014 decoding would re-segment the path or change its meaning.\nconst RESERVED_BYTES = new Set([\n 0x21, // !\n 0x23, // #\n 0x24, // $\n 0x26, // &\n 0x27, // '\n 0x28, // (\n 0x29, // )\n 0x2a, // *\n 0x2b, // +\n 0x2c, // ,\n 0x2f, // /\n 0x3a, // :\n 0x3b, // ;\n 0x3d, // =\n 0x3f, // ?\n 0x40, // @\n 0x5b, // [\n 0x5d, // ]\n]);\nconst utf8Decoder = new TextDecoder('utf-8', { fatal: false });\n/** Decode `%XX` sequences for unreserved bytes only. Collapses\n * adjacent `%XX` runs into a UTF-8 decode so `%C3%A9` \u2192 `\u00E9`. */\nfunction decodeUnreservedOnly(input) {\n let out = '';\n let pending = [];\n const flushPending = () => {\n if (pending.length === 0)\n return;\n const bytes = new Uint8Array(pending);\n out += utf8Decoder.decode(bytes);\n pending = [];\n };\n let i = 0;\n while (i < input.length) {\n const ch = input[i];\n if (ch === '%' && i + 2 < input.length && isHex(input[i + 1]) && isHex(input[i + 2])) {\n const byte = parseInt(input.slice(i + 1, i + 3), 16);\n if (RESERVED_BYTES.has(byte)) {\n flushPending();\n // Keep raw, but normalize hex case to uppercase so the\n // canonical form is stable across input casing.\n out += `%${input.slice(i + 1, i + 3).toUpperCase()}`;\n i += 3;\n }\n else {\n pending.push(byte);\n i += 3;\n }\n }\n else {\n flushPending();\n out += ch;\n i += 1;\n }\n }\n flushPending();\n return out;\n}\nfunction isHex(c) {\n return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');\n}\n/** Strip query string and hash fragment. */\nfunction stripQueryAndHash(s) {\n const q = s.indexOf('?');\n if (q !== -1)\n s = s.slice(0, q);\n const h = s.indexOf('#');\n if (h !== -1)\n s = s.slice(0, h);\n return s;\n}\n/**\n * Normalize a literal path (e.g. `window.location.pathname`, an\n * action's `route` field, a wiki route key).\n *\n * Throws `TypeError` if the input is not an absolute path. Callers\n * that want a soft API should use {@link normalizeRouteWithChange}.\n */\nexport function normalizeRoute(path) {\n if (typeof path !== 'string' || path.length === 0) {\n throw new TypeError('normalizeRoute: input must be a non-empty string');\n }\n if (!path.startsWith('/')) {\n throw new TypeError(`normalizeRoute: input must be absolute (start with '/'); got ${JSON.stringify(path)}`);\n }\n let s = stripQueryAndHash(path);\n s = decodeUnreservedOnly(s);\n s = s.replace(/\\/+/g, '/');\n if (s.length > 1 && s.endsWith('/'))\n s = s.slice(0, -1);\n return s;\n}\n/**\n * Normalize an activation route pattern. Preserves `*`, `**`,\n * `:param` exactly. Today equivalent to {@link normalizeRoute} \u2014 kept\n * as a separate export so rules can diverge later without API churn.\n */\nexport function normalizeRoutePattern(pattern) {\n return normalizeRoute(pattern);\n}\n/**\n * Normalize a route and report whether the input was already\n * canonical. Used by authoring tools to decide whether to emit a\n * warning to the LLM.\n */\nexport function normalizeRouteWithChange(path) {\n const canonical = normalizeRoute(path);\n return { canonical, changed: canonical !== path };\n}\n/** Pattern-side counterpart of {@link normalizeRouteWithChange}. */\nexport function normalizeRoutePatternWithChange(pattern) {\n const canonical = normalizeRoutePattern(pattern);\n return { canonical, changed: canonical !== pattern };\n}\n/**\n * Case-insensitive comparison of two already-canonical paths. Use\n * this anywhere two routes are compared for equality (wiki lookups,\n * non-pattern action route gates) \u2014 preserves casing in the inputs\n * while honoring case-insensitive routing on the customer's site.\n */\nexport function routesMatch(a, b) {\n return a.toLowerCase() === b.toLowerCase();\n}\n", "/**\n * Shared Zod schemas for decision strategies, conditions, and event scoping.\n *\n * These are the canonical definitions \u2014 runtime-sdk and all adaptive packages\n * should import from here instead of duplicating.\n */\nimport { z } from 'zod';\n// =============================================================================\n// ANCHOR ID SCHEMA\n// =============================================================================\n// A selector containing \"{\" or \"}\" can never match a real DOM element via\n// querySelectorAll \u2014 those characters are exclusively CSS rule delimiters,\n// not valid selector syntax. They ARE, however, exactly what\n// content:hideBySelector's executor needs to escape the single CSS rule it\n// injects as raw text into a live <style> element\n// (`${selector} { ${prop}: ${value} !important; }` \u2014 see\n// executeHideBySelector in adaptive-content/src/runtime.ts): a selector\n// containing `}` closes that rule early and lets the rest of the string\n// splice in arbitrary attacker-controlled CSS anywhere on the host page\n// (defacement, CSS-based data exfiltration via attribute selectors,\n// clickjacking overlays). This constraint lives on THIS canonical AnchorIdZ\n// (not a hideBySelector-only variant, and not a second copy in a\n// downstream package) so that every action kind in every package \u2014 core\n// and adaptive \u2014 inherits it automatically: there is exactly one\n// `AnchorIdZ`, and every consumer imports it from here (SEC-067,\n// BUG-1786764688). No legitimate selector for any action kind needs a\n// literal brace.\nexport const NO_CSS_BREAKOUT_PATTERN = /^[^{}]*$/;\nexport const AnchorIdZ = z\n .object({\n selector: z\n .string()\n .regex(NO_CSS_BREAKOUT_PATTERN, {\n message: 'selector must not contain \"{\" or \"}\" \u2014 not valid CSS selector syntax, and content:hideBySelector injects this value directly into a <style> element where these characters would break out of the generated rule.',\n })\n .describe('CSS selector for the target element'),\n route: z\n .union([z.string(), z.array(z.string())])\n .describe('URL path(s) where this element exists'),\n})\n .strict()\n .describe('DOM element target. selector = CSS selector, route = URL path(s) where the element exists.');\n// =============================================================================\n// AUTHORING FIELDS \u2014 id / title / description / validation\n//\n// Shared fields every action carries. `id` is the action identifier the\n// runtime uses to dispatch, dedupe, and drop/replace actions \u2014 it is NOT\n// stripped before serving. `title` / `description` / `validation` are\n// authoring-only metadata stripped server-side in `to_runtime_config`\n// (platform/backend/app/domains/experiments/helpers.py).\n//\n// They all appear in the JSON Schema (and therefore in the tactician's\n// prompt) because the LLM needs to know they are valid action properties \u2014\n// otherwise schema validation would reject what the prompt commands.\n//\n// Each action variant should `.extend(AuthoringFieldsZ)` alongside any\n// triggerWhen/condition extensions.\n// =============================================================================\nexport const AuthoringFieldsZ = {\n id: z.string().optional().describe('Stable action identifier (e.g. \"act_3db6a14d2ab0\").'),\n title: z\n .string()\n .max(200)\n .optional()\n .describe('Authoring-only: short label shown on the action plan dashboard. Stripped before serving to the runtime SDK.'),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe('Authoring-only: one-sentence explanation of what this action does and why. Stripped before serving to the runtime SDK.'),\n validation: z\n .array(z.string().max(500))\n .max(10)\n .optional()\n .describe('Authoring-only: ordered steps a reviewer can follow to trigger this action and visually confirm it works. Each entry is one step. Stripped before serving to the runtime SDK.'),\n};\n// =============================================================================\n// TRIGGER VOCABULARY \u2014 canonical lists of valid event names, metric keys, etc.\n// These flow through to the JSON schema as enums and are used by the LLM prompt.\n// =============================================================================\n/** Events that can be counted in event_count conditions.\n *\n * Every value here must be an event the runtime actually emits \u2014 either a\n * PostHog-autocapture normalization (ui.click/scroll/input/change/submit) or\n * an event-processor detector (ui.hover/idle/scroll_thrash/focus_bounce/\n * hesitate/rage_click). Do not add aspirational names; a trigger counting an\n * event nothing emits never fires.\n */\nexport const COUNTABLE_EVENTS = [\n // User interactions (from PostHog autocapture normalization)\n 'ui.click',\n 'ui.scroll',\n 'ui.input',\n 'ui.change',\n 'ui.submit',\n // Behavioral detectors (from event-processor)\n 'ui.hover',\n 'ui.idle',\n 'ui.scroll_thrash',\n 'ui.focus_bounce',\n 'ui.hesitate',\n 'ui.rage_click',\n // Navigation\n 'nav.page_view',\n 'nav.page_leave',\n];\nexport const CountableEventZ = z\n .enum(COUNTABLE_EVENTS)\n .describe('Event name to count. ui.* = user interactions and behavioral detectors (hesitate, rage_click, scroll_thrash, focus_bounce, idle, hover); nav.* = page navigation.');\n/** Valid session metric keys. */\nexport const SESSION_METRIC_KEYS = ['time_on_page', 'page_views', 'scroll_depth'];\nexport const SessionMetricKeyZ = z\n .enum(SESSION_METRIC_KEYS)\n .describe('Session metric key. time_on_page = seconds on current page, page_views = pages visited this session, scroll_depth = 0-100 percentage.');\n/** Element chain match field prefixes for counter filters. */\nexport const ELEMENT_MATCH_FIELDS = ['tag_name', '$el_text'];\n// Note: attr__* is a dynamic prefix (attr__data-id, attr__class, attr__href, etc.)\n// and cannot be enumerated. The match key is either one of ELEMENT_MATCH_FIELDS\n// or starts with \"attr__\".\n// =============================================================================\n// CONDITION SCHEMAS\n// =============================================================================\nexport const PageUrlConditionZ = z\n .object({\n type: z.literal('page_url'),\n url: z.string().describe('URL path to match (e.g. \"/pricing\", \"/dashboard\")'),\n})\n .describe('Fires when the current page URL matches. Use for page-specific actions. ' +\n 'Example: {\"type\": \"page_url\", \"url\": \"/pricing\"}');\nexport const RouteConditionZ = z\n .object({\n type: z.literal('route'),\n routeId: z.string().describe('Named route ID from the route filter'),\n})\n .describe('Fires when the current route matches a named route ID.');\nexport const AnchorVisibleConditionZ = z\n .object({\n type: z.literal('anchor_visible'),\n anchorId: z.string().describe('CSS selector of the anchor element'),\n state: z\n .enum(['visible', 'present', 'absent'])\n .describe('\"visible\" = in viewport, \"present\" = in DOM, \"absent\" = not in DOM'),\n})\n .describe(\"Fires based on a DOM element's visibility state. \" +\n 'Example: {\"type\": \"anchor_visible\", \"anchorId\": \"#cta-button\", \"state\": \"visible\"}');\nexport const EventOccurredConditionZ = z\n .object({\n type: z.literal('event_occurred'),\n eventName: z.string().describe('Event name (e.g. \"ui.click\", \"$pageview\")'),\n withinMs: z.number().optional().describe('Time window in ms. Omit = any time this session.'),\n})\n .describe('Fires when a specific event has occurred during this session. ' +\n 'Example: {\"type\": \"event_occurred\", \"eventName\": \"ui.click\", \"withinMs\": 5000}');\nexport const StateEqualsConditionZ = z\n .object({\n type: z.literal('state_equals'),\n key: z\n .string()\n .describe('Key in the SDK persistent state store (localStorage). Only valid for keys the host app explicitly sets via syntro.state.set().'),\n value: z.unknown().describe('Expected value to match against'),\n})\n .describe('Checks the SDK persistent state store (localStorage). ONLY for host-app state set via syntro.state.set() \u2014 ' +\n 'NOT for user attributes like region, device, or UTM params (those are handled by segment targeting). ' +\n 'Do NOT use this for targeting. If you do not know the valid state keys, do not use this condition type.');\nexport const ViewportConditionZ = z\n .object({\n type: z.literal('viewport'),\n minWidth: z.number().optional().describe('Minimum viewport width in pixels'),\n maxWidth: z.number().optional().describe('Maximum viewport width in pixels'),\n minHeight: z.number().optional().describe('Minimum viewport height in pixels'),\n maxHeight: z.number().optional().describe('Maximum viewport height in pixels'),\n})\n .describe('Fires based on viewport (screen) size. Use for responsive behavior. ' +\n 'Example: {\"type\": \"viewport\", \"minWidth\": 768} \u2014 fires on tablet and larger.');\nexport const SessionMetricConditionZ = z\n .object({\n type: z.literal('session_metric'),\n key: SessionMetricKeyZ,\n operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),\n threshold: z.number().describe('Numeric threshold to compare against'),\n})\n .describe('Fires when a session metric crosses a threshold. Valid keys: \"time_on_page\" (seconds), ' +\n '\"page_views\" (count), \"scroll_depth\" (0-100). ' +\n 'Example: {\"type\": \"session_metric\", \"key\": \"time_on_page\", \"operator\": \"gte\", \"threshold\": 30}');\nexport const DismissedConditionZ = z\n .object({\n type: z.literal('dismissed'),\n key: z.string().describe('Dismissal key (usually a tile or action ID)'),\n inverted: z\n .boolean()\n .optional()\n .describe('When true, fires if NOT dismissed (default behavior)'),\n})\n .describe('Checks if an item has been dismissed by the user. Use with inverted: true to show only if not dismissed.');\nexport const CooldownActiveConditionZ = z\n .object({\n type: z.literal('cooldown_active'),\n key: z.string().describe('Cooldown key'),\n inverted: z.boolean().optional().describe('When true, fires if cooldown is NOT active'),\n})\n .describe('Checks if a cooldown timer is currently active. Use to prevent showing the same intervention too frequently.');\nexport const FrequencyLimitConditionZ = z\n .object({\n type: z.literal('frequency_limit'),\n key: z.string().describe('Frequency counter key'),\n limit: z.number().describe('Maximum allowed count'),\n inverted: z.boolean().optional().describe('When true, fires if limit NOT reached'),\n})\n .describe('Checks if a frequency limit has been reached. Use to cap how many times an action fires per session.');\nexport const MatchOpZ = z\n .object({\n equals: z.union([z.string(), z.number(), z.boolean()]).optional(),\n contains: z.string().optional(),\n})\n .refine((operator) => Number(operator.equals !== undefined) + Number(operator.contains !== undefined) === 1, {\n message: 'Exactly one of equals or contains must be specified.',\n})\n .describe('Match operator for counter filters. Exactly one of equals or contains must be specified.');\nexport const CounterDefZ = z\n .object({\n events: z\n .array(CountableEventZ)\n .min(1)\n .describe('Event names to count. Use values from the countable events enum.'),\n match: z\n .record(z.string(), MatchOpZ)\n .optional()\n .describe('Property filters. Keys are event prop names or element-chain fields ' +\n '(tag_name, $el_text, attr__*). All entries AND together.'),\n})\n .describe('Defines what events to count. Registered as an accumulator predicate at config-load time.');\nexport const EventCountConditionZ = z\n .object({\n type: z.literal('event_count'),\n key: z.string().describe('Unique key for this counter (used for accumulator registration)'),\n operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),\n count: z.number().int().min(0).describe('Target count threshold'),\n withinMs: z\n .number()\n .positive()\n .optional()\n .describe('Time window in ms. Omit = count across entire session.'),\n counter: CounterDefZ.optional().describe('Inline counter definition. Defines what events to count.'),\n})\n .describe('Fires when accumulated event count crosses a threshold. Most powerful trigger type. ' +\n 'Example: {\"type\": \"event_count\", \"key\": \"pricing-clicks\", \"operator\": \"gte\", \"count\": 3, ' +\n '\"counter\": {\"events\": [\"ui.click\"], \"match\": {\"attr__data-cta\": {\"contains\": \"pricing\"}}}}');\nexport const ConditionZ = z.discriminatedUnion('type', [\n PageUrlConditionZ,\n RouteConditionZ,\n AnchorVisibleConditionZ,\n EventOccurredConditionZ,\n StateEqualsConditionZ,\n ViewportConditionZ,\n SessionMetricConditionZ,\n DismissedConditionZ,\n CooldownActiveConditionZ,\n FrequencyLimitConditionZ,\n EventCountConditionZ,\n]);\n// =============================================================================\n// STRATEGY SCHEMAS\n// =============================================================================\nexport const RuleZ = z\n .object({\n conditions: z\n .array(ConditionZ)\n .describe('Array of conditions \u2014 ALL must match (AND logic) for this rule to fire.'),\n value: z\n .unknown()\n .describe('Value returned when all conditions match. For triggerWhen: true = fire the action.'),\n})\n .describe('A single rule. ALL conditions must match (AND logic). Rules in a strategy are evaluated ' +\n 'top-to-bottom \u2014 first rule where all conditions match wins and returns its value.');\nexport const RuleStrategyZ = z\n .object({\n type: z.literal('rules'),\n rules: z\n .array(RuleZ)\n .describe('Ordered list of rules. Evaluated top-to-bottom \u2014 first match wins.'),\n default: z\n .unknown()\n .describe('Fallback value when no rule matches. For triggerWhen: false = do not fire by default.'),\n})\n .describe('Rule-based strategy. Evaluates rules top-to-bottom. First rule where ALL conditions match ' +\n 'returns its value. If no rule matches, returns default. ' +\n 'For triggerWhen: set value=true on matching rules, default=false.');\nexport const ScoreStrategyZ = z\n .object({\n type: z.literal('score'),\n field: z.string(),\n threshold: z.number(),\n above: z.unknown(),\n below: z.unknown(),\n})\n .describe('Score-based strategy. Compares a field value against a threshold.');\nexport const ModelStrategyZ = z\n .object({\n type: z.literal('model'),\n modelId: z.string(),\n inputs: z.array(z.string()),\n outputMapping: z.record(z.string(), z.unknown()),\n default: z.unknown(),\n})\n .describe('ML model strategy. Sends inputs to a model and maps outputs.');\nexport const ExternalStrategyZ = z\n .object({\n type: z.literal('external'),\n endpoint: z.string(),\n method: z.enum(['GET', 'POST']).optional(),\n default: z.unknown(),\n timeoutMs: z.number().optional(),\n})\n .describe('External API strategy. Calls an endpoint to determine the value.');\nexport const DecisionStrategyZ = z.discriminatedUnion('type', [\n RuleStrategyZ,\n ScoreStrategyZ,\n ModelStrategyZ,\n ExternalStrategyZ,\n]);\n/** Canonical Zod schema for the optional triggerWhen field on actions and adaptive items. */\nexport const TriggerWhenZ = DecisionStrategyZ.nullable().optional();\n// =============================================================================\n// TRIGGER DOCUMENTATION \u2014 examples and match field docs\n// Exported as constants so the schema generator can inject them into the\n// JSON schema. The Python prompt builder reads them from the schema.\n// =============================================================================\n/** Complete triggerWhen examples showing the full rules wrapper structure. */\nexport const TRIGGER_EXAMPLES = [\n {\n name: 'Click count on a specific element',\n description: 'Fire when user clicks an element with data-id=\"hero-cta\" 2+ times',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'event_count',\n key: 'cta-clicks',\n operator: 'gte',\n count: 2,\n counter: {\n events: ['ui.click'],\n match: { 'attr__data-id': { equals: 'hero-cta' } },\n },\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'Time on page threshold',\n description: 'Fire after user spends 30+ seconds on the page',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'session_metric',\n key: 'time_on_page',\n operator: 'gte',\n threshold: 30,\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'Element visible in viewport',\n description: 'Fire when a DOM element becomes visible',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'anchor_visible',\n anchorId: '#pricing-section',\n state: 'visible',\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'No trigger (fire immediately)',\n description: 'Action fires as soon as the segment matches \u2014 no in-session condition needed',\n triggerWhen: null,\n },\n];\n/** Documentation for counter.match field keys. */\nexport const MATCH_FIELD_DOCS = {\n tag_name: 'HTML tag name (e.g. \"button\", \"a\", \"input\")',\n $el_text: 'Visible text content of the element',\n 'attr__*': 'HTML attribute prefixed with attr__. Example: attr__data-id matches the data-id attribute, ' +\n 'attr__class matches the class attribute, attr__href matches the href attribute.',\n};\n// =============================================================================\n// EVENT SCOPE SCHEMA\n// =============================================================================\n/** Scopes a widget to specific events/URLs. */\nexport const EventScopeZ = z.object({\n events: z.array(z.string()),\n urlContains: z.string().optional(),\n props: z.record(z.union([z.string(), z.number(), z.boolean()])).optional(),\n});\n// =============================================================================\n// NOTIFY SCHEMA\n// =============================================================================\n/** Toast notification config for triggerWhen transitions. */\nexport const NotifyZ = z\n .object({\n title: z.string().optional().describe('Notification title'),\n body: z.string().optional().describe('Notification body text'),\n icon: z.string().optional().describe('Notification icon (emoji or URL)'),\n})\n .describe('Optional toast notification shown when this action triggers.')\n .nullable()\n .optional();\n", "/**\n * Adaptive Gamification - Config Schema\n *\n * Zod schema for validating gamification app configuration.\n */\n\nimport { AnchorIdZ, AuthoringFieldsZ, TriggerWhenZ } from '@syntrologie/sdk-contracts';\nimport { z } from 'zod';\n\n/**\n * Conditional execution for actions.\n * Actions use `triggerWhen` (DecisionStrategy) exclusively \u2014 `activation`\n * (routes/strategy) is for TILES only and is never evaluated by ActionEngine.\n */\nconst ActionTriggerZ = { triggerWhen: TriggerWhenZ };\n\n/**\n * Badge definition schema.\n */\nexport const badgeSchema = z.object({\n id: z.string(),\n name: z.string(),\n icon: z.string(),\n description: z.string().optional(),\n trigger: z.object({\n event: z.string(),\n conditions: z.array(z.unknown()).optional(),\n }),\n});\n\n/**\n * Leaderboard configuration schema.\n */\nconst leaderboardConfigSchema = z.object({\n enabled: z.boolean().default(false),\n refreshInterval: z.number().default(60000),\n});\n\n/**\n * Gamification app config schema.\n */\nexport const configSchema = z.object({\n badges: z.array(badgeSchema).default([]),\n leaderboard: leaderboardConfigSchema.optional(),\n points: z\n .object({\n enabled: z.boolean().default(false),\n multiplier: z.number().default(1),\n })\n .optional(),\n});\n\nexport type GamificationConfig = z.infer<typeof configSchema>;\n\n// ============================================================================\n// Executor Action Schemas\n// ============================================================================\n\n/**\n * Schema for awarding a badge to a user.\n */\nexport const AwardBadgeSchema = z\n .object({\n kind: z.literal('gamification:awardBadge'),\n badgeId: z.string(),\n anchorId: AnchorIdZ.optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .extend(AuthoringFieldsZ);\n\n/**\n * Schema for adding points to a user's score.\n */\nexport const AddPointsSchema = z\n .object({\n kind: z.literal('gamification:addPoints'),\n points: z.number(),\n reason: z.string().optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .extend(AuthoringFieldsZ);\n\n// ============================================================================\n// Unified Schema Export\n// ============================================================================\n\n/**\n * Action step schemas for unified JSON Schema generation.\n * The build script reads this array to merge adaptive actions into the\n * unified canvas-config.schema.json.\n */\nexport const actionStepSchemas = [\n { defName: 'awardBadge', schema: AwardBadgeSchema },\n { defName: 'addPoints', schema: AddPointsSchema },\n];\n\n// ============================================================================\n// Capabilities Documentation (injected into JSON Schema for LLM prompts)\n// ============================================================================\n\nexport const CAPABILITIES_DOCUMENTATION = {\n packageId: 'adaptive-gamification',\n plannerSummary:\n 'Gamification actions for awarding badges and adding points. Reach for this when a strategy needs durable achievement, progress, or reward signals tied to user behavior.',\n description:\n 'Action-only gamification adaptive. Provides badge and points executors plus optional badge, leaderboard, and points configuration metadata.',\n whenToUse: [\n {\n goal: 'Award a badge when a user reaches a milestone',\n action:\n 'Add a gamification:awardBadge action with badgeId and triggerWhen. Include label and anchorId when the editor should show clear authoring context.',\n },\n {\n goal: 'Add points for a behavior or completion event',\n action:\n 'Add a gamification:addPoints action with points, reason, and triggerWhen. Use this for progress or engagement scoring.',\n },\n ],\n conventions: [\n {\n name: 'Actions use triggerWhen',\n description:\n 'Gamification actions are executed by ActionEngine and use triggerWhen. Tile activation is not evaluated for action-only surfaces.',\n },\n {\n name: 'Awards and points are durable signals',\n description:\n 'Executor cleanup is intentionally a no-op. The action publishes events such as gamification.badge_awarded and gamification.points_added; downstream systems own any persistent reward state.',\n },\n {\n name: 'No tile widget yet',\n description:\n 'adaptive-gamification currently exposes actions and metadata only. Do not expect a widget id in the canvas tile widget enum until a real widget ships.',\n },\n ],\n // Structured {name, when, props} entries \u2014 plain strings here crashed the\n // capabilities renderers (BUG-1784941121). Payloads mirror runtime.ts.\n events: [\n {\n name: 'gamification.badge_awarded',\n when: 'awardBadge action executes',\n props: '{ badgeId, awardedAt }',\n },\n {\n name: 'gamification.points_added',\n when: 'addPoints action executes',\n props: '{ points, reason, timestamp }',\n },\n ],\n};\n"],
|
|
5
|
-
"mappings": ";AAqDM,SAAUA,EAAsCC,IAAAA;AACpD,SAAOA;AACT;;;AClCO,IAAM,uBAAuB,EAAc,4BAA4B;;;
|
|
6
|
-
"names": ["createContext", "key", "z"]
|
|
3
|
+
"sources": ["../../../../node_modules/@lit/context/src/lib/create-context.ts", "../../../sdk-contracts/dist/canvas-context.js", "../../../sdk-contracts/dist/detector-events.js", "../../../sdk-contracts/dist/routes.js", "../../../sdk-contracts/dist/schemas.js", "../src/schema.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * The Context type defines a type brand to associate a key value with the context value type\n */\nexport type Context<KeyType, ValueType> = KeyType & {__context__: ValueType};\n\n/**\n * @deprecated use Context instead\n */\nexport type ContextKey<KeyType, ValueType> = Context<KeyType, ValueType>;\n\n/**\n * A helper type which can extract a Context value type from a Context type\n */\nexport type ContextType<Key extends Context<unknown, unknown>> =\n Key extends Context<unknown, infer ValueType> ? ValueType : never;\n\n/**\n * Creates a typed Context.\n *\n * Contexts are compared with strict equality.\n *\n * If you want two separate `createContext()` calls to referer to the same\n * context, then use a key that will by equal under strict equality like a\n * string for `Symbol.for()`:\n *\n * ```ts\n * // true\n * createContext('my-context') === createContext('my-context')\n * // true\n * createContext(Symbol.for('my-context')) === createContext(Symbol.for('my-context'))\n * ```\n *\n * If you want a context to be unique so that it's guaranteed to not collide\n * with other contexts, use a key that's unique under strict equality, like\n * a `Symbol()` or object.:\n *\n * ```\n * // false\n * createContext({}) === createContext({})\n * // false\n * createContext(Symbol('my-context')) === createContext(Symbol('my-context'))\n * ```\n *\n * @param key a context key value\n * @template ValueType the type of value that can be provided by this context.\n * @returns the context key value cast to `Context<K, ValueType>`\n */\nexport function createContext<ValueType, K = unknown>(key: K) {\n return key as Context<K, ValueType>;\n}\n", "/**\n * Canvas runtime context \u2014 the shared @lit/context symbol both\n * runtime-sdk (the provider) and canvas-sdk / canvas authors (the\n * consumers) use to thread a narrow runtime handle through the canvas\n * element tree.\n *\n * Living here keeps the symbol identity stable across both packages.\n * If canvas-sdk created its own symbol with `createContext(...)`, it\n * would never match the one runtime-sdk publishes, and `<sc-mount>`\n * would silently see `undefined` instead of the widget registry.\n *\n * The shape declared here is a NARROW VIEW of `SmartCanvasRuntime`.\n * Canvas-side code reads only this subset. The runtime-sdk's\n * `SmartCanvasRuntime` type is a structural superset.\n */\nimport { createContext } from '@lit/context';\n/**\n * The @lit/context symbol. Both runtime-sdk's ContextProvider and\n * canvas-sdk's ContextConsumer must import THIS exact symbol \u2014 not a\n * symbol with the same string name \u2014 for context propagation to work.\n */\nexport const canvasRuntimeContext = createContext('syntrologie:canvas-runtime');\n", "/**\n * The prop shapes of every CANONICAL runtime-bus event \u2014 the producer/consumer\n * contract for the visitor-behavior signals that reach the chat agent.\n *\n * ## Why this module exists\n *\n * Two independent packages have to agree on these prop names and nothing was\n * holding them to it:\n *\n * producer `packages/event-processor/src/detectors/*` (rrweb detectors)\n * `packages/runtime-sdk/src/instrumentation/*` (bus instrumentation)\n * consumer `packages/adaptives/adaptive-chatbot/src/observer/allowlist.ts`\n *\n * Both sides passed `Record<string, unknown>` around, so a disagreement was not\n * a build error \u2014 it was an observation rendered into the model's prompt with\n * its content missing. `hovered on ''`. `idle`. Shipped for months\n * (BUG-1786923485), and once before that as a name mismatch (BUG-1784146789).\n *\n * ## The rule this module enforces\n *\n * `CanonicalBusEventProps` is the ONE declaration. Producers emit through\n * `detectorEvent()` (event-processor), which types `props` as\n * `CanonicalBusEventProps[N]`; consumers render through an exhaustive\n * `Record<CanonicalBusEventName, \u2026>` whose functions receive\n * `Partial<CanonicalBusEventProps[N]>`. Therefore:\n *\n * - renaming a key in a detector \u2192 producer fails `tsc`\n * - renaming a key in the summarizer \u2192 consumer fails `tsc`\n * - adding an event with no summarizer case \u2192 consumer fails `tsc` (missing\n * key in the exhaustive record)\n * - renaming a key HERE \u2192 both sides fail `tsc`\n *\n * None of those can degrade to an empty string at runtime.\n *\n * ## Deliberately dependency-free\n *\n * No zod, no `@lit/context`, no DOM types \u2014 `@syntrologie/event-processor` has\n * zero runtime dependencies and imports this via the `./detector-events`\n * subpath so it stays that way.\n *\n * ## Deliberately WITHOUT string index signatures\n *\n * An index signature on a props type makes `props.anyTypoAtAll` legal and\n * silently reintroduces the exact bug this module exists to prevent. The one\n * index signature below is a template-literal pattern (`attr__${string}`), so\n * arbitrary DOM attributes are still expressible while `text` / `tag_name`\n * typos remain errors.\n */\nexport const DETECTOR_EVENT_NAMES = [\n 'ui.hover',\n 'ui.idle',\n 'ui.hesitate',\n 'ui.rage_click',\n 'ui.scroll_thrash',\n 'ui.focus_bounce',\n];\nexport const CANONICAL_BUS_EVENT_NAMES = [\n ...DETECTOR_EVENT_NAMES,\n 'nav.section_viewed',\n 'nav.scroll_depth',\n];\nconst _canonicalExhaustive = true;\nconst _detectorExhaustive = true;\nvoid _canonicalExhaustive;\nvoid _detectorExhaustive;\n/** Runtime membership test \u2014 narrows an arbitrary event name to the contract. */\nexport function isCanonicalBusEvent(name) {\n return CANONICAL_BUS_EVENT_NAMES.includes(name);\n}\n", "/**\n * Canonical route normalization. See `routes.md` for rules and\n * `normalize-route.cases.json` for the parity corpus shared with the\n * Python implementation in syntrologie_common/sdk/routing.py.\n *\n * Two exports \u2014 `normalizeRoute` for literal paths, `normalizeRoutePattern`\n * for activation patterns containing `*`, `**`, `:param`. Today they share\n * an implementation because the rules happen to be wildcard-safe (no\n * lowercase, unreserved-only decode, slash collapse preserves `**`).\n * The seam is preserved as separate exports so the API can diverge\n * without consumer churn if rules change.\n */\n// RFC 3986 reserved characters (gen-delims + sub-delims). When a `%XX`\n// sequence decodes to one of these bytes, we keep the percent-encoded\n// form \u2014 decoding would re-segment the path or change its meaning.\nconst RESERVED_BYTES = new Set([\n 0x21, // !\n 0x23, // #\n 0x24, // $\n 0x26, // &\n 0x27, // '\n 0x28, // (\n 0x29, // )\n 0x2a, // *\n 0x2b, // +\n 0x2c, // ,\n 0x2f, // /\n 0x3a, // :\n 0x3b, // ;\n 0x3d, // =\n 0x3f, // ?\n 0x40, // @\n 0x5b, // [\n 0x5d, // ]\n]);\nconst utf8Decoder = new TextDecoder('utf-8', { fatal: false });\n/** Decode `%XX` sequences for unreserved bytes only. Collapses\n * adjacent `%XX` runs into a UTF-8 decode so `%C3%A9` \u2192 `\u00E9`. */\nfunction decodeUnreservedOnly(input) {\n let out = '';\n let pending = [];\n const flushPending = () => {\n if (pending.length === 0)\n return;\n const bytes = new Uint8Array(pending);\n out += utf8Decoder.decode(bytes);\n pending = [];\n };\n let i = 0;\n while (i < input.length) {\n const ch = input[i];\n if (ch === '%' && i + 2 < input.length && isHex(input[i + 1]) && isHex(input[i + 2])) {\n const byte = parseInt(input.slice(i + 1, i + 3), 16);\n if (RESERVED_BYTES.has(byte)) {\n flushPending();\n // Keep raw, but normalize hex case to uppercase so the\n // canonical form is stable across input casing.\n out += `%${input.slice(i + 1, i + 3).toUpperCase()}`;\n i += 3;\n }\n else {\n pending.push(byte);\n i += 3;\n }\n }\n else {\n flushPending();\n out += ch;\n i += 1;\n }\n }\n flushPending();\n return out;\n}\nfunction isHex(c) {\n return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');\n}\n/** Strip query string and hash fragment. */\nfunction stripQueryAndHash(s) {\n const q = s.indexOf('?');\n if (q !== -1)\n s = s.slice(0, q);\n const h = s.indexOf('#');\n if (h !== -1)\n s = s.slice(0, h);\n return s;\n}\n/**\n * Normalize a literal path (e.g. `window.location.pathname`, an\n * action's `route` field, a wiki route key).\n *\n * Throws `TypeError` if the input is not an absolute path. Callers\n * that want a soft API should use {@link normalizeRouteWithChange}.\n */\nexport function normalizeRoute(path) {\n if (typeof path !== 'string' || path.length === 0) {\n throw new TypeError('normalizeRoute: input must be a non-empty string');\n }\n if (!path.startsWith('/')) {\n throw new TypeError(`normalizeRoute: input must be absolute (start with '/'); got ${JSON.stringify(path)}`);\n }\n let s = stripQueryAndHash(path);\n s = decodeUnreservedOnly(s);\n s = s.replace(/\\/+/g, '/');\n if (s.length > 1 && s.endsWith('/'))\n s = s.slice(0, -1);\n return s;\n}\n/**\n * Normalize an activation route pattern. Preserves `*`, `**`,\n * `:param` exactly. Today equivalent to {@link normalizeRoute} \u2014 kept\n * as a separate export so rules can diverge later without API churn.\n */\nexport function normalizeRoutePattern(pattern) {\n return normalizeRoute(pattern);\n}\n/**\n * Normalize a route and report whether the input was already\n * canonical. Used by authoring tools to decide whether to emit a\n * warning to the LLM.\n */\nexport function normalizeRouteWithChange(path) {\n const canonical = normalizeRoute(path);\n return { canonical, changed: canonical !== path };\n}\n/** Pattern-side counterpart of {@link normalizeRouteWithChange}. */\nexport function normalizeRoutePatternWithChange(pattern) {\n const canonical = normalizeRoutePattern(pattern);\n return { canonical, changed: canonical !== pattern };\n}\n/**\n * Case-insensitive comparison of two already-canonical paths. Use\n * this anywhere two routes are compared for equality (wiki lookups,\n * non-pattern action route gates) \u2014 preserves casing in the inputs\n * while honoring case-insensitive routing on the customer's site.\n */\nexport function routesMatch(a, b) {\n return a.toLowerCase() === b.toLowerCase();\n}\n", "/**\n * Shared Zod schemas for decision strategies, conditions, and event scoping.\n *\n * These are the canonical definitions \u2014 runtime-sdk and all adaptive packages\n * should import from here instead of duplicating.\n */\nimport { z } from 'zod';\nimport { normalizeRoute } from './routes.js';\n// =============================================================================\n// ANCHOR ID SCHEMA\n// =============================================================================\n// A selector containing \"{\" or \"}\" can never match a real DOM element via\n// querySelectorAll \u2014 those characters are exclusively CSS rule delimiters,\n// not valid selector syntax. They ARE, however, exactly what\n// content:hideBySelector's executor needs to escape the single CSS rule it\n// injects as raw text into a live <style> element\n// (`${selector} { ${prop}: ${value} !important; }` \u2014 see\n// executeHideBySelector in adaptive-content/src/runtime.ts): a selector\n// containing `}` closes that rule early and lets the rest of the string\n// splice in arbitrary attacker-controlled CSS anywhere on the host page\n// (defacement, CSS-based data exfiltration via attribute selectors,\n// clickjacking overlays). This constraint lives on THIS canonical AnchorIdZ\n// (not a hideBySelector-only variant, and not a second copy in a\n// downstream package) so that every action kind in every package \u2014 core\n// and adaptive \u2014 inherits it automatically: there is exactly one\n// `AnchorIdZ`, and every consumer imports it from here (SEC-067,\n// BUG-1786764688). No legitimate selector for any action kind needs a\n// literal brace.\nexport const NO_CSS_BREAKOUT_PATTERN = /^[^{}]*$/;\nexport const AnchorIdZ = z\n .object({\n selector: z\n .string()\n .regex(NO_CSS_BREAKOUT_PATTERN, {\n message: 'selector must not contain \"{\" or \"}\" \u2014 not valid CSS selector syntax, and content:hideBySelector injects this value directly into a <style> element where these characters would break out of the generated rule.',\n })\n .describe('CSS selector for the target element'),\n route: z\n .union([z.string(), z.array(z.string())])\n .superRefine((value, ctx) => {\n // Backend parity check (Finding 1, .superpowers/sdd/\n // duplicated-definitions-audit.md): the backend's\n // RouteCanonicalityCheck (platform/backend/app/services/\n // sdk_config_checks.py) rejects any actions[].anchorId.route that\n // isn't already in `normalize_route`'s canonical form (absolute,\n // no trailing slash, no doubled slashes, no query/hash, unreserved\n // percent-decoding only). Before this check, authoring accepted\n // configs the backend would 422 on (e.g. a trailing slash, or a\n // bare \"**\" missing the leading \"/\"). Reuses `normalizeRoute` from\n // ./routes.ts \u2014 the SAME function already parity-tested against\n // the Python implementation via normalize-route.cases.json \u2014 so\n // this is single-sourced, not a third reimplementation of the\n // canonicalization rule.\n for (const route of Array.isArray(value) ? value : [value]) {\n let canonical;\n try {\n canonical = normalizeRoute(route);\n }\n catch (err) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `route must be an absolute path starting with \"/\" (got ${JSON.stringify(route)}): ${err instanceof Error ? err.message : String(err)}`,\n });\n continue;\n }\n if (canonical !== route) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `route ${JSON.stringify(route)} is not canonical \u2014 use ${JSON.stringify(canonical)} (this must match what the backend's RouteCanonicalityCheck accepts)`,\n });\n }\n }\n })\n .describe('URL path(s) where this element exists'),\n})\n .strict()\n .describe('DOM element target. selector = CSS selector, route = URL path(s) where the element exists.');\n// =============================================================================\n// AUTHORING FIELDS \u2014 id / title / description / validation\n//\n// Shared fields every action carries. `id` is the action identifier the\n// runtime uses to dispatch, dedupe, and drop/replace actions \u2014 it is NOT\n// stripped before serving. `title` / `description` / `validation` are\n// authoring-only metadata stripped server-side in `to_runtime_config`\n// (platform/backend/app/domains/experiments/helpers.py).\n//\n// They all appear in the JSON Schema (and therefore in the tactician's\n// prompt) because the LLM needs to know they are valid action properties \u2014\n// otherwise schema validation would reject what the prompt commands.\n//\n// Each action variant should `.extend(AuthoringFieldsZ)` alongside any\n// triggerWhen/condition extensions.\n// =============================================================================\nexport const AuthoringFieldsZ = {\n id: z.string().optional().describe('Stable action identifier (e.g. \"act_3db6a14d2ab0\").'),\n title: z\n .string()\n .max(200)\n .optional()\n .describe('Authoring-only: short label shown on the action plan dashboard. Stripped before serving to the runtime SDK.'),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe('Authoring-only: one-sentence explanation of what this action does and why. Stripped before serving to the runtime SDK.'),\n validation: z\n .array(z.string().max(500))\n .max(10)\n .optional()\n .describe('Authoring-only: ordered steps a reviewer can follow to trigger this action and visually confirm it works. Each entry is one step. Stripped before serving to the runtime SDK.'),\n};\n// =============================================================================\n// TRIGGER VOCABULARY \u2014 canonical lists of valid event names, metric keys, etc.\n// These flow through to the JSON schema as enums and are used by the LLM prompt.\n// =============================================================================\n/** Events that can be counted in event_count conditions.\n *\n * Every value here must be an event the runtime actually emits \u2014 either a\n * PostHog-autocapture normalization (ui.click/scroll/input/change/submit) or\n * an event-processor detector (ui.hover/idle/scroll_thrash/focus_bounce/\n * hesitate/rage_click). Do not add aspirational names; a trigger counting an\n * event nothing emits never fires.\n */\nexport const COUNTABLE_EVENTS = [\n // User interactions (from PostHog autocapture normalization)\n 'ui.click',\n 'ui.scroll',\n 'ui.input',\n 'ui.change',\n 'ui.submit',\n // Behavioral detectors (from event-processor)\n 'ui.hover',\n 'ui.idle',\n 'ui.scroll_thrash',\n 'ui.focus_bounce',\n 'ui.hesitate',\n 'ui.rage_click',\n // Navigation\n 'nav.page_view',\n 'nav.page_leave',\n];\nexport const CountableEventZ = z\n .enum(COUNTABLE_EVENTS)\n .describe('Event name to count. ui.* = user interactions and behavioral detectors (hesitate, rage_click, scroll_thrash, focus_bounce, idle, hover); nav.* = page navigation.');\n/** Valid session metric keys. */\nexport const SESSION_METRIC_KEYS = ['time_on_page', 'page_views', 'scroll_depth'];\nexport const SessionMetricKeyZ = z\n .enum(SESSION_METRIC_KEYS)\n .describe('Session metric key. time_on_page = seconds on current page, page_views = pages visited this session, scroll_depth = 0-100 percentage.');\n/** Element chain match field prefixes for counter filters. */\nexport const ELEMENT_MATCH_FIELDS = ['tag_name', '$el_text'];\n// Note: attr__* is a dynamic prefix (attr__data-id, attr__class, attr__href, etc.)\n// and cannot be enumerated. The match key is either one of ELEMENT_MATCH_FIELDS\n// or starts with \"attr__\".\n// =============================================================================\n// CONDITION SCHEMAS\n// =============================================================================\nexport const PageUrlConditionZ = z\n .object({\n type: z.literal('page_url'),\n url: z.string().describe('URL path to match (e.g. \"/pricing\", \"/dashboard\")'),\n})\n .describe('Fires when the current page URL matches. Use for page-specific actions. ' +\n 'Example: {\"type\": \"page_url\", \"url\": \"/pricing\"}');\nexport const RouteConditionZ = z\n .object({\n type: z.literal('route'),\n routeId: z.string().describe('Named route ID from the route filter'),\n})\n .describe('Fires when the current route matches a named route ID.');\nexport const AnchorVisibleConditionZ = z\n .object({\n type: z.literal('anchor_visible'),\n anchorId: z.string().describe('CSS selector of the anchor element'),\n state: z\n .enum(['visible', 'present', 'absent'])\n .describe('\"visible\" = in viewport, \"present\" = in DOM, \"absent\" = not in DOM'),\n})\n .describe(\"Fires based on a DOM element's visibility state. \" +\n 'Example: {\"type\": \"anchor_visible\", \"anchorId\": \"#cta-button\", \"state\": \"visible\"}');\nexport const EventOccurredConditionZ = z\n .object({\n type: z.literal('event_occurred'),\n eventName: z.string().describe('Event name (e.g. \"ui.click\", \"$pageview\")'),\n withinMs: z.number().optional().describe('Time window in ms. Omit = any time this session.'),\n})\n .describe('Fires when a specific event has occurred during this session. ' +\n 'Example: {\"type\": \"event_occurred\", \"eventName\": \"ui.click\", \"withinMs\": 5000}');\nexport const StateEqualsConditionZ = z\n .object({\n type: z.literal('state_equals'),\n key: z\n .string()\n .describe('Key in the SDK persistent state store (localStorage). Only valid for keys the host app explicitly sets via syntro.state.set().'),\n value: z.unknown().describe('Expected value to match against'),\n})\n .describe('Checks the SDK persistent state store (localStorage). ONLY for host-app state set via syntro.state.set() \u2014 ' +\n 'NOT for user attributes like region, device, or UTM params (those are handled by segment targeting). ' +\n 'Do NOT use this for targeting. If you do not know the valid state keys, do not use this condition type.');\nexport const ViewportConditionZ = z\n .object({\n type: z.literal('viewport'),\n minWidth: z.number().optional().describe('Minimum viewport width in pixels'),\n maxWidth: z.number().optional().describe('Maximum viewport width in pixels'),\n minHeight: z.number().optional().describe('Minimum viewport height in pixels'),\n maxHeight: z.number().optional().describe('Maximum viewport height in pixels'),\n})\n .describe('Fires based on viewport (screen) size. Use for responsive behavior. ' +\n 'Example: {\"type\": \"viewport\", \"minWidth\": 768} \u2014 fires on tablet and larger.');\nexport const SessionMetricConditionZ = z\n .object({\n type: z.literal('session_metric'),\n key: SessionMetricKeyZ,\n operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),\n threshold: z.number().describe('Numeric threshold to compare against'),\n})\n .describe('Fires when a session metric crosses a threshold. Valid keys: \"time_on_page\" (seconds), ' +\n '\"page_views\" (count), \"scroll_depth\" (0-100). ' +\n 'Example: {\"type\": \"session_metric\", \"key\": \"time_on_page\", \"operator\": \"gte\", \"threshold\": 30}');\nexport const DismissedConditionZ = z\n .object({\n type: z.literal('dismissed'),\n key: z.string().describe('Dismissal key (usually a tile or action ID)'),\n inverted: z\n .boolean()\n .optional()\n .describe('When true, fires if NOT dismissed (default behavior)'),\n})\n .describe('Checks if an item has been dismissed by the user. Use with inverted: true to show only if not dismissed.');\nexport const CooldownActiveConditionZ = z\n .object({\n type: z.literal('cooldown_active'),\n key: z.string().describe('Cooldown key'),\n inverted: z.boolean().optional().describe('When true, fires if cooldown is NOT active'),\n})\n .describe('Checks if a cooldown timer is currently active. Use to prevent showing the same intervention too frequently.');\nexport const FrequencyLimitConditionZ = z\n .object({\n type: z.literal('frequency_limit'),\n key: z.string().describe('Frequency counter key'),\n limit: z.number().describe('Maximum allowed count'),\n inverted: z.boolean().optional().describe('When true, fires if limit NOT reached'),\n})\n .describe('Checks if a frequency limit has been reached. Use to cap how many times an action fires per session.');\nexport const MatchOpZ = z\n .object({\n equals: z.union([z.string(), z.number(), z.boolean()]).optional(),\n contains: z.string().optional(),\n})\n .refine((operator) => Number(operator.equals !== undefined) + Number(operator.contains !== undefined) === 1, {\n message: 'Exactly one of equals or contains must be specified.',\n})\n .describe('Match operator for counter filters. Exactly one of equals or contains must be specified.');\nexport const CounterDefZ = z\n .object({\n events: z\n .array(CountableEventZ)\n .min(1)\n .describe('Event names to count. Use values from the countable events enum.'),\n match: z\n .record(z.string(), MatchOpZ)\n .optional()\n .describe('Property filters. Keys are event prop names or element-chain fields ' +\n '(tag_name, $el_text, attr__*). All entries AND together.'),\n})\n .describe('Defines what events to count. Registered as an accumulator predicate at config-load time.');\nexport const EventCountConditionZ = z\n .object({\n type: z.literal('event_count'),\n key: z.string().describe('Unique key for this counter (used for accumulator registration)'),\n operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),\n count: z.number().int().min(0).describe('Target count threshold'),\n withinMs: z\n .number()\n .positive()\n .optional()\n .describe('Time window in ms. Omit = count across entire session.'),\n counter: CounterDefZ.optional().describe('Inline counter definition. Defines what events to count.'),\n})\n .describe('Fires when accumulated event count crosses a threshold. Most powerful trigger type. ' +\n 'Example: {\"type\": \"event_count\", \"key\": \"pricing-clicks\", \"operator\": \"gte\", \"count\": 3, ' +\n '\"counter\": {\"events\": [\"ui.click\"], \"match\": {\"attr__data-cta\": {\"contains\": \"pricing\"}}}}');\nexport const ConditionZ = z.discriminatedUnion('type', [\n PageUrlConditionZ,\n RouteConditionZ,\n AnchorVisibleConditionZ,\n EventOccurredConditionZ,\n StateEqualsConditionZ,\n ViewportConditionZ,\n SessionMetricConditionZ,\n DismissedConditionZ,\n CooldownActiveConditionZ,\n FrequencyLimitConditionZ,\n EventCountConditionZ,\n]);\n// =============================================================================\n// STRATEGY SCHEMAS\n// =============================================================================\nexport const RuleZ = z\n .object({\n conditions: z\n .array(ConditionZ)\n .describe('Array of conditions \u2014 ALL must match (AND logic) for this rule to fire.'),\n value: z\n .unknown()\n .describe('Value returned when all conditions match. For triggerWhen: true = fire the action.'),\n})\n .describe('A single rule. ALL conditions must match (AND logic). Rules in a strategy are evaluated ' +\n 'top-to-bottom \u2014 first rule where all conditions match wins and returns its value.');\nexport const RuleStrategyZ = z\n .object({\n type: z.literal('rules'),\n rules: z\n .array(RuleZ)\n .describe('Ordered list of rules. Evaluated top-to-bottom \u2014 first match wins.'),\n default: z\n .unknown()\n .describe('Fallback value when no rule matches. For triggerWhen: false = do not fire by default.'),\n})\n .describe('Rule-based strategy. Evaluates rules top-to-bottom. First rule where ALL conditions match ' +\n 'returns its value. If no rule matches, returns default. ' +\n 'For triggerWhen: set value=true on matching rules, default=false.');\nexport const ScoreStrategyZ = z\n .object({\n type: z.literal('score'),\n field: z.string(),\n threshold: z.number(),\n above: z.unknown(),\n below: z.unknown(),\n})\n .describe('Score-based strategy. Compares a field value against a threshold.');\nexport const ModelStrategyZ = z\n .object({\n type: z.literal('model'),\n modelId: z.string(),\n inputs: z.array(z.string()),\n outputMapping: z.record(z.string(), z.unknown()),\n default: z.unknown(),\n})\n .describe('ML model strategy. Sends inputs to a model and maps outputs.');\nexport const ExternalStrategyZ = z\n .object({\n type: z.literal('external'),\n endpoint: z.string(),\n method: z.enum(['GET', 'POST']).optional(),\n default: z.unknown(),\n timeoutMs: z.number().optional(),\n})\n .describe('External API strategy. Calls an endpoint to determine the value.');\nexport const DecisionStrategyZ = z.discriminatedUnion('type', [\n RuleStrategyZ,\n ScoreStrategyZ,\n ModelStrategyZ,\n ExternalStrategyZ,\n]);\n/** Canonical Zod schema for the optional triggerWhen field on actions and adaptive items. */\nexport const TriggerWhenZ = DecisionStrategyZ.nullable().optional();\n// =============================================================================\n// TRIGGER DOCUMENTATION \u2014 examples and match field docs\n// Exported as constants so the schema generator can inject them into the\n// JSON schema. The Python prompt builder reads them from the schema.\n// =============================================================================\n/** Complete triggerWhen examples showing the full rules wrapper structure. */\nexport const TRIGGER_EXAMPLES = [\n {\n name: 'Click count on a specific element',\n description: 'Fire when user clicks an element with data-id=\"hero-cta\" 2+ times',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'event_count',\n key: 'cta-clicks',\n operator: 'gte',\n count: 2,\n counter: {\n events: ['ui.click'],\n match: { 'attr__data-id': { equals: 'hero-cta' } },\n },\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'Time on page threshold',\n description: 'Fire after user spends 30+ seconds on the page',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'session_metric',\n key: 'time_on_page',\n operator: 'gte',\n threshold: 30,\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'Element visible in viewport',\n description: 'Fire when a DOM element becomes visible',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'anchor_visible',\n anchorId: '#pricing-section',\n state: 'visible',\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'No trigger (fire immediately)',\n description: 'Action fires as soon as the segment matches \u2014 no in-session condition needed',\n triggerWhen: null,\n },\n];\n/** Documentation for counter.match field keys. */\nexport const MATCH_FIELD_DOCS = {\n tag_name: 'HTML tag name (e.g. \"button\", \"a\", \"input\")',\n $el_text: 'Visible text content of the element',\n 'attr__*': 'HTML attribute prefixed with attr__. Example: attr__data-id matches the data-id attribute, ' +\n 'attr__class matches the class attribute, attr__href matches the href attribute.',\n};\n// =============================================================================\n// EVENT SCOPE SCHEMA\n// =============================================================================\n/** Scopes a widget to specific events/URLs. */\nexport const EventScopeZ = z.object({\n events: z.array(z.string()),\n urlContains: z.string().optional(),\n props: z.record(z.union([z.string(), z.number(), z.boolean()])).optional(),\n});\n// =============================================================================\n// NOTIFY SCHEMA\n// =============================================================================\n/** Toast notification config for triggerWhen transitions. */\nexport const NotifyZ = z\n .object({\n title: z.string().optional().describe('Notification title'),\n body: z.string().optional().describe('Notification body text'),\n icon: z.string().optional().describe('Notification icon (emoji or URL)'),\n})\n .describe('Optional toast notification shown when this action triggers.')\n .nullable()\n .optional();\n", "/**\n * Adaptive Gamification - Config Schema\n *\n * Zod schema for validating gamification app configuration.\n */\n\nimport { AnchorIdZ, AuthoringFieldsZ, TriggerWhenZ } from '@syntrologie/sdk-contracts';\nimport { z } from 'zod';\n\n/**\n * Conditional execution for actions.\n * Actions use `triggerWhen` (DecisionStrategy) exclusively \u2014 `activation`\n * (routes/strategy) is for TILES only and is never evaluated by ActionEngine.\n */\nconst ActionTriggerZ = { triggerWhen: TriggerWhenZ };\n\n/**\n * Badge definition schema.\n */\nexport const badgeSchema = z.object({\n id: z.string(),\n name: z.string(),\n icon: z.string(),\n description: z.string().optional(),\n trigger: z.object({\n event: z.string(),\n conditions: z.array(z.unknown()).optional(),\n }),\n});\n\n/**\n * Leaderboard configuration schema.\n */\nconst leaderboardConfigSchema = z.object({\n enabled: z.boolean().default(false),\n refreshInterval: z.number().default(60000),\n});\n\n/**\n * Gamification app config schema.\n */\nexport const configSchema = z.object({\n badges: z.array(badgeSchema).default([]),\n leaderboard: leaderboardConfigSchema.optional(),\n points: z\n .object({\n enabled: z.boolean().default(false),\n multiplier: z.number().default(1),\n })\n .optional(),\n});\n\nexport type GamificationConfig = z.infer<typeof configSchema>;\n\n// ============================================================================\n// Executor Action Schemas\n// ============================================================================\n\n/**\n * Schema for awarding a badge to a user.\n */\nexport const AwardBadgeSchema = z\n .object({\n kind: z.literal('gamification:awardBadge'),\n badgeId: z.string(),\n anchorId: AnchorIdZ.optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .extend(AuthoringFieldsZ);\n\n/**\n * Schema for adding points to a user's score.\n */\nexport const AddPointsSchema = z\n .object({\n kind: z.literal('gamification:addPoints'),\n points: z.number(),\n reason: z.string().optional(),\n label: z.string().optional(),\n })\n .extend(ActionTriggerZ)\n .extend(AuthoringFieldsZ);\n\n// ============================================================================\n// Unified Schema Export\n// ============================================================================\n\n/**\n * Action step schemas for unified JSON Schema generation.\n * The build script reads this array to merge adaptive actions into the\n * unified canvas-config.schema.json.\n */\nexport const actionStepSchemas = [\n { defName: 'awardBadge', schema: AwardBadgeSchema },\n { defName: 'addPoints', schema: AddPointsSchema },\n];\n\n// ============================================================================\n// Capabilities Documentation (injected into JSON Schema for LLM prompts)\n// ============================================================================\n\nexport const CAPABILITIES_DOCUMENTATION = {\n packageId: 'adaptive-gamification',\n plannerSummary:\n 'Gamification actions for awarding badges and adding points. Reach for this when a strategy needs durable achievement, progress, or reward signals tied to user behavior.',\n description:\n 'Action-only gamification adaptive. Provides badge and points executors plus optional badge, leaderboard, and points configuration metadata.',\n whenToUse: [\n {\n goal: 'Award a badge when a user reaches a milestone',\n action:\n 'Add a gamification:awardBadge action with badgeId and triggerWhen. Include label and anchorId when the editor should show clear authoring context.',\n },\n {\n goal: 'Add points for a behavior or completion event',\n action:\n 'Add a gamification:addPoints action with points, reason, and triggerWhen. Use this for progress or engagement scoring.',\n },\n ],\n conventions: [\n {\n name: 'Actions use triggerWhen',\n description:\n 'Gamification actions are executed by ActionEngine and use triggerWhen. Tile activation is not evaluated for action-only surfaces.',\n },\n {\n name: 'Awards and points are durable signals',\n description:\n 'Executor cleanup is intentionally a no-op. The action publishes events such as gamification.badge_awarded and gamification.points_added; downstream systems own any persistent reward state.',\n },\n {\n name: 'No tile widget yet',\n description:\n 'adaptive-gamification currently exposes actions and metadata only. Do not expect a widget id in the canvas tile widget enum until a real widget ships.',\n },\n ],\n // Structured {name, when, props} entries \u2014 plain strings here crashed the\n // capabilities renderers (BUG-1784941121). Payloads mirror runtime.ts.\n events: [\n {\n name: 'gamification.badge_awarded',\n when: 'awardBadge action executes',\n props: '{ badgeId, awardedAt }',\n },\n {\n name: 'gamification.points_added',\n when: 'addPoints action executes',\n props: '{ points, reason, timestamp }',\n },\n ],\n};\n"],
|
|
5
|
+
"mappings": ";AAqDM,SAAUA,EAAsCC,IAAAA;AACpD,SAAOA;AACT;;;AClCO,IAAM,uBAAuB,EAAc,4BAA4B;;;AC2BvE,IAAM,uBAAuB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ;AACO,IAAM,4BAA4B;AAAA,EACrC,GAAG;AAAA,EACH;AAAA,EACA;AACJ;;;AC7CA,IAAM,iBAAiB,oBAAI,IAAI;AAAA,EAC3B;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;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