tinacms 0.66.0 → 0.66.4

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.
@@ -70,6 +70,9 @@ declare type BaseComponents = {
70
70
  alt?: string;
71
71
  };
72
72
  hr?: {};
73
+ maybe_mdx?: {
74
+ children: JSX.Element;
75
+ };
73
76
  component_missing?: {
74
77
  name: string;
75
78
  };
@@ -39,7 +39,6 @@ const TinaMarkdown = ({
39
39
  }
40
40
  const nodes = Array.isArray(content) ? content : content.children;
41
41
  if (!nodes) {
42
- console.log(`Expected to find structured content for TinaMarkdown`);
43
42
  return null;
44
43
  }
45
44
  return /* @__PURE__ */ React.createElement(React.Fragment, null, nodes.map((child, index) => {
@@ -113,7 +112,8 @@ const TinaMarkdown = ({
113
112
  }));
114
113
  case "code_block":
115
114
  const value = child.children.map((item) => {
116
- return item.children[0].text;
115
+ var _a2;
116
+ return ((_a2 = item.children[0]) == null ? void 0 : _a2.text) || "";
117
117
  }).join("\n");
118
118
  if (components[child.type]) {
119
119
  const Component2 = components[child.type];
@@ -160,6 +160,8 @@ const TinaMarkdown = ({
160
160
  throw new Error(`No component provided for ${child.name}`);
161
161
  }
162
162
  }
163
+ case "maybe_mdx":
164
+ return null;
163
165
  default:
164
166
  if (typeof child.text === "string") {
165
167
  return /* @__PURE__ */ React.createElement(Leaf, __spreadValues({
package/dist/rich-text.js CHANGED
@@ -46,7 +46,6 @@ var __objRest = (source, exclude) => {
46
46
  }
47
47
  const nodes = Array.isArray(content) ? content : content.children;
48
48
  if (!nodes) {
49
- console.log(`Expected to find structured content for TinaMarkdown`);
50
49
  return null;
51
50
  }
52
51
  return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, nodes.map((child, index) => {
@@ -120,7 +119,8 @@ var __objRest = (source, exclude) => {
120
119
  }));
121
120
  case "code_block":
122
121
  const value = child.children.map((item) => {
123
- return item.children[0].text;
122
+ var _a2;
123
+ return ((_a2 = item.children[0]) == null ? void 0 : _a2.text) || "";
124
124
  }).join("\n");
125
125
  if (components[child.type]) {
126
126
  const Component2 = components[child.type];
@@ -167,6 +167,8 @@ var __objRest = (source, exclude) => {
167
167
  throw new Error(`No component provided for ${child.name}`);
168
168
  }
169
169
  }
170
+ case "maybe_mdx":
171
+ return null;
170
172
  default:
171
173
  if (typeof child.text === "string") {
172
174
  return /* @__PURE__ */ React__default["default"].createElement(Leaf, __spreadValues({