@protontech/autofill 0.0.35059265 → 0.0.36026908

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 (68) hide show
  1. package/features/feature.d.ts +13 -2
  2. package/features/feature.js +37 -15
  3. package/features/v1/abstract.field.d.ts +8406 -435
  4. package/features/v1/abstract.field.js +24 -24
  5. package/features/v1/abstract.form.d.ts +3428 -14
  6. package/features/v1/abstract.form.js +197 -197
  7. package/features/v1/field-predicates.d.ts +8 -0
  8. package/features/v1/field-predicates.js +42 -0
  9. package/features/v1/field.email.d.ts +3445 -24
  10. package/features/v1/field.email.js +7 -7
  11. package/features/v1/field.otp.d.ts +71234 -56
  12. package/features/v1/field.otp.js +42 -42
  13. package/features/v1/field.password.d.ts +99230 -64
  14. package/features/v1/field.password.js +42 -42
  15. package/features/v1/field.username-hidden.d.ts +932 -24
  16. package/features/v1/field.username-hidden.js +7 -7
  17. package/features/v1/field.username.d.ts +42410 -28
  18. package/features/v1/field.username.js +11 -11
  19. package/features/v1/fields.sorted.gen.d.ts +1441 -0
  20. package/features/v1/fields.sorted.gen.js +344 -0
  21. package/features/v1/forms.sorted.gen.d.ts +734 -0
  22. package/features/v1/forms.sorted.gen.js +334 -0
  23. package/features/v1/index.d.ts +5305 -12
  24. package/features/v1/index.js +7 -11
  25. package/models/perceptron/params/email-model.json +4 -4
  26. package/models/perceptron/params/login-model.json +97 -97
  27. package/models/perceptron/params/new-password-model.json +16 -16
  28. package/models/perceptron/params/otp-model.json +29 -29
  29. package/models/perceptron/params/password-change-model.json +69 -69
  30. package/models/perceptron/params/password-model.json +18 -18
  31. package/models/perceptron/params/recovery-model.json +92 -92
  32. package/models/perceptron/params/register-model.json +90 -90
  33. package/models/perceptron/params/username-hidden-model.json +7 -7
  34. package/models/perceptron/params/username-model.json +3 -3
  35. package/models/random_forest/params/otp-model.json +306 -366
  36. package/package.json +3 -3
  37. package/rules/v1/index.js +5 -5
  38. package/types/index.d.ts +2 -1
  39. package/utils/credit-card.d.ts +0 -1
  40. package/utils/credit-card.js +2 -9
  41. package/utils/fathom.d.ts +1 -2
  42. package/utils/fathom.js +2 -2
  43. package/utils/field.d.ts +4 -5
  44. package/utils/field.js +6 -17
  45. package/utils/identity.d.ts +0 -2
  46. package/utils/identity.js +2 -23
  47. package/dictionary/generate.d.ts +0 -1
  48. package/dictionary/generate.js +0 -51
  49. package/features/feature.spec.d.ts +0 -1
  50. package/features/feature.spec.js +0 -59
  51. package/features/registry.d.ts +0 -3
  52. package/features/registry.js +0 -9
  53. package/features/sorted.gen.d.ts +0 -14
  54. package/features/sorted.gen.js +0 -22
  55. package/features/v1/index.spec.d.ts +0 -1
  56. package/features/v1/index.spec.js +0 -30
  57. package/scripts/gen-sorted-features.d.ts +0 -1
  58. package/scripts/gen-sorted-features.js +0 -32
  59. package/utils/credit-card.samples.spec.d.ts +0 -1
  60. package/utils/credit-card.samples.spec.js +0 -452
  61. package/utils/credit-card.spec.d.ts +0 -1
  62. package/utils/credit-card.spec.js +0 -296
  63. package/utils/identity.samples.spec.d.ts +0 -1
  64. package/utils/identity.samples.spec.js +0 -28
  65. package/utils/re.spec.d.ts +0 -1
  66. package/utils/re.spec.js +0 -62
  67. package/utils/shadow-dom.spec.d.ts +0 -1
  68. package/utils/shadow-dom.spec.js +0 -215
@@ -4,13 +4,13 @@ import { field, fieldAttrEmail, fieldAttrs, fieldAutocomplete, fieldAutocomplete
4
4
  import { any } from "@protontech/autofill/utils/combinators";
5
5
  import { matchEmail, matchEmailValue, matchMFAAttr } from "@protontech/autofill/utils/re";
6
6
  import { sanitizeString } from "@protontech/autofill/utils/text";
7
- const typeEmail = feature("typeEmail", { fieldType: type }, (p) => p.type === "email");
8
- const exactAttrEmail = feature("exactAttrEmail", { field }, (p) => p.field.matches(kEmailSelector));
9
- const textEmail = feature("textEmail", { fieldText }, (p) => matchEmail(p.fieldText));
10
- const labelEmail = feature("labelEmail", { fieldLabel }, (p) => matchEmail(p.fieldLabel));
11
- const placeholderEmailValue = feature("placeholderEmailValue", { fieldPlaceholder: placeholder }, (p) => any(matchEmailValue)(p.placeholder.split(" ")));
12
- const placeholderEmail = feature("placeholderEmail", { placeholderEmailValue, fieldPlaceholder: placeholder }, (p) => p.placeholderEmailValue || matchEmail(sanitizeString(p.placeholder)));
13
- const mfaOutlier = feature("mfaOutlier", { fieldAttrs, fieldAutocomplete }, (p) => p.fieldAutocomplete === "one-time-code" || any(matchMFAAttr)(p.fieldAttrs));
7
+ export const typeEmail = feature("typeEmail", { fieldType: type }, (p) => p.type === "email");
8
+ export const exactAttrEmail = feature("exactAttrEmail", { field }, (p) => p.field.matches(kEmailSelector));
9
+ export const textEmail = feature("textEmail", { fieldText }, (p) => matchEmail(p.fieldText));
10
+ export const labelEmail = feature("labelEmail", { fieldLabel }, (p) => matchEmail(p.fieldLabel));
11
+ export const placeholderEmailValue = feature("placeholderEmailValue", { fieldPlaceholder: placeholder }, (p) => any(matchEmailValue)(p.placeholder.split(" ")));
12
+ export const placeholderEmail = feature("placeholderEmail", { placeholderEmailValue, fieldPlaceholder: placeholder }, (p) => p.placeholderEmailValue || matchEmail(sanitizeString(p.placeholder)));
13
+ export const mfaOutlier = feature("mfaOutlier", { fieldAttrs, fieldAutocomplete }, (p) => p.fieldAutocomplete === "one-time-code" || any(matchMFAAttr)(p.fieldAttrs));
14
14
  export const emailFeatures = flattenFeatures({
15
15
  exactAttrEmail,
16
16
  fieldAttrEmail,