@webstudio-is/sdk-components-react-remix 0.205.0 → 0.207.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 +6 -7
- package/lib/link.js +17 -4
- package/lib/types/rich-text-link.d.ts +1 -16
- package/package.json +5 -5
- package/lib/rich-text-link.js +0 -6
- package/lib/shared/remix-link.js +0 -20
- package/lib/types/shared/remix-link.d.ts +0 -17
package/lib/components.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Body as m } from "./body.js";
|
|
2
|
-
import { Link as x } from "./link.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { RemixForm as F } from "./remix-form.js";
|
|
2
|
+
import { Link as x, Link as i } from "./link.js";
|
|
3
|
+
import { WebhookForm as f } from "./webhook-form.js";
|
|
4
|
+
import { RemixForm as p } from "./remix-form.js";
|
|
6
5
|
export {
|
|
7
6
|
m as Body,
|
|
8
|
-
|
|
7
|
+
f as Form,
|
|
9
8
|
x as Link,
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
p as RemixForm,
|
|
10
|
+
i as RichTextLink
|
|
12
11
|
};
|
package/lib/link.js
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n, useContext as m } from "react";
|
|
3
|
+
import { NavLink as f } from "@remix-run/react";
|
|
4
|
+
import { ReactSdkContext as c } from "@webstudio-is/react-sdk/runtime";
|
|
5
|
+
import { Link as s } from "@webstudio-is/sdk-components-react";
|
|
6
|
+
const l = n((r, e) => {
|
|
7
|
+
const { assetBaseUrl: a } = m(c), t = String(r.href ?? "");
|
|
8
|
+
if (
|
|
9
|
+
// remix appends ?index in runtime but not in ssr
|
|
10
|
+
t === "" || t.startsWith("?") || t.startsWith("/") && t.startsWith(a) === !1
|
|
11
|
+
)
|
|
12
|
+
return /* @__PURE__ */ o(f, { ...r, to: t, ref: e, end: !0 });
|
|
13
|
+
const { prefetch: p, reloadDocument: d, replace: h, preventScrollReset: k, ...i } = r;
|
|
14
|
+
return /* @__PURE__ */ o(s, { ...i, ref: e });
|
|
15
|
+
});
|
|
16
|
+
l.displayName = s.displayName;
|
|
4
17
|
export {
|
|
5
|
-
|
|
18
|
+
l as Link
|
|
6
19
|
};
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
target?: "_self" | "_blank" | "_parent" | "_top";
|
|
3
|
-
download?: boolean;
|
|
4
|
-
prefetch?: "none" | "intent" | "render" | "viewport";
|
|
5
|
-
preventScrollReset?: boolean;
|
|
6
|
-
reloadDocument?: boolean;
|
|
7
|
-
replace?: boolean;
|
|
8
|
-
} & {
|
|
9
|
-
$webstudio$canvasOnly$assetId?: string | undefined;
|
|
10
|
-
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>, "ref">, "target"> & {
|
|
11
|
-
target?: "_self" | "_blank" | "_parent" | "_top";
|
|
12
|
-
prefetch?: "none" | "intent" | "render" | "viewport";
|
|
13
|
-
reloadDocument?: boolean;
|
|
14
|
-
replace?: boolean;
|
|
15
|
-
preventScrollReset?: boolean;
|
|
16
|
-
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
1
|
+
export { Link as RichTextLink } from "./link";
|
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.207.0",
|
|
4
4
|
"description": "Webstudio components for Remix",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"react-dom": "18.3.0-canary-14898b6a9-20240318"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@webstudio-is/react-sdk": "0.
|
|
39
|
-
"@webstudio-is/sdk": "0.
|
|
40
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
38
|
+
"@webstudio-is/react-sdk": "0.207.0",
|
|
39
|
+
"@webstudio-is/sdk": "0.207.0",
|
|
40
|
+
"@webstudio-is/sdk-components-react": "0.207.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@remix-run/react": "^2.
|
|
43
|
+
"@remix-run/react": "^2.16.0",
|
|
44
44
|
"@types/react": "^18.2.70",
|
|
45
45
|
"@types/react-dom": "^18.2.25",
|
|
46
46
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
package/lib/rich-text-link.js
DELETED
package/lib/shared/remix-link.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
if (
|
|
9
|
-
// remix appends ?index in runtime but not in ssr
|
|
10
|
-
t === "" || t.startsWith("?") || t.startsWith("#") || t.startsWith("/") && t.startsWith(a) === !1
|
|
11
|
-
)
|
|
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
|
-
});
|
|
16
|
-
return o.displayName = e.displayName, o;
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
R as wrapLinkComponent
|
|
20
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Link } from "@webstudio-is/sdk-components-react";
|
|
2
|
-
export declare const wrapLinkComponent: (BaseLink: typeof Link) => import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "target" | "download"> & {
|
|
3
|
-
target?: "_self" | "_blank" | "_parent" | "_top";
|
|
4
|
-
download?: boolean;
|
|
5
|
-
prefetch?: "none" | "intent" | "render" | "viewport";
|
|
6
|
-
preventScrollReset?: boolean;
|
|
7
|
-
reloadDocument?: boolean;
|
|
8
|
-
replace?: boolean;
|
|
9
|
-
} & {
|
|
10
|
-
$webstudio$canvasOnly$assetId?: string | undefined;
|
|
11
|
-
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>, "ref">, "target"> & {
|
|
12
|
-
target?: "_self" | "_blank" | "_parent" | "_top";
|
|
13
|
-
prefetch?: "none" | "intent" | "render" | "viewport";
|
|
14
|
-
reloadDocument?: boolean;
|
|
15
|
-
replace?: boolean;
|
|
16
|
-
preventScrollReset?: boolean;
|
|
17
|
-
} & import("react").RefAttributes<HTMLAnchorElement>>;
|