@elytracms/next 0.0.101 → 0.0.103

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/index.js CHANGED
@@ -88,13 +88,11 @@ function bodyItemsOf(document, presentation) {
88
88
  }
89
89
  function compositionOf(document) {
90
90
  const body = document["body"];
91
- if (isCompositionishSequence(body) || Array.isArray(body) || isComponentNodeValue(body)) return body;
91
+ if (isCompositionishSequence(body)) return body;
92
92
  const content = document["content"];
93
- if (isCompositionishSequence(content) || Array.isArray(content) || isComponentNodeValue(content)) return content;
93
+ if (isCompositionishSequence(content)) return content;
94
94
  for (const value of Object.values(document)) {
95
95
  if (isCompositionishSequence(value)) return value;
96
- if (isComponentNodeValue(value)) return value;
97
- if (Array.isArray(value) && value.length > 0 && value.every(isComponentNodeValue)) return value;
98
96
  }
99
97
  return void 0;
100
98
  }
@@ -106,9 +104,6 @@ function isCompositionishSequence(value) {
106
104
  (node) => typeof node === "object" && node !== null && node.type === "elytra/component"
107
105
  );
108
106
  }
109
- function isComponentNodeValue(value) {
110
- return typeof value === "object" && value !== null && typeof value.id === "string" && typeof value.componentId === "string";
111
- }
112
107
  function mergeCacheTags(first, ...rest) {
113
108
  const all = [first, ...rest];
114
109
  return cacheTags({