@aranova/tracking-react 0.5.1 → 0.6.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/README.md +114 -0
- package/dist/index.d.mts +47 -43
- package/dist/index.d.ts +47 -43
- package/dist/index.js +26 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -257,7 +257,7 @@ var pageViewMetadataSchema = z.object({
|
|
|
257
257
|
path: z.string(),
|
|
258
258
|
search: z.string(),
|
|
259
259
|
hash: z.string()
|
|
260
|
-
}),
|
|
260
|
+
}).strict(),
|
|
261
261
|
referrer: z.string().nullable(),
|
|
262
262
|
// `.nullable().optional()` — absent (undefined) OR explicit null OR a
|
|
263
263
|
// real viewport object. Mirrors Pydantic's `_Viewport | None = None`
|
|
@@ -265,7 +265,7 @@ var pageViewMetadataSchema = z.object({
|
|
|
265
265
|
viewport: z.object({
|
|
266
266
|
w: z.number(),
|
|
267
267
|
h: z.number()
|
|
268
|
-
}).nullable().optional()
|
|
268
|
+
}).strict().nullable().optional()
|
|
269
269
|
}).strict();
|
|
270
270
|
var pageViewConfigSchema = z.object({}).strict();
|
|
271
271
|
|
|
@@ -648,7 +648,7 @@ var ctaClickMetadataSchema = z2.object({
|
|
|
648
648
|
cta_name: z2.string(),
|
|
649
649
|
page: z2.object({
|
|
650
650
|
path: z2.string()
|
|
651
|
-
}),
|
|
651
|
+
}).strict(),
|
|
652
652
|
section: z2.string().nullable().optional(),
|
|
653
653
|
destination_url: z2.string().nullable().optional()
|
|
654
654
|
}).strict();
|
|
@@ -675,10 +675,10 @@ var formStartMetadataSchema = z4.object({
|
|
|
675
675
|
form: z4.object({
|
|
676
676
|
id: z4.string(),
|
|
677
677
|
action: z4.string().nullable()
|
|
678
|
-
}),
|
|
678
|
+
}).strict(),
|
|
679
679
|
page: z4.object({
|
|
680
680
|
path: z4.string()
|
|
681
|
-
})
|
|
681
|
+
}).strict()
|
|
682
682
|
}).strict();
|
|
683
683
|
var formStartConfigSchema = z4.object({
|
|
684
684
|
selector: z4.string().optional()
|
|
@@ -686,6 +686,16 @@ var formStartConfigSchema = z4.object({
|
|
|
686
686
|
|
|
687
687
|
// ../tracking-core/src/events/form-submit.ts
|
|
688
688
|
import { z as z5 } from "zod";
|
|
689
|
+
var jsonValueSchema = z5.lazy(
|
|
690
|
+
() => z5.union([
|
|
691
|
+
z5.string(),
|
|
692
|
+
z5.number().finite(),
|
|
693
|
+
z5.boolean(),
|
|
694
|
+
z5.null(),
|
|
695
|
+
z5.array(jsonValueSchema),
|
|
696
|
+
z5.record(jsonValueSchema)
|
|
697
|
+
])
|
|
698
|
+
);
|
|
689
699
|
var formSubmitMetadataSchema = z5.object({
|
|
690
700
|
form: z5.object({
|
|
691
701
|
id: z5.string(),
|
|
@@ -695,13 +705,13 @@ var formSubmitMetadataSchema = z5.object({
|
|
|
695
705
|
name: z5.string(),
|
|
696
706
|
type: z5.string(),
|
|
697
707
|
label: z5.string().nullable(),
|
|
698
|
-
|
|
699
|
-
})
|
|
708
|
+
value: jsonValueSchema
|
|
709
|
+
}).strict()
|
|
700
710
|
).optional()
|
|
701
|
-
}),
|
|
711
|
+
}).strict(),
|
|
702
712
|
page: z5.object({
|
|
703
713
|
path: z5.string()
|
|
704
|
-
})
|
|
714
|
+
}).strict()
|
|
705
715
|
}).strict();
|
|
706
716
|
var formSubmitConfigSchema = z5.object({}).strict();
|
|
707
717
|
|
|
@@ -711,7 +721,7 @@ var multiPageSessionMetadataSchema = z6.object({
|
|
|
711
721
|
page_count: z6.number().int().min(2),
|
|
712
722
|
page: z6.object({
|
|
713
723
|
path: z6.string()
|
|
714
|
-
})
|
|
724
|
+
}).strict()
|
|
715
725
|
}).strict();
|
|
716
726
|
var multiPageSessionConfigSchema = z6.object({
|
|
717
727
|
pageThreshold: z6.number().int().min(2)
|
|
@@ -723,7 +733,7 @@ var phoneClickMetadataSchema = z7.object({
|
|
|
723
733
|
phone_number: z7.string(),
|
|
724
734
|
page: z7.object({
|
|
725
735
|
path: z7.string()
|
|
726
|
-
}),
|
|
736
|
+
}).strict(),
|
|
727
737
|
section: z7.string().nullable().optional()
|
|
728
738
|
}).strict();
|
|
729
739
|
var phoneClickConfigSchema = z7.object({}).strict();
|
|
@@ -734,7 +744,7 @@ var scrollDepthMetadataSchema = z8.object({
|
|
|
734
744
|
depth_percent: z8.number().int().min(1).max(100),
|
|
735
745
|
page: z8.object({
|
|
736
746
|
path: z8.string()
|
|
737
|
-
})
|
|
747
|
+
}).strict()
|
|
738
748
|
}).strict();
|
|
739
749
|
var scrollDepthConfigSchema = z8.object({
|
|
740
750
|
thresholds: z8.array(z8.number().int().min(1).max(100)).min(1)
|
|
@@ -757,7 +767,7 @@ var specificPageVisitMetadataSchema = z9.object({
|
|
|
757
767
|
page_name: specificPageNameSchema,
|
|
758
768
|
page: z9.object({
|
|
759
769
|
path: z9.string()
|
|
760
|
-
})
|
|
770
|
+
}).strict()
|
|
761
771
|
}).strict();
|
|
762
772
|
var specificPageVisitConfigSchema = z9.object({
|
|
763
773
|
pages: z9.array(
|
|
@@ -766,7 +776,7 @@ var specificPageVisitConfigSchema = z9.object({
|
|
|
766
776
|
pathPattern: z9.custom((value) => value instanceof RegExp, {
|
|
767
777
|
message: "pathPattern must be a RegExp"
|
|
768
778
|
})
|
|
769
|
-
})
|
|
779
|
+
}).strict()
|
|
770
780
|
).min(1)
|
|
771
781
|
}).strict();
|
|
772
782
|
|
|
@@ -776,7 +786,7 @@ var timeOnSiteMetadataSchema = z10.object({
|
|
|
776
786
|
duration_ms: z10.number().int().nonnegative(),
|
|
777
787
|
page: z10.object({
|
|
778
788
|
path: z10.string()
|
|
779
|
-
})
|
|
789
|
+
}).strict()
|
|
780
790
|
}).strict();
|
|
781
791
|
var timeOnSiteConfigSchema = z10.object({
|
|
782
792
|
thresholdSeconds: z10.number().int().positive()
|
|
@@ -1293,7 +1303,7 @@ import {
|
|
|
1293
1303
|
} from "react";
|
|
1294
1304
|
|
|
1295
1305
|
// package.json
|
|
1296
|
-
var version = "0.
|
|
1306
|
+
var version = "0.6.0";
|
|
1297
1307
|
|
|
1298
1308
|
// src/factory.tsx
|
|
1299
1309
|
import { jsx as jsx2 } from "react/jsx-runtime";
|