@syntrologie/runtime-sdk 2.13.0 → 2.14.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/actions/schema.d.ts +776 -776
- package/dist/actions/schema.js +3 -3
- package/dist/{chunk-L6RJMBR2.js → chunk-77TNZ66J.js} +3 -3
- package/dist/{chunk-XDYJ64IN.js → chunk-IR6UOR63.js} +4 -4
- package/dist/chunk-IR6UOR63.js.map +7 -0
- package/dist/{chunk-GF364MMB.js → chunk-JCDCANR7.js} +157 -64
- package/dist/chunk-JCDCANR7.js.map +7 -0
- package/dist/chunk-YLLWLUQX.js +241 -0
- package/dist/chunk-YLLWLUQX.js.map +7 -0
- package/dist/components/ShadowCanvasOverlay.d.ts +1 -2
- package/dist/config/schema.d.ts +147 -136
- package/dist/config/schema.js +2 -2
- package/dist/decisions/schema.d.ts +47 -47
- package/dist/decisions/schema.js +1 -1
- package/dist/fetchers/experimentsFetcher.d.ts +3 -3
- package/dist/fetchers/mergeConfigs.d.ts +7 -7
- package/dist/index.js +4 -4
- package/dist/react.js +4 -4
- package/dist/smart-canvas.esm.js +42 -42
- package/dist/smart-canvas.esm.js.map +3 -3
- package/dist/smart-canvas.js +219 -103
- package/dist/smart-canvas.js.map +2 -2
- package/dist/smart-canvas.min.js +40 -40
- package/dist/smart-canvas.min.js.map +3 -3
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/schema/canvas-config.schema.json +2347 -11396
- package/dist/chunk-BU4Z6PD7.js +0 -218
- package/dist/chunk-BU4Z6PD7.js.map +0 -7
- package/dist/chunk-GF364MMB.js.map +0 -7
- package/dist/chunk-XDYJ64IN.js.map +0 -7
- /package/dist/{chunk-L6RJMBR2.js.map → chunk-77TNZ66J.js.map} +0 -0
package/dist/config/schema.js
CHANGED
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
TileNotificationRuleZ,
|
|
13
13
|
TileZ,
|
|
14
14
|
configSchemas
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
} from "../chunk-IR6UOR63.js";
|
|
16
|
+
import "../chunk-YLLWLUQX.js";
|
|
17
17
|
export {
|
|
18
18
|
CanvasConfigResponseZ,
|
|
19
19
|
CanvasElementConfigZ,
|
|
@@ -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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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.
|
|
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:
|
|
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:
|
|
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.
|
|
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:
|
|
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:
|
|
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.
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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.
|
|
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:
|
|
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:
|
|
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.
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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.
|
|
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:
|
|
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:
|
|
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.
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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;
|
package/dist/decisions/schema.js
CHANGED
|
@@ -6,10 +6,10 @@ export interface ExperimentsFetcherOptions {
|
|
|
6
6
|
*/
|
|
7
7
|
client: ExperimentClient;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* Feature key for the monolithic config (legacy mode).
|
|
10
|
+
* Callers must provide this explicitly — no hardcoded default.
|
|
11
11
|
*/
|
|
12
|
-
featureKey
|
|
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
|
-
*
|
|
14
|
-
*
|
|
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.
|
|
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
|
|
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[],
|
|
29
|
+
export declare function resolveVariantConfigs(client: ExperimentClient, keys: string[], strategy?: MergeStrategy): CanvasConfigResponse | null;
|
package/dist/index.js
CHANGED
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
validateEventName,
|
|
105
105
|
validateProps,
|
|
106
106
|
widgetRegistry
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-JCDCANR7.js";
|
|
108
108
|
import {
|
|
109
109
|
AddClassZ,
|
|
110
110
|
AnchorIdZ,
|
|
@@ -138,8 +138,8 @@ import {
|
|
|
138
138
|
WaitZ,
|
|
139
139
|
WidgetConfigZ,
|
|
140
140
|
coreActionStepSchemas
|
|
141
|
-
} from "./chunk-
|
|
142
|
-
import "./chunk-
|
|
141
|
+
} from "./chunk-77TNZ66J.js";
|
|
142
|
+
import "./chunk-IR6UOR63.js";
|
|
143
143
|
import {
|
|
144
144
|
ActivationConfigZ,
|
|
145
145
|
AnchorVisibleConditionZ,
|
|
@@ -169,7 +169,7 @@ import {
|
|
|
169
169
|
validateActivationConfig,
|
|
170
170
|
validateCondition,
|
|
171
171
|
validateStrategy
|
|
172
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-YLLWLUQX.js";
|
|
173
173
|
|
|
174
174
|
// src/index.ts
|
|
175
175
|
import React4 from "react";
|
package/dist/react.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Syntro
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-JCDCANR7.js";
|
|
4
|
+
import "./chunk-77TNZ66J.js";
|
|
5
|
+
import "./chunk-IR6UOR63.js";
|
|
6
|
+
import "./chunk-YLLWLUQX.js";
|
|
7
7
|
|
|
8
8
|
// src/react.tsx
|
|
9
9
|
import { createContext, useContext, useEffect, useRef, useState } from "react";
|