@uniformdev/canvas-next-rsc 19.177.2-alpha.10 → 19.178.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/dist/component.js CHANGED
@@ -48,13 +48,13 @@ var DefaultNotImplementedComponent = ({ component }) => {
48
48
  };
49
49
 
50
50
  // src/components/UniformRichText.tsx
51
- var import_richtext6 = require("@uniformdev/richtext");
52
- var import_react12 = __toESM(require("react"));
53
-
54
- // src/components/UniformRichTextNode.tsx
55
51
  var import_richtext5 = require("@uniformdev/richtext");
56
52
  var import_react11 = __toESM(require("react"));
57
53
 
54
+ // src/components/UniformRichTextNode.tsx
55
+ var import_richtext4 = require("@uniformdev/richtext");
56
+ var import_react10 = __toESM(require("react"));
57
+
58
58
  // src/components/nodes/HeadingRichTextNode.tsx
59
59
  var import_react2 = __toESM(require("react"));
60
60
  var HeadingRichTextNode = ({ children, node }) => {
@@ -107,34 +107,25 @@ var ParagraphRichTextNode = ({ children, node }) => {
107
107
  );
108
108
  };
109
109
 
110
- // src/components/nodes/TableCellRichTextNode.tsx
111
- var import_richtext3 = require("@uniformdev/richtext");
112
- var import_react8 = __toESM(require("react"));
113
- var TableCellRichTextNode = ({ children, node }) => {
114
- const { headerState } = node;
115
- const TableCellTag = (0, import_richtext3.getRichTextTagFromTableCellHeaderState)(headerState);
116
- return /* @__PURE__ */ import_react8.default.createElement(TableCellTag, null, children);
117
- };
118
-
119
110
  // src/components/nodes/TabRichTextNode.tsx
120
- var import_react9 = __toESM(require("react"));
111
+ var import_react8 = __toESM(require("react"));
121
112
  var TabRichTextNode = () => {
122
- return /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, " ");
113
+ return /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, " ");
123
114
  };
124
115
 
125
116
  // src/components/nodes/TextRichTextNode.tsx
126
- var import_richtext4 = require("@uniformdev/richtext");
127
- var import_react10 = __toESM(require("react"));
117
+ var import_richtext3 = require("@uniformdev/richtext");
118
+ var import_react9 = __toESM(require("react"));
128
119
  var TextRichTextNode = ({ node }) => {
129
120
  const { text, format } = node;
130
- const tags = (0, import_richtext4.getRichTextTagsFromTextFormat)(format);
131
- return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ import_react10.default.createElement(Tag, null, children), text) : text);
121
+ const tags = (0, import_richtext3.getRichTextTagsFromTextFormat)(format);
122
+ return /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ import_react9.default.createElement(Tag, null, children), text) : text);
132
123
  };
133
124
 
134
125
  // src/components/UniformRichTextNode.tsx
