@webstudio-is/react-sdk 0.36.0 → 0.41.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/cjs/tree/root.cjs +15 -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/lib/tree/root.js +15 -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
- package/src/tree/root.ts +22 -11
|
@@ -5,7 +5,7 @@ const isAbsoluteUrl = (href) => {
|
|
|
5
5
|
try {
|
|
6
6
|
new URL(href);
|
|
7
7
|
return true;
|
|
8
|
-
} catch
|
|
8
|
+
} catch {
|
|
9
9
|
return false;
|
|
10
10
|
}
|
|
11
11
|
};
|
|
@@ -15,7 +15,7 @@ const wrapLinkComponent = (BaseLink) => {
|
|
|
15
15
|
const isAbsolute = isAbsoluteUrl(href);
|
|
16
16
|
const willRemixTryToTreatAsAbsoluteAndCrash = isAbsolute === false && isAbsoluteUrlRemix(href);
|
|
17
17
|
if (isAbsolute || willRemixTryToTreatAsAbsoluteAndCrash) {
|
|
18
|
-
return /* @__PURE__ */ jsx(
|
|
18
|
+
return /* @__PURE__ */ jsx(BaseLink, {
|
|
19
19
|
...props,
|
|
20
20
|
href: willRemixTryToTreatAsAbsoluteAndCrash ? "" : href,
|
|
21
21
|
ref
|
|
@@ -28,7 +28,7 @@ const isAbsoluteUrl = (href) => {
|
|
|
28
28
|
try {
|
|
29
29
|
new URL(href);
|
|
30
30
|
return true;
|
|
31
|
-
} catch
|
|
31
|
+
} catch {
|
|
32
32
|
return false;
|
|
33
33
|
}
|
|
34
34
|
};
|
|
@@ -38,7 +38,7 @@ const wrapLinkComponent = (BaseLink) => {
|
|
|
38
38
|
const isAbsolute = isAbsoluteUrl(href);
|
|
39
39
|
const willRemixTryToTreatAsAbsoluteAndCrash = isAbsolute === false && isAbsoluteUrlRemix(href);
|
|
40
40
|
if (isAbsolute || willRemixTryToTreatAsAbsoluteAndCrash) {
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseLink, {
|
|
42
42
|
...props,
|
|
43
43
|
href: willRemixTryToTreatAsAbsoluteAndCrash ? "" : href,
|
|
44
44
|
ref
|
|
@@ -120,7 +120,7 @@ const props = {
|
|
|
120
120
|
"aria-autocomplete": {
|
|
121
121
|
description: "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.",
|
|
122
122
|
required: false,
|
|
123
|
-
control: "
|
|
123
|
+
control: "select",
|
|
124
124
|
type: "string",
|
|
125
125
|
options: ["list", "none", "inline", "both"]
|
|
126
126
|
},
|
|
@@ -383,7 +383,7 @@ const props = {
|
|
|
383
383
|
"aria-sort": {
|
|
384
384
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
385
385
|
required: false,
|
|
386
|
-
control: "
|
|
386
|
+
control: "select",
|
|
387
387
|
type: "string",
|
|
388
388
|
options: ["none", "ascending", "descending", "other"]
|
|
389
389
|
},
|
|
@@ -119,7 +119,7 @@ const props = {
|
|
|
119
119
|
"aria-autocomplete": {
|
|
120
120
|
description: "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.",
|
|
121
121
|
required: false,
|
|
122
|
-
control: "
|
|
122
|
+
control: "select",
|
|
123
123
|
type: "string",
|
|
124
124
|
options: ["list", "none", "inline", "both"]
|
|
125
125
|
},
|
|
@@ -382,7 +382,7 @@ const props = {
|
|
|
382
382
|
"aria-sort": {
|
|
383
383
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
384
384
|
required: false,
|
|
385
|
-
control: "
|
|
385
|
+
control: "select",
|
|
386
386
|
type: "string",
|
|
387
387
|
options: ["none", "ascending", "descending", "other"]
|
|
388
388
|
},
|
|
@@ -119,7 +119,7 @@ const props = {
|
|
|
119
119
|
"aria-autocomplete": {
|
|
120
120
|
description: "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.",
|
|
121
121
|
required: false,
|
|
122
|
-
control: "
|
|
122
|
+
control: "select",
|
|
123
123
|
type: "string",
|
|
124
124
|
options: ["list", "none", "inline", "both"]
|
|
125
125
|
},
|
|
@@ -382,7 +382,7 @@ const props = {
|
|
|
382
382
|
"aria-sort": {
|
|
383
383
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
384
384
|
required: false,
|
|
385
|
-
control: "
|
|
385
|
+
control: "select",
|
|
386
386
|
type: "string",
|
|
387
387
|
options: ["none", "ascending", "descending", "other"]
|
|
388
388
|
},
|
|
@@ -119,7 +119,7 @@ const props = {
|
|
|
119
119
|
"aria-autocomplete": {
|
|
120
120
|
description: "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.",
|
|
121
121
|
required: false,
|
|
122
|
-
control: "
|
|
122
|
+
control: "select",
|
|
123
123
|
type: "string",
|
|
124
124
|
options: ["list", "none", "inline", "both"]
|
|
125
125
|
},
|
|
@@ -382,7 +382,7 @@ const props = {
|
|
|
382
382
|
"aria-sort": {
|
|
383
383
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
384
384
|
required: false,
|
|
385
|
-
control: "
|
|
385
|
+
control: "select",
|
|
386
386
|
type: "string",
|
|
387
387
|
options: ["none", "ascending", "descending", "other"]
|
|
388
388
|
},
|
|
@@ -136,7 +136,7 @@ const props = {
|
|
|
136
136
|
"aria-autocomplete": {
|
|
137
137
|
description: "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.",
|
|
138
138
|
required: false,
|
|
139
|
-
control: "
|
|
139
|
+
control: "select",
|
|
140
140
|
type: "string",
|
|
141
141
|
options: ["list", "none", "inline", "both"]
|
|
142
142
|
},
|
|
@@ -399,7 +399,7 @@ const props = {
|
|
|
399
399
|
"aria-sort": {
|
|
400
400
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
401
401
|
required: false,
|
|
402
|
-
control: "
|
|
402
|
+
control: "select",
|
|
403
403
|
type: "string",
|
|
404
404
|
options: ["none", "ascending", "descending", "other"]
|
|
405
405
|
},
|
|
@@ -120,7 +120,7 @@ const props = {
|
|
|
120
120
|
"aria-autocomplete": {
|
|
121
121
|
description: "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.",
|
|
122
122
|
required: false,
|
|
123
|
-
control: "
|
|
123
|
+
control: "select",
|
|
124
124
|
type: "string",
|
|
125
125
|
options: ["inline", "list", "none", "both"]
|
|
126
126
|
},
|
|
@@ -383,7 +383,7 @@ const props = {
|
|
|
383
383
|
"aria-sort": {
|
|
384
384
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
385
385
|
required: false,
|
|
386
|
-
control: "
|
|
386
|
+
control: "select",
|
|
387
387
|
type: "string",
|
|
388
388
|
options: ["none", "ascending", "descending", "other"]
|
|
389
389
|
},
|
|
@@ -127,7 +127,7 @@ const props = {
|
|
|
127
127
|
"aria-autocomplete": {
|
|
128
128
|
description: "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
129
|
required: false,
|
|
130
|
-
control: "
|
|
130
|
+
control: "select",
|
|
131
131
|
type: "string",
|
|
132
132
|
options: ["list", "none", "inline", "both"]
|
|
133
133
|
},
|
|
@@ -390,7 +390,7 @@ const props = {
|
|
|
390
390
|
"aria-sort": {
|
|
391
391
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
392
392
|
required: false,
|
|
393
|
-
control: "
|
|
393
|
+
control: "select",
|
|
394
394
|
type: "string",
|
|
395
395
|
options: ["none", "ascending", "descending", "other"]
|
|
396
396
|
},
|
|
@@ -119,7 +119,7 @@ const props = {
|
|
|
119
119
|
"aria-autocomplete": {
|
|
120
120
|
description: "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.",
|
|
121
121
|
required: false,
|
|
122
|
-
control: "
|
|
122
|
+
control: "select",
|
|
123
123
|
type: "string",
|
|
124
124
|
options: ["list", "none", "inline", "both"]
|
|
125
125
|
},
|
|
@@ -382,7 +382,7 @@ const props = {
|
|
|
382
382
|
"aria-sort": {
|
|
383
383
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
384
384
|
required: false,
|
|
385
|
-
control: "
|
|
385
|
+
control: "select",
|
|
386
386
|
type: "string",
|
|
387
387
|
options: ["none", "ascending", "descending", "other"]
|
|
388
388
|
},
|
|
@@ -160,7 +160,7 @@ const props = {
|
|
|
160
160
|
"aria-autocomplete": {
|
|
161
161
|
description: "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.",
|
|
162
162
|
required: false,
|
|
163
|
-
control: "
|
|
163
|
+
control: "select",
|
|
164
164
|
type: "string",
|
|
165
165
|
options: ["list", "none", "inline", "both"]
|
|
166
166
|
},
|
|
@@ -423,7 +423,7 @@ const props = {
|
|
|
423
423
|
"aria-sort": {
|
|
424
424
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
425
425
|
required: false,
|
|
426
|
-
control: "
|
|
426
|
+
control: "select",
|
|
427
427
|
type: "string",
|
|
428
428
|
options: ["none", "ascending", "descending", "other"]
|
|
429
429
|
},
|
|
@@ -157,7 +157,7 @@ const props = {
|
|
|
157
157
|
"aria-autocomplete": {
|
|
158
158
|
description: "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.",
|
|
159
159
|
required: false,
|
|
160
|
-
control: "
|
|
160
|
+
control: "select",
|
|
161
161
|
type: "string",
|
|
162
162
|
options: ["list", "none", "inline", "both"]
|
|
163
163
|
},
|
|
@@ -420,7 +420,7 @@ const props = {
|
|
|
420
420
|
"aria-sort": {
|
|
421
421
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
422
422
|
required: false,
|
|
423
|
-
control: "
|
|
423
|
+
control: "select",
|
|
424
424
|
type: "string",
|
|
425
425
|
options: ["none", "ascending", "descending", "other"]
|
|
426
426
|
},
|
|
@@ -119,7 +119,7 @@ const props = {
|
|
|
119
119
|
"aria-autocomplete": {
|
|
120
120
|
description: "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.",
|
|
121
121
|
required: false,
|
|
122
|
-
control: "
|
|
122
|
+
control: "select",
|
|
123
123
|
type: "string",
|
|
124
124
|
options: ["list", "none", "inline", "both"]
|
|
125
125
|
},
|
|
@@ -382,7 +382,7 @@ const props = {
|
|
|
382
382
|
"aria-sort": {
|
|
383
383
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
384
384
|
required: false,
|
|
385
|
-
control: "
|
|
385
|
+
control: "select",
|
|
386
386
|
type: "string",
|
|
387
387
|
options: ["none", "ascending", "descending", "other"]
|
|
388
388
|
},
|
|
@@ -31,7 +31,13 @@ const props = {
|
|
|
31
31
|
media: { required: false, control: "text", type: "string" },
|
|
32
32
|
ping: { required: false, control: "text", type: "string" },
|
|
33
33
|
rel: { required: false, control: "text", type: "string" },
|
|
34
|
-
target: {
|
|
34
|
+
target: {
|
|
35
|
+
required: false,
|
|
36
|
+
control: "select",
|
|
37
|
+
type: "string",
|
|
38
|
+
defaultValue: "self",
|
|
39
|
+
options: ["self", "blank", "parent", "top"]
|
|
40
|
+
},
|
|
35
41
|
type: { required: false, control: "text", type: "string" },
|
|
36
42
|
referrerPolicy: {
|
|
37
43
|
required: false,
|
|
@@ -143,7 +149,7 @@ const props = {
|
|
|
143
149
|
"aria-autocomplete": {
|
|
144
150
|
description: "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.",
|
|
145
151
|
required: false,
|
|
146
|
-
control: "
|
|
152
|
+
control: "select",
|
|
147
153
|
type: "string",
|
|
148
154
|
options: ["list", "none", "inline", "both"]
|
|
149
155
|
},
|
|
@@ -406,7 +412,7 @@ const props = {
|
|
|
406
412
|
"aria-sort": {
|
|
407
413
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
408
414
|
required: false,
|
|
409
|
-
control: "
|
|
415
|
+
control: "select",
|
|
410
416
|
type: "string",
|
|
411
417
|
options: ["none", "ascending", "descending", "other"]
|
|
412
418
|
},
|
|
@@ -433,5 +439,11 @@ const props = {
|
|
|
433
439
|
required: false,
|
|
434
440
|
control: "text",
|
|
435
441
|
type: "string"
|
|
442
|
+
},
|
|
443
|
+
prefetch: {
|
|
444
|
+
required: false,
|
|
445
|
+
control: "radio",
|
|
446
|
+
type: "string",
|
|
447
|
+
options: ["none", "intent", "render"]
|
|
436
448
|
}
|
|
437
449
|
};
|
|
@@ -120,7 +120,7 @@ const props = {
|
|
|
120
120
|
"aria-autocomplete": {
|
|
121
121
|
description: "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.",
|
|
122
122
|
required: false,
|
|
123
|
-
control: "
|
|
123
|
+
control: "select",
|
|
124
124
|
type: "string",
|
|
125
125
|
options: ["list", "none", "inline", "both"]
|
|
126
126
|
},
|
|
@@ -383,7 +383,7 @@ const props = {
|
|
|
383
383
|
"aria-sort": {
|
|
384
384
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
385
385
|
required: false,
|
|
386
|
-
control: "
|
|
386
|
+
control: "select",
|
|
387
387
|
type: "string",
|
|
388
388
|
options: ["none", "ascending", "descending", "other"]
|
|
389
389
|
},
|
|
@@ -119,7 +119,7 @@ const props = {
|
|
|
119
119
|
"aria-autocomplete": {
|
|
120
120
|
description: "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.",
|
|
121
121
|
required: false,
|
|
122
|
-
control: "
|
|
122
|
+
control: "select",
|
|
123
123
|
type: "string",
|
|
124
124
|
options: ["list", "none", "inline", "both"]
|
|
125
125
|
},
|
|
@@ -382,7 +382,7 @@ const props = {
|
|
|
382
382
|
"aria-sort": {
|
|
383
383
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
384
384
|
required: false,
|
|
385
|
-
control: "
|
|
385
|
+
control: "select",
|
|
386
386
|
type: "string",
|
|
387
387
|
options: ["none", "ascending", "descending", "other"]
|
|
388
388
|
},
|
|
@@ -414,7 +414,7 @@ const props = {
|
|
|
414
414
|
start: { required: false, control: "number", type: "number" },
|
|
415
415
|
type: {
|
|
416
416
|
required: false,
|
|
417
|
-
control: "
|
|
417
|
+
control: "select",
|
|
418
418
|
type: "string",
|
|
419
419
|
options: ["a", "i", "1", "A", "I"]
|
|
420
420
|
},
|
|
@@ -119,7 +119,7 @@ const props = {
|
|
|
119
119
|
"aria-autocomplete": {
|
|
120
120
|
description: "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.",
|
|
121
121
|
required: false,
|
|
122
|
-
control: "
|
|
122
|
+
control: "select",
|
|
123
123
|
type: "string",
|
|
124
124
|
options: ["list", "none", "inline", "both"]
|
|
125
125
|
},
|
|
@@ -382,7 +382,7 @@ const props = {
|
|
|
382
382
|
"aria-sort": {
|
|
383
383
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
384
384
|
required: false,
|
|
385
|
-
control: "
|
|
385
|
+
control: "select",
|
|
386
386
|
type: "string",
|
|
387
387
|
options: ["none", "ascending", "descending", "other"]
|
|
388
388
|
},
|
|
@@ -26,12 +26,17 @@ const props = {
|
|
|
26
26
|
style: { required: false, control: "text", type: "string" },
|
|
27
27
|
title: { required: false, control: "text", type: "string" },
|
|
28
28
|
download: { required: false, control: "text", type: "string" },
|
|
29
|
-
href: { required: false, control: "text", type: "string"
|
|
29
|
+
href: { required: false, control: "text", type: "string" },
|
|
30
30
|
hrefLang: { required: false, control: "text", type: "string" },
|
|
31
31
|
media: { required: false, control: "text", type: "string" },
|
|
32
32
|
ping: { required: false, control: "text", type: "string" },
|
|
33
33
|
rel: { required: false, control: "text", type: "string" },
|
|
34
|
-
target: {
|
|
34
|
+
target: {
|
|
35
|
+
required: false,
|
|
36
|
+
control: "select",
|
|
37
|
+
type: "string",
|
|
38
|
+
options: ["self", "blank", "parent", "top"]
|
|
39
|
+
},
|
|
35
40
|
type: { required: false, control: "text", type: "string" },
|
|
36
41
|
referrerPolicy: {
|
|
37
42
|
required: false,
|
|
@@ -143,7 +148,7 @@ const props = {
|
|
|
143
148
|
"aria-autocomplete": {
|
|
144
149
|
description: "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.",
|
|
145
150
|
required: false,
|
|
146
|
-
control: "
|
|
151
|
+
control: "select",
|
|
147
152
|
type: "string",
|
|
148
153
|
options: ["list", "none", "inline", "both"]
|
|
149
154
|
},
|
|
@@ -406,7 +411,7 @@ const props = {
|
|
|
406
411
|
"aria-sort": {
|
|
407
412
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
408
413
|
required: false,
|
|
409
|
-
control: "
|
|
414
|
+
control: "select",
|
|
410
415
|
type: "string",
|
|
411
416
|
options: ["none", "ascending", "descending", "other"]
|
|
412
417
|
},
|
|
@@ -433,5 +438,11 @@ const props = {
|
|
|
433
438
|
required: false,
|
|
434
439
|
control: "text",
|
|
435
440
|
type: "string"
|
|
441
|
+
},
|
|
442
|
+
prefetch: {
|
|
443
|
+
required: false,
|
|
444
|
+
control: "radio",
|
|
445
|
+
type: "string",
|
|
446
|
+
options: ["none", "intent", "render"]
|
|
436
447
|
}
|
|
437
448
|
};
|
|
@@ -119,7 +119,7 @@ const props = {
|
|
|
119
119
|
"aria-autocomplete": {
|
|
120
120
|
description: "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.",
|
|
121
121
|
required: false,
|
|
122
|
-
control: "
|
|
122
|
+
control: "select",
|
|
123
123
|
type: "string",
|
|
124
124
|
options: ["list", "none", "inline", "both"]
|
|
125
125
|
},
|
|
@@ -382,7 +382,7 @@ const props = {
|
|
|
382
382
|
"aria-sort": {
|
|
383
383
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
384
384
|
required: false,
|
|
385
|
-
control: "
|
|
385
|
+
control: "select",
|
|
386
386
|
type: "string",
|
|
387
387
|
options: ["none", "ascending", "descending", "other"]
|
|
388
388
|
},
|
|
@@ -119,7 +119,7 @@ const props = {
|
|
|
119
119
|
"aria-autocomplete": {
|
|
120
120
|
description: "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.",
|
|
121
121
|
required: false,
|
|
122
|
-
control: "
|
|
122
|
+
control: "select",
|
|
123
123
|
type: "string",
|
|
124
124
|
options: ["list", "none", "inline", "both"]
|
|
125
125
|
},
|
|
@@ -382,7 +382,7 @@ const props = {
|
|
|
382
382
|
"aria-sort": {
|
|
383
383
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
384
384
|
required: false,
|
|
385
|
-
control: "
|
|
385
|
+
control: "select",
|
|
386
386
|
type: "string",
|
|
387
387
|
options: ["none", "ascending", "descending", "other"]
|
|
388
388
|
},
|
|
@@ -119,7 +119,7 @@ const props = {
|
|
|
119
119
|
"aria-autocomplete": {
|
|
120
120
|
description: "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.",
|
|
121
121
|
required: false,
|
|
122
|
-
control: "
|
|
122
|
+
control: "select",
|
|
123
123
|
type: "string",
|
|
124
124
|
options: ["list", "none", "inline", "both"]
|
|
125
125
|
},
|
|
@@ -382,7 +382,7 @@ const props = {
|
|
|
382
382
|
"aria-sort": {
|
|
383
383
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
384
384
|
required: false,
|
|
385
|
-
control: "
|
|
385
|
+
control: "select",
|
|
386
386
|
type: "string",
|
|
387
387
|
options: ["none", "ascending", "descending", "other"]
|
|
388
388
|
},
|
|
@@ -119,7 +119,7 @@ const props = {
|
|
|
119
119
|
"aria-autocomplete": {
|
|
120
120
|
description: "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.",
|
|
121
121
|
required: false,
|
|
122
|
-
control: "
|
|
122
|
+
control: "select",
|
|
123
123
|
type: "string",
|
|
124
124
|
options: ["list", "none", "inline", "both"]
|
|
125
125
|
},
|
|
@@ -382,7 +382,7 @@ const props = {
|
|
|
382
382
|
"aria-sort": {
|
|
383
383
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
384
384
|
required: false,
|
|
385
|
-
control: "
|
|
385
|
+
control: "select",
|
|
386
386
|
type: "string",
|
|
387
387
|
options: ["none", "ascending", "descending", "other"]
|
|
388
388
|
},
|
|
@@ -119,7 +119,7 @@ const props = {
|
|
|
119
119
|
"aria-autocomplete": {
|
|
120
120
|
description: "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.",
|
|
121
121
|
required: false,
|
|
122
|
-
control: "
|
|
122
|
+
control: "select",
|
|
123
123
|
type: "string",
|
|
124
124
|
options: ["list", "none", "inline", "both"]
|
|
125
125
|
},
|
|
@@ -382,7 +382,7 @@ const props = {
|
|
|
382
382
|
"aria-sort": {
|
|
383
383
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
384
384
|
required: false,
|
|
385
|
-
control: "
|
|
385
|
+
control: "select",
|
|
386
386
|
type: "string",
|
|
387
387
|
options: ["none", "ascending", "descending", "other"]
|
|
388
388
|
},
|
|
@@ -24,10 +24,13 @@ module.exports = __toCommonJS(link_exports);
|
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_react = require("react");
|
|
26
26
|
const Link = (0, import_react.forwardRef)(
|
|
27
|
-
({ href = "", ...props }, ref) =>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
({ href = "", target = "self", ...props }, ref) => {
|
|
28
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
|
|
29
|
+
...props,
|
|
30
|
+
target: `_${target}`,
|
|
31
|
+
href,
|
|
32
|
+
ref
|
|
33
|
+
});
|
|
34
|
+
}
|
|
32
35
|
);
|
|
33
36
|
Link.displayName = "Link";
|
|
@@ -23,11 +23,9 @@ __export(rich_text_link_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(rich_text_link_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_react = require("react");
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
})
|
|
32
|
-
);
|
|
26
|
+
var import_link = require("./link");
|
|
27
|
+
const RichTextLink = (0, import_react.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.Link, {
|
|
28
|
+
...props,
|
|
29
|
+
ref
|
|
30
|
+
}));
|
|
33
31
|
RichTextLink.displayName = "RichTextLink";
|
package/lib/cjs/tree/root.cjs
CHANGED
|
@@ -28,7 +28,7 @@ var import_components = require("../components");
|
|
|
28
28
|
var import_custom_components = require("../app/custom-components");
|
|
29
29
|
var import_params = require("../app/params");
|
|
30
30
|
var import_props = require("../props");
|
|
31
|
-
const denormalizeTree = (instances) => {
|
|
31
|
+
const denormalizeTree = (instances, rootInstanceId) => {
|
|
32
32
|
const convertTree = (instance) => {
|
|
33
33
|
const legacyInstance = {
|
|
34
34
|
type: "instance",
|
|
@@ -48,7 +48,11 @@ const denormalizeTree = (instances) => {
|
|
|
48
48
|
}
|
|
49
49
|
return legacyInstance;
|
|
50
50
|
};
|
|
51
|
-
|
|
51
|
+
const rootInstance = instances.get(rootInstanceId);
|
|
52
|
+
if (rootInstance === void 0) {
|
|
53
|
+
return void 0;
|
|
54
|
+
}
|
|
55
|
+
return convertTree(rootInstance);
|
|
52
56
|
};
|
|
53
57
|
const InstanceRoot = ({
|
|
54
58
|
data,
|
|
@@ -56,15 +60,19 @@ const InstanceRoot = ({
|
|
|
56
60
|
customComponents = import_custom_components.customComponents,
|
|
57
61
|
getComponent
|
|
58
62
|
}) => {
|
|
59
|
-
if (data.tree === null) {
|
|
60
|
-
throw new Error("Tree is null");
|
|
61
|
-
}
|
|
62
63
|
(0, import_params.setParams)(data.params ?? null);
|
|
63
64
|
(0, import_components.registerComponents)(customComponents);
|
|
65
|
+
const instance = denormalizeTree(
|
|
66
|
+
new Map(data.build.instances),
|
|
67
|
+
data.page.rootInstanceId
|
|
68
|
+
);
|
|
69
|
+
if (instance === void 0) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
64
72
|
return (0, import_create_elements_tree.createElementsTree)({
|
|
65
|
-
instance
|
|
73
|
+
instance,
|
|
66
74
|
propsByInstanceIdStore: (0, import_nanostores.atom)(
|
|
67
|
-
(0, import_props.getPropsByInstanceId)(new Map(data.
|
|
75
|
+
(0, import_props.getPropsByInstanceId)(new Map(data.build.props))
|
|
68
76
|
),
|
|
69
77
|
assetsStore: (0, import_nanostores.atom)(new Map(data.assets.map((asset) => [asset.id, asset]))),
|
|
70
78
|
Component: Component ?? import_webstudio_component.WebstudioComponent,
|
|
@@ -97,7 +97,7 @@ const props = {
|
|
|
97
97
|
"aria-autocomplete": {
|
|
98
98
|
description: "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.",
|
|
99
99
|
required: false,
|
|
100
|
-
control: "
|
|
100
|
+
control: "select",
|
|
101
101
|
type: "string",
|
|
102
102
|
options: ["list", "none", "inline", "both"]
|
|
103
103
|
},
|
|
@@ -360,7 +360,7 @@ const props = {
|
|
|
360
360
|
"aria-sort": {
|
|
361
361
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
362
362
|
required: false,
|
|
363
|
-
control: "
|
|
363
|
+
control: "select",
|
|
364
364
|
type: "string",
|
|
365
365
|
options: ["none", "ascending", "descending", "other"]
|
|
366
366
|
},
|
|
@@ -96,7 +96,7 @@ const props = {
|
|
|
96
96
|
"aria-autocomplete": {
|
|
97
97
|
description: "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.",
|
|
98
98
|
required: false,
|
|
99
|
-
control: "
|
|
99
|
+
control: "select",
|
|
100
100
|
type: "string",
|
|
101
101
|
options: ["list", "none", "inline", "both"]
|
|
102
102
|
},
|
|
@@ -359,7 +359,7 @@ const props = {
|
|
|
359
359
|
"aria-sort": {
|
|
360
360
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
361
361
|
required: false,
|
|
362
|
-
control: "
|
|
362
|
+
control: "select",
|
|
363
363
|
type: "string",
|
|
364
364
|
options: ["none", "ascending", "descending", "other"]
|
|
365
365
|
},
|
|
@@ -96,7 +96,7 @@ const props = {
|
|
|
96
96
|
"aria-autocomplete": {
|
|
97
97
|
description: "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.",
|
|
98
98
|
required: false,
|
|
99
|
-
control: "
|
|
99
|
+
control: "select",
|
|
100
100
|
type: "string",
|
|
101
101
|
options: ["list", "none", "inline", "both"]
|
|
102
102
|
},
|
|
@@ -359,7 +359,7 @@ const props = {
|
|
|
359
359
|
"aria-sort": {
|
|
360
360
|
description: "Indicates if items in a table or grid are sorted in ascending or descending order.",
|
|
361
361
|
required: false,
|
|
362
|
-
control: "
|
|
362
|
+
control: "select",
|
|
363
363
|
type: "string",
|
|
364
364
|
options: ["none", "ascending", "descending", "other"]
|
|
365
365
|
},
|