ugcinc 5.3.2 → 5.5.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 (34) hide show
  1. package/README.md +70 -58
  2. package/dist/content-skills.js +4 -4
  3. package/dist/index.d.ts +1 -1
  4. package/dist/media-analysis.d.ts +460 -180
  5. package/dist/media-analysis.js +16 -9
  6. package/dist/render/components/TextElement.js +1 -1
  7. package/dist/render/compositions/IMessageDmComposition/convertPropsToElements.d.ts +27 -0
  8. package/dist/render/compositions/IMessageDmComposition/convertPropsToElements.js +629 -0
  9. package/dist/render/compositions/IMessageDmComposition/index.d.ts +21 -0
  10. package/dist/render/compositions/IMessageDmComposition/index.js +504 -0
  11. package/dist/render/compositions/IMessageDmComposition/types.d.ts +767 -0
  12. package/dist/render/compositions/IMessageDmComposition/types.js +228 -0
  13. package/dist/render/compositions/ImageEditorComposition.js +15 -2
  14. package/dist/render/compositions/VideoEditorComposition.js +7 -0
  15. package/dist/render/hooks/index.d.ts +10 -0
  16. package/dist/render/hooks/index.js +50 -0
  17. package/dist/render/types/base.d.ts +2 -0
  18. package/dist/render/types/element.d.ts +5 -0
  19. package/dist/render/types/native-text.d.ts +106 -1
  20. package/dist/render/types/native-text.js +17 -2
  21. package/dist/render/utils/fonts.d.ts +45 -3
  22. package/dist/render/utils/fonts.js +84 -3
  23. package/dist/render/utils/index.d.ts +1 -1
  24. package/dist/render/utils/index.js +9 -1
  25. package/dist/render/utils/positionResolver.js +2 -1
  26. package/dist/render.d.ts +1 -1
  27. package/dist/render.js +1 -1
  28. package/dist/skills.js +2 -2
  29. package/dist/stats.d.ts +24 -0
  30. package/dist/stats.js +11 -0
  31. package/package.json +1 -1
  32. package/skills/content-automation/SKILL.md +4 -2
  33. package/skills/media/SKILL.md +32 -11
  34. package/skills/media/references/tools.md +25 -20
@@ -3460,7 +3460,7 @@ export declare const matchTextStyleSchema: z.ZodEffects<z.ZodObject<{
3460
3460
  }>;
3461
3461
  export type MatchTextStyleParams = z.input<typeof matchTextStyleSchema>;
