@alpaca-headless/alpaca-headless 1.0.3929 → 1.0.3931

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.
@@ -25,6 +25,6 @@ export declare function Placeholder({ name, content, tag, className, description
25
25
  tag?: string;
26
26
  className?: string;
27
27
  content: Page | ComponentData;
28
- getComponentProps?: ({ component, context, index, count, }: RenderingProps) => any;
28
+ getComponentProps?: ({ component, context, index, count, }: RenderingProps) => RenderingProps & Record<string, any>;
29
29
  }): Promise<JSX.Element | undefined>;
30
30
  export declare function renderPlaceholder(wrap: (children: JSX.Element) => JSX.Element, componentsWithProps: PlaceholderComponent[], placeholderData: PlaceholderData, context: ServerRenderContext, description?: string): JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpaca-headless/alpaca-headless",
3
- "version": "1.0.3929",
3
+ "version": "1.0.3931",
4
4
  "type": "module",
5
5
  "description": "Alpaca Headless",
6
6
  "main": "dist/index.js",
@@ -52,7 +52,7 @@ export async function Placeholder({
52
52
  context,
53
53
  index,
54
54
  count,
55
- }: RenderingProps) => any;
55
+ }: RenderingProps) => RenderingProps & Record<string, any>;
56
56
  }) {
57
57
  const parentData = content;
58
58
 
@@ -212,9 +212,7 @@ export function renderPlaceholder(
212
212
  {componentsWithProps.map(({ Component, data, props }, index) => {
213
213
  return (
214
214
  <React.Fragment key={index}>
215
- <ErrorBoundary
216
- FallbackComponent={ErrorFallback}
217
- >
215
+ <ErrorBoundary FallbackComponent={ErrorFallback}>
218
216
  {renderMarkers && (
219
217
  <script
220
218
  data-component-start={data.id}
@@ -232,7 +230,7 @@ export function renderPlaceholder(
232
230
  }
233
231
  />
234
232
  )}
235
- <Component {...props} />
233
+ <Component {...props} />
236
234
  {renderMarkers && <script data-component-end={data.id}></script>}
237
235
  </ErrorBoundary>
238
236
  </React.Fragment>