@uniformdev/canvas-next-rsc 19.207.0 → 19.207.1-alpha.20
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/dist/component.js +9 -3
- package/dist/component.mjs +9 -3
- package/package.json +11 -11
package/dist/component.js
CHANGED
|
@@ -134,10 +134,16 @@ var AssetRichTextNode = ({ node }) => {
|
|
|
134
134
|
if (__asset === void 0) {
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
|
-
if (__asset.type
|
|
138
|
-
return null;
|
|
137
|
+
if (__asset.type === "image") {
|
|
138
|
+
return /* @__PURE__ */ import_react2.default.createElement("figure", null, /* @__PURE__ */ import_react2.default.createElement("img", { src: __asset.fields.url.value, alt: (_a = __asset.fields.title) == null ? void 0 : _a.value }), ((_b = __asset.fields.description) == null ? void 0 : _b.value) ? /* @__PURE__ */ import_react2.default.createElement("figcaption", null, __asset.fields.description.value) : null);
|
|
139
|
+
}
|
|
140
|
+
if (__asset.type === "video") {
|
|
141
|
+
return /* @__PURE__ */ import_react2.default.createElement("video", { src: __asset.fields.url.value, controls: true });
|
|
142
|
+
}
|
|
143
|
+
if (__asset.type === "audio") {
|
|
144
|
+
return /* @__PURE__ */ import_react2.default.createElement("audio", { src: __asset.fields.url.value, controls: true });
|
|
139
145
|
}
|
|
140
|
-
return
|
|
146
|
+
return null;
|
|
141
147
|
};
|
|
142
148
|
|
|
143
149
|
// src/components/nodes/HeadingRichTextNode.tsx
|
package/dist/component.mjs
CHANGED
|
@@ -95,10 +95,16 @@ var AssetRichTextNode = ({ node }) => {
|
|
|
95
95
|
if (__asset === void 0) {
|
|
96
96
|
return null;
|
|
97
97
|
}
|
|
98
|
-
if (__asset.type
|
|
99
|
-
return null;
|
|
98
|
+
if (__asset.type === "image") {
|
|
99
|
+
return /* @__PURE__ */ React2.createElement("figure", null, /* @__PURE__ */ React2.createElement("img", { src: __asset.fields.url.value, alt: (_a = __asset.fields.title) == null ? void 0 : _a.value }), ((_b = __asset.fields.description) == null ? void 0 : _b.value) ? /* @__PURE__ */ React2.createElement("figcaption", null, __asset.fields.description.value) : null);
|
|
100
|
+
}
|
|
101
|
+
if (__asset.type === "video") {
|
|
102
|
+
return /* @__PURE__ */ React2.createElement("video", { src: __asset.fields.url.value, controls: true });
|
|
103
|
+
}
|
|
104
|
+
if (__asset.type === "audio") {
|
|
105
|
+
return /* @__PURE__ */ React2.createElement("audio", { src: __asset.fields.url.value, controls: true });
|
|
100
106
|
}
|
|
101
|
-
return
|
|
107
|
+
return null;
|
|
102
108
|
};
|
|
103
109
|
|
|
104
110
|
// src/components/nodes/HeadingRichTextNode.tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-next-rsc",
|
|
3
|
-
"version": "19.207.
|
|
3
|
+
"version": "19.207.1-alpha.20+9dc4b12464",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsup",
|
|
@@ -61,15 +61,15 @@
|
|
|
61
61
|
"react-dom": "18.3.1"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@uniformdev/canvas": "19.207.
|
|
65
|
-
"@uniformdev/canvas-next-rsc-client": "^19.207.
|
|
66
|
-
"@uniformdev/canvas-next-rsc-shared": "^19.207.
|
|
67
|
-
"@uniformdev/canvas-react": "19.207.
|
|
68
|
-
"@uniformdev/context": "19.207.
|
|
69
|
-
"@uniformdev/project-map": "19.207.
|
|
70
|
-
"@uniformdev/redirect": "19.207.
|
|
71
|
-
"@uniformdev/richtext": "19.207.
|
|
72
|
-
"@uniformdev/webhooks": "19.207.
|
|
64
|
+
"@uniformdev/canvas": "19.207.1-alpha.20+9dc4b12464",
|
|
65
|
+
"@uniformdev/canvas-next-rsc-client": "^19.207.1-alpha.20+9dc4b12464",
|
|
66
|
+
"@uniformdev/canvas-next-rsc-shared": "^19.207.1-alpha.20+9dc4b12464",
|
|
67
|
+
"@uniformdev/canvas-react": "19.207.1-alpha.20+9dc4b12464",
|
|
68
|
+
"@uniformdev/context": "19.207.1-alpha.20+9dc4b12464",
|
|
69
|
+
"@uniformdev/project-map": "19.207.1-alpha.20+9dc4b12464",
|
|
70
|
+
"@uniformdev/redirect": "19.207.1-alpha.20+9dc4b12464",
|
|
71
|
+
"@uniformdev/richtext": "19.207.1-alpha.20+9dc4b12464",
|
|
72
|
+
"@uniformdev/webhooks": "19.207.1-alpha.20+9dc4b12464",
|
|
73
73
|
"@vercel/edge-config": "^0.4.0",
|
|
74
74
|
"encoding": "^0.1.13",
|
|
75
75
|
"server-only": "^0.0.1",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "9dc4b1246494bc273e86dd22cd4818aa4ebd1c24"
|
|
90
90
|
}
|