135
126
  function UniformRichTextNode({ node, ...props }) {
136
127
  var _a;
137
- if (!(0, import_richtext5.isRichTextNode)(node)) return null;
128
+ if (!(0, import_richtext4.isRichTextNode)(node)) return null;
138
129
  let NodeRenderer = (_a = props.resolveRichTextRenderer) == null ? void 0 : _a.call(props, node);
139
130
  if (typeof NodeRenderer === "undefined") {
140
131
  NodeRenderer = resolveRichTextDefaultRenderer(node);
@@ -142,8 +133,8 @@ function UniformRichTextNode({ node, ...props }) {
142
133
  if (!NodeRenderer) {
143
134
  return null;
144
135
  }
145
- const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ import_react11.default.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
146
- return /* @__PURE__ */ import_react11.default.createElement(NodeRenderer, { node }, children);
136
+ const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ import_react10.default.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
137
+ return /* @__PURE__ */ import_react10.default.createElement(NodeRenderer, { node }, children);
147
138
  }
148
139
  var rendererMap = /* @__PURE__ */ new Map([
149
140
  ["heading", HeadingRichTextNode],
@@ -152,32 +143,26 @@ var rendererMap = /* @__PURE__ */ new Map([
152
143
  ["list", ListRichTextNode],
153
144
  ["listitem", ListItemRichTextNode],
154
145
  ["paragraph", ParagraphRichTextNode],
155
- ["quote", ({ children }) => /* @__PURE__ */ import_react11.default.createElement("blockquote", null, children)],
146
+ ["quote", ({ children }) => /* @__PURE__ */ import_react10.default.createElement("blockquote", null, children)],
156
147
  [
157
148
  "code",
158
- ({ children }) => /* @__PURE__ */ import_react11.default.createElement("pre", null, /* @__PURE__ */ import_react11.default.createElement("code", null, children))
149
+ ({ children }) => /* @__PURE__ */ import_react10.default.createElement("pre", null, /* @__PURE__ */ import_react10.default.createElement("code", null, children))
159
150
  ],
160
- ["root", ({ children }) => /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, children)],
151
+ ["root", ({ children }) => /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, children)],
161
152
  ["text", TextRichTextNode],
162
- ["tab", TabRichTextNode],
163
- [
164
- "table",
165
- ({ children }) => /* @__PURE__ */ import_react11.default.createElement("table", null, /* @__PURE__ */ import_react11.default.createElement("tbody", null, children))
166
- ],
167
- ["tablerow", ({ children }) => /* @__PURE__ */ import_react11.default.createElement("tr", null, children)],
168
- ["tablecell", TableCellRichTextNode]
153
+ ["tab", TabRichTextNode]
169
154
  ]);
170
155
  var resolveRichTextDefaultRenderer = (node) => {
171
156
  return rendererMap.get(node.type);
172
157
  };
173
158
 
174
159
  // src/components/UniformRichText.tsx
175
- var UniformRichText = import_react12.default.forwardRef(function UniformRichText2({ parameterId, component, resolveRichTextRenderer, as: Tag = "div", ...props }, ref) {
160
+ var UniformRichText = import_react11.default.forwardRef(function UniformRichText2({ parameterId, component, resolveRichTextRenderer, as: Tag = "div", ...props }, ref) {
176
161
  var _a;
177
162
  const parameter = (_a = component == null ? void 0 : component.parameters) == null ? void 0 : _a[parameterId];
178
163
  const value = parameter == null ? void 0 : parameter.value;
179
- if (!value || !(0, import_richtext6.isRichTextValue)(value) || (0, import_richtext6.isRichTextValueConsideredEmpty)(value)) return null;
180
- return Tag === null ? /* @__PURE__ */ import_react12.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react12.default.createElement(Tag, { ref, ...props }, /* @__PURE__ */ import_react12.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }));
164
+ if (!value || !(0, import_richtext5.isRichTextValue)(value) || (0, import_richtext5.isRichTextValueConsideredEmpty)(value)) return null;
165
+ return Tag === null ? /* @__PURE__ */ import_react11.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react11.default.createElement(Tag, { ref, ...props }, /* @__PURE__ */ import_react11.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }));
181
166
  });
182
167
 
183
168
  // src/components/UniformSlot.tsx
@@ -208,9 +193,9 @@ var UniformSlot = ({ data, slot, children }) => {
208
193
 
209
194
  // src/components/UniformText.tsx
210
195
  var import_core = require("@uniformdev/canvas-react/core");
211
- var import_react13 = __toESM(require("react"));
196
+ var import_react12 = __toESM(require("react"));
212
197
  var UniformText = ({ context, ...rest }) => {
213
- return /* @__PURE__ */ import_react13.default.createElement(
198
+ return /* @__PURE__ */ import_react12.default.createElement(
214
199
  import_core.PureUniformText,
215
200
  {
216
201
  ...rest,
@@ -9,11 +9,11 @@ import {
9
9
  isRichTextValue,
10
10
  isRichTextValueConsideredEmpty
11
11
  } from "@uniformdev/richtext";
12
- import React12 from "react";
12
+ import React11 from "react";
13
13
 
14
14
  // src/components/UniformRichTextNode.tsx
15
15
  import { isRichTextNode } from "@uniformdev/richtext";
16
- import React11 from "react";
16
+ import React10 from "react";
17
17
 
18
18
  // src/components/nodes/HeadingRichTextNode.tsx
19
19
  import React2 from "react";
@@ -67,28 +67,19 @@ var ParagraphRichTextNode = ({ children, node }) => {
67
67
  );
68
68
  };
69
69
 
70
- // src/components/nodes/TableCellRichTextNode.tsx
71
- import { getRichTextTagFromTableCellHeaderState } from "@uniformdev/richtext";
72
- import React8 from "react";
73
- var TableCellRichTextNode = ({ children, node }) => {
74
- const { headerState } = node;
75
- const TableCellTag = getRichTextTagFromTableCellHeaderState(headerState);
76
- return /* @__PURE__ */ React8.createElement(TableCellTag, null, children);
77
- };
78
-
79
70
  // src/components/nodes/TabRichTextNode.tsx
80
- import React9 from "react";
71
+ import React8 from "react";
81
72
  var TabRichTextNode = () => {
82
- return /* @__PURE__ */ React9.createElement(React9.Fragment, null, " ");
73
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, " ");
83
74
  };
84
75
 
85
76
  // src/components/nodes/TextRichTextNode.tsx
86
77
  import { getRichTextTagsFromTextFormat } from "@uniformdev/richtext";
87
- import React10 from "react";
78
+ import React9 from "react";
88
79
  var TextRichTextNode = ({ node }) => {
89
80
  const { text, format } = node;
90
81
  const tags = getRichTextTagsFromTextFormat(format);
91
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ React10.createElement(Tag, null, children), text) : text);
82
+ return /* @__PURE__ */ React9.createElement(React9.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ React9.createElement(Tag, null, children), text) : text);
92
83
  };
