@humain/ui 2.1.62 → 2.1.65

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.
Files changed (160) hide show
  1. package/dist/components/organisms/ai/AIToolCall/AIToolCall.d.ts +9 -3
  2. package/dist/components/organisms/ai/AIToolRun/index.d.ts +1 -1
  3. package/dist/components/organisms/ai/AIToolRun/validation.d.ts +24 -3
  4. package/dist/components/organisms/ai/_shared/format-ai-duration.d.ts +1 -0
  5. package/dist/components/organisms/ai/_shared/workflow-step-renderer.d.ts +1 -0
  6. package/dist/index.js +52 -52
  7. package/dist/index151.js +1 -1
  8. package/dist/index174.js +10 -333
  9. package/dist/index174.js.map +1 -1
  10. package/dist/index175.js +310 -137
  11. package/dist/index175.js.map +1 -1
  12. package/dist/index176.js +148 -174
  13. package/dist/index176.js.map +1 -1
  14. package/dist/index177.js +186 -78
  15. package/dist/index177.js.map +1 -1
  16. package/dist/index178.js +74 -124
  17. package/dist/index178.js.map +1 -1
  18. package/dist/index179.js +133 -1
  19. package/dist/index179.js.map +1 -0
  20. package/dist/index180.js +2 -201
  21. package/dist/index181.js +201 -0
  22. package/dist/{index180.js.map → index181.js.map} +1 -1
  23. package/dist/index183.js +130 -166
  24. package/dist/index183.js.map +1 -1
  25. package/dist/index184.js +195 -983
  26. package/dist/index184.js.map +1 -1
  27. package/dist/index185.js +1069 -369
  28. package/dist/index185.js.map +1 -1
  29. package/dist/index186.js +395 -197
  30. package/dist/index186.js.map +1 -1
  31. package/dist/index187.js +198 -243
  32. package/dist/index187.js.map +1 -1
  33. package/dist/index188.js +263 -3
  34. package/dist/index188.js.map +1 -1
  35. package/dist/index189.js +3 -209
  36. package/dist/index189.js.map +1 -1
  37. package/dist/index190.js +190 -777
  38. package/dist/index190.js.map +1 -1
  39. package/dist/index191.js +771 -252
  40. package/dist/index191.js.map +1 -1
  41. package/dist/index192.js +250 -65
  42. package/dist/index192.js.map +1 -1
  43. package/dist/index193.js +72 -523
  44. package/dist/index193.js.map +1 -1
  45. package/dist/index194.js +537 -144
  46. package/dist/index194.js.map +1 -1
  47. package/dist/index195.js +139 -720
  48. package/dist/index195.js.map +1 -1
  49. package/dist/index196.js +707 -167
  50. package/dist/index196.js.map +1 -1
  51. package/dist/index197.js +175 -151
  52. package/dist/index197.js.map +1 -1
  53. package/dist/index198.js +152 -487
  54. package/dist/index198.js.map +1 -1
  55. package/dist/index199.js +472 -225
  56. package/dist/index199.js.map +1 -1
  57. package/dist/index200.js +236 -260
  58. package/dist/index200.js.map +1 -1
  59. package/dist/index201.js +265 -215
  60. package/dist/index201.js.map +1 -1
  61. package/dist/index202.js +207 -307
  62. package/dist/index202.js.map +1 -1
  63. package/dist/index203.js +302 -135
  64. package/dist/index203.js.map +1 -1
  65. package/dist/index204.js +140 -271
  66. package/dist/index204.js.map +1 -1
  67. package/dist/index205.js +263 -253
  68. package/dist/index205.js.map +1 -1
  69. package/dist/index206.js +244 -137
  70. package/dist/index206.js.map +1 -1
  71. package/dist/index207.js +100 -238
  72. package/dist/index207.js.map +1 -1
  73. package/dist/index208.js +278 -74
  74. package/dist/index208.js.map +1 -1
  75. package/dist/index209.js +56 -97
  76. package/dist/index209.js.map +1 -1
  77. package/dist/index210.js +142 -47
  78. package/dist/index210.js.map +1 -1
  79. package/dist/index211.js +38 -84
  80. package/dist/index211.js.map +1 -1
  81. package/dist/index212.js +72 -252
  82. package/dist/index212.js.map +1 -1
  83. package/dist/index213.js +274 -26
  84. package/dist/index213.js.map +1 -1
  85. package/dist/index214.js +29 -94
  86. package/dist/index214.js.map +1 -1
  87. package/dist/index215.js +98 -25
  88. package/dist/index215.js.map +1 -1
  89. package/dist/index216.js +20 -565
  90. package/dist/index216.js.map +1 -1
  91. package/dist/index217.js +564 -17
  92. package/dist/index217.js.map +1 -1
  93. package/dist/index218.js +20 -23
  94. package/dist/index218.js.map +1 -1
  95. package/dist/index219.js +20 -95
  96. package/dist/index219.js.map +1 -1
  97. package/dist/index220.js +92 -88
  98. package/dist/index220.js.map +1 -1
  99. package/dist/index221.js +97 -29
  100. package/dist/index221.js.map +1 -1
  101. package/dist/index222.js +24 -470
  102. package/dist/index222.js.map +1 -1
  103. package/dist/index223.js +446 -196
  104. package/dist/index223.js.map +1 -1
  105. package/dist/index224.js +199 -729
  106. package/dist/index224.js.map +1 -1
  107. package/dist/index225.js +750 -61
  108. package/dist/index225.js.map +1 -1
  109. package/dist/index226.js +58 -181
  110. package/dist/index226.js.map +1 -1
  111. package/dist/index227.js +175 -259
  112. package/dist/index227.js.map +1 -1
  113. package/dist/index228.js +246 -172
  114. package/dist/index228.js.map +1 -1
  115. package/dist/index229.js +195 -32
  116. package/dist/index229.js.map +1 -1
  117. package/dist/index230.js +12 -40
  118. package/dist/index230.js.map +1 -1
  119. package/dist/index231.js +23 -26
  120. package/dist/index231.js.map +1 -1
  121. package/dist/index232.js +45 -22
  122. package/dist/index232.js.map +1 -1
  123. package/dist/index233.js +27 -48
  124. package/dist/index233.js.map +1 -1
  125. package/dist/index234.js +52 -26
  126. package/dist/index234.js.map +1 -1
  127. package/dist/index235.js +40 -225
  128. package/dist/index235.js.map +1 -1
  129. package/dist/index236.js +217 -39
  130. package/dist/index236.js.map +1 -1
  131. package/dist/index237.js +50 -0
  132. package/dist/index237.js.map +1 -0
  133. package/dist/styles.css +1 -1
  134. package/dist/wc/AIToolCall.js +218 -0
  135. package/dist/wc/AIToolCall.js.map +1 -0
  136. package/dist/wc/hf-ai-tool-call.js +34 -219
  137. package/dist/wc/hf-ai-tool-call.js.map +1 -1
  138. package/dist/wc/hf-ai-tool-run.js +673 -576
  139. package/dist/wc/hf-ai-tool-run.js.map +1 -1
  140. package/dist/wc/workflow-step-renderer.js +94 -86
  141. package/dist/wc/workflow-step-renderer.js.map +1 -1
  142. package/dist/wc-react/AIToolCall.js +218 -0
  143. package/dist/wc-react/AIToolCall.js.map +1 -0
  144. package/dist/wc-react/hf-ai-tool-call.js +32 -217
  145. package/dist/wc-react/hf-ai-tool-call.js.map +1 -1
  146. package/dist/wc-react/hf-ai-tool-run.js +698 -601
  147. package/dist/wc-react/hf-ai-tool-run.js.map +1 -1
  148. package/dist/wc-react/workflow-step-renderer.js +76 -68
  149. package/dist/wc-react/workflow-step-renderer.js.map +1 -1
  150. package/package.json +1 -1
  151. package/skills/humain-ui/SKILL.md +1 -1
  152. package/skills/humain-ui-wc/SKILL.md +1 -1
  153. package/skills/humain-ui-wc.skill +0 -0
  154. package/skills/humain-ui.skill +0 -0
  155. package/dist/index182.js +0 -143
  156. package/dist/index182.js.map +0 -1
  157. package/dist/wc/wrench.js +0 -10
  158. package/dist/wc/wrench.js.map +0 -1
  159. package/dist/wc-react/wrench.js +0 -10
  160. package/dist/wc-react/wrench.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index223.js","names":[],"sources":["../src/components/templates/AppShellCard/AppShellCard.tsx"],"sourcesContent":["'use client';\n\nimport { EllipsisVertical, Maximize2, Minimize2 } from 'lucide-react';\nimport * as React from 'react';\nimport { Button } from '@/components/atoms/buttons/Button';\nimport { DropdownMenu } from '@/components/organisms/menus/DropdownMenu';\nimport { AppShellContent } from '@/components/templates/AppShell/AppShellContent';\nimport { usePanelExpansion } from '@/components/templates/AppShell/AppShellContext';\nimport { cn } from '@/lib/utils';\n\n// ============================================\n// Type Markers\n// ============================================\n\nconst HEADER_TYPE = 'AppShellCard.Header' as const;\nconst TOOLBAR_TYPE = 'AppShellCard.Toolbar' as const;\nconst ACTIONS_TYPE = 'AppShellCard.Actions' as const;\nconst MENU_TYPE = 'AppShellCard.Menu' as const;\nconst TITLE_TYPE = 'AppShellCard.Title' as const;\n\ntype AppShellCardSlotType =\n | typeof HEADER_TYPE\n | typeof TOOLBAR_TYPE\n | typeof ACTIONS_TYPE\n | typeof MENU_TYPE\n | typeof TITLE_TYPE;\n\ninterface AppShellCardMarkedComponent {\n __appShellCardType?: AppShellCardSlotType;\n}\n\nfunction getAppShellCardType(\n child: React.ReactElement,\n): AppShellCardSlotType | undefined {\n if (!child.type || typeof child.type === 'string') {\n return undefined;\n }\n\n return (child.type as AppShellCardMarkedComponent).__appShellCardType;\n}\n\nfunction assignAppShellCardType<T>(\n component: T,\n type: AppShellCardSlotType,\n): T {\n (component as T & AppShellCardMarkedComponent).__appShellCardType = type;\n return component;\n}\n\nfunction getNodeText(node: React.ReactNode): string {\n if (typeof node === 'string' || typeof node === 'number') {\n return String(node);\n }\n\n if (Array.isArray(node)) {\n return node.map(getNodeText).join('');\n }\n\n if (React.isValidElement<{ children?: React.ReactNode }>(node)) {\n return getNodeText(node.props.children);\n }\n\n return '';\n}\n\nfunction getTitleText(node: React.ReactNode): string {\n let titleText = '';\n\n React.Children.forEach(node, (child) => {\n if (\n titleText ||\n !React.isValidElement<{ children?: React.ReactNode }>(child)\n ) {\n return;\n }\n\n if (getAppShellCardType(child) === TITLE_TYPE) {\n titleText = getNodeText(child.props.children).trim();\n return;\n }\n\n titleText = getTitleText(child.props.children);\n });\n\n return titleText;\n}\n\n// ============================================\n// AppShellCard Root\n// ============================================\n\nexport type AppShellCardBodyPadding = 'none' | 'md';\nexport type AppShellCardElevation =\n | 'none'\n | '2xs'\n | 'xs'\n | 'sm'\n | 'md'\n | 'lg'\n | 'xl'\n | '2xl';\n\nconst appShellCardBodyPaddingClasses: Record<AppShellCardBodyPadding, string> =\n {\n none: '',\n md: 'p-4 sm:p-6',\n };\n\nconst appShellCardElevationClasses: Record<AppShellCardElevation, string> = {\n none: 'shadow-none',\n '2xs': 'shadow-2xs',\n xs: 'shadow-xs',\n sm: 'shadow-sm',\n md: 'shadow-md',\n lg: 'shadow-lg',\n xl: 'shadow-xl',\n '2xl': 'shadow-2xl',\n};\n\nconst appShellCardToolbarClassName =\n 'flex shrink-0 items-center gap-4 overflow-hidden border-b border-border px-4 py-3 sm:gap-6 sm:p-6';\n\nexport interface AppShellCardProps extends React.ComponentProps<'div'> {\n /** Body padding. Defaults to \"md\"; use \"none\" for edge-to-edge content. */\n bodyPadding?: AppShellCardBodyPadding;\n /** Outer panel elevation. Defaults to \"md\"; use \"none\" only when a flush panel is needed. */\n elevation?: AppShellCardElevation;\n /** Additional class names for the scrollable body region. */\n bodyClassName?: string;\n /** Accessible label for the scrollable body region. Defaults to the card title when present. */\n bodyAriaLabel?: string;\n /** Opt into the legacy inset margin when the containing panel is not expanded. */\n inset?: boolean;\n}\n\nconst AppShellCardRoot = React.forwardRef<HTMLDivElement, AppShellCardProps>(\n function AppShellCardRoot(\n {\n className,\n bodyPadding = 'md',\n elevation = 'md',\n bodyClassName,\n bodyAriaLabel,\n inset = false,\n children,\n ...props\n },\n ref,\n ) {\n const expansion = usePanelExpansion();\n const menuId = React.useId();\n const bodyRef = React.useRef<HTMLElement>(null);\n\n // Scroll shadow detection — sets CSS custom properties for delight-scroll-shadow\n React.useEffect(() => {\n const el = bodyRef.current;\n if (!el) return;\n\n const update = () => {\n const hasOverflow = el.scrollHeight > el.clientHeight;\n const top = hasOverflow && el.scrollTop > 0 ? '1' : '0';\n const bottom =\n hasOverflow && el.scrollTop + el.clientHeight < el.scrollHeight - 1\n ? '1'\n : '0';\n if (el.style.getPropertyValue('--scroll-t') !== top)\n el.style.setProperty('--scroll-t', top);\n if (el.style.getPropertyValue('--scroll-b') !== bottom)\n el.style.setProperty('--scroll-b', bottom);\n };\n\n el.addEventListener('scroll', update, { passive: true });\n const OwnerResizeObserver = el.ownerDocument.defaultView?.ResizeObserver;\n const observer = OwnerResizeObserver\n ? new OwnerResizeObserver(update)\n : null;\n observer?.observe(el);\n update();\n\n return () => {\n el.removeEventListener('scroll', update);\n observer?.disconnect();\n };\n }, []);\n\n // Classify children by type markers\n let toolbarSlot: React.ReactElement<AppShellCardToolbarProps> | null = null;\n let headerSlot: React.ReactNode = null;\n let actionsSlot: React.ReactNode = null;\n let menuSlot: React.ReactNode = null;\n const toolbarChildren: React.ReactNode[] = [];\n const bodyChildren: React.ReactNode[] = [];\n\n for (const child of React.Children.toArray(children)) {\n if (!React.isValidElement(child)) {\n bodyChildren.push(child);\n continue;\n }\n const type = getAppShellCardType(child);\n if (type === HEADER_TYPE) {\n headerSlot = child;\n } else if (type === TOOLBAR_TYPE) {\n toolbarSlot = child as React.ReactElement<AppShellCardToolbarProps>;\n } else if (type === ACTIONS_TYPE) {\n actionsSlot = child;\n } else if (type === MENU_TYPE) {\n menuSlot = child;\n } else {\n bodyChildren.push(child);\n }\n }\n\n if (toolbarSlot) {\n for (const child of React.Children.toArray(toolbarSlot.props.children)) {\n if (!React.isValidElement(child)) {\n toolbarChildren.push(child);\n continue;\n }\n\n const type = getAppShellCardType(child);\n if (type === HEADER_TYPE) {\n headerSlot = child;\n } else if (type === ACTIONS_TYPE) {\n actionsSlot = child;\n } else if (type === MENU_TYPE) {\n menuSlot = child;\n } else {\n toolbarChildren.push(child);\n }\n }\n }\n\n const hasToolbar =\n toolbarSlot ||\n headerSlot ||\n actionsSlot ||\n menuSlot ||\n toolbarChildren.length > 0 ||\n expansion?.onExpandedChange;\n const titleText = headerSlot ? getTitleText(headerSlot) : '';\n const resolvedBodyAriaLabel =\n bodyAriaLabel ?? (titleText ? `${titleText} content` : 'Card content');\n const {\n children: _toolbarSlotChildren,\n className: toolbarClassName,\n ...toolbarProps\n } = toolbarSlot?.props ?? {};\n\n return (\n <AppShellContent\n ref={ref}\n data-slot=\"app-shell-card\"\n className={cn(\n appShellCardElevationClasses[elevation],\n 'transition-[margin] duration-300 ease-[cubic-bezier(0.16,1,0.3,1)]',\n inset && !expansion?.expanded ? 'mx-5 my-10' : 'm-0',\n className,\n )}\n {...props}\n >\n {hasToolbar && (\n <div\n role=\"toolbar\"\n aria-label=\"Card actions\"\n {...toolbarProps}\n data-slot=\"app-shell-card-toolbar\"\n className={cn(appShellCardToolbarClassName, toolbarClassName)}\n >\n {headerSlot}\n {toolbarChildren}\n {actionsSlot}\n {menuSlot && (\n <DropdownMenu>\n <DropdownMenu.Trigger\n render={\n <Button\n appearance=\"ghost\"\n size=\"icon\"\n aria-label=\"More options\"\n >\n <EllipsisVertical className=\"size-5\" />\n </Button>\n }\n />\n <DropdownMenu.Popup\n id={`${menuId}-popup`}\n align=\"end\"\n sideOffset={4}\n >\n {\n (menuSlot as React.ReactElement<AppShellCardMenuProps>)\n .props.children\n }\n </DropdownMenu.Popup>\n </DropdownMenu>\n )}\n {expansion?.onExpandedChange && (\n <Button\n appearance=\"ghost\"\n size=\"icon\"\n onClick={() =>\n expansion.onExpandedChange?.(!expansion.expanded)\n }\n aria-label={\n expansion.expanded ? 'Minimize panel' : 'Maximize panel'\n }\n >\n <span\n key={String(expansion.expanded)}\n className=\"delight-fade-in inline-flex\"\n >\n {expansion.expanded ? (\n <Minimize2 className=\"size-5\" />\n ) : (\n <Maximize2 className=\"size-5\" />\n )}\n </span>\n </Button>\n )}\n </div>\n )}\n <section\n ref={bodyRef}\n data-slot=\"app-shell-card-body\"\n aria-label={resolvedBodyAriaLabel || 'Card content'}\n // biome-ignore lint/a11y/noNoninteractiveTabindex: Focusable scroll region satisfies axe scrollable-region-focusable.\n tabIndex={0}\n className={cn(\n 'delight-scroll-shadow flex-1 min-h-0 overflow-auto focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring rounded-b-[inherit]',\n appShellCardBodyPaddingClasses[bodyPadding],\n bodyClassName,\n )}\n >\n {bodyChildren}\n </section>\n </AppShellContent>\n );\n },\n);\n\nAppShellCardRoot.displayName = 'AppShellCard';\n\n// ============================================\n// AppShellCard.Toolbar\n// ============================================\n\nexport interface AppShellCardToolbarProps extends React.ComponentProps<'div'> {}\n\nfunction AppShellCardToolbar({\n className,\n children,\n ...props\n}: AppShellCardToolbarProps) {\n return (\n <div\n data-slot=\"app-shell-card-toolbar\"\n role=\"toolbar\"\n aria-label=\"Card actions\"\n className={cn(appShellCardToolbarClassName, className)}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nAppShellCardToolbar.displayName = 'AppShellCard.Toolbar';\nassignAppShellCardType(AppShellCardToolbar, TOOLBAR_TYPE);\n\n// ============================================\n// AppShellCard.Header\n// ============================================\n\nexport interface AppShellCardHeaderProps extends React.ComponentProps<'div'> {}\n\nfunction AppShellCardHeader({\n className,\n children,\n ...props\n}: AppShellCardHeaderProps) {\n return (\n <div\n data-slot=\"app-shell-card-header\"\n className={cn('flex min-w-0 flex-1 flex-col justify-center', className)}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nAppShellCardHeader.displayName = 'AppShellCard.Header';\nassignAppShellCardType(AppShellCardHeader, HEADER_TYPE);\n\n// ============================================\n// AppShellCard.Title\n// ============================================\n\nexport interface AppShellCardTitleProps extends React.ComponentProps<'h3'> {}\n\nfunction AppShellCardTitle({\n className,\n children,\n ...props\n}: AppShellCardTitleProps) {\n return (\n <h3\n data-slot=\"app-shell-card-title\"\n className={cn(\n 'text-lg font-semibold leading-7 text-foreground',\n className,\n )}\n {...props}\n >\n {children}\n </h3>\n );\n}\n\nAppShellCardTitle.displayName = 'AppShellCard.Title';\nassignAppShellCardType(AppShellCardTitle, TITLE_TYPE);\n\n// ============================================\n// AppShellCard.Subtitle\n// ============================================\n\nexport interface AppShellCardSubtitleProps extends React.ComponentProps<'p'> {}\n\nfunction AppShellCardSubtitle({\n className,\n children,\n ...props\n}: AppShellCardSubtitleProps) {\n return (\n <p\n data-slot=\"app-shell-card-subtitle\"\n className={cn('text-sm leading-5 text-secondary-foreground', className)}\n {...props}\n >\n {children}\n </p>\n );\n}\n\nAppShellCardSubtitle.displayName = 'AppShellCard.Subtitle';\n\n// ============================================\n// AppShellCard.Actions\n// ============================================\n\nexport interface AppShellCardActionsProps extends React.ComponentProps<'div'> {}\n\nfunction AppShellCardActions({\n className,\n children,\n ...props\n}: AppShellCardActionsProps) {\n return (\n <div\n data-slot=\"app-shell-card-actions\"\n className={cn('flex shrink-0 items-center gap-2', className)}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nAppShellCardActions.displayName = 'AppShellCard.Actions';\nassignAppShellCardType(AppShellCardActions, ACTIONS_TYPE);\n\n// ============================================\n// AppShellCard.Menu\n// ============================================\n\nexport interface AppShellCardMenuProps {\n children: React.ReactNode;\n}\n\nfunction AppShellCardMenu({ children }: AppShellCardMenuProps) {\n return children as React.ReactElement;\n}\n\nAppShellCardMenu.displayName = 'AppShellCard.Menu';\nassignAppShellCardType(AppShellCardMenu, MENU_TYPE);\n\n// ============================================\n// Compound Export\n// ============================================\n\nconst AppShellCard = Object.assign(AppShellCardRoot, {\n Toolbar: AppShellCardToolbar,\n Header: AppShellCardHeader,\n Title: AppShellCardTitle,\n Subtitle: AppShellCardSubtitle,\n Actions: AppShellCardActions,\n Menu: AppShellCardMenu,\n});\n\nexport {\n AppShellCard,\n AppShellCardActions,\n AppShellCardHeader,\n AppShellCardMenu,\n AppShellCardRoot,\n AppShellCardSubtitle,\n AppShellCardTitle,\n AppShellCardToolbar,\n};\n"],"mappings":";;;;;;;;;;AAcA,IAAM,cAAc;AACpB,IAAM,eAAe;AACrB,IAAM,eAAe;AACrB,IAAM,YAAY;AAClB,IAAM,aAAa;AAanB,SAAS,oBACP,OACkC;CAClC,IAAI,CAAC,MAAM,QAAQ,OAAO,MAAM,SAAS,UACvC;CAGF,OAAQ,MAAM,KAAqC;AACrD;AAEA,SAAS,uBACP,WACA,MACG;CACH,UAA+C,qBAAqB;CACpE,OAAO;AACT;AAEA,SAAS,YAAY,MAA+B;CAClD,IAAI,OAAO,SAAS,YAAY,OAAO,SAAS,UAC9C,OAAO,OAAO,IAAI;CAGpB,IAAI,MAAM,QAAQ,IAAI,GACpB,OAAO,KAAK,IAAI,WAAW,CAAC,CAAC,KAAK,EAAE;CAGtC,IAAI,MAAM,eAA+C,IAAI,GAC3D,OAAO,YAAY,KAAK,MAAM,QAAQ;CAGxC,OAAO;AACT;AAEA,SAAS,aAAa,MAA+B;CACnD,IAAI,YAAY;CAEhB,MAAM,SAAS,QAAQ,OAAO,UAAU;EACtC,IACE,aACA,CAAC,MAAM,eAA+C,KAAK,GAE3D;EAGF,IAAI,oBAAoB,KAAK,MAAM,YAAY;G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AkB,EACzB,WACA,UACA,GAAG,SACsB;CACzB,OACE,oBAAC,MAAD;EACE,aAAU;EACV,WAAW,GACT,mDACA,SACF;EACA,GAAI;EAEH;CACC,CAAA;AAER;AAEA,kBAAkB,cAAc;AAChC,uBAAuB,mBAAmB,UAAU;AAQpD,SAAS,qBAAqB,EAC5B,WACA,UACA,GAAG,SACyB;CAC5B,OACE,oBAAC,KAAD;EACE,aAAU;EACV,WAAW,GAAG,+CAA+C,SAAS;EACtE,GAAI;EAEH;CACA,CAAA;AAEP;AAEA,qBAAqB,cAAc;AAQnC,SAAS,oBAAoB,EAC3B,WACA,UACA,GAAG,SACwB;CAC3B,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,oCAAoC,SAAS;EAC3D,GAAI;EAEH;CACE,CAAA;AAET;AAEA,oBAAoB,cAAc;AAClC,uBAAuB,qBAAqB,YAAY;AAUxD,SAAS,iBAAiB,EAAE,YAAmC;CAC7D,OAAO;AACT;AAEA,iBAAiB,cAAc;AAC/B,uBAAuB,kBAAkB,SAAS;AAMlD,IAAM,eAAe,OAAO,OAAO,kBAAkB;CACnD,SAAS;CACT,QAAQ;CACR,OAAO;CACP,UAAU;CACV,SAAS;CACT,MAAM;AACR,CAAC"}
