@uniformdev/canvas-next-rsc 19.207.1-alpha.11 → 19.207.1-alpha.28

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 CHANGED
@@ -134,10 +134,16 @@ var AssetRichTextNode = ({ node }) => {
134
134
  if (__asset === void 0) {
135
135
  return null;
136
136
  }
137
- if (__asset.type !== "image") {
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 /* @__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);
146
+ return null;
141
147
  };
142
148
 
143
149
  // src/components/nodes/HeadingRichTextNode.tsx
@@ -95,10 +95,16 @@ var AssetRichTextNode = ({ node }) => {
95
95
  if (__asset === void 0) {
96
96
  return null;
97
97
  }
98
- if (__asset.type !== "image") {
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 /* @__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);
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.1-alpha.11+682b1954b3",
3
+ "version": "19.207.1-alpha.28+369def3ba0",
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.1-alpha.11+682b1954b3",
65
- "@uniformdev/canvas-next-rsc-client": "^19.207.1-alpha.11+682b1954b3",
66
- "@uniformdev/canvas-next-rsc-shared": "^19.207.1-alpha.11+682b1954b3",
67
- "@uniformdev/canvas-react": "19.207.1-alpha.11+682b1954b3",
68
- "@uniformdev/context": "19.207.1-alpha.11+682b1954b3",
69
- "@uniformdev/project-map": "19.207.1-alpha.11+682b1954b3",
70
- "@uniformdev/redirect": "19.207.1-alpha.11+682b1954b3",
71
- "@uniformdev/richtext": "19.207.1-alpha.11+682b1954b3",
72
- "@uniformdev/webhooks": "19.207.1-alpha.11+682b1954b3",
64
+ "@uniformdev/canvas": "19.207.1-alpha.28+369def3ba0",
65
+ "@uniformdev/canvas-next-rsc-client": "^19.207.1-alpha.28+369def3ba0",
66
+ "@uniformdev/canvas-next-rsc-shared": "^19.207.1-alpha.28+369def3ba0",
67
+ "@uniformdev/canvas-react": "19.207.1-alpha.28+369def3ba0",
68
+ "@uniformdev/context": "19.207.1-alpha.28+369def3ba0",
69
+ "@uniformdev/project-map": "19.207.1-alpha.28+369def3ba0",
70
+ "@uniformdev/redirect": "19.207.1-alpha.28+369def3ba0",
71
+ "@uniformdev/richtext": "19.207.1-alpha.28+369def3ba0",
72
+ "@uniformdev/webhooks": "19.207.1-alpha.28+369def3ba0",
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": "682b1954b3ddfeb43952e44367c314cfe6feda69"
89
+ "gitHead": "369def3ba012b3fc314254d940448b9937e12900"
90
90
  }