93
84
 
94
85
  // src/components/UniformRichTextNode.tsx
@@ -102,8 +93,8 @@ function UniformRichTextNode({ node, ...props }) {
102
93
  if (!NodeRenderer) {
103
94
  return null;
104
95
  }
105
- const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ React11.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
106
- return /* @__PURE__ */ React11.createElement(NodeRenderer, { node }, children);
96
+ const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ React10.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
97
+ return /* @__PURE__ */ React10.createElement(NodeRenderer, { node }, children);
107
98
  }
108
99
  var rendererMap = /* @__PURE__ */ new Map([
109
100
  ["heading", HeadingRichTextNode],
@@ -112,32 +103,26 @@ var rendererMap = /* @__PURE__ */ new Map([
112
103
  ["list", ListRichTextNode],
113
104
  ["listitem", ListItemRichTextNode],
114
105
  ["paragraph", ParagraphRichTextNode],
115
- ["quote", ({ children }) => /* @__PURE__ */ React11.createElement("blockquote", null, children)],
106
+ ["quote", ({ children }) => /* @__PURE__ */ React10.createElement("blockquote", null, children)],
116
107
  [
117
108
  "code",
118
- ({ children }) => /* @__PURE__ */ React11.createElement("pre", null, /* @__PURE__ */ React11.createElement("code", null, children))
109
+ ({ children }) => /* @__PURE__ */ React10.createElement("pre", null, /* @__PURE__ */ React10.createElement("code", null, children))
119
110
  ],
120
- ["root", ({ children }) => /* @__PURE__ */ React11.createElement(React11.Fragment, null, children)],
111
+ ["root", ({ children }) => /* @__PURE__ */ React10.createElement(React10.Fragment, null, children)],
121
112
  ["text", TextRichTextNode],
122
- ["tab", TabRichTextNode],
123
- [
124
- "table",
125
- ({ children }) => /* @__PURE__ */ React11.createElement("table", null, /* @__PURE__ */ React11.createElement("tbody", null, children))
126
- ],
127
- ["tablerow", ({ children }) => /* @__PURE__ */ React11.createElement("tr", null, children)],
128
- ["tablecell", TableCellRichTextNode]
113
+ ["tab", TabRichTextNode]
129
114
  ]);
130
115
  var resolveRichTextDefaultRenderer = (node) => {
131
116
  return rendererMap.get(node.type);
132
117
  };
133
118
 
134
119
  // src/components/UniformRichText.tsx
135
- var UniformRichText = React12.forwardRef(function UniformRichText2({ parameterId, component, resolveRichTextRenderer, as: Tag = "div", ...props }, ref) {
120
+ var UniformRichText = React11.forwardRef(function UniformRichText2({ parameterId, component, resolveRichTextRenderer, as: Tag = "div", ...props }, ref) {
136
121
  var _a;
137
122
  const parameter = (_a = component == null ? void 0 : component.parameters) == null ? void 0 : _a[parameterId];
138
123
  const value = parameter == null ? void 0 : parameter.value;
139
124
  if (!value || !isRichTextValue(value) || isRichTextValueConsideredEmpty(value)) return null;
140
- return Tag === null ? /* @__PURE__ */ React12.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React12.createElement(Tag, { ref, ...props }, /* @__PURE__ */ React12.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }));
125
+ return Tag === null ? /* @__PURE__ */ React11.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ React11.createElement(Tag, { ref, ...props }, /* @__PURE__ */ React11.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }));
141
126
  });
