@protontech/autofill 0.0.35059265 → 0.0.35481761
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/features/feature.d.ts +13 -2
- package/features/feature.js +37 -15
- package/features/feature.spec.js +56 -7
- package/features/v1/abstract.field.d.ts +8377 -406
- package/features/v1/abstract.field.js +24 -24
- package/features/v1/abstract.form.d.ts +3428 -14
- package/features/v1/abstract.form.js +197 -197
- package/features/v1/field.email.d.ts +3421 -0
- package/features/v1/field.email.js +7 -7
- package/features/v1/field.otp.d.ts +71178 -0
- package/features/v1/field.otp.js +42 -42
- package/features/v1/field.password.d.ts +99166 -0
- package/features/v1/field.password.js +42 -42
- package/features/v1/field.username-hidden.d.ts +908 -0
- package/features/v1/field.username-hidden.js +7 -7
- package/features/v1/field.username.d.ts +42382 -0
- package/features/v1/field.username.js +11 -11
- package/features/v1/fields.sorted.gen.d.ts +1441 -0
- package/features/v1/fields.sorted.gen.js +344 -0
- package/features/v1/forms.sorted.gen.d.ts +734 -0
- package/features/v1/forms.sorted.gen.js +334 -0
- package/features/v1/index.d.ts +5305 -12
- package/features/v1/index.js +7 -11
- package/features/v1/index.spec.js +34 -20
- package/models/perceptron/params/login-model.json +91 -91
- package/models/perceptron/params/new-password-model.json +21 -21
- package/models/perceptron/params/otp-model.json +29 -29
- package/models/perceptron/params/password-change-model.json +72 -72
- package/models/perceptron/params/password-model.json +23 -23
- package/models/perceptron/params/recovery-model.json +81 -81
- package/models/perceptron/params/register-model.json +99 -99
- package/models/perceptron/params/username-hidden-model.json +10 -10
- package/models/perceptron/params/username-model.json +7 -7
- package/models/random_forest/params/otp-model.json +306 -366
- package/package.json +3 -3
- package/rules/v1/index.js +2 -2
- package/scripts/gen-sorted-features.js +125 -29
- package/types/index.d.ts +2 -1
- package/utils/fathom.d.ts +1 -2
- package/utils/fathom.js +2 -2
- package/features/registry.d.ts +0 -3
- package/features/registry.js +0 -9
- package/features/sorted.gen.d.ts +0 -14
- package/features/sorted.gen.js +0 -22
|
@@ -2,13 +2,13 @@ import { feature, flattenFeatures } from "@protontech/autofill/features/feature"
|
|
|
2
2
|
import { field, fieldAttrEmail, fieldAttrUsername, fieldAutocomplete, fieldAutocompleteEmail, fieldCC, fieldExotic, fieldIdentity, readonly, typeValid, value } from "@protontech/autofill/features/v1/abstract.field";
|
|
3
3
|
import { matchEmailValue, matchTelValue, matchUsernameValue } from "@protontech/autofill/utils/re";
|
|
4
4
|
import { isVisible } from "@protontech/autofill/utils/visible";
|
|
5
|
-
const visibleReadonly = feature("visibleReadonly", { field, typeValid, readonly }, (p) => p.readonly && p.typeValid && isVisible(p.field, { opacity: true }));
|
|
6
|
-
const attrMatch = feature("attrMatch", { field }, (p) => p.field.matches('[name="username"],[id="username"],[name="account"]'));
|
|
7
|
-
const autocompleteUsername = feature("autocompleteUsername", { fieldAutocomplete }, (p) => { var _a; return Boolean((_a = p.fieldAutocomplete) === null || _a === void 0 ? void 0 : _a.includes("username")); });
|
|
8
|
-
const valueCandidate = feature("valueCandidate", { fieldValue: value }, (p) => p.value.length < 100);
|
|
9
|
-
const valueEmail = feature("valueEmail", { valueCandidate, fieldValue: value }, (p) => p.valueCandidate && matchEmailValue(p.value));
|
|
10
|
-
const valueTel = feature("valueTel", { valueCandidate, fieldValue: value }, (p) => p.valueCandidate && matchTelValue(p.value));
|
|
11
|
-
const valueUsername = feature("valueUsername", { valueCandidate, fieldValue: value }, (p) => p.valueCandidate && matchUsernameValue(p.value));
|
|
5
|
+
export const visibleReadonly = feature("visibleReadonly", { field, typeValid, readonly }, (p) => p.readonly && p.typeValid && isVisible(p.field, { opacity: true }));
|
|
6
|
+
export const attrMatch = feature("attrMatch", { field }, (p) => p.field.matches('[name="username"],[id="username"],[name="account"]'));
|
|
7
|
+
export const autocompleteUsername = feature("autocompleteUsername", { fieldAutocomplete }, (p) => { var _a; return Boolean((_a = p.fieldAutocomplete) === null || _a === void 0 ? void 0 : _a.includes("username")); });
|
|
8
|
+
export const valueCandidate = feature("valueCandidate", { fieldValue: value }, (p) => p.value.length < 100);
|
|
9
|
+
export const valueEmail = feature("valueEmail", { valueCandidate, fieldValue: value }, (p) => p.valueCandidate && matchEmailValue(p.value));
|
|
10
|
+
export const valueTel = feature("valueTel", { valueCandidate, fieldValue: value }, (p) => p.valueCandidate && matchTelValue(p.value));
|
|
11
|
+
export const valueUsername = feature("valueUsername", { valueCandidate, fieldValue: value }, (p) => p.valueCandidate && matchUsernameValue(p.value));
|
|
12
12
|
export const usernameHiddenFeatures = flattenFeatures({
|
|
13
13
|
attrMatch,
|
|
14
14
|
autocompleteUsername,
|