@webstudio-is/sdk-components-react-remix 0.196.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 CHANGED
@@ -1,20 +1,16 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as f, useContext as s } from "react";
3
- import { Form as p } from "@remix-run/react";
4
- import { ReactSdkContext as d } from "@webstudio-is/react-sdk/runtime";
5
- const v = f(({ action: r, ...e }, m) => {
6
- const { renderer: o } = s(d);
7
- return (r === void 0 || r === "" || typeof r == "string" && (r != null && r.startsWith("/"))) && o !== "canvas" && o !== "preview" ? /* @__PURE__ */ t(
8
- p,
9
- {
10
- action: r,
11
- ...e,
12
- ref: m,
13
- preventScrollReset: r === void 0 || r === ""
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
- v as RemixForm
15
+ p as RemixForm
20
16
  };
@@ -1,20 +1,20 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as c, useContext as f } from "react";
3
- import { NavLink as p } from "@remix-run/react";
4
- import { ReactSdkContext as l } from "@webstudio-is/react-sdk/runtime";
5
- const N = (r) => {
6
- const o = c((e, n) => {
7
- const { assetBaseUrl: i, renderer: s } = f(l), t = String(e.href ?? "");
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
- (t === "" || t.startsWith("?") || t.startsWith("#") || t.startsWith("/") && t.startsWith(i) === !1) && s !== "canvas" && s !== "preview"
10
+ t === "" || t.startsWith("?") || t.startsWith("#") || t.startsWith("/") && t.startsWith(a) === !1
11
11
  )
12
- return /* @__PURE__ */ a(p, { ...e, to: t, ref: n, end: !0 });
13
- const { prefetch: d, reloadDocument: h, replace: u, preventScrollReset: v, ...m } = e;
14
- return /* @__PURE__ */ a(r, { ...m, ref: n });
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 = r.displayName, o;
16
+ return o.displayName = e.displayName, o;
17
17
  };
18
18
  export {
19
- N as wrapLinkComponent
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.196.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,24 +35,20 @@
35
35
  "react-dom": "18.3.0-canary-14898b6a9-20240318"
36
36
  },
37
37
  "dependencies": {
38
- "@webstudio-is/react-sdk": "0.196.0",
39
- "@webstudio-is/icons": "0.196.0",
40
- "@webstudio-is/sdk": "0.196.0",
41
- "@webstudio-is/sdk-components-react": "0.196.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
- "@remix-run/react": "^2.15.0",
45
- "@types/node": "^22.9.3",
43
+ "@remix-run/react": "^2.15.2",
46
44
  "@types/react": "^18.2.70",
47
45
  "@types/react-dom": "^18.2.25",
48
46
  "react": "18.3.0-canary-14898b6a9-20240318",
49
47
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
50
- "@webstudio-is/generate-arg-types": "0.0.0",
51
48
  "@webstudio-is/tsconfig": "1.0.7"
52
49
  },
53
50
  "scripts": {
54
51
  "build": "vite build --config ../../vite.sdk-components.config.ts",
55
- "build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/*.tsx !./src/**/*.stories.tsx !./src/**/*.ws.ts' && prettier --write \"**/*.props.ts\"",
56
52
  "dts": "tsc --project tsconfig.dts.json",
57
53
  "typecheck": "tsc"
58
54
  }