@atls/react-app-links 0.0.2 → 0.0.3
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/dist/app-link.component.d.ts +3 -0
- package/dist/app-link.component.js +2 -4
- package/dist/app-url.interfaces.d.ts +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +5 -1
- package/dist/use-app-url.hook.d.ts +2 -0
- package/dist/use-browser-effect.hook.d.ts +3 -0
- package/package.json +6 -5
|
@@ -4,12 +4,10 @@ exports.AppLink = void 0;
|
|
|
4
4
|
const use_app_url_hook_1 = require("./use-app-url.hook");
|
|
5
5
|
const AppLink = ({ children, subdomain, pathname }) => {
|
|
6
6
|
const url = (0, use_app_url_hook_1.useAppUrl)({ subdomain, pathname });
|
|
7
|
-
if (!children || !url)
|
|
7
|
+
if (!children || !url)
|
|
8
8
|
return null;
|
|
9
|
-
|
|
10
|
-
if (typeof children !== 'function') {
|
|
9
|
+
if (typeof children !== 'function')
|
|
11
10
|
throw new Error('AppLink - children must be a function.');
|
|
12
|
-
}
|
|
13
11
|
return children(url);
|
|
14
12
|
};
|
|
15
13
|
exports.AppLink = AppLink;
|
package/dist/index.d.ts
ADDED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atls/react-app-links",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -18,11 +18,12 @@
|
|
|
18
18
|
"@testing-library/jest-dom": "^5.16.1",
|
|
19
19
|
"@testing-library/react": "^12.1.2",
|
|
20
20
|
"@testing-library/react-hooks": "^7.0.2",
|
|
21
|
-
"@types/react": "
|
|
22
|
-
"@types/react-dom": "
|
|
21
|
+
"@types/react": "18.3.6",
|
|
22
|
+
"@types/react-dom": "18.2.7",
|
|
23
23
|
"@types/testing-library__jest-dom": "^5.14.2",
|
|
24
|
-
"
|
|
25
|
-
"react
|
|
24
|
+
"@types/tldjs": "2.3.4",
|
|
25
|
+
"react": "^18.2.0",
|
|
26
|
+
"react-dom": "^18.2.0"
|
|
26
27
|
},
|
|
27
28
|
"peerDependencies": {
|
|
28
29
|
"react": "^17.0.1"
|