1
+ {"version":3,"file":"index223.js","names":[],"sources":["../src/components/templates/AppShell/AppShell.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { GroupImperativeHandle } from 'react-resizable-panels';\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from '@/components/atoms/layout/Resizable';\nimport { AppShell as AppShellPrimitive } from '@/components/ui/app-shell';\n\nimport { Sheet, SheetContent } from '@/components/ui/sheet';\nimport { SidebarContext } from '@/components/ui/sidebar';\nimport { useIsMobile } from '@/hooks/use-mobile';\nimport { cn } from '@/lib/utils';\nimport { AppShellContent } from './AppShellContent';\nimport {\n type AppShellContextValue,\n AppShellProvider,\n PanelIndexContext,\n PanelLayoutContext,\n type PanelLayoutInfo,\n type PanelPosition,\n} from './AppShellContext';\nimport { AppShellMobileTabBar } from './AppShellMobileTabBar';\nimport {\n APPSHELL_PANEL_TYPE,\n AppShellPanel,\n type AppShellPanelComponent,\n type AppShellPanelProps,\n} from './AppShellPanel';\nimport {\n DEFAULT_EXPAND_THRESHOLD,\n getExpandedPanelFromLayout,\n layoutMapToTuple,\n normalizePanelSizes,\n toResizableMinSize,\n toResizablePercentageSize,\n} from './AppShellResize';\n\nconst DEFAULT_APP_SHELL_BACKGROUND = 'var(--app-background)';\n\ninterface AppShellPanelMarker {\n __appShellType?: unknown;\n}\n\nfunction isAppShellPanelComponent(\n type: unknown,\n): type is AppShellPanelComponent {\n return (\n typeof type === 'function' &&\n (type as AppShellPanelMarker).__appShellType === APPSHELL_PANEL_TYPE\n );\n}\n\nfunction isAppShellPanelElement(\n child: React.ReactNode,\n): child is React.ReactElement<AppShellPanelProps, AppShellPanelComponent> {\n return React.isValidElement(child) && isAppShellPanelComponent(child.type);\n}\n\nfunction getAppShellPanelIdentity(\n panel: React.ReactElement<AppShellPanelProps>,\n ariaBaseId: string,\n index: number,\n): React.Key {\n return panel.key ?? panel.props.label ?? `${ariaBaseId}-panel-${index}`;\n}\n\ninterface AppShellPanelWithLayoutProps {\n panel: React.ReactElement<AppShellPanelProps>;\n visible: boolean;\n index: number;\n overrides?: Partial<PanelLayoutInfo>;\n isMobile: boolean;\n activePanel: number;\n hasExpanded: boolean;\n hasTabBar: boolean;\n ariaBaseId: string;\n rootExpansionActive: boolean;\n firstExpandedIndex: number | null;\n onExpandedPanelChange: (panelIndex: number | null) => void;\n}\n\nfunction AppShellPanelWithLayout({\n panel,\n visible,\n index,\n overrides = {},\n isMobile,\n activePanel,\n hasExpanded,\n hasTabBar,\n ariaBaseId,\n rootExpansionActive,\n firstExpandedIndex,\n onExpandedPanelChange,\n}: AppShellPanelWithLayoutProps) {\n if (isMobile && index !== activePanel) return null;\n\n const layoutInfo: PanelLayoutInfo = {\n visible: isMobile ? true : visible,\n collapseMode: hasExpanded ? 'animated' : 'removed',\n isMobile,\n tabId: hasTabBar ? `${ariaBaseId}-tab-${index}` : undefined,\n panelId: hasTabBar ? `${ariaBaseId}-tabpanel-${index}` : undefined,\n expanded: rootExpansionActive\n ? hasExpanded && index === firstExpandedIndex\n : undefined,\n onExpandedChange: rootExpansionActive\n ? (nextExpanded) => onExpandedPanelChange(nextExpanded ? index : null)\n : undefined,\n ...overrides,\n };\n\n return (\n <PanelIndexContext.Provider value={index}>\n <PanelLayoutContext.Provider value={layoutInfo}>\n {panel}\n </PanelLayoutContext.Provider>\n </PanelIndexContext.Provider>\n );\n}\n\n// ============================================\n// AppShell Root\n// ============================================\n\nexport interface AppShellProps extends React.ComponentProps<'div'> {\n /** Any CSS background value (color, gradient, image). Defaults to var(--app-background). */\n background?: string;\n /** Fixed height, supports CSS calc() */\n height?: string;\n /** Spacing around the inner content in pixels or CSS value */\n padding?: number | string;\n /** Padding on mobile viewports. Defaults to 8px. */\n mobilePadding?: number | string;\n /** Gap between panels in pixels or CSS value. Defaults to 12. */\n gap?: number | string;\n /** Joined-edge mode where panels share borders. Defaults to false. */\n connected?: boolean;\n /** ID of the main content element for skip navigation. */\n skipToId?: string;\n /** Controlled active panel index for mobile tab switching. */\n activePanel?: number;\n /** Callback when active panel changes on mobile. */\n onActivePanelChange?: (index: number) => void;\n /** Default active panel on mobile (default: 0). */\n defaultActivePanel?: number;\n /** Controlled expanded panel index. Use null for no expanded panel. */\n expandedPanel?: number | null;\n /** Initial expanded panel index for uncontrolled root-owned expansion. */\n defaultExpandedPanel?: number | null;\n /** Callback when root-owned expansion changes. */\n onExpandedPanelChange?: (panelIndex: number | null) => void;\n /** Enables root-owned two-panel resizing on desktop. Defaults to true for eligible two-panel layouts. */\n resizablePanels?: boolean;\n /** Initial panel size split in percentages. Defaults to [35, 65]. */\n defaultPanelSizes?: [number, number];\n /** Controlled panel size split in percentages. */\n panelSizes?: [number, number];\n /** Called after the user releases the resize handle. */\n onPanelSizesChange?: (sizes: [number, number]) => void;\n /** Percentage threshold that expands the dominant panel on release. */\n expandThreshold?: number;\n}\n\nfunction AppShellRoot({\n background = DEFAULT_APP_SHELL_BACKGROUND,\n height = '100dvh',\n padding = 16,\n mobilePadding,\n gap = 12,\n connected = false,\n skipToId,\n activePanel: activePanelProp,\n onActivePanelChange,\n defaultActivePanel = 0,\n expandedPanel: expandedPanelProp,\n defaultExpandedPanel,\n onExpandedPanelChange,\n resizablePanels,\n defaultPanelSizes,\n panelSizes,\n onPanelSizesChange,\n expandThreshold = DEFAULT_EXPAND_THRESHOLD,\n className,\n children,\n ...props\n}: AppShellProps): React.ReactElement {\n const isMobile = useIsMobile();\n const ariaBaseId = React.useId();\n const [internalActivePanel, setInternalActivePanel] =\n React.useState(defaultActivePanel);\n const [internalExpandedPanel, setInternalExpandedPanel] = React.useState<\n number | null\n >(defaultExpandedPanel ?? null);\n const [internalPanelSizes, setInternalPanelSizes] = React.useState(() =>\n normalizePanelSizes(defaultPanelSizes),\n );\n const [isResizingPanels, setIsResizingPanels] = React.useState(false);\n const [isRestoringResizablePanels, setIsRestoringResizablePanels] =\n React.useState(false);\n const [internalMobileSidebarOpen, setInternalMobileSidebarOpen] =\n React.useState(false);\n const resizableGroupRef = React.useRef<GroupImperativeHandle | null>(null);\n const rootRef = React.useRef<HTMLDivElement>(null);\n const allowResizeReleaseExpansionRef = React.useRef(false);\n const suppressControlledLayoutChangeRef = React.useRef(false);\n const previousResizableExpandedRef = React.useRef(false);\n\n const activePanel = activePanelProp ?? internalActivePanel;\n const handleActivePanelChange = React.useCallback(\n (index: number) => {\n if (activePanelProp === undefined) {\n setInternalActivePanel((prev) => (prev === index ? prev : index));\n }\n onActivePanelChange?.(index);\n },\n [activePanelProp, onActivePanelChange],\n );\n\n const rootExpansionRequested =\n expandedPanelProp !== undefined ||\n defaultExpandedPanel !== undefined ||\n onExpandedPanelChange !== undefined;\n const resolvedExpandedPanel =\n expandedPanelProp !== undefined ? expandedPanelProp : internalExpandedPanel;\n const handleExpandedPanelChange = React.useCallback(\n (panelIndex: number | null) => {\n if (expandedPanelProp === undefined) {\n setInternalExpandedPanel(panelIndex);\n }\n onExpandedPanelChange?.(panelIndex);\n },\n [expandedPanelProp, onExpandedPanelChange],\n );\n\n // Classify children (memoized to stabilize downstream references)\n const { panels, panelInfos, sidebarChild, otherChildren } =\n React.useMemo(() => {\n const p: React.ReactElement<AppShellPanelProps>[] = [];\n const infos: { key?: React.Key; label?: string }[] = [];\n let sidebar: React.ReactNode = null;\n const other: React.ReactNode[] = [];\n\n React.Children.forEach(children, (child) => {\n if (isAppShellPanelElement(child)) {\n infos.push({\n key: child.key ?? child.props.label,\n label: child.props.label,\n });\n p.push(child);\n return;\n }\n\n if (!React.isValidElement(child)) {\n return;\n }\n\n if (child.type === AppShellSidebar) {\n sidebar = child;\n } else {\n other.push(child);\n }\n });\n\n return {\n panels: p,\n panelInfos: infos,\n sidebarChild: sidebar,\n otherChildren: other,\n };\n }, [children]);\n\n const shouldUseResizablePanels = resizablePanels ?? true;\n\n // Determine which panels are visible\n const firstPanelExpandedIndex = panels.findIndex((p) => p.props.expanded);\n const hasPanelExpansionProps = panels.some(\n (panel) =>\n panel.props.expanded !== undefined ||\n panel.props.onExpandedChange !== undefined,\n );\n const canUseResizablePanelPair =\n shouldUseResizablePanels &&\n !connected &&\n !isMobile &&\n panels.length === 2 &&\n (resizablePanels !== undefined || !hasPanelExpansionProps);\n const rootExpansionActive =\n rootExpansionRequested || canUseResizablePanelPair;\n const validRootExpandedPanel =\n typeof resolvedExpandedPanel === 'number' &&\n Number.isInteger(resolvedExpandedPanel) &&\n resolvedExpandedPanel >= 0 &&\n resolvedExpandedPanel < panels.length\n ? resolvedExpandedPanel\n : null;\n let firstExpandedIndex: number | null = firstPanelExpandedIndex;\n if (rootExpansionActive) {\n firstExpandedIndex = validRootExpandedPanel;\n }\n const hasExpanded = firstExpandedIndex !== -1 && firstExpandedIndex !== null;\n const visibleCount = hasExpanded ? 1 : Math.min(panels.length, 2);\n const canRenderResizablePanels = canUseResizablePanelPair;\n const resolvedPanelSizes = React.useMemo(\n () => normalizePanelSizes(panelSizes ?? internalPanelSizes),\n [panelSizes, internalPanelSizes],\n );\n const resizablePanelSizes = React.useMemo<[number, number]>(() => {\n if (hasExpanded && firstExpandedIndex === 0) return [100, 0];\n if (hasExpanded && firstExpandedIndex === 1) return [0, 100];\n return resolvedPanelSizes;\n }, [firstExpandedIndex, hasExpanded, resolvedPanelSizes]);\n const shouldBypassResizableMinSize =\n hasExpanded ||\n isRestoringResizablePanels ||\n (!hasExpanded && previousResizableExpandedRef.current);\n\n // Dev warnings\n if (process.env.NODE_ENV !== 'production') {\n const expandedPanelPropCount = panels.filter(\n (p) => p.props.expanded,\n ).length;\n if (rootExpansionActive && expandedPanelPropCount > 0) {\n console.warn(\n 'AppShell.Root: root-owned expansion props should not be mixed with AppShell.Panel expanded. Root expansion will be used.',\n );\n }\n if (!rootExpansionActive && expandedPanelPropCount > 1) {\n console.warn(\n 'AppShell.Root: multiple panels have expanded={true}. Only the first expanded panel will be shown.',\n );\n }\n if (\n rootExpansionActive &&\n resolvedExpandedPanel !== null &&\n resolvedExpandedPanel !== undefined &&\n validRootExpandedPanel === null\n ) {\n console.warn(\n `AppShell.Root: expandedPanel index ${resolvedExpandedPanel} is out of range. No panel will be expanded.`,\n );\n }\n if (resizablePanels === true && connected) {\n console.warn(\n 'AppShell.Root: resizablePanels is not supported with connected. Rendering non-resizable panels.',\n );\n }\n if (resizablePanels === true && !connected && panels.length !== 2) {\n console.warn(\n `AppShell.Root: resizablePanels requires exactly 2 Panel children, got ${panels.length}. Rendering non-resizable panels.`,\n );\n }\n if (panels.length > 2 && !hasExpanded) {\n console.warn(\n `AppShell.Root: max 2 Panel children allowed, got ${panels.length}. Only the first 2 will be visible.`,\n );\n }\n }\n\n const handleLayoutChange = React.useCallback(\n (layout: Record<string, number>) => {\n if (hasExpanded || suppressControlledLayoutChangeRef.current) {\n return;\n }\n if (panelSizes === undefined) {\n setInternalPanelSizes(layoutMapToTuple(layout));\n }\n },\n [hasExpanded, panelSizes],\n );\n\n const handleLayoutChanged = React.useCallback(\n (layout: Record<string, number>) => {\n if (\n hasExpanded ||\n !allowResizeReleaseExpansionRef.current ||\n suppressControlledLayoutChangeRef.current\n ) {\n return;\n }\n\n const nextSizes = layoutMapToTuple(layout);\n if (panelSizes === undefined) {\n setInternalPanelSizes(nextSizes);\n }\n onPanelSizesChange?.(nextSizes);\n\n const expandedIndex = getExpandedPanelFromLayout(layout, expandThreshold);\n if (expandedIndex !== null) {\n handleExpandedPanelChange(expandedIndex);\n }\n },\n [\n expandThreshold,\n handleExpandedPanelChange,\n hasExpanded,\n onPanelSizesChange,\n panelSizes,\n ],\n );\n\n React.useEffect(() => {\n if (!canRenderResizablePanels) {\n suppressControlledLayoutChangeRef.current = false;\n previousResizableExpandedRef.current = false;\n return;\n }\n\n const ownerWindow = rootRef.current?.ownerDocument.defaultView;\n if (!ownerWindow) return;\n\n const wasExpanded = previousResizableExpandedRef.current;\n previousResizableExpandedRef.current = hasExpanded;\n const shouldApplyLayout =\n hasExpanded || wasExpanded || panelSizes !== undefined;\n if (!shouldApplyLayout) {\n suppressControlledLayoutChangeRef.current = false;\n return;\n }\n\n let restoreFrame: number | undefined;\n const [first, second] = resizablePanelSizes;\n if (wasExpanded && !hasExpanded) {\n restoreFrame = ownerWindow.requestAnimationFrame(() => {\n setIsRestoringResizablePanels(true);\n });\n }\n suppressControlledLayoutChangeRef.current = true;\n const nextLayout = { panel0: first, panel1: second };\n resizableGroupRef.current?.setLayout(nextLayout);\n const frame = ownerWindow.requestAnimationFrame(() => {\n resizableGroupRef.current?.setLayout(nextLayout);\n });\n const timeout = ownerWindow.setTimeout(() => {\n suppressControlledLayoutChangeRef.current = false;\n }, 350);\n return () => {\n if (restoreFrame !== undefined) {\n ownerWindow.cancelAnimationFrame(restoreFrame);\n }\n ownerWindow.cancelAnimationFrame(frame);\n ownerWindow.clearTimeout(timeout);\n suppressControlledLayoutChangeRef.current = false;\n };\n }, [canRenderResizablePanels, hasExpanded, panelSizes, resizablePanelSizes]);\n\n React.useEffect(() => {\n if (!isRestoringResizablePanels) return;\n\n const ownerWindow = rootRef.current?.ownerDocument.defaultView;\n if (!ownerWindow) return;\n\n const timeout = ownerWindow.setTimeout(() => {\n setIsRestoringResizablePanels(false);\n }, 350);\n return () => ownerWindow.clearTimeout(timeout);\n }, [isRestoringResizablePanels]);\n\n React.useEffect(() => {\n if (!canRenderResizablePanels) {\n allowResizeReleaseExpansionRef.current = false;\n suppressControlledLayoutChangeRef.current = false;\n return;\n }\n\n const ownerWindow = rootRef.current?.ownerDocument.defaultView;\n if (!ownerWindow) return;\n\n const frame = ownerWindow.requestAnimationFrame(() => {\n allowResizeReleaseExpansionRef.current = true;\n });\n return () => {\n ownerWindow.cancelAnimationFrame(frame);\n allowResizeReleaseExpansionRef.current = false;\n };\n }, [canRenderResizablePanels]);\n\n React.useEffect(() => {\n if (!isResizingPanels) return;\n const ownerWindow = rootRef.current?.ownerDocument.defaultView;\n if (!ownerWindow) return;\n\n const stopResizing = () => setIsResizingPanels(false);\n ownerWindow.addEventListener('pointerup', stopResizing);\n ownerWindow.addEventListener('pointercancel', stopResizing);\n return () => {\n ownerWindow.removeEventListener('pointerup', stopResizing);\n ownerWindow.removeEventListener('pointercancel', stopResizing);\n };\n }, [isResizingPanels]);\n\n const handleResizablePointerDownCapture = React.useCallback(\n (event: React.PointerEvent<HTMLDivElement>) => {\n const target = event.target;\n if (!(target instanceof Element)) return;\n if (target.closest('[data-slot=\"resizable-handle\"]')) {\n setIsResizingPanels(true);\n }\n },\n [],\n );\n\n // Memoize the visibility map to stabilize downstream context values\n const visiblePanels = React.useMemo(\n () =>\n hasExpanded\n ? panels.map((panel, i) => ({\n panel,\n visible: i === firstExpandedIndex,\n index: i,\n }))\n : panels.map((panel, i) => ({\n panel,\n visible: i < 2,\n index: i,\n })),\n [panels, hasExpanded, firstExpandedIndex],\n );\n\n // Whether the tab bar is active (mobile with 2+ panels)\n const hasTabBar = isMobile && panels.length > 1;\n\n // Build context (derive position from stable scalars, not array reference)\n const getPanelPosition = React.useCallback(\n (index: number): PanelPosition => {\n if (visibleCount === 1) return 'only';\n if (hasExpanded) return index === firstExpandedIndex ? 'only' : 'last';\n return index === 0 ? 'first' : 'last';\n },\n [visibleCount, hasExpanded, firstExpandedIndex],\n );\n\n const contextValue: AppShellContextValue = React.useMemo(\n () => ({\n connected,\n panelCount: visibleCount,\n getPanelPosition,\n }),\n [connected, visibleCount, getPanelPosition],\n );\n\n // Sidebar context for mobile drawer integration\n const sidebarContext = React.useContext(SidebarContext);\n const mobileSidebarOpen =\n sidebarContext?.openMobile ?? internalMobileSidebarOpen;\n const setMobileSidebarOpen =\n sidebarContext?.setOpenMobile ?? setInternalMobileSidebarOpen;\n const handleSidebarOpen = React.useCallback(() => {\n setMobileSidebarOpen(true);\n }, [setMobileSidebarOpen]);\n\n const handleSheetOpenChange = React.useCallback(\n (open: boolean) => {\n setMobileSidebarOpen(open);\n },\n [setMobileSidebarOpen],\n );\n\n // Skip navigation link\n const skipLink = skipToId ? (\n <a\n href={`#${skipToId}`}\n className=\"sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:font-medium focus:text-foreground focus:shadow-sm focus:ring-2 focus:ring-ring\"\n >\n Skip to content\n </a>\n ) : null;\n\n // Render panels with context providers (no cloneElement — panels self-style)\n const renderedPanels = React.useMemo(\n () =>\n visiblePanels.map(({ panel, visible, index }) => (\n <AppShellPanelWithLayout\n key={getAppShellPanelIdentity(panel, ariaBaseId, index)}\n panel={panel}\n visible={visible}\n index={index}\n isMobile={isMobile}\n activePanel={activePanel}\n hasExpanded={hasExpanded}\n hasTabBar={hasTabBar}\n ariaBaseId={ariaBaseId}\n rootExpansionActive={rootExpansionActive}\n firstExpandedIndex={firstExpandedIndex}\n onExpandedPanelChange={handleExpandedPanelChange}\n />\n )),\n [\n visiblePanels,\n ariaBaseId,\n isMobile,\n activePanel,\n hasExpanded,\n hasTabBar,\n rootExpansionActive,\n firstExpandedIndex,\n handleExpandedPanelChange,\n ],\n );\n\n const renderedResizablePanels = canRenderResizablePanels ? (\n <ResizablePanelGroup\n orientation=\"horizontal\"\n disabled={hasExpanded}\n groupRef={resizableGroupRef}\n onLayoutChange={handleLayoutChange}\n onLayoutChanged={handleLayoutChanged}\n onPointerDownCapture={handleResizablePointerDownCapture}\n className={cn(\n 'min-h-0 min-w-0 flex-1',\n !isResizingPanels &&\n '[&>[data-slot=resizable-panel]]:transition-[flex-grow] [&>[data-slot=resizable-panel]]:duration-300 [&>[data-slot=resizable-panel]]:ease-[cubic-bezier(0.16,1,0.3,1)] motion-reduce:[&>[data-slot=resizable-panel]]:transition-none',\n )}\n >\n <ResizablePanel\n id=\"panel0\"\n defaultSize={toResizablePercentageSize(resizablePanelSizes[0])}\n minSize={\n shouldBypassResizableMinSize\n ? 0\n : toResizableMinSize(panels[0].props.minWidth)\n }\n >\n <AppShellPanelWithLayout\n panel={panels[0]}\n visible={!hasExpanded || firstExpandedIndex === 0}\n index={0}\n overrides={{ sizeManagedByRoot: true }}\n isMobile={isMobile}\n activePanel={activePanel}\n hasExpanded={hasExpanded}\n hasTabBar={hasTabBar}\n ariaBaseId={ariaBaseId}\n rootExpansionActive={rootExpansionActive}\n firstExpandedIndex={firstExpandedIndex}\n onExpandedPanelChange={handleExpandedPanelChange}\n />\n </ResizablePanel>\n <ResizableHandle\n disabled={hasExpanded}\n className={cn(\n 'z-10 min-w-2 shrink-0 cursor-col-resize w-[var(--app-shell-gap,0px)] bg-transparent after:w-2 hover:bg-transparent',\n 'transition-[width,min-width,opacity,background-color] duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] motion-reduce:transition-none',\n hasExpanded && 'min-w-0 w-0 opacity-0 after:w-0 pointer-events-none',\n )}\n />\n <ResizablePanel\n id=\"panel1\"\n defaultSize={toResizablePercentageSize(resizablePanelSizes[1])}\n minSize={\n shouldBypassResizableMinSize\n ? 0\n : toResizableMinSize(panels[1].props.minWidth)\n }\n >\n <AppShellPanelWithLayout\n panel={panels[1]}\n visible={!hasExpanded || firstExpandedIndex === 1}\n index={1}\n overrides={{ sizeManagedByRoot: true }}\n isMobile={isMobile}\n activePanel={activePanel}\n hasExpanded={hasExpanded}\n hasTabBar={hasTabBar}\n ariaBaseId={ariaBaseId}\n rootExpansionActive={rootExpansionActive}\n firstExpandedIndex={firstExpandedIndex}\n onExpandedPanelChange={handleExpandedPanelChange}\n />\n </ResizablePanel>\n </ResizablePanelGroup>\n ) : null;\n\n // Live region for announcing panel changes to screen readers\n const activeLabel =\n hasTabBar && panelInfos[activePanel]\n ? panelInfos[activePanel].label || `Panel ${activePanel + 1}`\n : null;\n\n // Mobile layout\n if (isMobile) {\n return (\n <AppShellProvider value={contextValue}>\n <AppShellPrimitive\n ref={rootRef}\n background={background}\n height={height}\n padding={padding}\n mobilePadding={mobilePadding}\n gap={0}\n connected={connected}\n className={className}\n {...props}\n >\n {skipLink}\n {sidebarChild && (\n <Sheet\n open={mobileSidebarOpen}\n onOpenChange={handleSheetOpenChange}\n >\n <SheetContent\n side=\"left\"\n showCloseButton={false}\n className=\"w-[280px] p-0\"\n aria-label=\"Sidebar navigation\"\n >\n {sidebarChild}\n </SheetContent>\n </Sheet>\n )}\n <div className=\"flex h-full min-w-0 flex-1 flex-col overflow-clip\">\n <AppShellMobileTabBar\n panels={panelInfos}\n activeIndex={activePanel}\n onActiveChange={handleActivePanelChange}\n onSidebarOpen={sidebarChild ? handleSidebarOpen : undefined}\n baseId={ariaBaseId}\n />\n <div className=\"flex min-h-0 flex-1\">{renderedPanels}</div>\n </div>\n {/* Live region for panel switch announcements */}\n {activeLabel && (\n <div className=\"sr-only\" role=\"status\" aria-live=\"polite\">\n {activeLabel} panel active\n </div>\n )}\n {otherChildren}\n </AppShellPrimitive>\n </AppShellProvider>\n );\n }\n\n // Desktop layout\n const effectiveGap = connected || hasExpanded ? 0 : gap;\n\n return (\n <AppShellProvider value={contextValue}>\n <AppShellPrimitive\n ref={rootRef}\n background={background}\n height={height}\n padding={padding}\n mobilePadding={mobilePadding}\n gap={effectiveGap}\n connected={connected}\n className={className}\n {...props}\n >\n {skipLink}\n {sidebarChild}\n {renderedResizablePanels ?? renderedPanels}\n {otherChildren}\n </AppShellPrimitive>\n </AppShellProvider>\n );\n}\n\nAppShellRoot.displayName = 'AppShell';\n\n// ============================================\n// AppShell Sidebar\n// ============================================\n\nexport interface AppShellSidebarProps extends React.ComponentProps<'div'> {\n /**\n * Explicit width override — bypasses auto-detection.\n * When omitted, the sidebar auto-sizes based on the child\n * SidebarProvider's expanded/collapsed state.\n */\n width?: string;\n /** Width when sidebar is expanded (auto mode only). @default '280px' */\n expandedWidth?: string;\n /** Width when sidebar is collapsed (auto mode only). @default '64px' */\n collapsedWidth?: string;\n}\n\n/**\n * Layout slot for the sidebar region. Renders a div — the actual aside\n * landmark is provided by AppSidebar/Sidebar primitive inside it.\n *\n * **Auto-detection (default):** When no `width` prop is provided, the sidebar\n * observes the child SidebarProvider's `data-state` attribute via CSS `:has()`\n * and transitions between `collapsedWidth` and `expandedWidth` automatically.\n *\n * **Manual mode:** Pass an explicit `width` to control sizing yourself.\n */\nfunction AppShellSidebar({\n width,\n expandedWidth = '280px',\n collapsedWidth = '64px',\n className,\n style,\n children,\n ...props\n}: AppShellSidebarProps) {\n const autoMode = !width;\n\n return (\n <div\n data-slot=\"app-shell-sidebar\"\n style={\n {\n ...(autoMode\n ? {\n '--app-shell-sidebar-collapsed': collapsedWidth,\n '--app-shell-sidebar-expanded': expandedWidth,\n }\n : { '--app-shell-sidebar-width': width }),\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n 'flex h-full shrink-0 flex-col overflow-clip',\n 'transition-[width] duration-300 ease-[cubic-bezier(0.16,1,0.3,1)]',\n 'motion-reduce:transition-none',\n autoMode\n ? [\n 'w-[var(--app-shell-sidebar-collapsed,64px)]',\n '[&:has([data-state=expanded])]:w-[var(--app-shell-sidebar-expanded,280px)]',\n ]\n : 'w-[var(--app-shell-sidebar-width,64px)]',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nAppShellSidebar.displayName = 'AppShell.Sidebar';\n\n// ============================================\n// AppShell Header\n// ============================================\n\nexport interface AppShellHeaderProps extends React.ComponentProps<'div'> {}\n\nfunction AppShellHeader({\n className,\n children,\n ...props\n}: AppShellHeaderProps) {\n return (\n <div\n data-slot=\"app-shell-header\"\n className={cn('shrink-0', className)}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nAppShellHeader.displayName = 'AppShell.Header';\n\n// ============================================\n// Preset Background Variants\n// ============================================\n\nconst appShellBackgrounds = {\n transparent: 'transparent',\n appBg: DEFAULT_APP_SHELL_BACKGROUND,\n neutral: 'var(--muted)',\n brandSubtle: 'linear-gradient(135deg, var(--air-50) 0%, var(--air-100) 100%)',\n brand: 'linear-gradient(135deg, var(--air-400) 0%, var(--primary) 100%)',\n brandDeep: 'linear-gradient(135deg, var(--primary) 0%, var(--air-900) 100%)',\n desertMidnight:\n 'linear-gradient(135deg, var(--slate-500) 0%, var(--slate-700) 100%)',\n aqua: 'linear-gradient(135deg, var(--air-400) 0%, var(--air-600) 100%)',\n} as const;\n\n// ============================================\n// Compound Component (Dot Notation)\n// ============================================\n\nconst AppShell = Object.assign(AppShellRoot, {\n Root: AppShellRoot,\n Sidebar: AppShellSidebar,\n Header: AppShellHeader,\n Panel: AppShellPanel,\n Content: AppShellContent,\n});\n\n// ============================================\n// Exports\n// ============================================\n\nexport type { AppShellContentProps } from './AppShellContent';\nexport type { AppShellPanelProps } from './AppShellPanel';\n\nexport {\n AppShell,\n AppShellContent,\n AppShellHeader,\n AppShellPanel,\n AppShellRoot,\n AppShellSidebar,\n appShellBackgrounds,\n};\n"],"mappings":";;;;;;;;;;;;;;;AAwCA,IAAM,+BAA+B;AAMrC,SAAS,yBACP,MACgC;CAChC,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