jamdesk 1.1.85 → 1.1.86

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamdesk",
3
- "version": "1.1.85",
3
+ "version": "1.1.86",
4
4
  "description": "CLI for Jamdesk — build, preview, and deploy documentation sites from MDX. Dev server with hot reload, 50+ components, OpenAPI support, AI search, and Mintlify migration",
5
5
  "keywords": [
6
6
  "jamdesk",
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { ReactNode, Children, cloneElement, isValidElement, memo } from 'react';
3
+ import { ReactNode, Children, Fragment, cloneElement, isValidElement, memo } from 'react';
4
4
  import { getIconClass } from '@/lib/icon-utils';
5
5
  import { useStepSlug } from './StepSlugContext';
6
6
 
@@ -25,11 +25,25 @@ interface StepProps {
25
25
  function isStepComponent(child: unknown): boolean {
26
26
  if (!isValidElement(child)) return false;
27
27
  const type = child.type as { displayName?: string; name?: string };
28
- return (
28
+ if (
29
29
  type === Step ||
30
30
  type?.displayName === 'Step' ||
31
31
  type?.name === 'Step'
32
- );
32
+ ) {
33
+ return true;
34
+ }
35
+
36
+ const childProps = child.props as Record<string, unknown> | null;
37
+ if (childProps && Object.prototype.hasOwnProperty.call(childProps, 'title')) {
38
+ return true;
39
+ }
40
+
41
+ if (child.type === Fragment) return false;
42
+
43
+ // In the RSC + MDX path, nested client components can arrive as opaque
44
+ // client references instead of the local `Step` function. Direct custom
45
+ // elements inside <Steps> are Step-compatible; DOM nodes like <p> are not.
46
+ return typeof child.type !== 'string';
33
47
  }
34
48
 
35
49
  export const Steps = memo(function Steps({ children, titleSize = 'p' }: StepsProps) {