3462
3462
  export declare const matchTextStyleResultSchema: z.ZodObject<{
3463
- version: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>;
3463
+ version: z.ZodUnion<[z.ZodLiteral<2>, z.ZodLiteral<3>]>;
3464
3464
  operation: z.ZodLiteral<"match_text_style">;
3465
3465
  source: z.ZodObject<{
3466
3466
  encodedWidth: z.ZodNumber;
@@ -3520,20 +3520,37 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3520
3520
  renderer: z.ZodUnion<[z.ZodObject<{
3521
3521
  name: z.ZodLiteral<"UGC-ImageEditorComposition">;
3522
3522
  ugcVersion: z.ZodString;
3523
- fonts: z.ZodArray<z.ZodString, "many">;
3524
- fontHashes: z.ZodRecord<z.ZodString, z.ZodString>;
3523
+ fontLibrary: z.ZodNullable<z.ZodObject<{
3524
+ source: z.ZodLiteral<"google-fonts">;
3525
+ fonts: z.ZodNumber;
3526
+ refreshedAt: z.ZodNumber;
3527
+ }, "strip", z.ZodTypeAny, {
3528
+ source: "google-fonts";
3529
+ fonts: number;
3530
+ refreshedAt: number;
3531
+ }, {
3532
+ source: "google-fonts";
3533
+ fonts: number;
3534
+ refreshedAt: number;
3535
+ }>>;
3525
3536
  maxRenders: z.ZodNumber;
3526
3537
  }, "strip", z.ZodTypeAny, {
3527
3538
  name: "UGC-ImageEditorComposition";
3528
3539
  ugcVersion: string;
3529
- fonts: string[];
3530
- fontHashes: Record<string, string>;
3540
+ fontLibrary: {
3541
+ source: "google-fonts";
3542
+ fonts: number;
3543
+ refreshedAt: number;
3544
+ } | null;
3531
3545
  maxRenders: number;
3532
3546
  }, {
3533
3547
  name: "UGC-ImageEditorComposition";
3534
3548
  ugcVersion: string;
3535
- fonts: string[];
3536
- fontHashes: Record<string, string>;
3549
+ fontLibrary: {
3550
+ source: "google-fonts";
3551
+ fonts: number;
3552
+ refreshedAt: number;
3553
+ } | null;
3537
3554
  maxRenders: number;
3538
3555
  }>, z.ZodObject<{
3539
3556
  name: z.ZodLiteral<"UGC-NativeTikTok">;
@@ -3543,13 +3560,13 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3543
3560
  }, "strip", z.ZodTypeAny, {
3544
3561
  profile: "tiktok-classic-ios-47";
3545
3562
  name: "UGC-NativeTikTok";
3546
- fontHashes: Record<string, string>;
3547
3563
  maxRenders: number;
3564
+ fontHashes: Record<string, string>;
3548
3565
  }, {
3549
3566
  profile: "tiktok-classic-ios-47";
3550
3567
  name: "UGC-NativeTikTok";
3551
- fontHashes: Record<string, string>;
3552
3568
  maxRenders: number;
3569
+ fontHashes: Record<string, string>;
3553
3570
  }>]>;
3554
3571
  candidates: z.ZodArray<z.ZodObject<{
3555
3572
  element: z.ZodObject<{
@@ -3562,9 +3579,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3562
3579
  zIndex: z.ZodNumber;
3563
3580
  textIsVariable: z.ZodLiteral<false>;
3564
3581
  text: z.ZodString;
3565
- font: z.ZodEnum<["arial", "tiktok", "apple"]>;
3582
+ fontFamily: z.ZodString;
3566
3583
  fontSize: z.ZodNumber;
3567
- fontWeight: z.ZodUnion<[z.ZodLiteral<400>, z.ZodLiteral<500>, z.ZodLiteral<600>, z.ZodLiteral<700>, z.ZodLiteral<800>, z.ZodLiteral<900>]>;
3584
+ fontWeight: z.ZodUnion<[z.ZodLiteral<100>, z.ZodLiteral<200>, z.ZodLiteral<300>, z.ZodLiteral<400>, z.ZodLiteral<500>, z.ZodLiteral<600>, z.ZodLiteral<700>, z.ZodLiteral<800>, z.ZodLiteral<900>]>;
3568
3585
  color: z.ZodString;
3569
3586
  strokeColor: z.ZodString;
3570
3587
  outlineWidth: z.ZodNumber;
@@ -3587,9 +3604,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3587
3604
  y: number;
3588
3605
  zIndex: number;
3589
3606
  textIsVariable: false;
3590
- font: "tiktok" | "arial" | "apple";
3607
+ fontFamily: string;
3591
3608
  fontSize: number;
3592
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
3609
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
3593
3610
  color: string;
3594
3611
  strokeColor: string;
3595
3612
  outlineWidth: number;
@@ -3612,9 +3629,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3612
3629
  y: number;
3613
3630
  zIndex: number;
3614
3631
  textIsVariable: false;
3615
- font: "tiktok" | "arial" | "apple";
3632
+ fontFamily: string;
3616
3633
  fontSize: number;
3617
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
3634
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
3618
3635
  color: string;
3619
3636
  strokeColor: string;
3620
3637
  outlineWidth: number;
@@ -3643,9 +3660,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3643
3660
  zIndex: z.ZodNumber;
3644
3661
  textIsVariable: z.ZodLiteral<false>;
3645
3662
  text: z.ZodString;
3646
- font: z.ZodEnum<["arial", "tiktok", "apple"]>;
3663
+ fontFamily: z.ZodString;
3647
3664
  fontSize: z.ZodNumber;
3648
- fontWeight: z.ZodUnion<[z.ZodLiteral<400>, z.ZodLiteral<500>, z.ZodLiteral<600>, z.ZodLiteral<700>, z.ZodLiteral<800>, z.ZodLiteral<900>]>;
3665
+ fontWeight: z.ZodUnion<[z.ZodLiteral<100>, z.ZodLiteral<200>, z.ZodLiteral<300>, z.ZodLiteral<400>, z.ZodLiteral<500>, z.ZodLiteral<600>, z.ZodLiteral<700>, z.ZodLiteral<800>, z.ZodLiteral<900>]>;
3649
3666
  color: z.ZodString;
3650
3667
  strokeColor: z.ZodString;
3651
3668
  outlineWidth: z.ZodNumber;
@@ -3668,9 +3685,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3668
3685
  y: number;
3669
3686
  zIndex: number;
3670
3687
  textIsVariable: false;
3671
- font: "tiktok" | "arial" | "apple";
3688
+ fontFamily: string;
3672
3689
  fontSize: number;
3673
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
3690
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
3674
3691
  color: string;
3675
3692
  strokeColor: string;
3676
3693
  outlineWidth: number;
@@ -3693,9 +3710,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3693
3710
  y: number;
3694
3711
  zIndex: number;
3695
3712
  textIsVariable: false;
3696
- font: "tiktok" | "arial" | "apple";
3713
+ fontFamily: string;
3697
3714
  fontSize: number;
3698
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
3715
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
3699
3716
  color: string;
3700
3717
  strokeColor: string;
3701
3718
  outlineWidth: number;
@@ -3724,9 +3741,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3724
3741
  y: number;
3725
3742
  zIndex: number;
3726
3743
  textIsVariable: false;
3727
- font: "tiktok" | "arial" | "apple";
3744
+ fontFamily: string;
3728
3745
  fontSize: number;
3729
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
3746
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
3730
3747
  color: string;
3731
3748
  strokeColor: string;
3732
3749
  outlineWidth: number;
@@ -3757,9 +3774,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3757
3774
  y: number;
3758
3775
  zIndex: number;
3759
3776
  textIsVariable: false;
3760
- font: "tiktok" | "arial" | "apple";
3777
+ fontFamily: string;
3761
3778
  fontSize: number;
3762
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
3779
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
3763
3780
  color: string;
3764
3781
  strokeColor: string;
3765
3782
  outlineWidth: number;
@@ -3779,8 +3796,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3779
3796
  backgroundColor: string;
3780
3797
  }>;
3781
3798
  maskIoU: z.ZodNumber;
3782
- foregroundMae: z.ZodNumber;
3783
- fontIdentity: z.ZodLiteral<"unverified">;
3799
+ outlineIoU: z.ZodNullable<z.ZodNumber>;
3800
+ foregroundMae: z.ZodNullable<z.ZodNumber>;
3801
+ fontIdentity: z.ZodEnum<["identified", "approximate"]>;
3784
3802
  quality: z.ZodEnum<["close", "approximate"]>;
3785
3803
  }, "strip", z.ZodTypeAny, {
3786
3804
  element: {
@@ -3793,9 +3811,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3793
3811
  y: number;
3794
3812
  zIndex: number;
3795
3813
  textIsVariable: false;
3796
- font: "tiktok" | "arial" | "apple";
3814
+ fontFamily: string;
3797
3815
  fontSize: number;
3798
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
3816
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
3799
3817
  color: string;
3800
3818
  strokeColor: string;
3801
3819
  outlineWidth: number;
@@ -3822,9 +3840,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3822
3840
  y: number;
3823
3841
  zIndex: number;
3824
3842
  textIsVariable: false;
3825
- font: "tiktok" | "arial" | "apple";
3843
+ fontFamily: string;
3826
3844
  fontSize: number;
3827
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
3845
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
3828
3846
  color: string;
3829
3847
  strokeColor: string;
3830
3848
  outlineWidth: number;
@@ -3844,9 +3862,10 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3844
3862
  backgroundColor: string;
3845
3863
  };
3846
3864
  maskIoU: number;
3847
- foregroundMae: number;
3848
- fontIdentity: "unverified";
3849
- quality: "close" | "approximate";
3865
+ outlineIoU: number | null;
3866
+ foregroundMae: number | null;
3867
+ fontIdentity: "identified" | "approximate";
3868
+ quality: "approximate" | "close";
3850
3869
  }, {
3851
3870
  element: {
3852
3871
  type: "text";
@@ -3858,9 +3877,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3858
3877
  y: number;
3859
3878
  zIndex: number;
3860
3879
  textIsVariable: false;
3861
- font: "tiktok" | "arial" | "apple";
3880
+ fontFamily: string;
3862
3881
  fontSize: number;
3863
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
3882
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
3864
3883
  color: string;
3865
3884
  strokeColor: string;
3866
3885
  outlineWidth: number;
@@ -3887,9 +3906,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3887
3906
  y: number;
3888
3907
  zIndex: number;
3889
3908
  textIsVariable: false;
3890
- font: "tiktok" | "arial" | "apple";
3909
+ fontFamily: string;
3891
3910
  fontSize: number;
3892
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
3911
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
3893
3912
  color: string;
3894
3913
  strokeColor: string;
3895
3914
  outlineWidth: number;
@@ -3909,10 +3928,68 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3909
3928
  backgroundColor: string;
3910
3929
  };
3911
3930
  maskIoU: number;
3912
- foregroundMae: number;
3913
- fontIdentity: "unverified";
3914
- quality: "close" | "approximate";
3931
+ outlineIoU: number | null;
3932
+ foregroundMae: number | null;
3933
+ fontIdentity: "identified" | "approximate";
3934
+ quality: "approximate" | "close";
3915
3935
  }>, "many">;
3936
+ fontIdentification: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3937
+ status: z.ZodEnum<["identified", "approximate"]>;
3938
+ family: z.ZodString;
3939
+ weight: z.ZodNumber;
3940
+ score: z.ZodNumber;
3941
+ margin: z.ZodNullable<z.ZodNumber>;
3942
+ topCandidates: z.ZodArray<z.ZodObject<{
3943
+ family: z.ZodString;
3944
+ weight: z.ZodNumber;
3945
+ score: z.ZodNumber;
3946
+ }, "strip", z.ZodTypeAny, {
3947
+ family: string;
3948
+ weight: number;
3949
+ score: number;
3950
+ }, {
3951
+ family: string;
3952
+ weight: number;
3953
+ score: number;
3954
+ }>, "many">;
3955
+ fontsScanned: z.ZodNumber;
3956
+ libraryFonts: z.ZodNumber;
3957
+ libraryRefreshedAt: z.ZodNumber;
3958
+ evidenceMode: z.ZodEnum<["outlined", "plain"]>;
3959
+ seconds: z.ZodNumber;
3960
+ }, "strip", z.ZodTypeAny, {
3961
+ status: "identified" | "approximate";
3962
+ family: string;
3963
+ weight: number;
3964
+ score: number;
3965
+ margin: number | null;
3966
+ topCandidates: {
3967
+ family: string;
3968
+ weight: number;
3969
+ score: number;
3970
+ }[];
3971
+ fontsScanned: number;
3972
+ libraryFonts: number;
3973
+ libraryRefreshedAt: number;
3974
+ evidenceMode: "outlined" | "plain";
3975
+ seconds: number;
3976
+ }, {
3977
+ status: "identified" | "approximate";
3978
+ family: string;
3979
+ weight: number;
3980
+ score: number;
3981
+ margin: number | null;
3982
+ topCandidates: {
3983
+ family: string;
3984
+ weight: number;
3985
+ score: number;
3986
+ }[];
3987
+ fontsScanned: number;
3988
+ libraryFonts: number;
3989
+ libraryRefreshedAt: number;
3990
+ evidenceMode: "outlined" | "plain";
3991
+ seconds: number;
3992
+ }>>>;
3916
3993
  nativeResult: z.ZodOptional<z.ZodObject<{
3917
3994
  profile: z.ZodLiteral<"tiktok-classic-ios-47">;
3918
3995
  settings: z.ZodObject<{
@@ -3988,6 +4065,7 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3988
4065
  foregroundMetric: z.ZodLiteral<"estimated-background-composite-MAE">;
3989
4066
  }, "strip", z.ZodTypeAny, {
3990
4067
  method: "local-white-fill-dark-outline";
4068
+ outlineIoU: number;
3991
4069
  textPixelCount: number;
3992
4070
  outlinePixelCount: number;
3993
4071
  backgroundExcluded: true;
@@ -3998,12 +4076,12 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
3998
4076
  comparison: "segmented-text-and-outline";
3999
4077
  resampling: "none" | "lanczos3";
4000
4078
  maskMetric: "white-fill-iou";
4001
- outlineIoU: number;
4002
4079
  emojiPixelCount: number;
4003
4080
  residualMetric: "segmented-text-outline-and-warm-emoji";
4004
4081
  foregroundMetric: "estimated-background-composite-MAE";
4005
4082
  }, {
4006
4083
  method: "local-white-fill-dark-outline";
4084
+ outlineIoU: number;
4007
4085
  textPixelCount: number;
4008
4086
  outlinePixelCount: number;
4009
4087
  backgroundExcluded: true;
@@ -4014,7 +4092,6 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4014
4092
  comparison: "segmented-text-and-outline";
4015
4093
  resampling: "none" | "lanczos3";
4016
4094
  maskMetric: "white-fill-iou";
4017
- outlineIoU: number;
4018
4095
  emojiPixelCount: number;
4019
4096
  residualMetric: "segmented-text-outline-and-warm-emoji";
4020
4097
  foregroundMetric: "estimated-background-composite-MAE";
@@ -4035,7 +4112,7 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4035
4112
  maskIoU: number;
4036
4113
  foregroundMae: number;
4037
4114
  fontIdentity: "unverified";
4038
- quality: "close" | "approximate";
4115
+ quality: "approximate" | "close";
4039
4116
  stickerUrl: string;
4040
4117
  composition: {
4041
4118
  width: number;
@@ -4046,6 +4123,7 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4046
4123
  };
4047
4124
  diagnostics: {
4048
4125
  method: "local-white-fill-dark-outline";
4126
+ outlineIoU: number;
4049
4127
  textPixelCount: number;
4050
4128
  outlinePixelCount: number;
4051
4129
  backgroundExcluded: true;
@@ -4056,7 +4134,6 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4056
4134
  comparison: "segmented-text-and-outline";
4057
4135
  resampling: "none" | "lanczos3";
4058
4136
  maskMetric: "white-fill-iou";
4059
- outlineIoU: number;
4060
4137
  emojiPixelCount: number;
4061
4138
  residualMetric: "segmented-text-outline-and-warm-emoji";
4062
4139
  foregroundMetric: "estimated-background-composite-MAE";
@@ -4077,7 +4154,7 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4077
4154
  maskIoU: number;
4078
4155
  foregroundMae: number;
4079
4156
  fontIdentity: "unverified";
4080
- quality: "close" | "approximate";
4157
+ quality: "approximate" | "close";
4081
4158
  stickerUrl: string;
4082
4159
  composition: {
4083
4160
  width: number;
@@ -4088,6 +4165,7 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4088
4165
  };
4089
4166
  diagnostics: {
4090
4167
  method: "local-white-fill-dark-outline";
4168
+ outlineIoU: number;
4091
4169
  textPixelCount: number;
4092
4170
  outlinePixelCount: number;
4093
4171
  backgroundExcluded: true;
@@ -4098,7 +4176,6 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4098
4176
  comparison: "segmented-text-and-outline";
4099
4177
  resampling: "none" | "lanczos3";
4100
4178
  maskMetric: "white-fill-iou";
4101
- outlineIoU: number;
4102
4179
  emojiPixelCount: number;
4103
4180
  residualMetric: "segmented-text-outline-and-warm-emoji";
4104
4181
  foregroundMetric: "estimated-background-composite-MAE";
@@ -4108,14 +4185,14 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4108
4185
  nextActions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4109
4186
  fitAttempted: z.ZodOptional<z.ZodBoolean>;
4110
4187
  renders: z.ZodNumber;
4111
- backgroundColor: z.ZodString;
4188
+ backgroundColor: z.ZodNullable<z.ZodString>;
4112
4189
  warnings: z.ZodArray<z.ZodString, "many">;
4113
4190
  previewUrl: z.ZodString;
4114
4191
  manifestUrl: z.ZodString;
4115
4192
  }, "strip", z.ZodTypeAny, {
4116
4193
  status: "unavailable" | "fitted";
4117
4194
  text: string | null;
4118
- version: 1 | 2;
4195
+ version: 2 | 3;
4119
4196
  operation: "match_text_style";
4120
4197
  source: {
4121
4198
  encodedWidth: number;
@@ -4144,16 +4221,19 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4144
4221
  renderer: {
4145
4222
  name: "UGC-ImageEditorComposition";
4146
4223
  ugcVersion: string;
4147
- fonts: string[];
4148
- fontHashes: Record<string, string>;
4224
+ fontLibrary: {
4225
+ source: "google-fonts";
4226
+ fonts: number;
4227
+ refreshedAt: number;
4228
+ } | null;
4149
4229
  maxRenders: number;
4150
4230
  } | {
4151
4231
  profile: "tiktok-classic-ios-47";
4152
4232
  name: "UGC-NativeTikTok";
4153
- fontHashes: Record<string, string>;
4154
4233
  maxRenders: number;
4234
+ fontHashes: Record<string, string>;
4155
4235
  };
4156
- backgroundColor: string;
4236
+ backgroundColor: string | null;
4157
4237
  candidates: {
4158
4238
  element: {
4159
4239
  type: "text";
@@ -4165,9 +4245,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4165
4245
  y: number;
4166
4246
  zIndex: number;
4167
4247
  textIsVariable: false;
4168
- font: "tiktok" | "arial" | "apple";
4248
+ fontFamily: string;
4169
4249
  fontSize: number;
4170
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
4250
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
4171
4251
  color: string;
4172
4252
  strokeColor: string;
4173
4253
  outlineWidth: number;
@@ -4194,9 +4274,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4194
4274
  y: number;
4195
4275
  zIndex: number;
4196
4276
  textIsVariable: false;
4197
- font: "tiktok" | "arial" | "apple";
4277
+ fontFamily: string;
4198
4278
  fontSize: number;
4199
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
4279
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
4200
4280
  color: string;
4201
4281
  strokeColor: string;
4202
4282
  outlineWidth: number;
@@ -4216,11 +4296,29 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4216
4296
  backgroundColor: string;
4217
4297
  };
4218
4298
  maskIoU: number;
4219
- foregroundMae: number;
4220
- fontIdentity: "unverified";
4221
- quality: "close" | "approximate";
4299
+ outlineIoU: number | null;
4300
+ foregroundMae: number | null;
4301
+ fontIdentity: "identified" | "approximate";
4302
+ quality: "approximate" | "close";
4222
4303
  }[];
4223
4304
  renders: number;
4305
+ fontIdentification?: {
4306
+ status: "identified" | "approximate";
4307
+ family: string;
4308
+ weight: number;
4309
+ score: number;
4310
+ margin: number | null;
4311
+ topCandidates: {
4312
+ family: string;
4313
+ weight: number;
4314
+ score: number;
4315
+ }[];
4316
+ fontsScanned: number;
4317
+ libraryFonts: number;
4318
+ libraryRefreshedAt: number;
4319
+ evidenceMode: "outlined" | "plain";
4320
+ seconds: number;
4321
+ } | null | undefined;
4224
4322
  nativeResult?: {
4225
4323
  profile: "tiktok-classic-ios-47";
4226
4324
  settings: {
@@ -4237,7 +4335,7 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4237
4335
  maskIoU: number;
4238
4336
  foregroundMae: number;
4239
4337
  fontIdentity: "unverified";
4240
- quality: "close" | "approximate";
4338
+ quality: "approximate" | "close";
4241
4339
  stickerUrl: string;
4242
4340
  composition: {
4243
4341
  width: number;
@@ -4248,6 +4346,7 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4248
4346
  };
4249
4347
  diagnostics: {
4250
4348
  method: "local-white-fill-dark-outline";
4349
+ outlineIoU: number;
4251
4350
  textPixelCount: number;
4252
4351
  outlinePixelCount: number;
4253
4352
  backgroundExcluded: true;
@@ -4258,7 +4357,6 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4258
4357
  comparison: "segmented-text-and-outline";
4259
4358
  resampling: "none" | "lanczos3";
4260
4359
  maskMetric: "white-fill-iou";
4261
- outlineIoU: number;
4262
4360
  emojiPixelCount: number;
4263
4361
  residualMetric: "segmented-text-outline-and-warm-emoji";
4264
4362
  foregroundMetric: "estimated-background-composite-MAE";
@@ -4270,7 +4368,7 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4270
4368
  }, {
4271
4369
  status: "unavailable" | "fitted";
4272
4370
  text: string | null;
4273
- version: 1 | 2;
4371
+ version: 2 | 3;
4274
4372
  operation: "match_text_style";
4275
4373
  source: {
4276
4374
  encodedWidth: number;
@@ -4299,16 +4397,19 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4299
4397
  renderer: {
4300
4398
  name: "UGC-ImageEditorComposition";
4301
4399
  ugcVersion: string;
4302
- fonts: string[];
4303
- fontHashes: Record<string, string>;
4400
+ fontLibrary: {
4401
+ source: "google-fonts";
4402
+ fonts: number;
4403
+ refreshedAt: number;
4404
+ } | null;
4304
4405
  maxRenders: number;
4305
4406
  } | {
4306
4407
  profile: "tiktok-classic-ios-47";
4307
4408
  name: "UGC-NativeTikTok";
4308
- fontHashes: Record<string, string>;
4309
4409
  maxRenders: number;
4410
+ fontHashes: Record<string, string>;
4310
4411
  };
4311
- backgroundColor: string;
4412
+ backgroundColor: string | null;
4312
4413
  candidates: {
4313
4414
  element: {
4314
4415
  type: "text";
@@ -4320,9 +4421,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4320
4421
  y: number;
4321
4422
  zIndex: number;
4322
4423
  textIsVariable: false;
4323
- font: "tiktok" | "arial" | "apple";
4424
+ fontFamily: string;
4324
4425
  fontSize: number;
4325
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
4426
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
4326
4427
  color: string;
4327
4428
  strokeColor: string;
4328
4429
  outlineWidth: number;
@@ -4349,9 +4450,9 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4349
4450
  y: number;
4350
4451
  zIndex: number;
4351
4452
  textIsVariable: false;
4352
- font: "tiktok" | "arial" | "apple";
4453
+ fontFamily: string;
4353
4454
  fontSize: number;
4354
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
4455
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
4355
4456
  color: string;
4356
4457
  strokeColor: string;
4357
4458
  outlineWidth: number;
@@ -4371,11 +4472,29 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4371
4472
  backgroundColor: string;
4372
4473
  };
4373
4474
  maskIoU: number;
4374
- foregroundMae: number;
4375
- fontIdentity: "unverified";
4376
- quality: "close" | "approximate";
4475
+ outlineIoU: number | null;
4476
+ foregroundMae: number | null;
4477
+ fontIdentity: "identified" | "approximate";
4478
+ quality: "approximate" | "close";
4377
4479
  }[];
4378
4480
  renders: number;
4481
+ fontIdentification?: {
4482
+ status: "identified" | "approximate";
4483
+ family: string;
4484
+ weight: number;
4485
+ score: number;
4486
+ margin: number | null;
4487
+ topCandidates: {
4488
+ family: string;
4489
+ weight: number;
4490
+ score: number;
4491
+ }[];
4492
+ fontsScanned: number;
4493
+ libraryFonts: number;
4494
+ libraryRefreshedAt: number;
4495
+ evidenceMode: "outlined" | "plain";
4496
+ seconds: number;
4497
+ } | null | undefined;
4379
4498
  nativeResult?: {
4380
4499
  profile: "tiktok-classic-ios-47";
4381
4500
  settings: {
@@ -4392,7 +4511,7 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4392
4511
  maskIoU: number;
4393
4512
  foregroundMae: number;
4394
4513
  fontIdentity: "unverified";
4395
- quality: "close" | "approximate";
4514
+ quality: "approximate" | "close";
4396
4515
  stickerUrl: string;
4397
4516
  composition: {
4398
4517
  width: number;
@@ -4403,6 +4522,7 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4403
4522
  };
4404
4523
  diagnostics: {
4405
4524
  method: "local-white-fill-dark-outline";
4525
+ outlineIoU: number;
4406
4526
  textPixelCount: number;
4407
4527
  outlinePixelCount: number;
4408
4528
  backgroundExcluded: true;
@@ -4413,7 +4533,6 @@ export declare const matchTextStyleResultSchema: z.ZodObject<{
4413
4533
  comparison: "segmented-text-and-outline";
4414
4534
  resampling: "none" | "lanczos3";
4415
4535
  maskMetric: "white-fill-iou";
4416
- outlineIoU: number;
4417
4536
  emojiPixelCount: number;
4418
4537
  residualMetric: "segmented-text-outline-and-warm-emoji";
4419
4538
  foregroundMetric: "estimated-background-composite-MAE";
@@ -7085,7 +7204,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7085
7204
  } | null;
7086
7205
  }[];
7087
7206
  }>, z.ZodObject<{
7088
- version: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>;
7207
+ version: z.ZodUnion<[z.ZodLiteral<2>, z.ZodLiteral<3>]>;
7089
7208
  operation: z.ZodLiteral<"match_text_style">;
7090
7209
  source: z.ZodObject<{
7091
7210
  encodedWidth: z.ZodNumber;
@@ -7145,20 +7264,37 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7145
7264
  renderer: z.ZodUnion<[z.ZodObject<{
7146
7265
  name: z.ZodLiteral<"UGC-ImageEditorComposition">;
7147
7266
  ugcVersion: z.ZodString;
7148
- fonts: z.ZodArray<z.ZodString, "many">;
7149
- fontHashes: z.ZodRecord<z.ZodString, z.ZodString>;
7267
+ fontLibrary: z.ZodNullable<z.ZodObject<{
7268
+ source: z.ZodLiteral<"google-fonts">;
7269
+ fonts: z.ZodNumber;
7270
+ refreshedAt: z.ZodNumber;
7271
+ }, "strip", z.ZodTypeAny, {
7272
+ source: "google-fonts";
7273
+ fonts: number;
7274
+ refreshedAt: number;
7275
+ }, {
7276
+ source: "google-fonts";
7277
+ fonts: number;
7278
+ refreshedAt: number;
7279
+ }>>;
7150
7280
  maxRenders: z.ZodNumber;
7151
7281
  }, "strip", z.ZodTypeAny, {
7152
7282
  name: "UGC-ImageEditorComposition";
7153
7283
  ugcVersion: string;
7154
- fonts: string[];
7155
- fontHashes: Record<string, string>;
7284
+ fontLibrary: {
7285
+ source: "google-fonts";
7286
+ fonts: number;
7287
+ refreshedAt: number;
7288
+ } | null;
7156
7289
  maxRenders: number;
7157
7290
  }, {
7158
7291
  name: "UGC-ImageEditorComposition";
7159
7292
  ugcVersion: string;
7160
- fonts: string[];
7161
- fontHashes: Record<string, string>;
7293
+ fontLibrary: {
7294
+ source: "google-fonts";
7295
+ fonts: number;
7296
+ refreshedAt: number;
7297
+ } | null;
7162
7298
  maxRenders: number;
7163
7299
  }>, z.ZodObject<{
7164
7300
  name: z.ZodLiteral<"UGC-NativeTikTok">;
@@ -7168,13 +7304,13 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7168
7304
  }, "strip", z.ZodTypeAny, {
7169
7305
  profile: "tiktok-classic-ios-47";
7170
7306
  name: "UGC-NativeTikTok";
7171
- fontHashes: Record<string, string>;
7172
7307
  maxRenders: number;
7308
+ fontHashes: Record<string, string>;
7173
7309
  }, {
7174
7310
  profile: "tiktok-classic-ios-47";
7175
7311
  name: "UGC-NativeTikTok";
7176
- fontHashes: Record<string, string>;
7177
7312
  maxRenders: number;
7313
+ fontHashes: Record<string, string>;
7178
7314
  }>]>;
7179
7315
  candidates: z.ZodArray<z.ZodObject<{
7180
7316
  element: z.ZodObject<{
@@ -7187,9 +7323,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7187
7323
  zIndex: z.ZodNumber;
7188
7324
  textIsVariable: z.ZodLiteral<false>;
7189
7325
  text: z.ZodString;
7190
- font: z.ZodEnum<["arial", "tiktok", "apple"]>;
7326
+ fontFamily: z.ZodString;
7191
7327
  fontSize: z.ZodNumber;
7192
- fontWeight: z.ZodUnion<[z.ZodLiteral<400>, z.ZodLiteral<500>, z.ZodLiteral<600>, z.ZodLiteral<700>, z.ZodLiteral<800>, z.ZodLiteral<900>]>;
7328
+ fontWeight: z.ZodUnion<[z.ZodLiteral<100>, z.ZodLiteral<200>, z.ZodLiteral<300>, z.ZodLiteral<400>, z.ZodLiteral<500>, z.ZodLiteral<600>, z.ZodLiteral<700>, z.ZodLiteral<800>, z.ZodLiteral<900>]>;
7193
7329
  color: z.ZodString;
7194
7330
  strokeColor: z.ZodString;
7195
7331
  outlineWidth: z.ZodNumber;
@@ -7212,9 +7348,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7212
7348
  y: number;
7213
7349
  zIndex: number;
7214
7350
  textIsVariable: false;
7215
- font: "tiktok" | "arial" | "apple";
7351
+ fontFamily: string;
7216
7352
  fontSize: number;
7217
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
7353
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7218
7354
  color: string;
7219
7355
  strokeColor: string;
7220
7356
  outlineWidth: number;
@@ -7237,9 +7373,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7237
7373
  y: number;
7238
7374
  zIndex: number;
7239
7375
  textIsVariable: false;
7240
- font: "tiktok" | "arial" | "apple";
7376
+ fontFamily: string;
7241
7377
  fontSize: number;
7242
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
7378
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7243
7379
  color: string;
7244
7380
  strokeColor: string;
7245
7381
  outlineWidth: number;
@@ -7268,9 +7404,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7268
7404
  zIndex: z.ZodNumber;
7269
7405
  textIsVariable: z.ZodLiteral<false>;
7270
7406
  text: z.ZodString;
7271
- font: z.ZodEnum<["arial", "tiktok", "apple"]>;
7407
+ fontFamily: z.ZodString;
7272
7408
  fontSize: z.ZodNumber;
7273
- fontWeight: z.ZodUnion<[z.ZodLiteral<400>, z.ZodLiteral<500>, z.ZodLiteral<600>, z.ZodLiteral<700>, z.ZodLiteral<800>, z.ZodLiteral<900>]>;
7409
+ fontWeight: z.ZodUnion<[z.ZodLiteral<100>, z.ZodLiteral<200>, z.ZodLiteral<300>, z.ZodLiteral<400>, z.ZodLiteral<500>, z.ZodLiteral<600>, z.ZodLiteral<700>, z.ZodLiteral<800>, z.ZodLiteral<900>]>;
7274
7410
  color: z.ZodString;
7275
7411
  strokeColor: z.ZodString;
7276
7412
  outlineWidth: z.ZodNumber;
@@ -7293,9 +7429,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7293
7429
  y: number;
7294
7430
  zIndex: number;
7295
7431
  textIsVariable: false;
7296
- font: "tiktok" | "arial" | "apple";
7432
+ fontFamily: string;
7297
7433
  fontSize: number;
7298
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
7434
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7299
7435
  color: string;
7300
7436
  strokeColor: string;
7301
7437
  outlineWidth: number;
@@ -7318,9 +7454,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7318
7454
  y: number;
7319
7455
  zIndex: number;
7320
7456
  textIsVariable: false;
7321
- font: "tiktok" | "arial" | "apple";
7457
+ fontFamily: string;
7322
7458
  fontSize: number;
7323
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
7459
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7324
7460
  color: string;
7325
7461
  strokeColor: string;
7326
7462
  outlineWidth: number;
@@ -7349,9 +7485,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7349
7485
  y: number;
7350
7486
  zIndex: number;
7351
7487
  textIsVariable: false;
7352
- font: "tiktok" | "arial" | "apple";
7488
+ fontFamily: string;
7353
7489
  fontSize: number;
7354
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
7490
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7355
7491
  color: string;
7356
7492
  strokeColor: string;
7357
7493
  outlineWidth: number;
@@ -7382,9 +7518,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7382
7518
  y: number;
7383
7519
  zIndex: number;
7384
7520
  textIsVariable: false;
7385
- font: "tiktok" | "arial" | "apple";
7521
+ fontFamily: string;
7386
7522
  fontSize: number;
7387
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
7523
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7388
7524
  color: string;
7389
7525
  strokeColor: string;
7390
7526
  outlineWidth: number;
@@ -7404,8 +7540,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7404
7540
  backgroundColor: string;
7405
7541
  }>;
7406
7542
  maskIoU: z.ZodNumber;
7407
- foregroundMae: z.ZodNumber;
7408
- fontIdentity: z.ZodLiteral<"unverified">;
7543
+ outlineIoU: z.ZodNullable<z.ZodNumber>;
7544
+ foregroundMae: z.ZodNullable<z.ZodNumber>;
7545
+ fontIdentity: z.ZodEnum<["identified", "approximate"]>;
7409
7546
  quality: z.ZodEnum<["close", "approximate"]>;
7410
7547
  }, "strip", z.ZodTypeAny, {
7411
7548
  element: {
@@ -7418,9 +7555,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7418
7555
  y: number;
7419
7556
  zIndex: number;
7420
7557
  textIsVariable: false;
7421
- font: "tiktok" | "arial" | "apple";
7558
+ fontFamily: string;
7422
7559
  fontSize: number;
7423
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
7560
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7424
7561
  color: string;
7425
7562
  strokeColor: string;
7426
7563
  outlineWidth: number;
@@ -7447,9 +7584,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7447
7584
  y: number;
7448
7585
  zIndex: number;
7449
7586
  textIsVariable: false;
7450
- font: "tiktok" | "arial" | "apple";
7587
+ fontFamily: string;
7451
7588
  fontSize: number;
7452
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
7589
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7453
7590
  color: string;
7454
7591
  strokeColor: string;
7455
7592
  outlineWidth: number;
@@ -7469,9 +7606,10 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7469
7606
  backgroundColor: string;
7470
7607
  };
7471
7608
  maskIoU: number;
7472
- foregroundMae: number;
7473
- fontIdentity: "unverified";
7474
- quality: "close" | "approximate";
7609
+ outlineIoU: number | null;
7610
+ foregroundMae: number | null;
7611
+ fontIdentity: "identified" | "approximate";
7612
+ quality: "approximate" | "close";
7475
7613
  }, {
7476
7614
  element: {
7477
7615
  type: "text";
@@ -7483,9 +7621,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7483
7621
  y: number;
7484
7622
  zIndex: number;
7485
7623
  textIsVariable: false;
7486
- font: "tiktok" | "arial" | "apple";
7624
+ fontFamily: string;
7487
7625
  fontSize: number;
7488
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
7626
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7489
7627
  color: string;
7490
7628
  strokeColor: string;
7491
7629
  outlineWidth: number;
@@ -7512,9 +7650,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7512
7650
  y: number;
7513
7651
  zIndex: number;
7514
7652
  textIsVariable: false;
7515
- font: "tiktok" | "arial" | "apple";
7653
+ fontFamily: string;
7516
7654
  fontSize: number;
7517
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
7655
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7518
7656
  color: string;
7519
7657
  strokeColor: string;
7520
7658
  outlineWidth: number;
@@ -7534,10 +7672,68 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7534
7672
  backgroundColor: string;
7535
7673
  };
7536
7674
  maskIoU: number;
7537
- foregroundMae: number;
7538
- fontIdentity: "unverified";
7539
- quality: "close" | "approximate";
7675
+ outlineIoU: number | null;
7676
+ foregroundMae: number | null;
7677
+ fontIdentity: "identified" | "approximate";
7678
+ quality: "approximate" | "close";
7540
7679
  }>, "many">;
7680
+ fontIdentification: z.ZodOptional<z.ZodNullable<z.ZodObject<{
7681
+ status: z.ZodEnum<["identified", "approximate"]>;
7682
+ family: z.ZodString;
7683
+ weight: z.ZodNumber;
7684
+ score: z.ZodNumber;
7685
+ margin: z.ZodNullable<z.ZodNumber>;
7686
+ topCandidates: z.ZodArray<z.ZodObject<{
7687
+ family: z.ZodString;
7688
+ weight: z.ZodNumber;
7689
+ score: z.ZodNumber;
7690
+ }, "strip", z.ZodTypeAny, {
7691
+ family: string;
7692
+ weight: number;
7693
+ score: number;
7694
+ }, {
7695
+ family: string;
7696
+ weight: number;
7697
+ score: number;
7698
+ }>, "many">;
7699
+ fontsScanned: z.ZodNumber;
7700
+ libraryFonts: z.ZodNumber;
7701
+ libraryRefreshedAt: z.ZodNumber;
7702
+ evidenceMode: z.ZodEnum<["outlined", "plain"]>;
7703
+ seconds: z.ZodNumber;
7704
+ }, "strip", z.ZodTypeAny, {
7705
+ status: "identified" | "approximate";
7706
+ family: string;
7707
+ weight: number;
7708
+ score: number;
7709
+ margin: number | null;
7710
+ topCandidates: {
7711
+ family: string;
7712
+ weight: number;
7713
+ score: number;
7714
+ }[];
7715
+ fontsScanned: number;
7716
+ libraryFonts: number;
7717
+ libraryRefreshedAt: number;
7718
+ evidenceMode: "outlined" | "plain";
7719
+ seconds: number;
7720
+ }, {
7721
+ status: "identified" | "approximate";
7722
+ family: string;
7723
+ weight: number;
7724
+ score: number;
7725
+ margin: number | null;
7726
+ topCandidates: {
7727
+ family: string;
7728
+ weight: number;
7729
+ score: number;
7730
+ }[];
7731
+ fontsScanned: number;
7732
+ libraryFonts: number;
7733
+ libraryRefreshedAt: number;
7734
+ evidenceMode: "outlined" | "plain";
7735
+ seconds: number;
7736
+ }>>>;
7541
7737
  nativeResult: z.ZodOptional<z.ZodObject<{
7542
7738
  profile: z.ZodLiteral<"tiktok-classic-ios-47">;
7543
7739
  settings: z.ZodObject<{
@@ -7613,6 +7809,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7613
7809
  foregroundMetric: z.ZodLiteral<"estimated-background-composite-MAE">;
7614
7810
  }, "strip", z.ZodTypeAny, {
7615
7811
  method: "local-white-fill-dark-outline";
7812
+ outlineIoU: number;
7616
7813
  textPixelCount: number;
7617
7814
  outlinePixelCount: number;
7618
7815
  backgroundExcluded: true;
@@ -7623,12 +7820,12 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7623
7820
  comparison: "segmented-text-and-outline";
7624
7821
  resampling: "none" | "lanczos3";
7625
7822
  maskMetric: "white-fill-iou";
7626
- outlineIoU: number;
7627
7823
  emojiPixelCount: number;
7628
7824
  residualMetric: "segmented-text-outline-and-warm-emoji";
7629
7825
  foregroundMetric: "estimated-background-composite-MAE";
7630
7826
  }, {
7631
7827
  method: "local-white-fill-dark-outline";
7828
+ outlineIoU: number;
7632
7829
  textPixelCount: number;
7633
7830
  outlinePixelCount: number;
7634
7831
  backgroundExcluded: true;
@@ -7639,7 +7836,6 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7639
7836
  comparison: "segmented-text-and-outline";
7640
7837
  resampling: "none" | "lanczos3";
7641
7838
  maskMetric: "white-fill-iou";
7642
- outlineIoU: number;
7643
7839
  emojiPixelCount: number;
7644
7840
  residualMetric: "segmented-text-outline-and-warm-emoji";
7645
7841
  foregroundMetric: "estimated-background-composite-MAE";
@@ -7660,7 +7856,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7660
7856
  maskIoU: number;
7661
7857
  foregroundMae: number;
7662
7858
  fontIdentity: "unverified";
7663
- quality: "close" | "approximate";
7859
+ quality: "approximate" | "close";
7664
7860
  stickerUrl: string;
7665
7861
  composition: {
7666
7862
  width: number;
@@ -7671,6 +7867,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7671
7867
  };
7672
7868
  diagnostics: {
7673
7869
  method: "local-white-fill-dark-outline";
7870
+ outlineIoU: number;
7674
7871
  textPixelCount: number;
7675
7872
  outlinePixelCount: number;
7676
7873
  backgroundExcluded: true;
@@ -7681,7 +7878,6 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7681
7878
  comparison: "segmented-text-and-outline";
7682
7879
  resampling: "none" | "lanczos3";
7683
7880
  maskMetric: "white-fill-iou";
7684
- outlineIoU: number;
7685
7881
  emojiPixelCount: number;
7686
7882
  residualMetric: "segmented-text-outline-and-warm-emoji";
7687
7883
  foregroundMetric: "estimated-background-composite-MAE";
@@ -7702,7 +7898,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7702
7898
  maskIoU: number;
7703
7899
  foregroundMae: number;
7704
7900
  fontIdentity: "unverified";
7705
- quality: "close" | "approximate";
7901
+ quality: "approximate" | "close";
7706
7902
  stickerUrl: string;
7707
7903
  composition: {
7708
7904
  width: number;
@@ -7713,6 +7909,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7713
7909
  };
7714
7910
  diagnostics: {
7715
7911
  method: "local-white-fill-dark-outline";
7912
+ outlineIoU: number;
7716
7913
  textPixelCount: number;
7717
7914
  outlinePixelCount: number;
7718
7915
  backgroundExcluded: true;
@@ -7723,7 +7920,6 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7723
7920
  comparison: "segmented-text-and-outline";
7724
7921
  resampling: "none" | "lanczos3";
7725
7922
  maskMetric: "white-fill-iou";
7726
- outlineIoU: number;
7727
7923
  emojiPixelCount: number;
7728
7924
  residualMetric: "segmented-text-outline-and-warm-emoji";
7729
7925
  foregroundMetric: "estimated-background-composite-MAE";
@@ -7733,14 +7929,14 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7733
7929
  nextActions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7734
7930
  fitAttempted: z.ZodOptional<z.ZodBoolean>;
7735
7931
  renders: z.ZodNumber;
7736
- backgroundColor: z.ZodString;
7932
+ backgroundColor: z.ZodNullable<z.ZodString>;
7737
7933
  warnings: z.ZodArray<z.ZodString, "many">;
7738
7934
  previewUrl: z.ZodString;
7739
7935
  manifestUrl: z.ZodString;
7740
7936
  }, "strip", z.ZodTypeAny, {
7741
7937
  status: "unavailable" | "fitted";
7742
7938
  text: string | null;
7743
- version: 1 | 2;
7939
+ version: 2 | 3;
7744
7940
  operation: "match_text_style";
7745
7941
  source: {
7746
7942
  encodedWidth: number;
@@ -7769,16 +7965,19 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7769
7965
  renderer: {
7770
7966
  name: "UGC-ImageEditorComposition";
7771
7967
  ugcVersion: string;
7772
- fonts: string[];
7773
- fontHashes: Record<string, string>;
7968
+ fontLibrary: {
7969
+ source: "google-fonts";
7970
+ fonts: number;
7971
+ refreshedAt: number;
7972
+ } | null;
7774
7973
  maxRenders: number;
7775
7974
  } | {
7776
7975
  profile: "tiktok-classic-ios-47";
7777
7976
  name: "UGC-NativeTikTok";
7778
- fontHashes: Record<string, string>;
7779
7977
  maxRenders: number;
7978
+ fontHashes: Record<string, string>;
7780
7979
  };
7781
- backgroundColor: string;
7980
+ backgroundColor: string | null;
7782
7981
  candidates: {
7783
7982
  element: {
7784
7983
  type: "text";
@@ -7790,9 +7989,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7790
7989
  y: number;
7791
7990
  zIndex: number;
7792
7991
  textIsVariable: false;
7793
- font: "tiktok" | "arial" | "apple";
7992
+ fontFamily: string;
7794
7993
  fontSize: number;
7795
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
7994
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7796
7995
  color: string;
7797
7996
  strokeColor: string;
7798
7997
  outlineWidth: number;
@@ -7819,9 +8018,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7819
8018
  y: number;
7820
8019
  zIndex: number;
7821
8020
  textIsVariable: false;
7822
- font: "tiktok" | "arial" | "apple";
8021
+ fontFamily: string;
7823
8022
  fontSize: number;
7824
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
8023
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7825
8024
  color: string;
7826
8025
  strokeColor: string;
7827
8026
  outlineWidth: number;
@@ -7841,11 +8040,29 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7841
8040
  backgroundColor: string;
7842
8041
  };
7843
8042
  maskIoU: number;
7844
- foregroundMae: number;
7845
- fontIdentity: "unverified";
7846
- quality: "close" | "approximate";
8043
+ outlineIoU: number | null;
8044
+ foregroundMae: number | null;
8045
+ fontIdentity: "identified" | "approximate";
8046
+ quality: "approximate" | "close";
7847
8047
  }[];
7848
8048
  renders: number;
8049
+ fontIdentification?: {
8050
+ status: "identified" | "approximate";
8051
+ family: string;
8052
+ weight: number;
8053
+ score: number;
8054
+ margin: number | null;
8055
+ topCandidates: {
8056
+ family: string;
8057
+ weight: number;
8058
+ score: number;
8059
+ }[];
8060
+ fontsScanned: number;
8061
+ libraryFonts: number;
8062
+ libraryRefreshedAt: number;
8063
+ evidenceMode: "outlined" | "plain";
8064
+ seconds: number;
8065
+ } | null | undefined;
7849
8066
  nativeResult?: {
7850
8067
  profile: "tiktok-classic-ios-47";
7851
8068
  settings: {
@@ -7862,7 +8079,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7862
8079
  maskIoU: number;
7863
8080
  foregroundMae: number;
7864
8081
  fontIdentity: "unverified";
7865
- quality: "close" | "approximate";
8082
+ quality: "approximate" | "close";
7866
8083
  stickerUrl: string;
7867
8084
  composition: {
7868
8085
  width: number;
@@ -7873,6 +8090,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7873
8090
  };
7874
8091
  diagnostics: {
7875
8092
  method: "local-white-fill-dark-outline";
8093
+ outlineIoU: number;
7876
8094
  textPixelCount: number;
7877
8095
  outlinePixelCount: number;
7878
8096
  backgroundExcluded: true;
@@ -7883,7 +8101,6 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7883
8101
  comparison: "segmented-text-and-outline";
7884
8102
  resampling: "none" | "lanczos3";
7885
8103
  maskMetric: "white-fill-iou";
7886
- outlineIoU: number;
7887
8104
  emojiPixelCount: number;
7888
8105
  residualMetric: "segmented-text-outline-and-warm-emoji";
7889
8106
  foregroundMetric: "estimated-background-composite-MAE";
@@ -7895,7 +8112,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7895
8112
  }, {
7896
8113
  status: "unavailable" | "fitted";
7897
8114
  text: string | null;
7898
- version: 1 | 2;
8115
+ version: 2 | 3;
7899
8116
  operation: "match_text_style";
7900
8117
  source: {
7901
8118
  encodedWidth: number;
@@ -7924,16 +8141,19 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7924
8141
  renderer: {
7925
8142
  name: "UGC-ImageEditorComposition";
7926
8143
  ugcVersion: string;
7927
- fonts: string[];
7928
- fontHashes: Record<string, string>;
8144
+ fontLibrary: {
8145
+ source: "google-fonts";
8146
+ fonts: number;
8147
+ refreshedAt: number;
8148
+ } | null;
7929
8149
  maxRenders: number;
7930
8150
  } | {
7931
8151
  profile: "tiktok-classic-ios-47";
7932
8152
  name: "UGC-NativeTikTok";
7933
- fontHashes: Record<string, string>;
7934
8153
  maxRenders: number;
8154
+ fontHashes: Record<string, string>;
7935
8155
  };
7936
- backgroundColor: string;
8156
+ backgroundColor: string | null;
7937
8157
  candidates: {
7938
8158
  element: {
7939
8159
  type: "text";
@@ -7945,9 +8165,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7945
8165
  y: number;
7946
8166
  zIndex: number;
7947
8167
  textIsVariable: false;
7948
- font: "tiktok" | "arial" | "apple";
8168
+ fontFamily: string;
7949
8169
  fontSize: number;
7950
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
8170
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7951
8171
  color: string;
7952
8172
  strokeColor: string;
7953
8173
  outlineWidth: number;
@@ -7974,9 +8194,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7974
8194
  y: number;
7975
8195
  zIndex: number;
7976
8196
  textIsVariable: false;
7977
- font: "tiktok" | "arial" | "apple";
8197
+ fontFamily: string;
7978
8198
  fontSize: number;
7979
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
8199
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
7980
8200
  color: string;
7981
8201
  strokeColor: string;
7982
8202
  outlineWidth: number;
@@ -7996,11 +8216,29 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
7996
8216
  backgroundColor: string;
7997
8217
  };
7998
8218
  maskIoU: number;
7999
- foregroundMae: number;
8000
- fontIdentity: "unverified";
8001
- quality: "close" | "approximate";
8219
+ outlineIoU: number | null;
8220
+ foregroundMae: number | null;
8221
+ fontIdentity: "identified" | "approximate";
8222
+ quality: "approximate" | "close";
8002
8223
  }[];
8003
8224
  renders: number;
8225
+ fontIdentification?: {
8226
+ status: "identified" | "approximate";
8227
+ family: string;
8228
+ weight: number;
8229
+ score: number;
8230
+ margin: number | null;
8231
+ topCandidates: {
8232
+ family: string;
8233
+ weight: number;
8234
+ score: number;
8235
+ }[];
8236
+ fontsScanned: number;
8237
+ libraryFonts: number;
8238
+ libraryRefreshedAt: number;
8239
+ evidenceMode: "outlined" | "plain";
8240
+ seconds: number;
8241
+ } | null | undefined;
8004
8242
  nativeResult?: {
8005
8243
  profile: "tiktok-classic-ios-47";
8006
8244
  settings: {
@@ -8017,7 +8255,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
8017
8255
  maskIoU: number;
8018
8256
  foregroundMae: number;
8019
8257
  fontIdentity: "unverified";
8020
- quality: "close" | "approximate";
8258
+ quality: "approximate" | "close";
8021
8259
  stickerUrl: string;
8022
8260
  composition: {
8023
8261
  width: number;
@@ -8028,6 +8266,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
8028
8266
  };
8029
8267
  diagnostics: {
8030
8268
  method: "local-white-fill-dark-outline";
8269
+ outlineIoU: number;
8031
8270
  textPixelCount: number;
8032
8271
  outlinePixelCount: number;
8033
8272
  backgroundExcluded: true;
@@ -8038,7 +8277,6 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
8038
8277
  comparison: "segmented-text-and-outline";
8039
8278
  resampling: "none" | "lanczos3";
8040
8279
  maskMetric: "white-fill-iou";
8041
- outlineIoU: number;
8042
8280
  emojiPixelCount: number;
8043
8281
  residualMetric: "segmented-text-outline-and-warm-emoji";
8044
8282
  foregroundMetric: "estimated-background-composite-MAE";
@@ -8555,7 +8793,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
8555
8793
  } | {
8556
8794
  status: "unavailable" | "fitted";
8557
8795
  text: string | null;
8558
- version: 1 | 2;
8796
+ version: 2 | 3;
8559
8797
  operation: "match_text_style";
8560
8798
  source: {
8561
8799
  encodedWidth: number;
@@ -8584,16 +8822,19 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
8584
8822
  renderer: {
8585
8823
  name: "UGC-ImageEditorComposition";
8586
8824
  ugcVersion: string;
8587
- fonts: string[];
8588
- fontHashes: Record<string, string>;
8825
+ fontLibrary: {
8826
+ source: "google-fonts";
8827
+ fonts: number;
8828
+ refreshedAt: number;
8829
+ } | null;
8589
8830
  maxRenders: number;
8590
8831
  } | {
8591
8832
  profile: "tiktok-classic-ios-47";
8592
8833
  name: "UGC-NativeTikTok";
8593
- fontHashes: Record<string, string>;
8594
8834
  maxRenders: number;
8835
+ fontHashes: Record<string, string>;
8595
8836
  };
8596
- backgroundColor: string;
8837
+ backgroundColor: string | null;
8597
8838
  candidates: {
8598
8839
  element: {
8599
8840
  type: "text";
@@ -8605,9 +8846,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
8605
8846
  y: number;
8606
8847
  zIndex: number;
8607
8848
  textIsVariable: false;
8608
- font: "tiktok" | "arial" | "apple";
8849
+ fontFamily: string;
8609
8850
  fontSize: number;
8610
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
8851
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
8611
8852
  color: string;
8612
8853
  strokeColor: string;
8613
8854
  outlineWidth: number;
@@ -8634,9 +8875,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
8634
8875
  y: number;
8635
8876
  zIndex: number;
8636
8877
  textIsVariable: false;
8637
- font: "tiktok" | "arial" | "apple";
8878
+ fontFamily: string;
8638
8879
  fontSize: number;
8639
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
8880
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
8640
8881
  color: string;
8641
8882
  strokeColor: string;
8642
8883
  outlineWidth: number;
@@ -8656,11 +8897,29 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
8656
8897
  backgroundColor: string;
8657
8898
  };
8658
8899
  maskIoU: number;
8659
- foregroundMae: number;
8660
- fontIdentity: "unverified";
8661
- quality: "close" | "approximate";
8900
+ outlineIoU: number | null;
8901
+ foregroundMae: number | null;
8902
+ fontIdentity: "identified" | "approximate";
8903
+ quality: "approximate" | "close";
8662
8904
  }[];
8663
8905
  renders: number;
8906
+ fontIdentification?: {
8907
+ status: "identified" | "approximate";
8908
+ family: string;
8909
+ weight: number;
8910
+ score: number;
8911
+ margin: number | null;
8912
+ topCandidates: {
8913
+ family: string;
8914
+ weight: number;
8915
+ score: number;
8916
+ }[];
8917
+ fontsScanned: number;
8918
+ libraryFonts: number;
8919
+ libraryRefreshedAt: number;
8920
+ evidenceMode: "outlined" | "plain";
8921
+ seconds: number;
8922
+ } | null | undefined;
8664
8923
  nativeResult?: {
8665
8924
  profile: "tiktok-classic-ios-47";
8666
8925
  settings: {
@@ -8677,7 +8936,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
8677
8936
  maskIoU: number;
8678
8937
  foregroundMae: number;
8679
8938
  fontIdentity: "unverified";
8680
- quality: "close" | "approximate";
8939
+ quality: "approximate" | "close";
8681
8940
  stickerUrl: string;
8682
8941
  composition: {
8683
8942
  width: number;
@@ -8688,6 +8947,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
8688
8947
  };
8689
8948
  diagnostics: {
8690
8949
  method: "local-white-fill-dark-outline";
8950
+ outlineIoU: number;
8691
8951
  textPixelCount: number;
8692
8952
  outlinePixelCount: number;
8693
8953
  backgroundExcluded: true;
@@ -8698,7 +8958,6 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
8698
8958
  comparison: "segmented-text-and-outline";
8699
8959
  resampling: "none" | "lanczos3";
8700
8960
  maskMetric: "white-fill-iou";
8701
- outlineIoU: number;
8702
8961
  emojiPixelCount: number;
8703
8962
  residualMetric: "segmented-text-outline-and-warm-emoji";
8704
8963
  foregroundMetric: "estimated-background-composite-MAE";
@@ -9215,7 +9474,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
9215
9474
  } | {
9216
9475
  status: "unavailable" | "fitted";
9217
9476
  text: string | null;
9218
- version: 1 | 2;
9477
+ version: 2 | 3;
9219
9478
  operation: "match_text_style";
9220
9479
  source: {
9221
9480
  encodedWidth: number;
@@ -9244,16 +9503,19 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
9244
9503
  renderer: {
9245
9504
  name: "UGC-ImageEditorComposition";
9246
9505
  ugcVersion: string;
9247
- fonts: string[];
9248
- fontHashes: Record<string, string>;
9506
+ fontLibrary: {
9507
+ source: "google-fonts";
9508
+ fonts: number;
9509
+ refreshedAt: number;
9510
+ } | null;
9249
9511
  maxRenders: number;
9250
9512
  } | {
9251
9513
  profile: "tiktok-classic-ios-47";
9252
9514
  name: "UGC-NativeTikTok";
9253
- fontHashes: Record<string, string>;
9254
9515
  maxRenders: number;
9516
+ fontHashes: Record<string, string>;
9255
9517
  };
9256
- backgroundColor: string;
9518
+ backgroundColor: string | null;
9257
9519
  candidates: {
9258
9520
  element: {
9259
9521
  type: "text";
@@ -9265,9 +9527,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
9265
9527
  y: number;
9266
9528
  zIndex: number;
9267
9529
  textIsVariable: false;
9268
- font: "tiktok" | "arial" | "apple";
9530
+ fontFamily: string;
9269
9531
  fontSize: number;
9270
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
9532
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
9271
9533
  color: string;
9272
9534
  strokeColor: string;
9273
9535
  outlineWidth: number;
@@ -9294,9 +9556,9 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
9294
9556
  y: number;
9295
9557
  zIndex: number;
9296
9558
  textIsVariable: false;
9297
- font: "tiktok" | "arial" | "apple";
9559
+ fontFamily: string;
9298
9560
  fontSize: number;
9299
- fontWeight: 700 | 400 | 500 | 600 | 800 | 900;
9561
+ fontWeight: 100 | 700 | 400 | 500 | 600 | 300 | 200 | 800 | 900;
9300
9562
  color: string;
9301
9563
  strokeColor: string;
9302
9564
  outlineWidth: number;
@@ -9316,11 +9578,29 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
9316
9578
  backgroundColor: string;
9317
9579
  };
9318
9580
  maskIoU: number;
9319
- foregroundMae: number;
9320
- fontIdentity: "unverified";
9321
- quality: "close" | "approximate";
9581
+ outlineIoU: number | null;
9582
+ foregroundMae: number | null;
9583
+ fontIdentity: "identified" | "approximate";
9584
+ quality: "approximate" | "close";
9322
9585
  }[];
9323
9586
  renders: number;
9587
+ fontIdentification?: {
9588
+ status: "identified" | "approximate";
9589
+ family: string;
9590
+ weight: number;
9591
+ score: number;
9592
+ margin: number | null;
9593
+ topCandidates: {
9594
+ family: string;
9595
+ weight: number;
9596
+ score: number;
9597
+ }[];
9598
+ fontsScanned: number;
9599
+ libraryFonts: number;
9600
+ libraryRefreshedAt: number;
9601
+ evidenceMode: "outlined" | "plain";
9602
+ seconds: number;
9603
+ } | null | undefined;
9324
9604
  nativeResult?: {
9325
9605
  profile: "tiktok-classic-ios-47";
9326
9606
  settings: {
@@ -9337,7 +9617,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
9337
9617
  maskIoU: number;
9338
9618
  foregroundMae: number;
9339
9619
  fontIdentity: "unverified";
9340
- quality: "close" | "approximate";
9620
+ quality: "approximate" | "close";
9341
9621
  stickerUrl: string;
9342
9622
  composition: {
9343
9623
  width: number;
@@ -9348,6 +9628,7 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
9348
9628
  };
9349
9629
  diagnostics: {
9350
9630
  method: "local-white-fill-dark-outline";
9631
+ outlineIoU: number;
9351
9632
  textPixelCount: number;
9352
9633
  outlinePixelCount: number;
9353
9634
  backgroundExcluded: true;
@@ -9358,7 +9639,6 @@ export declare const mediaAnalysisResultSchema: z.ZodEffects<z.ZodDiscriminatedU
9358
9639
  comparison: "segmented-text-and-outline";
9359
9640
  resampling: "none" | "lanczos3";
9360
9641
  maskMetric: "white-fill-iou";
9361
- outlineIoU: number;
9362
9642
  emojiPixelCount: number;
9363
9643
  residualMetric: "segmented-text-outline-and-warm-emoji";
9364
9644
  foregroundMetric: "estimated-background-composite-MAE";