@webstudio-is/sdk-components-react-remix 0.173.0 → 0.174.0
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 +11 -4
- package/package.json +7 -7
package/lib/components.js
CHANGED
|
@@ -121,7 +121,14 @@ var WebhookForm = forwardRef3(
|
|
|
121
121
|
ref,
|
|
122
122
|
onSubmit: handleSubmitAndAddHiddenJsField,
|
|
123
123
|
children: [
|
|
124
|
-
/* @__PURE__ */ jsx3(
|
|
124
|
+
/* @__PURE__ */ jsx3(
|
|
125
|
+
"input",
|
|
126
|
+
{
|
|
127
|
+
type: "hidden",
|
|
128
|
+
name: formIdFieldName2,
|
|
129
|
+
value: action?.toString()
|
|
130
|
+
}
|
|
131
|
+
),
|
|
125
132
|
children
|
|
126
133
|
]
|
|
127
134
|
}
|
|
@@ -138,11 +145,11 @@ import {
|
|
|
138
145
|
import { Form } from "@remix-run/react";
|
|
139
146
|
import { ReactSdkContext as ReactSdkContext2 } from "@webstudio-is/react-sdk";
|
|
140
147
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
141
|
-
var RemixForm = forwardRef4((props, ref) => {
|
|
148
|
+
var RemixForm = forwardRef4(({ action, ...props }, ref) => {
|
|
142
149
|
const { renderer } = useContext2(ReactSdkContext2);
|
|
143
|
-
if (
|
|
150
|
+
if (action === void 0 || action === "" || typeof action === "string" && action?.startsWith("/")) {
|
|
144
151
|
if (renderer !== "canvas" && renderer !== "preview") {
|
|
145
|
-
return /* @__PURE__ */ jsx4(Form, { ...props, ref });
|
|
152
|
+
return /* @__PURE__ */ jsx4(Form, { action, ...props, ref });
|
|
146
153
|
}
|
|
147
154
|
}
|
|
148
155
|
return /* @__PURE__ */ jsx4("form", { ...props, ref });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk-components-react-remix",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.174.0",
|
|
4
4
|
"description": "Webstudio components for Remix",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"react-dom": "18.3.0-canary-14898b6a9-20240318"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@webstudio-is/form-handlers": "0.
|
|
39
|
-
"@webstudio-is/
|
|
40
|
-
"@webstudio-is/
|
|
41
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
38
|
+
"@webstudio-is/form-handlers": "0.174.0",
|
|
39
|
+
"@webstudio-is/react-sdk": "0.174.0",
|
|
40
|
+
"@webstudio-is/icons": "0.174.0",
|
|
41
|
+
"@webstudio-is/sdk-components-react": "0.174.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@remix-run/react": "^2.10.3",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
49
49
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
50
50
|
"typescript": "5.5.2",
|
|
51
|
-
"@webstudio-is/
|
|
52
|
-
"@webstudio-is/
|
|
51
|
+
"@webstudio-is/tsconfig": "1.0.7",
|
|
52
|
+
"@webstudio-is/generate-arg-types": "0.0.0"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "rm -rf lib && esbuild src/components.ts src/metas.ts src/props.ts --outdir=lib --bundle --format=esm --packages=external",
|