@syntrologie/runtime-sdk 2.13.0 → 2.15.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.
Files changed (67) hide show
  1. package/README.md +1 -0
  2. package/dist/SmartCanvasElementLit.d.ts +166 -0
  3. package/dist/actions/schema.d.ts +776 -776
  4. package/dist/actions/schema.js +4 -3
  5. package/dist/actions/types.d.ts +8 -2
  6. package/dist/anchor/AnchorResolver.d.ts +1 -0
  7. package/dist/api-lit.d.ts +84 -0
  8. package/dist/apps/builtinRuntimeModules-lit.d.ts +20 -0
  9. package/dist/bootstrap-types.d.ts +10 -0
  10. package/dist/chunk-2IQ2PTLJ.js +871 -0
  11. package/dist/chunk-2IQ2PTLJ.js.map +7 -0
  12. package/dist/chunk-4HXPGXUC.js +226 -0
  13. package/dist/chunk-4HXPGXUC.js.map +7 -0
  14. package/dist/{chunk-GF364MMB.js → chunk-CVMZW3II.js} +1102 -1098
  15. package/dist/chunk-CVMZW3II.js.map +7 -0
  16. package/dist/{chunk-XDYJ64IN.js → chunk-GX7BBYX6.js} +4 -4
  17. package/dist/chunk-GX7BBYX6.js.map +7 -0
  18. package/dist/chunk-JMHRHAEL.js +18 -0
  19. package/dist/chunk-JMHRHAEL.js.map +7 -0
  20. package/dist/{chunk-L6RJMBR2.js → chunk-XVRDKBYF.js} +3 -3
  21. package/dist/components/ShadowCanvasOverlay.d.ts +1 -2
  22. package/dist/components/SyntroCanvasOverlay.d.ts +100 -0
  23. package/dist/components/SyntroDrawer.d.ts +110 -0
  24. package/dist/components/SyntroLauncher.d.ts +105 -0
  25. package/dist/components/SyntroTileCard.d.ts +74 -0
  26. package/dist/components/SyntroTileWheel.d.ts +51 -0
  27. package/dist/config/schema.d.ts +147 -136
  28. package/dist/config/schema.js +3 -2
  29. package/dist/controllers/DecisionController.d.ts +48 -0
  30. package/dist/controllers/NotificationsController.d.ts +59 -0
  31. package/dist/controllers/RuntimeController.d.ts +52 -0
  32. package/dist/controllers/RuntimeEventsController.d.ts +42 -0
  33. package/dist/controllers/ThemeController.d.ts +110 -0
  34. package/dist/controllers/index.d.ts +13 -0
  35. package/dist/decisions/schema.d.ts +47 -47
  36. package/dist/decisions/schema.js +2 -1
  37. package/dist/decisions/types.d.ts +4 -0
  38. package/dist/editorLoader.d.ts +5 -0
  39. package/dist/fetchers/experimentsFetcher.d.ts +3 -3
  40. package/dist/fetchers/mergeConfigs.d.ts +7 -7
  41. package/dist/index-lit.d.ts +40 -0
  42. package/dist/index.js +1264 -19
  43. package/dist/index.js.map +4 -4
  44. package/dist/interop/LitInReact.d.ts +27 -0
  45. package/dist/interop/ReactInLit.d.ts +42 -0
  46. package/dist/interop/index.d.ts +7 -0
  47. package/dist/metrics/sessionMetrics.d.ts +4 -0
  48. package/dist/notifications/SyntroToastStack.d.ts +43 -0
  49. package/dist/react-compat.d.ts +114 -0
  50. package/dist/react.js +6 -4
  51. package/dist/react.js.map +1 -1
  52. package/dist/smart-canvas.esm.js +856 -240
  53. package/dist/smart-canvas.esm.js.map +4 -4
  54. package/dist/smart-canvas.js +31387 -39860
  55. package/dist/smart-canvas.js.map +4 -4
  56. package/dist/smart-canvas.min.js +855 -240
  57. package/dist/smart-canvas.min.js.map +4 -4
  58. package/dist/theme/index.js +30 -0
  59. package/dist/theme/index.js.map +7 -0
  60. package/dist/version.d.ts +1 -1
  61. package/package.json +10 -1
  62. package/schema/canvas-config.schema.json +2347 -11396
  63. package/dist/chunk-BU4Z6PD7.js +0 -218
  64. package/dist/chunk-BU4Z6PD7.js.map +0 -7
  65. package/dist/chunk-GF364MMB.js.map +0 -7
  66. package/dist/chunk-XDYJ64IN.js.map +0 -7
  67. /package/dist/{chunk-L6RJMBR2.js.map → chunk-XVRDKBYF.js.map} +0 -0
