@jobber/hooks 2.13.0 → 2.13.1
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 +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/package.json +3 -5
- package/dist/usePasswordStrength/index.d.ts +0 -1
- package/dist/usePasswordStrength/index.js +0 -5
- package/dist/usePasswordStrength/usePasswordStrength.d.ts +0 -8
- package/dist/usePasswordStrength/usePasswordStrength.js +0 -18
- package/usePasswordStrength.d.ts +0 -1
- package/usePasswordStrength.js +0 -17
package/README.md
CHANGED
|
@@ -13,7 +13,6 @@ Shared hooks for components in Atlantis.
|
|
|
13
13
|
- [useOnMount](../?path=/docs/hooks-useonmount--docs)
|
|
14
14
|
- [useLiveAnnounce](../?path=/docs/hooks-useliveannounce--docs)
|
|
15
15
|
- [useOnKeyDown](../?path=/docs/hooks-useonkeydown--docs)
|
|
16
|
-
- [usePasswordStrength](../?path=/docs/hooks-usepasswordstrength--docs)
|
|
17
16
|
- [useRefocusOnActivator](../?path=/docs/hooks-userefocusonactivator--docs)
|
|
18
17
|
- [useResizeObserver](../?path=/docs/hooks-useresizeobserver--docs)
|
|
19
18
|
- [useWindowDimensions](../?path=/docs/hooks-usewindowdimensions--docs)
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export * from "./useIsMounted";
|
|
|
10
10
|
export * from "./useLiveAnnounce";
|
|
11
11
|
export * from "./useOnKeyDown";
|
|
12
12
|
export * from "./useOnMount";
|
|
13
|
-
export * from "./usePasswordStrength";
|
|
14
13
|
export * from "./useRefocusOnActivator";
|
|
15
14
|
export * from "./useResizeObserver";
|
|
16
15
|
export * from "./useSafeLayoutEffect";
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,6 @@ __exportStar(require("./useIsMounted"), exports);
|
|
|
26
26
|
__exportStar(require("./useLiveAnnounce"), exports);
|
|
27
27
|
__exportStar(require("./useOnKeyDown"), exports);
|
|
28
28
|
__exportStar(require("./useOnMount"), exports);
|
|
29
|
-
__exportStar(require("./usePasswordStrength"), exports);
|
|
30
29
|
__exportStar(require("./useRefocusOnActivator"), exports);
|
|
31
30
|
__exportStar(require("./useResizeObserver"), exports);
|
|
32
31
|
__exportStar(require("./useSafeLayoutEffect"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/hooks",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.js",
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"@types/react": "^18.0.28",
|
|
26
26
|
"@types/react-dom": "^18.0.11",
|
|
27
27
|
"@types/uuid": "^8.3.3",
|
|
28
|
-
"@types/zxcvbn": "^4.4.1",
|
|
29
28
|
"jsdom-testing-mocks": "^1.9.0",
|
|
30
29
|
"uuid": "^8.3.2"
|
|
31
30
|
},
|
|
@@ -33,12 +32,11 @@
|
|
|
33
32
|
"lodash": "^4.17.20",
|
|
34
33
|
"resize-observer-polyfill": "^1.5.1",
|
|
35
34
|
"ts-xor": "^1.0.8",
|
|
36
|
-
"use-resize-observer": "^6.1.0"
|
|
37
|
-
"zxcvbn": "^4.4.2"
|
|
35
|
+
"use-resize-observer": "^6.1.0"
|
|
38
36
|
},
|
|
39
37
|
"peerDependencies": {
|
|
40
38
|
"@apollo/client": "^3.0.0",
|
|
41
39
|
"react": "^18.2.0"
|
|
42
40
|
},
|
|
43
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "eeadd690623d3d194d257bd7e5833c83bb10f218"
|
|
44
42
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { usePasswordStrength } from "./usePasswordStrength";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.usePasswordStrength = void 0;
|
|
4
|
-
var usePasswordStrength_1 = require("./usePasswordStrength");
|
|
5
|
-
Object.defineProperty(exports, "usePasswordStrength", { enumerable: true, get: function () { return usePasswordStrength_1.usePasswordStrength; } });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import calculateStrength from "zxcvbn";
|
|
2
|
-
export declare function usePasswordStrength(password: string, dictionary?: string[]): {
|
|
3
|
-
guesses: number;
|
|
4
|
-
score: calculateStrength.ZXCVBNScore;
|
|
5
|
-
warning: calculateStrength.ZXCVBNFeedbackWarning;
|
|
6
|
-
suggestions: string[];
|
|
7
|
-
timeToCrack: string | number;
|
|
8
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.usePasswordStrength = usePasswordStrength;
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const zxcvbn_1 = __importDefault(require("zxcvbn"));
|
|
9
|
-
function usePasswordStrength(password, dictionary) {
|
|
10
|
-
const { guesses, score, feedback: { warning, suggestions }, crack_times_display: { offline_fast_hashing_1e10_per_second: timeToCrack }, } = (0, react_1.useMemo)(() => (0, zxcvbn_1.default)(password, dictionary), [password, dictionary]);
|
|
11
|
-
return {
|
|
12
|
-
guesses,
|
|
13
|
-
score,
|
|
14
|
-
warning,
|
|
15
|
-
suggestions,
|
|
16
|
-
timeToCrack,
|
|
17
|
-
};
|
|
18
|
-
}
|
package/usePasswordStrength.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./dist/usePasswordStrength";
|
package/usePasswordStrength.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true,
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var usePasswordStrength = require("./dist/usePasswordStrength");
|
|
8
|
-
|
|
9
|
-
Object.keys(usePasswordStrength).forEach(function(key) {
|
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
Object.defineProperty(exports, key, {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function get() {
|
|
14
|
-
return usePasswordStrength[key];
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
});
|