@webstudio-is/react-sdk 0.36.0 → 0.40.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/app/custom-components/shared/remix-link.js +2 -2
- package/lib/cjs/app/custom-components/shared/remix-link.cjs +2 -2
- package/lib/cjs/components/__generated__/blockquote.props.cjs +2 -2
- package/lib/cjs/components/__generated__/body.props.cjs +2 -2
- package/lib/cjs/components/__generated__/bold.props.cjs +2 -2
- package/lib/cjs/components/__generated__/box.props.cjs +2 -2
- package/lib/cjs/components/__generated__/button.props.cjs +2 -2
- package/lib/cjs/components/__generated__/code.props.cjs +2 -2
- package/lib/cjs/components/__generated__/form.props.cjs +2 -2
- package/lib/cjs/components/__generated__/heading.props.cjs +2 -2
- package/lib/cjs/components/__generated__/image.props.cjs +2 -2
- package/lib/cjs/components/__generated__/input.props.cjs +2 -2
- package/lib/cjs/components/__generated__/italic.props.cjs +2 -2
- package/lib/cjs/components/__generated__/link.props.cjs +15 -3
- package/lib/cjs/components/__generated__/list-item.props.cjs +2 -2
- package/lib/cjs/components/__generated__/list.props.cjs +3 -3
- package/lib/cjs/components/__generated__/paragraph.props.cjs +2 -2
- package/lib/cjs/components/__generated__/rich-text-link.props.cjs +15 -4
- package/lib/cjs/components/__generated__/separator.props.cjs +2 -2
- package/lib/cjs/components/__generated__/span.props.cjs +2 -2
- package/lib/cjs/components/__generated__/subscript.props.cjs +2 -2
- package/lib/cjs/components/__generated__/superscript.props.cjs +2 -2
- package/lib/cjs/components/__generated__/text-block.props.cjs +2 -2
- package/lib/cjs/components/link.cjs +8 -5
- package/lib/cjs/components/link.ws.cjs +1 -1
- package/lib/cjs/components/rich-text-link.cjs +5 -7
- package/lib/components/__generated__/blockquote.props.js +2 -2
- package/lib/components/__generated__/body.props.js +2 -2
- package/lib/components/__generated__/bold.props.js +2 -2
- package/lib/components/__generated__/box.props.js +2 -2
- package/lib/components/__generated__/button.props.js +2 -2
- package/lib/components/__generated__/code.props.js +2 -2
- package/lib/components/__generated__/form.props.js +2 -2
- package/lib/components/__generated__/heading.props.js +2 -2
- package/lib/components/__generated__/image.props.js +2 -2
- package/lib/components/__generated__/input.props.js +2 -2
- package/lib/components/__generated__/italic.props.js +2 -2
- package/lib/components/__generated__/link.props.js +15 -3
- package/lib/components/__generated__/list-item.props.js +2 -2
- package/lib/components/__generated__/list.props.js +3 -3
- package/lib/components/__generated__/paragraph.props.js +2 -2
- package/lib/components/__generated__/rich-text-link.props.js +15 -4
- package/lib/components/__generated__/separator.props.js +2 -2
- package/lib/components/__generated__/span.props.js +2 -2
- package/lib/components/__generated__/subscript.props.js +2 -2
- package/lib/components/__generated__/superscript.props.js +2 -2
- package/lib/components/__generated__/text-block.props.js +2 -2
- package/lib/components/link.js +8 -5
- package/lib/components/link.ws.js +1 -1
- package/lib/components/rich-text-link.js +5 -7
- package/package.json +9 -9
- package/src/app/custom-components/shared/remix-link.tsx +4 -3
- package/src/components/__generated__/blockquote.props.ts +2 -2
- package/src/components/__generated__/body.props.ts +2 -2
- package/src/components/__generated__/bold.props.ts +2 -2
- package/src/components/__generated__/box.props.ts +2 -2
- package/src/components/__generated__/button.props.ts +2 -2
- package/src/components/__generated__/code.props.ts +2 -2
- package/src/components/__generated__/form.props.ts +2 -2
- package/src/components/__generated__/heading.props.ts +2 -2
- package/src/components/__generated__/image.props.ts +2 -2
- package/src/components/__generated__/input.props.ts +2 -2
- package/src/components/__generated__/italic.props.ts +2 -2
- package/src/components/__generated__/link.props.ts +15 -3
- package/src/components/__generated__/list-item.props.ts +2 -2
- package/src/components/__generated__/list.props.ts +3 -3
- package/src/components/__generated__/paragraph.props.ts +2 -2
- package/src/components/__generated__/rich-text-link.props.ts +15 -4
- package/src/components/__generated__/separator.props.ts +2 -2
- package/src/components/__generated__/span.props.ts +2 -2
- package/src/components/__generated__/subscript.props.ts +2 -2
- package/src/components/__generated__/superscript.props.ts +2 -2
- package/src/components/__generated__/text-block.props.ts +2 -2
- package/src/components/link.tsx +11 -2
- package/src/components/link.ws.tsx +1 -1
- package/src/components/rich-text-link.tsx +5 -4
|
@@ -144,7 +144,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
144
144
|
description:
|
|
145
145
|
"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
146
146
|
required: false,
|
|
147
|
-
control: "
|
|
147
|
+
control: "select",
|
|
148
148
|
type: "string",
|
|
149
149
|
options: ["list", "none", "inline", "both"],
|
|
150
150
|
},
|
|
@@ -446,7 +446,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
446
446
|
description:
|
|
447
447
|
"Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
448
448
|
required: false,
|
|
449
|
-
control: "
|
|
449
|
+
control: "select",
|
|
450
450
|
type: "string",
|
|
451
451
|
options: ["none", "ascending", "descending", "other"],
|
|
452
452
|
},
|
|
@@ -141,7 +141,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
141
141
|
description:
|
|
142
142
|
"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
143
143
|
required: false,
|
|
144
|
-
control: "
|
|
144
|
+
control: "select",
|
|
145
145
|
type: "string",
|
|
146
146
|
options: ["list", "none", "inline", "both"],
|
|
147
147
|
},
|
|
@@ -443,7 +443,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
443
443
|
description:
|
|
444
444
|
"Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
445
445
|
required: false,
|
|
446
|
-
control: "
|
|
446
|
+
control: "select",
|
|
447
447
|
type: "string",
|
|
448
448
|
options: ["none", "ascending", "descending", "other"],
|
|
449
449
|
},
|
|
@@ -103,7 +103,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
103
103
|
description:
|
|
104
104
|
"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
105
105
|
required: false,
|
|
106
|
-
control: "
|
|
106
|
+
control: "select",
|
|
107
107
|
type: "string",
|
|
108
108
|
options: ["list", "none", "inline", "both"],
|
|
109
109
|
},
|
|
@@ -405,7 +405,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
405
405
|
description:
|
|
406
406
|
"Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
407
407
|
required: false,
|
|
408
|
-
control: "
|
|
408
|
+
control: "select",
|
|
409
409
|
type: "string",
|
|
410
410
|
options: ["none", "ascending", "descending", "other"],
|
|
411
411
|
},
|
|
@@ -10,7 +10,13 @@ export const props: Record<string, PropMeta> = {
|
|
|
10
10
|
media: { required: false, control: "text", type: "string" },
|
|
11
11
|
ping: { required: false, control: "text", type: "string" },
|
|
12
12
|
rel: { required: false, control: "text", type: "string" },
|
|
13
|
-
target: {
|
|
13
|
+
target: {
|
|
14
|
+
required: false,
|
|
15
|
+
control: "select",
|
|
16
|
+
type: "string",
|
|
17
|
+
defaultValue: "self",
|
|
18
|
+
options: ["self", "blank", "parent", "top"],
|
|
19
|
+
},
|
|
14
20
|
type: { required: false, control: "text", type: "string" },
|
|
15
21
|
referrerPolicy: {
|
|
16
22
|
required: false,
|
|
@@ -127,7 +133,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
127
133
|
description:
|
|
128
134
|
"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
129
135
|
required: false,
|
|
130
|
-
control: "
|
|
136
|
+
control: "select",
|
|
131
137
|
type: "string",
|
|
132
138
|
options: ["list", "none", "inline", "both"],
|
|
133
139
|
},
|
|
@@ -429,7 +435,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
429
435
|
description:
|
|
430
436
|
"Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
431
437
|
required: false,
|
|
432
|
-
control: "
|
|
438
|
+
control: "select",
|
|
433
439
|
type: "string",
|
|
434
440
|
options: ["none", "ascending", "descending", "other"],
|
|
435
441
|
},
|
|
@@ -459,4 +465,10 @@ export const props: Record<string, PropMeta> = {
|
|
|
459
465
|
control: "text",
|
|
460
466
|
type: "string",
|
|
461
467
|
},
|
|
468
|
+
prefetch: {
|
|
469
|
+
required: false,
|
|
470
|
+
control: "radio",
|
|
471
|
+
type: "string",
|
|
472
|
+
options: ["none", "intent", "render"],
|
|
473
|
+
},
|
|
462
474
|
};
|
|
@@ -104,7 +104,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
104
104
|
description:
|
|
105
105
|
"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
106
106
|
required: false,
|
|
107
|
-
control: "
|
|
107
|
+
control: "select",
|
|
108
108
|
type: "string",
|
|
109
109
|
options: ["list", "none", "inline", "both"],
|
|
110
110
|
},
|
|
@@ -406,7 +406,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
406
406
|
description:
|
|
407
407
|
"Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
408
408
|
required: false,
|
|
409
|
-
control: "
|
|
409
|
+
control: "select",
|
|
410
410
|
type: "string",
|
|
411
411
|
options: ["none", "ascending", "descending", "other"],
|
|
412
412
|
},
|
|
@@ -103,7 +103,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
103
103
|
description:
|
|
104
104
|
"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
105
105
|
required: false,
|
|
106
|
-
control: "
|
|
106
|
+
control: "select",
|
|
107
107
|
type: "string",
|
|
108
108
|
options: ["list", "none", "inline", "both"],
|
|
109
109
|
},
|
|
@@ -405,7 +405,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
405
405
|
description:
|
|
406
406
|
"Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
407
407
|
required: false,
|
|
408
|
-
control: "
|
|
408
|
+
control: "select",
|
|
409
409
|
type: "string",
|
|
410
410
|
options: ["none", "ascending", "descending", "other"],
|
|
411
411
|
},
|
|
@@ -439,7 +439,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
439
439
|
start: { required: false, control: "number", type: "number" },
|
|
440
440
|
type: {
|
|
441
441
|
required: false,
|
|
442
|
-
control: "
|
|
442
|
+
control: "select",
|
|
443
443
|
type: "string",
|
|
444
444
|
options: ["a", "i", "1", "A", "I"],
|
|
445
445
|
},
|
|
@@ -103,7 +103,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
103
103
|
description:
|
|
104
104
|
"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
105
105
|
required: false,
|
|
106
|
-
control: "
|
|
106
|
+
control: "select",
|
|
107
107
|
type: "string",
|
|
108
108
|
options: ["list", "none", "inline", "both"],
|
|
109
109
|
},
|
|
@@ -405,7 +405,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
405
405
|
description:
|
|
406
406
|
"Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
407
407
|
required: false,
|
|
408
|
-
control: "
|
|
408
|
+
control: "select",
|
|
409
409
|
type: "string",
|
|
410
410
|
options: ["none", "ascending", "descending", "other"],
|
|
411
411
|
},
|
|
@@ -5,12 +5,17 @@ export const props: Record<string, PropMeta> = {
|
|
|
5
5
|
style: { required: false, control: "text", type: "string" },
|
|
6
6
|
title: { required: false, control: "text", type: "string" },
|
|
7
7
|
download: { required: false, control: "text", type: "string" },
|
|
8
|
-
href: { required: false, control: "text", type: "string"
|
|
8
|
+
href: { required: false, control: "text", type: "string" },
|
|
9
9
|
hrefLang: { required: false, control: "text", type: "string" },
|
|
10
10
|
media: { required: false, control: "text", type: "string" },
|
|
11
11
|
ping: { required: false, control: "text", type: "string" },
|
|
12
12
|
rel: { required: false, control: "text", type: "string" },
|
|
13
|
-
target: {
|
|
13
|
+
target: {
|
|
14
|
+
required: false,
|
|
15
|
+
control: "select",
|
|
16
|
+
type: "string",
|
|
17
|
+
options: ["self", "blank", "parent", "top"],
|
|
18
|
+
},
|
|
14
19
|
type: { required: false, control: "text", type: "string" },
|
|
15
20
|
referrerPolicy: {
|
|
16
21
|
required: false,
|
|
@@ -127,7 +132,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
127
132
|
description:
|
|
128
133
|
"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
129
134
|
required: false,
|
|
130
|
-
control: "
|
|
135
|
+
control: "select",
|
|
131
136
|
type: "string",
|
|
132
137
|
options: ["list", "none", "inline", "both"],
|
|
133
138
|
},
|
|
@@ -429,7 +434,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
429
434
|
description:
|
|
430
435
|
"Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
431
436
|
required: false,
|
|
432
|
-
control: "
|
|
437
|
+
control: "select",
|
|
433
438
|
type: "string",
|
|
434
439
|
options: ["none", "ascending", "descending", "other"],
|
|
435
440
|
},
|
|
@@ -459,4 +464,10 @@ export const props: Record<string, PropMeta> = {
|
|
|
459
464
|
control: "text",
|
|
460
465
|
type: "string",
|
|
461
466
|
},
|
|
467
|
+
prefetch: {
|
|
468
|
+
required: false,
|
|
469
|
+
control: "radio",
|
|
470
|
+
type: "string",
|
|
471
|
+
options: ["none", "intent", "render"],
|
|
472
|
+
},
|
|
462
473
|
};
|
|
@@ -103,7 +103,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
103
103
|
description:
|
|
104
104
|
"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
105
105
|
required: false,
|
|
106
|
-
control: "
|
|
106
|
+
control: "select",
|
|
107
107
|
type: "string",
|
|
108
108
|
options: ["list", "none", "inline", "both"],
|
|
109
109
|
},
|
|
@@ -405,7 +405,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
405
405
|
description:
|
|
406
406
|
"Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
407
407
|
required: false,
|
|
408
|
-
control: "
|
|
408
|
+
control: "select",
|
|
409
409
|
type: "string",
|
|
410
410
|
options: ["none", "ascending", "descending", "other"],
|
|
411
411
|
},
|
|
@@ -103,7 +103,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
103
103
|
description:
|
|
104
104
|
"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
105
105
|
required: false,
|
|
106
|
-
control: "
|
|
106
|
+
control: "select",
|
|
107
107
|
type: "string",
|
|
108
108
|
options: ["list", "none", "inline", "both"],
|
|
109
109
|
},
|
|
@@ -405,7 +405,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
405
405
|
description:
|
|
406
406
|
"Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
407
407
|
required: false,
|
|
408
|
-
control: "
|
|
408
|
+
control: "select",
|
|
409
409
|
type: "string",
|
|
410
410
|
options: ["none", "ascending", "descending", "other"],
|
|
411
411
|
},
|
|
@@ -103,7 +103,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
103
103
|
description:
|
|
104
104
|
"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
105
105
|
required: false,
|
|
106
|
-
control: "
|
|
106
|
+
control: "select",
|
|
107
107
|
type: "string",
|
|
108
108
|
options: ["list", "none", "inline", "both"],
|
|
109
109
|
},
|
|
@@ -405,7 +405,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
405
405
|
description:
|
|
406
406
|
"Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
407
407
|
required: false,
|
|
408
|
-
control: "
|
|
408
|
+
control: "select",
|
|
409
409
|
type: "string",
|
|
410
410
|
options: ["none", "ascending", "descending", "other"],
|
|
411
411
|
},
|
|
@@ -103,7 +103,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
103
103
|
description:
|
|
104
104
|
"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
105
105
|
required: false,
|
|
106
|
-
control: "
|
|
106
|
+
control: "select",
|
|
107
107
|
type: "string",
|
|
108
108
|
options: ["list", "none", "inline", "both"],
|
|
109
109
|
},
|
|
@@ -405,7 +405,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
405
405
|
description:
|
|
406
406
|
"Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
407
407
|
required: false,
|
|
408
|
-
control: "
|
|
408
|
+
control: "select",
|
|
409
409
|
type: "string",
|
|
410
410
|
options: ["none", "ascending", "descending", "other"],
|
|
411
411
|
},
|
|
@@ -103,7 +103,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
103
103
|
description:
|
|
104
104
|
"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.",
|
|
105
105
|
required: false,
|
|
106
|
-
control: "
|
|
106
|
+
control: "select",
|
|
107
107
|
type: "string",
|
|
108
108
|
options: ["list", "none", "inline", "both"],
|
|
109
109
|
},
|
|
@@ -405,7 +405,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
405
405
|
description:
|
|
406
406
|
"Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
407
407
|
required: false,
|
|
408
|
-
control: "
|
|
408
|
+
control: "select",
|
|
409
409
|
type: "string",
|
|
410
410
|
options: ["none", "ascending", "descending", "other"],
|
|
411
411
|
},
|
package/src/components/link.tsx
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { forwardRef, type ElementRef, type ComponentProps } from "react";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// @todo props that come from remix link, shouldn't be here at all
|
|
4
|
+
// - prefetch should be only on remix component and it already is
|
|
5
|
+
// - props meta should be generated from Remix link
|
|
6
|
+
type Props = Omit<ComponentProps<"a">, "href" | "target"> & {
|
|
7
|
+
href?: string;
|
|
8
|
+
target?: "self" | "blank" | "parent" | "top";
|
|
9
|
+
prefetch?: "none" | "intent" | "render";
|
|
10
|
+
};
|
|
4
11
|
|
|
5
12
|
export const Link = forwardRef<ElementRef<"a">, Props>(
|
|
6
|
-
({ href = "", ...props }, ref) =>
|
|
13
|
+
({ href = "", target = "self", ...props }, ref) => {
|
|
14
|
+
return <a {...props} target={`_${target}`} href={href} ref={ref} />;
|
|
15
|
+
}
|
|
7
16
|
);
|
|
8
17
|
|
|
9
18
|
Link.displayName = "Link";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { forwardRef, type ElementRef, type ComponentProps } from "react";
|
|
2
|
+
import { Link } from "./link";
|
|
2
3
|
|
|
3
|
-
type Props =
|
|
4
|
+
type Props = ComponentProps<typeof Link>;
|
|
4
5
|
|
|
5
|
-
export const RichTextLink = forwardRef<ElementRef<"a">, Props>(
|
|
6
|
-
|
|
7
|
-
);
|
|
6
|
+
export const RichTextLink = forwardRef<ElementRef<"a">, Props>((props, ref) => (
|
|
7
|
+
<Link {...props} ref={ref} />
|
|
8
|
+
));
|
|
8
9
|
|
|
9
10
|
RichTextLink.displayName = "RichTextLink";
|