142
127
 
143
128
  // src/components/UniformSlot.tsx
@@ -168,9 +153,9 @@ var UniformSlot = ({ data, slot, children }) => {
168
153
 
169
154
  // src/components/UniformText.tsx
170
155
  import { PureUniformText } from "@uniformdev/canvas-react/core";
171
- import React13 from "react";
156
+ import React12 from "react";
172
157
  var UniformText = ({ context, ...rest }) => {
173
- return /* @__PURE__ */ React13.createElement(
158
+ return /* @__PURE__ */ React12.createElement(
174
159
  PureUniformText,
175
160
  {
176
161
  ...rest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next-rsc",
3
- "version": "19.177.2-alpha.10+c9cb5f414c",
3
+ "version": "19.178.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "scripts": {
6
6
  "build": "tsup",
@@ -14,22 +14,22 @@
14
14
  "exports": {
15
15
  ".": {
16
16
  "require": "./dist/index.js",
17
- "import": "./dist/index.esm.js",
17
+ "import": "./dist/index.js",
18
18
  "types": "./dist/index.d.ts"
19
19
  },
20
20
  "./handler": {
21
21
  "require": "./dist/handler.js",
22
- "import": "./dist/handler.mjs",
22
+ "import": "./dist/handler.js",
23
23
  "types": "./dist/handler.d.ts"
24
24
  },
25
25
  "./config": {
26
26
  "require": "./dist/config.js",
27
- "import": "./dist/config.mjs",
27
+ "import": "./dist/config.js",
28
28
  "types": "./dist/config.d.ts"
29
29
  },
30
30
  "./component": {
31
31
  "require": "./dist/component.js",
32
- "import": "./dist/component.mjs",
32
+ "import": "./dist/component.js",
33
33
  "types": "./dist/component.d.ts"
34
34
  }
35
35
  },
@@ -61,15 +61,15 @@
61
61
  "react-dom": "18.2.0"
62
62
  },
63
63
  "dependencies": {
64
- "@uniformdev/canvas": "19.177.2-alpha.10+c9cb5f414c",
65
- "@uniformdev/canvas-next-rsc-client": "^19.177.2-alpha.10+c9cb5f414c",
66
- "@uniformdev/canvas-next-rsc-shared": "^19.177.2-alpha.10+c9cb5f414c",
67
- "@uniformdev/canvas-react": "19.177.2-alpha.10+c9cb5f414c",
68
- "@uniformdev/context": "19.177.2-alpha.10+c9cb5f414c",
69
- "@uniformdev/project-map": "19.177.2-alpha.10+c9cb5f414c",
70
- "@uniformdev/redirect": "19.177.2-alpha.10+c9cb5f414c",
71
- "@uniformdev/richtext": "19.177.2-alpha.10+c9cb5f414c",
72
- "@uniformdev/webhooks": "19.177.2-alpha.10+c9cb5f414c",
64
+ "@uniformdev/canvas": "19.178.0",
65
+ "@uniformdev/canvas-next-rsc-client": "^19.178.0",
66
+ "@uniformdev/canvas-next-rsc-shared": "^19.178.0",
67
+ "@uniformdev/canvas-react": "19.178.0",
68
+ "@uniformdev/context": "19.178.0",
69
+ "@uniformdev/project-map": "19.178.0",
70
+ "@uniformdev/redirect": "19.178.0",
71
+ "@uniformdev/richtext": "19.178.0",
72
+ "@uniformdev/webhooks": "19.178.0",
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": "c9cb5f414c41dc1d2c37dff02a5b87484901657e"
89
+ "gitHead": "66721c01d9bf53917e5c4d83e2e578248e72560d"
90
90
  }