@webstudio-is/sdk-components-react-remix 0.197.0 → 0.198.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/remix-form.js +14 -18
- package/lib/shared/remix-link.js +13 -13
- package/package.json +5 -8
package/lib/remix-form.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Form as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
) : /* @__PURE__ */ t("form", { ...e, ref: m });
|
|
16
|
-
});
|
|
17
|
-
v.displayName = "Form";
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as o } from "react";
|
|
3
|
+
import { Form as s } from "@remix-run/react";
|
|
4
|
+
const p = o(({ action: r, ...m }, e) => r === void 0 || r === "" || typeof r == "string" && (r != null && r.startsWith("/")) ? /* @__PURE__ */ f(
|
|
5
|
+
s,
|
|
6
|
+
{
|
|
7
|
+
action: r,
|
|
8
|
+
...m,
|
|
9
|
+
ref: e,
|
|
10
|
+
preventScrollReset: r === void 0 || r === ""
|
|
11
|
+
}
|
|
12
|
+
) : /* @__PURE__ */ f("form", { ...m, ref: e }));
|
|
13
|
+
p.displayName = "Form";
|
|
18
14
|
export {
|
|
19
|
-
|
|
15
|
+
p as RemixForm
|
|
20
16
|
};
|
package/lib/shared/remix-link.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { NavLink as
|
|
4
|
-
import { ReactSdkContext as
|
|
5
|
-
const
|
|
6
|
-
const o =
|
|
7
|
-
const { assetBaseUrl:
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m, useContext as c } from "react";
|
|
3
|
+
import { NavLink as f } from "@remix-run/react";
|
|
4
|
+
import { ReactSdkContext as p } from "@webstudio-is/react-sdk/runtime";
|
|
5
|
+
const R = (e) => {
|
|
6
|
+
const o = m((r, s) => {
|
|
7
|
+
const { assetBaseUrl: a } = c(p), t = String(r.href ?? "");
|
|
8
8
|
if (
|
|
9
9
|
// remix appends ?index in runtime but not in ssr
|
|
10
|
-
|
|
10
|
+
t === "" || t.startsWith("?") || t.startsWith("#") || t.startsWith("/") && t.startsWith(a) === !1
|
|
11
11
|
)
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
const { prefetch:
|
|
14
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ n(f, { ...r, to: t, ref: s, end: !0 });
|
|
13
|
+
const { prefetch: l, reloadDocument: h, replace: d, preventScrollReset: u, ...i } = r;
|
|
14
|
+
return /* @__PURE__ */ n(e, { ...i, ref: s });
|
|
15
15
|
});
|
|
16
|
-
return o.displayName =
|
|
16
|
+
return o.displayName = e.displayName, o;
|
|
17
17
|
};
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
R as wrapLinkComponent
|
|
20
20
|
};
|
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.198.0",
|
|
4
4
|
"description": "Webstudio components for Remix",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -35,10 +35,9 @@
|
|
|
35
35
|
"react-dom": "18.3.0-canary-14898b6a9-20240318"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@webstudio-is/
|
|
39
|
-
"@webstudio-is/react
|
|
40
|
-
"@webstudio-is/sdk
|
|
41
|
-
"@webstudio-is/sdk": "0.197.0"
|
|
38
|
+
"@webstudio-is/react-sdk": "0.198.0",
|
|
39
|
+
"@webstudio-is/sdk-components-react": "0.198.0",
|
|
40
|
+
"@webstudio-is/sdk": "0.198.0"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
43
|
"@remix-run/react": "^2.15.2",
|
|
@@ -46,12 +45,10 @@
|
|
|
46
45
|
"@types/react-dom": "^18.2.25",
|
|
47
46
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
48
47
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
49
|
-
"@webstudio-is/tsconfig": "1.0.7"
|
|
50
|
-
"@webstudio-is/generate-arg-types": "0.0.0"
|
|
48
|
+
"@webstudio-is/tsconfig": "1.0.7"
|
|
51
49
|
},
|
|
52
50
|
"scripts": {
|
|
53
51
|
"build": "vite build --config ../../vite.sdk-components.config.ts",
|
|
54
|
-
"build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/*.tsx !./src/**/*.stories.tsx !./src/**/*.ws.ts' && prettier --write \"**/*.props.ts\"",
|
|
55
52
|
"dts": "tsc --project tsconfig.dts.json",
|
|
56
53
|
"typecheck": "tsc"
|
|
57
54
|
}
|