@webstudio-is/sdk-components-react-router 0.238.0 → 0.252.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/lib/components.js +10 -2
- package/package.json +5 -5
package/lib/components.js
CHANGED
|
@@ -38,7 +38,11 @@ import {
|
|
|
38
38
|
useEffect
|
|
39
39
|
} from "react";
|
|
40
40
|
import { useFetcher } from "react-router";
|
|
41
|
-
import {
|
|
41
|
+
import {
|
|
42
|
+
formIdFieldName,
|
|
43
|
+
formBotFieldName,
|
|
44
|
+
isBraveBrowser
|
|
45
|
+
} from "@webstudio-is/sdk/runtime";
|
|
42
46
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
43
47
|
var useOnFetchEnd = (fetcher, handler) => {
|
|
44
48
|
const latestHandler = useRef(handler);
|
|
@@ -88,7 +92,11 @@ var WebhookForm = forwardRef3(
|
|
|
88
92
|
const hiddenInput = document.createElement("input");
|
|
89
93
|
hiddenInput.type = "hidden";
|
|
90
94
|
hiddenInput.name = formBotFieldName;
|
|
91
|
-
|
|
95
|
+
if (isBraveBrowser()) {
|
|
96
|
+
hiddenInput.value = "brave";
|
|
97
|
+
} else {
|
|
98
|
+
hiddenInput.value = isJSDom() ? "jsdom" : Date.now().toString(16);
|
|
99
|
+
}
|
|
92
100
|
event.currentTarget.appendChild(hiddenInput);
|
|
93
101
|
};
|
|
94
102
|
return /* @__PURE__ */ jsxs2(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk-components-react-router",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.252.1",
|
|
4
4
|
"description": "Webstudio components for React Router",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"react-router": "^7.5.3",
|
|
28
|
-
"@webstudio-is/react-sdk": "0.
|
|
29
|
-
"@webstudio-is/sdk": "0.
|
|
30
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
28
|
+
"@webstudio-is/react-sdk": "0.252.1",
|
|
29
|
+
"@webstudio-is/sdk": "0.252.1",
|
|
30
|
+
"@webstudio-is/sdk-components-react": "0.252.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/react": "^18.2.70",
|
|
@@ -39,6 +39,6 @@
|
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "rm -rf lib && esbuild src/components.ts --outdir=lib --bundle --format=esm --packages=external",
|
|
41
41
|
"dts": "tsc --project tsconfig.dts.json",
|
|
42
|
-
"typecheck": "
|
|
42
|
+
"typecheck": "tsgo --noEmit"
|
|
43
43
|
}
|
|
44
44
|
}
|