@@ -72,7 +72,7 @@ export declare function validateCondition(data: unknown): z.SafeParseReturnType<
72
72
  maxHeight?: number | undefined;
73
73
  } | {
74
74
  type: "session_metric";
75
- key: string;
75
+ key: "time_on_page" | "page_views" | "scroll_depth";
76
76
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
77
77
  threshold: number;
78
78
  } | {
@@ -95,7 +95,7 @@ export declare function validateCondition(data: unknown): z.SafeParseReturnType<
95
95
  count: number;
96
96
  withinMs?: number | undefined;
97
97
  counter?: {
98
- events: string[];
98
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
99
99
  match?: Record<string, {
100
100
  equals?: string | number | boolean | undefined;
101
101
  contains?: string | undefined;
@@ -127,7 +127,7 @@ export declare function validateCondition(data: unknown): z.SafeParseReturnType<
127
127
  maxHeight?: number | undefined;
128
128
  } | {
129
129
  type: "session_metric";
130
- key: string;
130
+ key: "time_on_page" | "page_views" | "scroll_depth";
131
131
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
132
132
  threshold: number;
133
133
  } | {
@@ -150,7 +150,7 @@ export declare function validateCondition(data: unknown): z.SafeParseReturnType<
150
150
  count: number;
151
151
  withinMs?: number | undefined;
152
152
  counter?: {
153
- events: string[];
153
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
154
154
  match?: Record<string, {
155
155
  equals?: string | number | boolean | undefined;
156
156
  contains?: string | undefined;
@@ -189,7 +189,7 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
189
189
  maxHeight?: number | undefined;
190
190
  } | {
191
191
  type: "session_metric";
192
- key: string;
192
+ key: "time_on_page" | "page_views" | "scroll_depth";
193
193
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
194
194
  threshold: number;
195
195
  } | {
@@ -212,7 +212,7 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
212
212
  count: number;
213
213
  withinMs?: number | undefined;
214
214
  counter?: {
215
- events: string[];
215
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
216
216
  match?: Record<string, {
217
217
  equals?: string | number | boolean | undefined;
218
218
  contains?: string | undefined;
@@ -269,7 +269,7 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
269
269
  maxHeight?: number | undefined;
270
270
  } | {
271
271
  type: "session_metric";
272
- key: string;
272
+ key: "time_on_page" | "page_views" | "scroll_depth";
273
273
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
274
274
  threshold: number;
275
275
  } | {
@@ -292,7 +292,7 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
292
292
  count: number;
293
293
  withinMs?: number | undefined;
294
294
  counter?: {
295
- events: string[];
295
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
296
296
  match?: Record<string, {
297
297
  equals?: string | number | boolean | undefined;
298
298
  contains?: string | undefined;
@@ -359,7 +359,7 @@ export declare const decisionSchemas: ({
359
359
  } | {
360
360
  defName: string;
361
361
  schema: z.ZodObject<{
362
- events: z.ZodArray<z.ZodString, "many">;
362
+ events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "nav.page_view", "nav.page_leave", "behavior.rage_click", "behavior.hesitation", "behavior.confusion"]>, "many">;
363
363
  match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
364
364
  equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
365
365
  contains: z.ZodOptional<z.ZodString>;
@@ -371,13 +371,13 @@ export declare const decisionSchemas: ({
371
371
  contains?: string | undefined;
372
372
  }>>>;
373
373
  }, "strip", z.ZodTypeAny, {
374
- events: string[];
374
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
375
375
  match?: Record<string, {
376
376
  equals?: string | number | boolean | undefined;
377
377
  contains?: string | undefined;
378
378
  }> | undefined;
379
379
  }, {
380
- events: string[];
380
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
381
381
  match?: Record<string, {
382
382
  equals?: string | number | boolean | undefined;
383
383
  contains?: string | undefined;
@@ -501,17 +501,17 @@ export declare const decisionSchemas: ({
501
501
  maxHeight?: number | undefined;
502
502
  }>, z.ZodObject<{
503
503
  type: z.ZodLiteral<"session_metric">;
504
- key: z.ZodString;
504
+ key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
505
505
  operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
506
506
  threshold: z.ZodNumber;
507
507
  }, "strip", z.ZodTypeAny, {
508
508
  type: "session_metric";
509
- key: string;
509
+ key: "time_on_page" | "page_views" | "scroll_depth";
510
510
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
511
511
  threshold: number;
512
512
  }, {
513
513
  type: "session_metric";
514
- key: string;
514
+ key: "time_on_page" | "page_views" | "scroll_depth";
515
515
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
516
516
  threshold: number;
517
517
  }>, z.ZodObject<{
@@ -560,7 +560,7 @@ export declare const decisionSchemas: ({
560
560
  count: z.ZodNumber;
561
561
  withinMs: z.ZodOptional<z.ZodNumber>;
562
562
  counter: z.ZodOptional<z.ZodObject<{
563
- events: z.ZodArray<z.ZodString, "many">;
563
+ events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "nav.page_view", "nav.page_leave", "behavior.rage_click", "behavior.hesitation", "behavior.confusion"]>, "many">;
564
564
  match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
565
565
  equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
566
566
  contains: z.ZodOptional<z.ZodString>;
@@ -572,13 +572,13 @@ export declare const decisionSchemas: ({
572
572
  contains?: string | undefined;
573
573
  }>>>;
574
574
  }, "strip", z.ZodTypeAny, {
575
- events: string[];
575
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
576
576
  match?: Record<string, {
577
577
  equals?: string | number | boolean | undefined;
578
578
  contains?: string | undefined;
579
579
  }> | undefined;
580
580
  }, {
581
- events: string[];
581
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
582
582
  match?: Record<string, {
583
583
  equals?: string | number | boolean | undefined;
584
584
  contains?: string | undefined;
@@ -591,7 +591,7 @@ export declare const decisionSchemas: ({
591
591
  count: number;
592
592
  withinMs?: number | undefined;
593
593
  counter?: {
594
- events: string[];
594
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
595
595
  match?: Record<string, {
596
596
  equals?: string | number | boolean | undefined;
597
597
  contains?: string | undefined;
@@ -604,7 +604,7 @@ export declare const decisionSchemas: ({
604
604
  count: number;
605
605
  withinMs?: number | undefined;
606
606
  counter?: {
607
- events: string[];
607
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
608
608
  match?: Record<string, {
609
609
  equals?: string | number | boolean | undefined;
610
610
  contains?: string | undefined;
@@ -639,7 +639,7 @@ export declare const decisionSchemas: ({
639
639
  maxHeight?: number | undefined;
640
640
  } | {
641
641
  type: "session_metric";
642
- key: string;
642
+ key: "time_on_page" | "page_views" | "scroll_depth";
643
643
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
644
644
  threshold: number;
645
645
  } | {
@@ -662,7 +662,7 @@ export declare const decisionSchemas: ({
662
662
  count: number;
663
663
  withinMs?: number | undefined;
664
664
  counter?: {
665
- events: string[];
665
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
666
666
  match?: Record<string, {
667
667
  equals?: string | number | boolean | undefined;
668
668
  contains?: string | undefined;
@@ -697,7 +697,7 @@ export declare const decisionSchemas: ({
697
697
  maxHeight?: number | undefined;
698
698
  } | {
699
699
  type: "session_metric";
700
- key: string;
700
+ key: "time_on_page" | "page_views" | "scroll_depth";
701
701
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
702
702
  threshold: number;
703
703
  } | {
@@ -720,7 +720,7 @@ export declare const decisionSchemas: ({
720
720
  count: number;
721
721
  withinMs?: number | undefined;
722
722
  counter?: {
723
- events: string[];
723
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
724
724
  match?: Record<string, {
725
725
  equals?: string | number | boolean | undefined;
726
726
  contains?: string | undefined;
@@ -759,7 +759,7 @@ export declare const decisionSchemas: ({
759
759
  maxHeight?: number | undefined;
760
760
  } | {
761
761
  type: "session_metric";
762
- key: string;
762
+ key: "time_on_page" | "page_views" | "scroll_depth";
763
763
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
764
764
  threshold: number;
765
765
  } | {
@@ -782,7 +782,7 @@ export declare const decisionSchemas: ({
782
782
  count: number;
783
783
  withinMs?: number | undefined;
784
784
  counter?: {
785
- events: string[];
785
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
786
786
  match?: Record<string, {
787
787
  equals?: string | number | boolean | undefined;
788
788
  contains?: string | undefined;
@@ -821,7 +821,7 @@ export declare const decisionSchemas: ({
821
821
  maxHeight?: number | undefined;
822
822
  } | {
823
823
  type: "session_metric";
824
- key: string;
824
+ key: "time_on_page" | "page_views" | "scroll_depth";
825
825
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
826
826
  threshold: number;
827
827
  } | {
@@ -844,7 +844,7 @@ export declare const decisionSchemas: ({
844
844
  count: number;
845
845
  withinMs?: number | undefined;
846
846
  counter?: {
847
- events: string[];
847
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
848
848
  match?: Record<string, {
849
849
  equals?: string | number | boolean | undefined;
850
850
  contains?: string | undefined;
@@ -995,17 +995,17 @@ export declare const decisionSchemas: ({
995
995
  maxHeight?: number | undefined;
996
996
  }>, z.ZodObject<{
997
997
  type: z.ZodLiteral<"session_metric">;
998
- key: z.ZodString;
998
+ key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
999
999
  operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1000
1000
  threshold: z.ZodNumber;
1001
1001
  }, "strip", z.ZodTypeAny, {
1002
1002
  type: "session_metric";
1003
- key: string;
1003
+ key: "time_on_page" | "page_views" | "scroll_depth";
1004
1004
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1005
1005
  threshold: number;
1006
1006
  }, {
1007
1007
  type: "session_metric";
1008
- key: string;
1008
+ key: "time_on_page" | "page_views" | "scroll_depth";
1009
1009
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1010
1010
  threshold: number;
1011
1011
  }>, z.ZodObject<{
@@ -1054,7 +1054,7 @@ export declare const decisionSchemas: ({
1054
1054
  count: z.ZodNumber;
1055
1055
  withinMs: z.ZodOptional<z.ZodNumber>;
1056
1056
  counter: z.ZodOptional<z.ZodObject<{
1057
- events: z.ZodArray<z.ZodString, "many">;
1057
+ events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "nav.page_view", "nav.page_leave", "behavior.rage_click", "behavior.hesitation", "behavior.confusion"]>, "many">;
1058
1058
  match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1059
1059
  equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1060
1060
  contains: z.ZodOptional<z.ZodString>;
@@ -1066,13 +1066,13 @@ export declare const decisionSchemas: ({
1066
1066
  contains?: string | undefined;
1067
1067
  }>>>;
1068
1068
  }, "strip", z.ZodTypeAny, {
1069
- events: string[];
1069
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1070
1070
  match?: Record<string, {
1071
1071
  equals?: string | number | boolean | undefined;
1072
1072
  contains?: string | undefined;
1073
1073
  }> | undefined;
1074
1074
  }, {
1075
- events: string[];
1075
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1076
1076
  match?: Record<string, {
1077
1077
  equals?: string | number | boolean | undefined;
1078
1078
  contains?: string | undefined;
@@ -1085,7 +1085,7 @@ export declare const decisionSchemas: ({
1085
1085
  count: number;
1086
1086
  withinMs?: number | undefined;
1087
1087
  counter?: {
1088
- events: string[];
1088
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1089
1089
  match?: Record<string, {
1090
1090
  equals?: string | number | boolean | undefined;
1091
1091
  contains?: string | undefined;
@@ -1098,7 +1098,7 @@ export declare const decisionSchemas: ({
1098
1098
  count: number;
1099
1099
  withinMs?: number | undefined;
1100
1100
  counter?: {
1101
- events: string[];
1101
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1102
1102
  match?: Record<string, {
1103
1103
  equals?: string | number | boolean | undefined;
1104
1104
  contains?: string | undefined;
@@ -1133,7 +1133,7 @@ export declare const decisionSchemas: ({
1133
1133
  maxHeight?: number | undefined;
1134
1134
  } | {
1135
1135
  type: "session_metric";
1136
- key: string;
1136
+ key: "time_on_page" | "page_views" | "scroll_depth";
1137
1137
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1138
1138
  threshold: number;
1139
1139
  } | {
@@ -1156,7 +1156,7 @@ export declare const decisionSchemas: ({
1156
1156
  count: number;
1157
1157
  withinMs?: number | undefined;
1158
1158
  counter?: {
1159
- events: string[];
1159
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1160
1160
  match?: Record<string, {
1161
1161
  equals?: string | number | boolean | undefined;
1162
1162
  contains?: string | undefined;
@@ -1191,7 +1191,7 @@ export declare const decisionSchemas: ({
1191
1191
  maxHeight?: number | undefined;
1192
1192
  } | {
1193
1193
  type: "session_metric";
1194
- key: string;
1194
+ key: "time_on_page" | "page_views" | "scroll_depth";
1195
1195
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1196
1196
  threshold: number;
1197
1197
  } | {
@@ -1214,7 +1214,7 @@ export declare const decisionSchemas: ({
1214
1214
  count: number;
1215
1215
  withinMs?: number | undefined;
1216
1216
  counter?: {
1217
- events: string[];
1217
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1218
1218
  match?: Record<string, {
1219
1219
  equals?: string | number | boolean | undefined;
1220
1220
  contains?: string | undefined;
@@ -1299,17 +1299,17 @@ export declare const decisionSchemas: ({
1299
1299
  maxHeight?: number | undefined;
1300
1300
  }>, z.ZodObject<{
1301
1301
  type: z.ZodLiteral<"session_metric">;
1302
- key: z.ZodString;
1302
+ key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
1303
1303
  operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1304
1304
  threshold: z.ZodNumber;
1305
1305
  }, "strip", z.ZodTypeAny, {
1306
1306
  type: "session_metric";
1307
- key: string;
1307
+ key: "time_on_page" | "page_views" | "scroll_depth";
1308
1308
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1309
1309
  threshold: number;
1310
1310
  }, {
1311
1311
  type: "session_metric";
1312
- key: string;
1312
+ key: "time_on_page" | "page_views" | "scroll_depth";
1313
1313
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1314
1314
  threshold: number;
1315
1315
  }>, z.ZodObject<{
@@ -1358,7 +1358,7 @@ export declare const decisionSchemas: ({
1358
1358
  count: z.ZodNumber;
1359
1359
  withinMs: z.ZodOptional<z.ZodNumber>;
1360
1360
  counter: z.ZodOptional<z.ZodObject<{
1361
- events: z.ZodArray<z.ZodString, "many">;
1361
+ events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "nav.page_view", "nav.page_leave", "behavior.rage_click", "behavior.hesitation", "behavior.confusion"]>, "many">;
1362
1362
  match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1363
1363
  equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1364
1364
  contains: z.ZodOptional<z.ZodString>;
@@ -1370,13 +1370,13 @@ export declare const decisionSchemas: ({
1370
1370
  contains?: string | undefined;
1371
1371
  }>>>;
1372
1372
  }, "strip", z.ZodTypeAny, {
1373
- events: string[];
1373
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1374
1374
  match?: Record<string, {
1375
1375
  equals?: string | number | boolean | undefined;
1376
1376
  contains?: string | undefined;
1377
1377
  }> | undefined;
1378
1378
  }, {
1379
- events: string[];
1379
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1380
1380
  match?: Record<string, {
1381
1381
  equals?: string | number | boolean | undefined;
1382
1382
  contains?: string | undefined;
@@ -1389,7 +1389,7 @@ export declare const decisionSchemas: ({
1389
1389
  count: number;
1390
1390
  withinMs?: number | undefined;
1391
1391
  counter?: {
1392
- events: string[];
1392
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1393
1393
  match?: Record<string, {
1394
1394
  equals?: string | number | boolean | undefined;
1395
1395
  contains?: string | undefined;
@@ -1402,7 +1402,7 @@ export declare const decisionSchemas: ({
1402
1402
  count: number;
1403
1403
  withinMs?: number | undefined;
1404
1404
  counter?: {
1405
- events: string[];
1405
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1406
1406
  match?: Record<string, {
1407
1407
  equals?: string | number | boolean | undefined;
1408
1408
  contains?: string | undefined;
@@ -26,7 +26,8 @@ import {
26
26
  validateActivationConfig,
27
27
  validateCondition,
28
28
  validateStrategy
29
- } from "../chunk-BU4Z6PD7.js";
29
+ } from "../chunk-4HXPGXUC.js";
30
+ import "../chunk-JMHRHAEL.js";
30
31
  export {
31
32
  ActivationConfigZ,
32
33
  AnchorVisibleConditionZ,
@@ -275,6 +275,10 @@ export interface EvaluationContext {
275
275
  /** Get an arbitrary state value by key (checks session then user store). */
276
276
  getValue?(key: string): unknown;
277
277
  };
278
+ /** Direct session metrics access (independent of state store) */
279
+ sessionMetrics?: {
280
+ get(key: string): number;
281
+ };
278
282
  /** Access to event bus (for event_occurred checks) */
279
283
  events?: {
280
284
  hasRecentEvent(eventName: string, withinMs: number): boolean;
@@ -9,6 +9,11 @@ export interface EditorConf {
9
9
  audit_session_id?: string;
10
10
  [key: string]: unknown;
11
11
  }
12
+ /**
13
+ * Clear persisted editor params from sessionStorage. Call when the audit/editor
14
+ * session intentionally ends so the next page load does not rehydrate stale state.
15
+ */
16
+ export declare function clearPersistedEditorParams(): void;
12
17
  /**
13
18
  * Reset the editor params cache, forcing re-evaluation on next access.
14
19
  * Called by the Chrome extension after restoring URL params via replaceState,
@@ -6,10 +6,10 @@ export interface ExperimentsFetcherOptions {
6
6
  */
7
7
  client: ExperimentClient;
8
8
  /**
9
- * Single feature key for the monolithic config (legacy mode).
10
- * @default "smart-canvas-config"
9
+ * Feature key for the monolithic config (legacy mode).
10
+ * Callers must provide this explicitly — no hardcoded default.
11
11
  */
12
- featureKey?: string;
12
+ featureKey: string;
13
13
  /**
14
14
  * Feature key for the variant manifest (lists active variant flag keys).
15
15
  * When set, enables multi-flag mode.
@@ -10,20 +10,20 @@ export type VariantFlagValue = Partial<CanvasConfigResponse> & {
10
10
  /**
11
11
  * Strategy for resolving multiple active variant configs into one.
12
12
  *
13
- * Currently: "first-match" returns the first non-empty variant config.
14
- * Future: "merge" concatenate tiles/actions/overlays from all variants.
13
+ * - "merge" (default): concatenate tiles/actions from all active variants.
14
+ * Singleton fields (theme, launcher, meta, etc.) take first-defined value.
15
+ * - "first-match": returns the first non-empty variant config (legacy).
15
16
  */
16
- export type MergeStrategy = 'first-match';
17
+ export type MergeStrategy = 'merge' | 'first-match';
17
18
  /**
18
19
  * Resolve multiple variant feature flags into a single CanvasConfigResponse.
19
20
  *
20
21
  * Evaluates each flag key against the experiment client and applies the
21
- * configured strategy. Currently uses "first-match": the first flag that
22
- * returns a non-empty config wins.
22
+ * configured strategy.
23
23
  *
24
24
  * @param client - Experiment client to evaluate feature flags
25
25
  * @param keys - Ordered list of variant flag keys to evaluate
26
- * @param _strategy - Resolution strategy (reserved for future use)
26
+ * @param strategy - Resolution strategy (default: "merge")
27
27
  * @returns Resolved config, or null if no flags are active
28
28
  */
29
- export declare function resolveVariantConfigs(client: ExperimentClient, keys: string[], _strategy?: MergeStrategy): CanvasConfigResponse | null;
29
+ export declare function resolveVariantConfigs(client: ExperimentClient, keys: string[], strategy?: MergeStrategy): CanvasConfigResponse | null;
@@ -0,0 +1,40 @@
1
+ import './components/SyntroCanvasOverlay';
2
+ import './components/SyntroDrawer';
3
+ import './components/SyntroLauncher';
4
+ import './components/SyntroTileCard';
5
+ import './components/SyntroTileWheel';
6
+ import './notifications/SyntroToastStack';
7
+ export declare const RUNTIME_SDK_BUILD: string;
8
+ export * from './actions';
9
+ export * from './anchor';
10
+ export * from './api-lit';
11
+ export { AppRegistry } from './apps/AppRegistry';
12
+ export type { SyntroInitOptions, SyntroInitResult } from './bootstrap';
13
+ export { Syntro } from './bootstrap';
14
+ export * from './config-validator';
15
+ export * from './configFetcher';
16
+ export * from './context';
17
+ export * from './controller';
18
+ export * from './controllers';
19
+ export * from './decisions';
20
+ export * from './events';
21
+ export * from './experiments';
22
+ export * from './metrics';
23
+ export type { NavigationDiagnostics, NavigationListener } from './navigation/NavigationMonitor';
24
+ export { NavigationMonitor } from './navigation/NavigationMonitor';
25
+ export type { ActiveNotification } from './notifications/types';
26
+ export { DEFAULT_COOLDOWN, MAX_VISIBLE_TOASTS } from './notifications/types';
27
+ export * from './overlays/fetcher';
28
+ export * from './overlays/schema';
29
+ export * from './overlays/types';
30
+ export type { RuntimeMode, SmartCanvasRuntime, SmartCanvasRuntimeOptions } from './runtime';
31
+ export { createSmartCanvasRuntime, RUNTIME_VERSION } from './runtime';
32
+ export * from './SmartCanvasElementLit';
33
+ export * from './state';
34
+ export * from './surfaces';
35
+ export * from './telemetry';
36
+ export type { SyntroTokenPayload } from './token';
37
+ export { decodeToken, encodeToken } from './token';
38
+ export * from './types';
39
+ export * from './version';
40
+ export * from './widgets';