@wildo-ai/presets-components 1.1.5 → 1.1.7
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/esm/.native.tsbuildinfo +1 -0
- package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
- package/dist/esm/components/actions/action-bar.js +5 -2
- package/dist/esm/components/actions/action-bar.js.map +1 -1
- package/dist/esm/components/ai-elements/chat/suggestion.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/chat/suggestion.js +8 -1
- package/dist/esm/components/ai-elements/chat/suggestion.js.map +1 -1
- package/dist/esm/components/ai-elements/decision/approval.d.ts +108 -13
- package/dist/esm/components/ai-elements/decision/approval.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/decision/approval.js +60 -10
- package/dist/esm/components/ai-elements/decision/approval.js.map +1 -1
- package/dist/esm/components/ai-elements/graph/graph-runtime.d.ts +3 -1
- package/dist/esm/components/ai-elements/graph/graph-runtime.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/graph-runtime.js +3 -1
- package/dist/esm/components/ai-elements/graph/graph-runtime.js.map +1 -1
- package/dist/esm/components/app/app-layout-main-container.d.ts +9 -0
- package/dist/esm/components/app/app-layout-main-container.d.ts.map +1 -1
- package/dist/esm/components/app/app-layout-main-container.js +17 -23
- package/dist/esm/components/app/app-layout-main-container.js.map +1 -1
- package/dist/esm/components/app/app-layout-main-container.labels.d.ts.map +1 -1
- package/dist/esm/components/app/app-layout-main-container.labels.js +27 -0
- package/dist/esm/components/app/app-layout-main-container.labels.js.map +1 -1
- package/dist/esm/components/billing/billing-plan-change-preview.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-plan-change-preview.js +5 -2
- package/dist/esm/components/billing/billing-plan-change-preview.js.map +1 -1
- package/dist/esm/components/billing/billing-plan-change-preview.labels.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-plan-change-preview.labels.js +3 -0
- package/dist/esm/components/billing/billing-plan-change-preview.labels.js.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.d.ts +1 -1
- package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.js +8 -4
- package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.labels.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.labels.js +7 -1
- package/dist/esm/components/billing/billing-pricing-table.labels.js.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.js +6 -3
- package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.labels.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.labels.js +2 -1
- package/dist/esm/components/billing/billing-usage-dashboard.labels.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-enum.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-enum.js +18 -4
- package/dist/esm/components/data-display/formatters/display-field-enum.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file.js +13 -14
- package/dist/esm/components/data-display/formatters/display-field-file.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file.labels.js +1 -0
- package/dist/esm/components/data-display/formatters/display-field-file.labels.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-number.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-number.js +6 -1
- package/dist/esm/components/data-display/formatters/display-field-number.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-number.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-number.labels.js +5 -2
- package/dist/esm/components/data-display/formatters/display-field-number.labels.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-string.d.ts +1 -1
- package/dist/esm/components/data-display/formatters/display-field-string.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-string.js +51 -12
- package/dist/esm/components/data-display/formatters/display-field-string.js.map +1 -1
- package/dist/esm/components/data-display/untrusted-html-content.d.ts +55 -0
- package/dist/esm/components/data-display/untrusted-html-content.d.ts.map +1 -0
- package/dist/esm/components/data-display/untrusted-html-content.js +67 -0
- package/dist/esm/components/data-display/untrusted-html-content.js.map +1 -0
- package/dist/esm/components/form/chromes/form-primitive.labels.d.ts.map +1 -1
- package/dist/esm/components/form/chromes/form-primitive.labels.js +9 -0
- package/dist/esm/components/form/chromes/form-primitive.labels.js.map +1 -1
- package/dist/esm/components/form/combobox.d.ts.map +1 -1
- package/dist/esm/components/form/combobox.js +10 -10
- package/dist/esm/components/form/combobox.js.map +1 -1
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.d.ts +42 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.d.ts.map +1 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.js +120 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.js.map +1 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.d.ts +16 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.d.ts.map +1 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.js +8 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.js.map +1 -0
- package/dist/esm/components/navigation/app-level/activity-bar.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/activity-bar.js +2 -2
- package/dist/esm/components/navigation/app-level/activity-bar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/menu-user-org.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/menu-user-org.js +10 -4
- package/dist/esm/components/navigation/app-level/menu-user-org.js.map +1 -1
- package/dist/esm/components/navigation/app-level/menu-user-org.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/menu-user-org.labels.js +7 -0
- package/dist/esm/components/navigation/app-level/menu-user-org.labels.js.map +1 -1
- package/dist/esm/components/navigation/app-level/menubar.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/menubar.js +6 -6
- package/dist/esm/components/navigation/app-level/menubar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/navigation-back.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/navigation-back.js +27 -9
- package/dist/esm/components/navigation/app-level/navigation-back.js.map +1 -1
- package/dist/esm/components/navigation/app-level/sidebar.js +3 -3
- package/dist/esm/components/navigation/app-level/sidebar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/status-bar.js +2 -2
- package/dist/esm/components/navigation/app-level/status-bar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/toolbar.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/toolbar.js +2 -2
- package/dist/esm/components/navigation/app-level/toolbar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/utility-panel.js +2 -2
- package/dist/esm/components/navigation/app-level/utility-panel.js.map +1 -1
- package/dist/esm/components/navigation/breadcrumb.js +1 -1
- package/dist/esm/components/navigation/breadcrumb.js.map +1 -1
- package/dist/esm/components/sections/stepper.d.ts.map +1 -1
- package/dist/esm/components/sections/stepper.js +5 -3
- package/dist/esm/components/sections/stepper.js.map +1 -1
- package/dist/esm/config/preset-navigation.d.ts.map +1 -1
- package/dist/esm/config/preset-navigation.js +23 -2
- package/dist/esm/config/preset-navigation.js.map +1 -1
- package/dist/esm/config/resources/agent-work.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/agent-work.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/agent-work.resource-presets.js +115 -0
- package/dist/esm/config/resources/agent-work.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/api-key-rotation-window.d.ts +22 -0
- package/dist/esm/config/resources/api-key-rotation-window.d.ts.map +1 -0
- package/dist/esm/config/resources/api-key-rotation-window.js +45 -0
- package/dist/esm/config/resources/api-key-rotation-window.js.map +1 -0
- package/dist/esm/config/resources/application.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/application.resource-presets.js +147 -61
- package/dist/esm/config/resources/application.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/billing.resource-presets.d.ts +4 -3
- package/dist/esm/config/resources/billing.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/billing.resource-presets.js +240 -111
- package/dist/esm/config/resources/billing.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/conversation-threads.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/conversation-threads.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/conversation-threads.resource-presets.js +105 -0
- package/dist/esm/config/resources/conversation-threads.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/guidance.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/guidance.resource-presets.js +18 -11
- package/dist/esm/config/resources/guidance.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/identity.resource-presets.d.ts +0 -13
- package/dist/esm/config/resources/identity.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/identity.resource-presets.js +48 -16
- package/dist/esm/config/resources/identity.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/inbound-deliveries.resource-presets.d.ts +6 -0
- package/dist/esm/config/resources/inbound-deliveries.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/inbound-deliveries.resource-presets.js +112 -0
- package/dist/esm/config/resources/inbound-deliveries.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/inbound-email.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/inbound-email.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/inbound-email.resource-presets.js +182 -0
- package/dist/esm/config/resources/inbound-email.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/index.d.ts.map +1 -1
- package/dist/esm/config/resources/index.js +9 -2
- package/dist/esm/config/resources/index.js.map +1 -1
- package/dist/esm/config/resources/legal-holds.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/legal-holds.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/legal-holds.resource-presets.js +76 -0
- package/dist/esm/config/resources/legal-holds.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/organizations.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/organizations.resource-presets.js +139 -36
- package/dist/esm/config/resources/organizations.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/resource.config.utils.d.ts +20 -0
- package/dist/esm/config/resources/resource.config.utils.d.ts.map +1 -1
- package/dist/esm/config/resources/resource.config.utils.js +20 -0
- package/dist/esm/config/resources/resource.config.utils.js.map +1 -1
- package/dist/esm/config/resources/retention-enforcement.resource-presets.d.ts +5 -0
- package/dist/esm/config/resources/retention-enforcement.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/retention-enforcement.resource-presets.js +74 -0
- package/dist/esm/config/resources/retention-enforcement.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/security.resource-presets.d.ts +3 -1
- package/dist/esm/config/resources/security.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/security.resource-presets.js +563 -133
- package/dist/esm/config/resources/security.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/service-providers.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/service-providers.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/service-providers.resource-presets.js +321 -0
- package/dist/esm/config/resources/service-providers.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/webhooks.resource-presets.d.ts +4 -3
- package/dist/esm/config/resources/webhooks.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/webhooks.resource-presets.js +76 -25
- package/dist/esm/config/resources/webhooks.resource-presets.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/registration/register-common-enums.d.ts.map +1 -1
- package/dist/esm/registration/register-common-enums.js +15 -0
- package/dist/esm/registration/register-common-enums.js.map +1 -1
- package/dist/esm/registration/register-provider-components.d.ts.map +1 -1
- package/dist/esm/registration/register-provider-components.js +6 -0
- package/dist/esm/registration/register-provider-components.js.map +1 -1
- package/dist/esm/themes/dense.theme.d.ts.map +1 -1
- package/dist/esm/themes/dense.theme.js +22 -2
- package/dist/esm/themes/dense.theme.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.js","sourceRoot":"","sources":["../../../../../../src/components/navigation/app-level/sidebar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,EAAE,uBAAuB,EAAE,cAAc,EAAE,UAAU,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AACtR,OAAO,EAEL,0BAA0B,EAC1B,yBAAyB,EAKzB,6BAA6B,EAC7B,MAAM,EACN,sBAAsB,EACtB,SAAS,EACT,UAAU,EACV,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,OAAO,EACP,QAAQ,EACR,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,KAAK,EACL,8BAA8B,EAC9B,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,EACL,YAAY,EACZ,UAAU,EACV,sBAAsB,EACtB,wBAAwB,EACxB,SAAS,EACT,EAAE,EACF,2CAA2C,EAC3C,OAAO,GACR,MAAM,6BAA6B,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,uBAAuB,GAA+E;IAC1G,CAAC,sBAAsB,CAAC,YAAY,CAAC,EAAE,cAAc;IACrD,CAAC,sBAAsB,CAAC,eAAe,CAAC,EAAE,gBAA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AAK,EAAE,cAAc,EAAE,2CAA2C,YAChI,qCACuB,WAAW,EAAE,CAAC,SAAS,EAAE,oBAC9B,EAAE,CAAC,SAAS,sBACV,EAAE,CAAC,aAAa,CAAC,aAAa,oBAChC,EAAE,CAAC,WAAW,4BACN,EAAE,CAAC,aAAa,CAAC,gBAAgB,qBACxC,iBAAiB,EAClC,SAAS,EAAE,EAAE;YACX,oEAAoE;YACpE,4CAA4C;YAC5C,mBAAmB;YACnB,oEAAoE;YACpE,sEAAsE;YACtE,4CAA4C;YAC5C,gBAAgB,EAChB,iBAAiB;gBACf,iEAAiE;gBACjE,+CAA+C;gBAC/C,CAAC,CAAC,gCAAgC;gBAClC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,aAAa,CAAC,cAAc,EAAE,+EAA+E,CAAC,EACxH,uFAAuF,CACxF,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,YAAY,IAAI,EAAE,YAEtD,+BAAmB,UAAU,CAAC,qBAAqB,CAAC,yBAAyB,EAAE,cAAc,CAAC,EAAE,SAAS,EAAC,8BAA8B,aACrI,iBAAiB,EAAE,EACnB,oBAAoB,EAAE,EACtB,sBAAsB,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAChD,oBAAoB,EAAE,IACjB,GACJ,GACE,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { ButtonSize, CorePresetNames, FrontendComponentType, HorizontalPlacement, PlacementSide, SelectableVariant, ShellAppearance, SidebarCompactLabelMode, SurfaceVariant, UIBehavior, VerticalPlacement, resolvePlacementSideToRadix } from '@wildo-ai/presets-components-models';\nimport {\n type SectionRenderProps,\n SidebarSectionInlineCreate,\n SidebarSectionContentKind,\n AnyNavigationItem,\n HierarchicalNavigationItem,\n SectionGroup,\n ApplicationLevelProps_Sidebar,\n ApplicationLevelComponentType,\n Button,\n ButtonVariants_Variant,\n InputRoot,\n ScrollArea,\n ScrollAreaType,\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n useI18n,\n IconSize,\n StandardIconReference,\n NavigationItemBadge,\n useIconRegistry,\n useUI,\n useHostedComponentInteractions,\n TruncatedText,\n useSidebarBehavior,\n useBrandPresentation,\n SidebarHomeDisplayMode,\n Sheet,\n SheetContent,\n SheetTitle,\n SidebarResourceBrowser,\n ComponentRegistryService,\n envLoader,\n cn,\n NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE,\n Surface,\n} from '@wildo-ai/saas-frontend-lib';\n\n/**\n * Which single home affordance each mode renders — the mutual exclusion as\n * DATA, so a future `SidebarHomeDisplayMode` member cannot compile without\n * declaring its answer. Two independent predicates could drift into rendering\n * both affordances (or neither); this map is the one source both renderers gate\n * on.\n */\nconst HOME_AFFORDANCE_BY_MODE: Record<SidebarHomeDisplayMode, 'brand-header' | 'navigation-row' | 'none'> = {\n [SidebarHomeDisplayMode.BRAND_HEADER]: 'brand-header',\n [SidebarHomeDisplayMode.NAVIGATION_ITEM]: 'navigation-row',\n [SidebarHomeDisplayMode.HIDDEN]: 'none',\n};\n\nexport const ApplicationLevelPreset_Sidebar_Default: React.FC<ApplicationLevelProps_Sidebar> = ({\n placement = HorizontalPlacement.START,\n isCollapsed: externalIsCollapsed,\n onToggleCollapse\n}) => {\n\n const sb = useSidebarBehavior({ placement, isCollapsed: externalIsCollapsed, onToggleCollapse });\n const { renderIcon } = useIconRegistry();\n const { tComponent, tSidebarSection, isReady } = useI18n({ component: FrontendComponentType.APPLICATION_LEVEL_SIDEBAR });\n const { UIConfig, getRecipe, shellAppearance, sidebarCompactLabelMode } = useUI();\n const { getHostedComponentProps } = useHostedComponentInteractions();\n const currentBreakpoint = UIConfig?.currentBreakpoint;\n\n // CONTINUOUS shell chrome: the sidebar is a transparent region of the shared\n // canvas (theme backgroundLayer) — no sunken slab, no separating edge border.\n const isContinuousShell = shellAppearance === ShellAppearance.CONTINUOUS;\n // Compact rail with labels under icons (theme design policy). Only relevant\n // while collapsed; expanded rendering is unchanged.\n const showCompactLabels = sb.isCollapsed && sidebarCompactLabelMode === SidebarCompactLabelMode.ICON_AND_LABEL;\n\n // Nav items consume the theme's SELECTABLE/FILLED recipe (the vocabulary for\n // \"sidebar active items\") instead of hardcoding state classes: the active\n // look is a subtle `surface-sunken-accent` overlay + `font-medium` — weight,\n // not a primary tint — and stays themable. Items opt in via `data-active`.\n // These classes are appended AFTER the Button GHOST recipe (cn/tailwind-merge\n // puts `className` last), so the sidebar hover wash wins over GHOST's.\n const selectableRecipe = getRecipe(UIBehavior.SELECTABLE, SelectableVariant.FILLED);\n const navItemStateClasses = cn(\n selectableRecipe.states.hover,\n selectableRecipe.states.selected,\n selectableRecipe.motion.transition,\n );\n\n // The brand header takes the SAME themed hover wash as navigation rows but\n // deliberately NOT the selected state — identity is not a selectable\n // destination, and a permanently-filled header on the home route reads as a\n // stuck menu item.\n const brandHoverClasses = cn(\n selectableRecipe.states.hover,\n selectableRecipe.motion.transition,\n );\n\n // Compact rail: section titles are hidden, so group boundaries are drawn as\n // thin separator lines instead (theme DIVIDER recipe — stays themable).\n const dividerRecipe = getRecipe(UIBehavior.DIVIDER);\n\n // The four decisions a surface must take before it may DRAW a brand identity — a failed asset\n // load degrading to the no-mark presentation, the latch resetting on a light/dark URL change, a\n // WORDMARK/LOCKUP replacing the name label rather than sitting beside it, and an identity with\n // neither mark nor name rendering nothing. They are rules about the DATA, so they live once in\n // `useBrandPresentation` and every surface that presents an identity reads the same answers\n // (#215). What stays HERE is layout: the rail collapses and a login card does not.\n //\n // Called unconditionally, as a hook must be: `sb.brandHeader` is `undefined` in every home mode\n // but BRAND_HEADER, and the hook answers `isEmpty` for that.\n const brand = useBrandPresentation(sb.brandHeader);\n\n const renderNavigationItem = (item: AnyNavigationItem, indent: number = 0) => {\n // Identity-keyed active check (resolved item id, not raw path) — two distinct\n // items sharing an identical urlPath must not both highlight; the behavior hook\n // elects one id. (Ids are deterministic per target, so the SAME target declared\n // in two sections shares one id and would still co-highlight — a config smell.)\n const isActive = sb.isNavigationItemActive(item);\n\n // Star affordance (favorites): only when a FAVORITES section is configured\n // and the rail is expanded (the collapsed rail has no hover surface for a\n // secondary action). Rendered as a SIBLING absolutely-positioned button —\n // a button must not contain interactive descendants — hover/focus-revealed,\n // and pinned visible while the item IS favorited (the \"star when favorite\n // is active\" cue). Favorites-section copies carry `favoriteId`, so the same\n // toggle unfavorites from there.\n const showStarAffordance = sb.hasFavoritesSection && !sb.isCollapsed;\n const isFavorite = showStarAffordance && sb.isItemFavorite(item);\n\n const itemButton = (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={() => sb.handleNavigationClick(item)}\n aria-current={isActive ? 'page' : undefined}\n data-active={isActive || undefined}\n // Resolved-item id (deterministic per target, e.g. `resolved-todos-list-default`)\n // as the i18n-independent automation hook — labels are runtime-translated.\n data-nav-item-id={item.id}\n className={cn(\n 'w-full justify-start gap-field-sm relative',\n navItemStateClasses,\n // Reserve the trailing star slot so hover-reveal does not reflow the\n // label/badge (the badge sits before the star, like Linear's row\n // action cluster).\n showStarAffordance && 'pe-8',\n sb.isCollapsed && !showCompactLabels && 'justify-center px-card-sm',\n // Icon-above-label rail item: intrinsic height (labels may wrap),\n // roomier vertical padding (`py-element` = spacing token) so each\n // entry breathes like a proper rail tile, not a squeezed row.\n showCompactLabels && 'h-auto min-h-8 flex-col items-center justify-center gap-1.5 px-1 py-element',\n )}\n style={{ paddingInlineStart: sb.isCollapsed ? undefined : `${12 + indent * 16}px` }}\n title={sb.isCollapsed && !showCompactLabels ? item.label : undefined}\n >\n {item.icon && (\n // Rail mode upsizes icons to MD (20px): with labels reduced to 11px,\n // the icon is the primary glyph and SM (16px) reads under-weighted.\n // CSS `size-*` on the wrapper wins over the svg's width/height attrs.\n <span className={cn('flex-shrink-0 relative', sb.isCollapsed && '[&_svg]:size-5')}>\n {item.icon}\n {sb.isCollapsed && item.notificationBadgeRef && (\n // Collapsed rail: the badge overlays the icon's top-end corner\n // (the expanded row shows it inline after the label instead).\n <span className=\"absolute -top-1.5 -end-1.5 z-10\">\n <NavigationItemBadge notificationBadgeRef={item.notificationBadgeRef} label={item.label} />\n </span>\n )}\n </span>\n )}\n {!sb.isCollapsed && (\n <>\n <TruncatedText className=\"flex-1 text-start\" tooltipSide={PlacementSide.END}>\n {item.label}\n </TruncatedText>\n {item.notificationBadgeRef && (\n <span className=\"ms-auto flex-shrink-0\">\n <NavigationItemBadge notificationBadgeRef={item.notificationBadgeRef} label={item.label} />\n </span>\n )}\n </>\n )}\n {showCompactLabels && (\n // The label is the primary affordance in this mode: it wraps onto\n // several lines rather than truncating (theme policy contract).\n <span className=\"w-full text-center text-[11px] leading-tight whitespace-normal break-words\">\n {item.label}\n </span>\n )}\n </Button>\n );\n\n if (!showStarAffordance) {\n return <React.Fragment key={item.id}>{itemButton}</React.Fragment>;\n }\n\n const favoriteLabel = tComponent(\n FrontendComponentType.APPLICATION_LEVEL_SIDEBAR,\n isFavorite ? 'favoriteRemove' : 'favoriteAdd',\n );\n\n return (\n <div key={item.id} className=\"relative group/navitem\">\n {itemButton}\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={(e) => {\n e.stopPropagation();\n sb.handleToggleItemFavorite(item);\n }}\n aria-pressed={isFavorite}\n aria-label={favoriteLabel}\n title={favoriteLabel}\n className={cn(\n 'absolute end-1 top-1/2 -translate-y-1/2 z-10 h-6 w-6 p-0 justify-center',\n 'text-muted-foreground hover:text-foreground',\n isFavorite\n ? 'opacity-100'\n : cn(\n 'opacity-0 transition-opacity duration-[var(--motion-duration-fast)] motion-reduce:transition-none',\n 'group-hover/navitem:opacity-100 group-focus-within/navitem:opacity-100 pointer-coarse:opacity-100',\n ),\n )}\n >\n <span className={cn('flex-shrink-0', isFavorite && '[&_svg]:fill-current')}>\n {renderIcon(StandardIconReference.STAR, { size: IconSize.XS })}\n </span>\n </Button>\n </div>\n );\n };\n\n const renderHierarchicalItem = (item: HierarchicalNavigationItem, indent: number = 0) => {\n const hasChildren = item.children && item.children.length > 0;\n const itemCollapsed = sb.isItemCollapsed(item.id);\n const isActive = sb.isNavigationItemActive(item);\n\n if (sb.isCollapsed || !hasChildren) {\n return renderNavigationItem(item, indent);\n }\n\n return (\n <Collapsible\n key={item.id}\n open={!itemCollapsed}\n onOpenChange={() => sb.handleToggleItemCollapse(item.id)}\n >\n <CollapsibleTrigger asChild>\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n aria-current={isActive ? 'page' : undefined}\n data-active={isActive || undefined}\n className={cn(\n 'w-full justify-start gap-field-sm relative',\n navItemStateClasses,\n )}\n style={{ paddingInlineStart: `${12 + indent * 16}px` }}\n >\n {item.icon && (\n <span className=\"flex-shrink-0\">\n {item.icon}\n </span>\n )}\n <TruncatedText className=\"flex-1 text-start\" tooltipSide={PlacementSide.END}>\n {item.label}\n </TruncatedText>\n <span className=\"ms-auto flex-shrink-0\">\n {renderIcon(\n itemCollapsed ? StandardIconReference.CHEVRON_RIGHT : StandardIconReference.CHEVRON_DOWN,\n { size: IconSize.XS }\n )}\n </span>\n </Button>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <div className=\"space-y-item-xs\">\n {item.children?.map(child => renderNavigationItem(child, indent + 1))}\n </div>\n </CollapsibleContent>\n </Collapsible>\n );\n };\n\n /**\n * Pinned brand header (`SidebarHomeDisplayMode.BRAND_HEADER`): the app's\n * symbol + display name at the very top of the sidebar, OUTSIDE the scroll\n * region so it stays put while navigation scrolls — and therefore above any\n * TOP-hosted component such as the command-menu search trigger. It IS the\n * home button (Slack / Linear / Notion), so no Home row renders in this mode.\n */\n const renderBrandHeader = () => {\n if (HOME_AFFORDANCE_BY_MODE[sb.homeDisplayMode] !== 'brand-header' || !sb.brandHeader) return null;\n\n const homeLabel = tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'home');\n // `logoUrl` here is already gated on a usable mark — the hook returns `undefined` for a URL\n // that 404'd, so there is no second failure check to keep in step.\n const { name, logoUrl, hasMark, markCarriesName, onMarkError } = brand;\n\n // Nothing identifiable to show (no name AND no usable mark) — render no\n // header rather than a nameless, unlabelled click target.\n if (brand.isEmpty) return null;\n // A WORDMARK/LOCKUP asset already CONTAINS the application name, so it replaces the name label\n // instead of sitting beside it, and it needs intrinsic width rather than a square icon slot.\n // Only a SYMBOL pairs with the text.\n //\n // The collapsed rail is an icon column: a wide mark cannot render there, so\n // it degrades to the framework home glyph exactly like a missing brand.\n const showSquareMark = hasMark && !markCarriesName;\n const showWideMark = hasMark && markCarriesName && !sb.isCollapsed;\n const showHomeGlyph = !showSquareMark && !showWideMark && sb.isCollapsed;\n // The name renders as text unless the mark already spells it.\n const showNameText = !sb.isCollapsed && !showWideMark;\n // Labelled rail falls back to the name ONLY when no mark resolved: a logo\n // already says which product this is, and repeating the name beneath it in\n // 11px spends rail height that navigation needs.\n const showCompactNameLabel = showCompactLabels && !showSquareMark;\n // Is the application name conveyed by something VISIBLE? A wide mark carries\n // it as `alt`; the two text branches carry it directly. When none render —\n // the logo-only rail — the button needs an explicit accessible name.\n const nameIsAnnounced = showNameText || showCompactNameLabel || showWideMark;\n\n const markImage = (className: string, alt: string) => (\n <img\n src={logoUrl}\n alt={alt}\n aria-hidden={alt === '' ? 'true' : undefined}\n onError={onMarkError}\n className={className}\n />\n );\n\n return (\n <div\n className={cn(\n 'px-card-sm pt-card-sm pb-item-xs flex items-center gap-element',\n // Rail: the mark alone, centred — the toggle lives at the bottom there.\n sb.isCollapsed && 'justify-center',\n )}\n >\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={sb.handleHomeClick}\n // `aria-current` stays truthful (the header DOES lead to the current\n // page when home is open) but NO `data-active` is set: the selected\n // fill belongs to navigation rows. The application's identity is not\n // a menu item that lights up — painting it selected made the product\n // name read as \"the highlighted row\", which is precisely the shell\n // language Linear/Notion/Slack reserve for navigation.\n aria-current={sb.isHomeActive ? 'page' : undefined}\n data-slot=\"sidebar-brand-header\"\n className={cn(\n // Its own register: taller than a nav row, hover-only affordance.\n // `min-w-0` lets the name truncate instead of pushing the collapse\n // toggle out of the row.\n 'flex-1 min-w-0 justify-start gap-field-sm h-11',\n brandHoverClasses,\n sb.isCollapsed && !showCompactLabels && 'justify-center px-card-sm',\n // Labelled rail (theme `SidebarCompactLabelMode.ICON_AND_LABEL`):\n // the brand tile follows the same icon-above-wrapped-label shape as\n // every other rail entry instead of staying an icon-only outlier.\n showCompactLabels && 'h-auto min-h-8 flex-col items-center justify-center gap-1.5 px-1 py-element',\n )}\n // Collapsed there is no visible text: the accessible name composes the\n // app name with the existing home label so the control still announces\n // WHAT it is and WHERE it leads — this covers the logo-only rail, whose\n // `alt=\"\"` mark would otherwise leave the button unnamed. When a name IS\n // visible it is the accessible name, and no `title` is set\n // (`TruncatedText` already supplies an overflow tooltip; a second one\n // would stack).\n aria-label={nameIsAnnounced ? undefined : `${name} — ${homeLabel}`}\n title={nameIsAnnounced ? undefined : `${name} — ${homeLabel}`}\n >\n {showSquareMark && markImage(cn('size-7 flex-shrink-0 rounded-md object-contain', sb.isCollapsed && 'size-5'), '')}\n {showWideMark && markImage('h-7 max-w-full flex-shrink-0 object-contain object-left', name)}\n {showHomeGlyph && (\n <span className=\"flex-shrink-0 [&_svg]:size-5\">\n {renderIcon(StandardIconReference.HOME, { size: IconSize.SM })}\n </span>\n )}\n {showNameText && (\n // Product identity type register — a step up from the 14px/500 nav\n // rows in size and weight, tightened so a longer name still reads as\n // one wordmark rather than a wrapped menu label.\n <TruncatedText className=\"flex-1 text-start text-base font-semibold tracking-tight leading-none\" tooltipSide={PlacementSide.END}>\n {name}\n </TruncatedText>\n )}\n {showCompactNameLabel && (\n // Labelled rail, but NO mark resolved: the name is the only thing\n // identifying the application, so it stands in for the logo. When a\n // mark IS present the rail shows the mark ALONE — a logo already\n // says which product this is, and repeating the name under it in\n // 11px steals rail height from navigation for no information.\n <span className=\"w-full text-center text-[11px] leading-tight whitespace-normal break-words\">\n {name}\n </span>\n )}\n </Button>\n {collapseToggleHostedInBrandHeader && (\n // Quiet by default (same fade contract as the former bottom control):\n // revealed on sidebar hover / focus-within, always visible to coarse\n // pointers, which have no hover to reveal it with.\n <span\n className={cn(\n 'flex-shrink-0',\n 'opacity-0 transition-opacity duration-[var(--motion-duration-normal)] ease-[var(--motion-easing-default)] motion-reduce:transition-none',\n 'group-hover/app-sidebar:opacity-100 group-focus-within/app-sidebar:opacity-100 pointer-coarse:opacity-100',\n )}\n >\n {renderCollapseToggle('h-8 w-8 p-0 justify-center')}\n </span>\n )}\n </div>\n );\n };\n\n const renderHomeLink = () => {\n if (HOME_AFFORDANCE_BY_MODE[sb.homeDisplayMode] !== 'navigation-row') return null;\n\n const homeLabel = tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'home');\n const homeIcon = renderIcon(\n StandardIconReference.HOME,\n { size: IconSize.SM }\n );\n\n return (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={sb.handleHomeClick}\n aria-current={sb.isHomeActive ? 'page' : undefined}\n data-active={sb.isHomeActive || undefined}\n className={cn(\n 'w-full justify-start gap-field-sm',\n navItemStateClasses,\n sb.isCollapsed && !showCompactLabels && 'justify-center px-card-sm',\n showCompactLabels && 'h-auto min-h-8 flex-col items-center justify-center gap-1.5 px-1 py-element',\n )}\n title={sb.isCollapsed && !showCompactLabels ? homeLabel : undefined}\n >\n <span className={cn('flex-shrink-0', sb.isCollapsed && '[&_svg]:size-5')}>{homeIcon}</span>\n {!sb.isCollapsed && <span>{homeLabel}</span>}\n {showCompactLabels && (\n <span className=\"w-full text-center text-[11px] leading-tight whitespace-normal break-words\">\n {homeLabel}\n </span>\n )}\n </Button>\n );\n };\n\n const renderInlineCreate = (section: SectionRenderProps) => {\n if (section.inlineCreate === SidebarSectionInlineCreate.NONE || sb.isCollapsed) {\n return null;\n }\n\n const isActive = sb.inlineCreate.activeSection === section.ref;\n const placeholder = tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'inlineCreatePlaceholder');\n\n if (section.inlineCreate === SidebarSectionInlineCreate.INPUT) {\n if (!isActive) {\n return (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={() => sb.inlineCreate.start(section.ref)}\n className=\"w-full justify-start gap-element text-muted-foreground hover:text-foreground\"\n >\n {renderIcon(\n StandardIconReference.PLUS,\n { size: IconSize.SM }\n )}\n <span className=\"text-sm\">{placeholder}</span>\n </Button>\n );\n }\n\n return (\n <div className=\"px-card-sm py-item-xs\">\n <InputRoot\n autoFocus\n type=\"text\"\n value={sb.inlineCreate.value}\n onChange={(e) => sb.inlineCreate.setValue(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n sb.inlineCreate.submit(section.ref, section.inlineCreateResourceType);\n } else if (e.key === 'Escape') {\n sb.inlineCreate.cancel();\n }\n }}\n onBlur={() => {\n setTimeout(sb.inlineCreate.cancel, 150);\n }}\n placeholder={placeholder}\n aria-label={placeholder}\n className=\"h-8 text-sm\"\n />\n </div>\n );\n }\n\n if (section.inlineCreate === SidebarSectionInlineCreate.DIALOG) {\n return (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={() => {\n if (section.inlineCreateResourceType) {\n sb.inlineCreate.submit(section.ref, section.inlineCreateResourceType);\n }\n }}\n className=\"w-full justify-start gap-element text-muted-foreground hover:text-foreground\"\n >\n {renderIcon(\n StandardIconReference.PLUS,\n { size: IconSize.SM }\n )}\n <span className=\"text-sm\">{placeholder}</span>\n </Button>\n );\n }\n\n return null;\n };\n\n const renderMoreMenu = (moreMenuItems: HierarchicalNavigationItem[]) => {\n if (moreMenuItems.length === 0 || sb.isCollapsed) return null;\n\n const displayLabel = tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'moreItems');\n\n return (\n <Collapsible>\n <CollapsibleTrigger asChild>\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n className=\"w-full justify-start gap-element text-muted-foreground hover:text-foreground\"\n >\n {renderIcon(\n StandardIconReference.MORE_HORIZONTAL,\n { size: IconSize.SM }\n )}\n <span>{displayLabel}</span>\n </Button>\n </CollapsibleTrigger>\n <CollapsibleContent className=\"space-y-item-xs ps-card\">\n {moreMenuItems.map(item => renderNavigationItem(item, 0))}\n </CollapsibleContent>\n </Collapsible>\n );\n };\n\n const renderSectionContent = (group: SectionGroup) => {\n const { contentKind } = group;\n\n if (contentKind === SidebarSectionContentKind.RESOURCE_BROWSER && group.resourceType) {\n return (\n <SidebarResourceBrowser\n resourceType={group.resourceType}\n operation={group.operation}\n operationVariant={group.operationVariant}\n navigateOperation={group.navigateOperation}\n navigateOperationVariant={group.navigateOperationVariant}\n instanceFilter={group.instanceFilter}\n onInstanceClick={group.onInstanceClick}\n isCollapsed={sb.isCollapsed}\n />\n );\n }\n\n if (contentKind === SidebarSectionContentKind.GUIDANCE_WIDGET) {\n const ref = group.guidanceRef;\n if (!ref) return null;\n const GuidanceComponent = ComponentRegistryService.resolve(ref, CorePresetNames.DEFAULT);\n if (!GuidanceComponent) {\n if (envLoader.isDevelopment()) console.warn(`[Sidebar] No registered component for guidance widget \"${ref}\"`);\n return null;\n }\n return (\n <React.Suspense fallback={<div className=\"h-8 animate-pulse motion-reduce:animate-none bg-muted rounded\" aria-hidden=\"true\" />}>\n <GuidanceComponent />\n </React.Suspense>\n );\n }\n\n if (contentKind === SidebarSectionContentKind.CUSTOM_COMPONENT) {\n const ref = group.componentRef;\n if (!ref) return null;\n const CustomComponent = ComponentRegistryService.resolve(ref, CorePresetNames.DEFAULT);\n if (!CustomComponent) {\n if (envLoader.isDevelopment()) console.warn(`[Sidebar] No registered component for custom component \"${ref}\"`);\n return null;\n }\n return (\n <React.Suspense fallback={<div className=\"h-8 animate-pulse motion-reduce:animate-none bg-muted rounded\" aria-hidden=\"true\" />}>\n <CustomComponent />\n </React.Suspense>\n );\n }\n\n return (\n <>\n {group.items.map(item => renderHierarchicalItem(item))}\n {renderMoreMenu(group.moreMenuItems)}\n {renderInlineCreate(group.section)}\n </>\n );\n };\n\n const renderSection = (group: SectionGroup) => {\n const { section } = group;\n const sectionCollapsed = sb.isSectionCollapsed(section);\n const showLabel = section.showLabel;\n const getSectionLabel = () => tSidebarSection(section.ref);\n\n if (!section.collapsible || sb.isCollapsed) {\n return (\n <div key={section.ref} className=\"space-y-item-xs\">\n {showLabel && !sb.isCollapsed && (\n <div className=\"px-card-sm py-card-sm text-xs font-medium text-muted-foreground uppercase tracking-wider\">\n {getSectionLabel()}\n </div>\n )}\n {renderSectionContent(group)}\n </div>\n );\n }\n\n return (\n <Collapsible\n key={section.ref}\n open={!sectionCollapsed}\n onOpenChange={(nextOpen) => sb.handleSetSectionCollapsed(section.ref, !nextOpen)}\n >\n {showLabel && (\n <CollapsibleTrigger asChild>\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n className=\"w-full justify-between px-card-sm py-card-sm text-xs font-medium text-muted-foreground uppercase tracking-wider hover:text-foreground\"\n >\n <span>{getSectionLabel()}</span>\n <span className=\"flex-shrink-0\">\n {renderIcon(\n sectionCollapsed ? StandardIconReference.CHEVRON_RIGHT : StandardIconReference.CHEVRON_DOWN,\n { size: IconSize.XS }\n )}\n </span>\n </Button>\n </CollapsibleTrigger>\n )}\n <CollapsibleContent className=\"space-y-item-xs\">\n {renderSectionContent(group)}\n </CollapsibleContent>\n </Collapsible>\n );\n };\n\n /**\n * The rail-collapse toggle itself. A PANEL glyph, never a chevron: a chevron is\n * the framework's NAVIGATION vocabulary (back / forward / expand-a-tree), so\n * pointing one at the edge of the shell reads as \"go back\" rather than \"fold\n * this panel\". The glyph mirrors with `placement` so it always depicts the\n * panel it toggles, and stays the SAME in both states — what changes is the\n * accessible name (`expand` / `collapse`), not the picture.\n */\n const renderCollapseToggle = (className?: string) => {\n const collapseIconRef = sb.placement === HorizontalPlacement.START\n ? StandardIconReference.PANEL_LEFT\n : StandardIconReference.PANEL_RIGHT;\n\n const collapseLabel = tComponent(\n FrontendComponentType.APPLICATION_LEVEL_SIDEBAR,\n sb.isCollapsed ? 'expand' : 'collapse'\n );\n\n return (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={sb.handleToggleCollapse}\n aria-expanded={!sb.isCollapsed}\n aria-label={collapseLabel}\n title={collapseLabel}\n data-slot=\"sidebar-collapse-toggle\"\n className={cn('text-muted-foreground hover:text-foreground', className)}\n >\n <span className=\"flex-shrink-0\">\n {renderIcon(collapseIconRef, { size: IconSize.SM })}\n </span>\n </Button>\n );\n };\n\n /**\n * BRAND_HEADER hosts the toggle at the trailing edge of its own row — which\n * costs NO extra height, because it shares the line the brand already\n * occupies. That only works while expanded: a collapsed rail is a single\n * ~64px icon column with no room beside the mark, and stacking the toggle\n * under it spends a whole extra row of the rail's scarcest axis. So the rail\n * hands the control back to the quiet bottom host. The two are mutually\n * exclusive by construction — one toggle, never two, never zero.\n */\n const collapseToggleHostedInBrandHeader =\n HOME_AFFORDANCE_BY_MODE[sb.homeDisplayMode] === 'brand-header'\n && sb.sidebarConfig.isCollapsible\n && !sb.isCollapsed;\n\n const renderCollapseButton = () => {\n if (!sb.sidebarConfig.isCollapsible || collapseToggleHostedInBrandHeader) return null;\n\n return (\n // Bottom-hosted collapse control.\n //\n // PERSISTENT while the rail is COLLAPSED, quiet-on-hover while it is expanded.\n //\n // The quiet contract — invisible until the pointer enters the sidebar, revealed\n // on focus-within for keyboard users, always shown to coarse pointers that have\n // no hover — is a deliberate reduction of chrome noise, and it holds while the\n // sidebar is EXPANDED: the surface is full of labelled rows, so it says what it\n // is and the toggle is a secondary affordance.\n //\n // It does NOT hold while the rail is COLLAPSED, and shipping it that way is what\n // made this a defect rather than a preference. In the collapsed state the toggle\n // is the ONLY chrome on the surface, nothing else on screen says the rail opens,\n // and a fine-pointer user who never happens to hover the rail has no way to\n // discover that it does. That went unnoticed for as long as every application\n // started expanded (the brand header hosts a toggle there, on the line it\n // already occupies); the moment `SIDEBAR.defaultCollapsed` let an application\n // OPEN collapsed, a first-run operator met an icon rail with no visible way out\n // of it — measured on the application-creation workbench.\n //\n // Hiding a control is only quiet when something else answers the question it\n // would have answered.\n <div\n className={cn(\n 'p-card-sm',\n sb.isCollapsed\n ? 'opacity-100'\n : cn(\n 'opacity-0 transition-opacity duration-[var(--motion-duration-normal)] ease-[var(--motion-easing-default)] motion-reduce:transition-none',\n 'group-hover/app-sidebar:opacity-100 group-focus-within/app-sidebar:opacity-100 pointer-coarse:opacity-100',\n ),\n )}\n >\n {renderCollapseToggle(cn('w-full', sb.isCollapsed ? 'justify-center' : 'justify-start'))}\n </div>\n );\n };\n\n // Container-inversion: components hosted inside the sidebar (e.g. the\n // command-menu trigger), resolved via the registry and mounted with the\n // shell-level interaction-owner props — the SAME bridge the menubar uses.\n // While the rail is COLLAPSED the full input-like trigger can't fit the narrow\n // icon column, so the hosted component is told to render COMPACT (icon-only)\n // via `compact` — this keeps the palette reachable on a collapsed desktop rail\n // AND on the mobile burger (where the rail is always collapsed), instead of\n // vanishing entirely.\n const renderHostedComponents = (placement: VerticalPlacement) => {\n const hosted = sb.hostedComponents.filter(\n comp => (comp.placement ?? VerticalPlacement.TOP) === placement,\n );\n if (hosted.length === 0) return null;\n\n return (\n <div\n className={cn(\n 'px-card-sm space-y-item-xs',\n // Edge-aligned insets: the sidebar's outer rhythm is 8px (`card-sm`,\n // matching the nav's `p-card-sm`), so the edge-facing side gets the\n // full inset while the content-facing side stays light — the adjacent\n // nav/list padding supplies the rest of the separation. The previous\n // uniform `py-item-xs` left the TOP-hosted search trigger 1px from\n // the sidebar's top edge.\n placement === VerticalPlacement.TOP ? 'pt-card-sm pb-item-xs' : 'pt-item-xs pb-card-sm',\n sb.isCollapsed && 'flex flex-col items-center',\n )}\n >\n {hosted.map(comp => {\n const Component = ComponentRegistryService.resolve(\n comp.frontendComponentType,\n comp.presetName ?? CorePresetNames.DEFAULT,\n );\n if (!Component) {\n if (envLoader.isDevelopment()) console.warn(`[Sidebar] No registered component for hosted component \"${comp.frontendComponentType}\"`);\n return null;\n }\n return (\n <React.Suspense\n key={comp.instanceId}\n fallback={<div className=\"h-9 animate-pulse motion-reduce:animate-none bg-muted rounded\" aria-hidden=\"true\" />}\n >\n <Component\n {...getHostedComponentProps(comp.component, comp.instanceId)}\n containerType={ApplicationLevelComponentType.SIDEBAR}\n containerPlacement={comp.placement}\n triggerWidth={comp.triggerWidth}\n compact={sb.isCollapsed}\n />\n </React.Suspense>\n );\n })}\n </div>\n );\n };\n\n const renderSidebarContent = () => {\n // Primary sections form ONE unlabeled group at the top (the hook already\n // forces them headerless/non-collapsible and orders them first), headed by\n // the framework Home row when `homeDisplayMode` is NAVIGATION_ITEM —\n // `renderHomeLink` returns null in the other modes, leaving the group to\n // the app's own destinations. Everything else renders as titled sections.\n const primaryGroups = sb.groupedSections.filter(group => group.section.isPrimary);\n const secondaryGroups = sb.groupedSections.filter(group => !group.section.isPrimary);\n\n return (\n <>\n {/* `min-h-0` lets the ScrollArea actually shrink inside the flex column —\n without it the nav content dictates the column height and overflow\n escapes to the shell instead of scrolling internally (E4).\n\n `type=AUTO` is load-bearing, not cosmetic. Radix drives the viewport's\n overflow from whether a scrollbar is MOUNTED\n (`overflowY: scrollbarYEnabled ? 'scroll' : 'hidden'`), and its default\n `type=\"hover\"` only mounts one on `pointerenter`. Without this the rail\n was `overflow: hidden` until hovered — content below the fold was\n unreachable, and on touch (the mobile drawer) the first gesture scrolled\n the PAGE instead. AUTO mounts the scrollbar from content overflow\n (ResizeObserver), so wheel/touch/keyboard work immediately in BOTH the\n expanded column and the collapsed rail. Radix positions the scrollbar\n `absolute`, so it overlays rather than stealing rail width.\n `overscroll-contain` keeps a scroll that reaches the end from chaining\n out to the page behind the sidebar. */}\n <ScrollArea\n className=\"flex-1 min-h-0\"\n type={ScrollAreaType.AUTO}\n viewportClassName=\"overscroll-contain\"\n >\n {/* TOP-hosted components (the command-menu search trigger) SCROLL with\n the navigation — only the brand header stays pinned. A sidebar's\n vertical placement names where a component sits in the content\n column, and the palette remains reachable at any scroll position via\n its hotkey and the menubar trigger, so pinning it here would spend\n permanent rail height for no reachability gain. */}\n {renderHostedComponents(VerticalPlacement.TOP)}\n <nav aria-label={tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'navigationLabel')} className=\"p-card-sm space-y-item\">\n {/* Home + primary navigation: one visual group, same item rhythm as\n a section body (`space-y-item-xs`), no header between them. */}\n <div className=\"space-y-item-xs\">\n {renderHomeLink()}\n {primaryGroups.map(group => (\n <React.Fragment key={group.section.ref}>\n {renderSectionContent(group)}\n </React.Fragment>\n ))}\n </div>\n\n {sb.isNavigationLoading && !sb.hasItems && (\n <div role=\"status\" aria-live=\"polite\" className=\"px-card-sm py-card-sm text-sm text-muted-foreground\">\n {tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'loading')}\n </div>\n )}\n\n {secondaryGroups\n // No emptiness filter here on purpose — `useSidebarBehavior` omits\n // an empty navigation section from `groupedSections` in BOTH modes,\n // so every preset inherits the policy and cannot disagree with it.\n // This preset used to filter for the collapsed rail alone (an empty\n // section's separator otherwise stacked against the next one into a\n // double line) while expanded mode kept the empty header; that split\n // is what shipped permanently-empty TOOLS / SETTINGS headings.\n .map((group) => (\n <React.Fragment key={group.section.ref}>\n {/* Collapsed rail: draw the group boundary the hidden section\n title would otherwise provide (before EACH section — the\n first line also separates the primary group from the rest). */}\n {sb.isCollapsed && (\n <div role=\"presentation\" className={cn(dividerRecipe.base, 'h-px mx-element')} />\n )}\n {renderSection(group)}\n </React.Fragment>\n ))}\n\n {!sb.isNavigationLoading && !sb.hasItems && (\n <div className=\"px-card-sm py-card-sm text-sm text-muted-foreground\">\n {tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'noItems')}\n </div>\n )}\n </nav>\n </ScrollArea>\n </>\n );\n };\n\n // ── Mobile overlay drawer (responsivePolicy BURGER at/below the configured\n // responsiveBreakpoint) ─────────────────────────────────────────────────────\n // The schema documents BURGER as \"burger menu / drawer overlay on mobile\":\n // nothing renders inline (width 0 — no 45%-wide rail eating the viewport);\n // the sidebar opens as a Sheet overlay instead. Radix supplies the backdrop\n // (click-closes), Escape handling, focus trap and a close button. The trigger\n // lives in the menubar (mobile-only burger) and speaks HOTKEY_SIDEBAR_TOGGLE.\n /*\n * Nothing until this component's own labels have loaded.\n *\n * `isReady` was read here and used NOWHERE, so the sidebar rendered its labels while they were\n * still arriving and showed the raw key paths instead — `components.APPLICATION_LEVEL_SIDEBAR.loading`\n * was seen on screen in the running Wonder Todos, in the loading line that exists to reassure\n * somebody during exactly that window. The labels are not MISSING (they are generated in every\n * catalog); they are not there YET, which is what readiness answers and what\n * `.claude/rules/display-text-comes-from-i18n.md` prescribes for the loading window.\n *\n * Blank rather than a skeleton, matching the other presets in this directory: the shell around it\n * renders, and the sidebar appears with its words the moment they land.\n */\n if (!isReady) return null;\n\n if (sb.isMobileDrawerMode) {\n const dir = (typeof document !== 'undefined' ? document.documentElement?.dir : undefined) || 'ltr';\n const drawerSide = resolvePlacementSideToRadix(\n sb.placement === HorizontalPlacement.START ? PlacementSide.START : PlacementSide.END,\n dir as 'ltr' | 'rtl',\n );\n\n return (\n <Sheet open={sb.isMobileDrawerOpen} onOpenChange={(open) => { if (!open) sb.closeMobileDrawer(); }}>\n <SheetContent\n side={drawerSide}\n data-component-area={`sidebar-${sb.placement}`}\n data-placement={sb.placement}\n data-responsive-policy={sb.sidebarConfig.responsivePolicy}\n data-mobile-drawer=\"true\"\n data-breakpoint={currentBreakpoint}\n className=\"gap-0\"\n style={{ width: `${sb.sidebarConfig.currentWidth}px` }}\n >\n {/* Radix Dialog a11y: the drawer needs an accessible name; visually the\n nav content is self-describing, so the title is screen-reader-only. */}\n <SheetTitle className=\"sr-only\">{tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'sidebarLabel')}</SheetTitle>\n <aside\n aria-label={tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'sidebarLabel')}\n className=\"flex-1 min-h-0 flex flex-col\"\n >\n {renderBrandHeader()}\n {renderSidebarContent()}\n {renderHostedComponents(VerticalPlacement.BOTTOM)}\n {/* No collapse chevron in the drawer: rail collapse is a desktop\n concept, and the SheetContent already renders a close button. */}\n </aside>\n </SheetContent>\n </Sheet>\n );\n }\n\n return (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div\n data-component-area={`sidebar-${sb.placement}`}\n data-placement={sb.placement}\n data-collapsible={sb.sidebarConfig.isCollapsible}\n data-collapsed={sb.isCollapsed}\n data-responsive-policy={sb.sidebarConfig.responsivePolicy}\n data-breakpoint={currentBreakpoint}\n className={cn(\n // Named group so the bottom collapse control can fade in on hover /\n // focus-within of the whole sidebar region.\n 'group/app-sidebar',\n // Height chain (E4): fill the shell row and allow the internal flex\n // column to shrink, so overflow scrolls INSIDE the ScrollArea instead\n // of stretching the whole shell vertically.\n 'h-full min-h-0',\n isContinuousShell\n // CONTINUOUS: transparent region of the shared canvas — no slab,\n // no edge border; page foreground for content.\n ? 'bg-transparent text-foreground'\n : cn(sb.sidebarConfig.placementClass, 'border-surface-sunken-border bg-surface-sunken text-surface-sunken-foreground'),\n 'transition-all duration-[var(--motion-duration-normal)] motion-reduce:transition-none',\n )}\n style={{ width: `${sb.sidebarConfig.currentWidth}px` }}\n >\n <aside aria-label={tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'sidebarLabel')} className=\"h-full min-h-0 flex flex-col\">\n {renderBrandHeader()}\n {renderSidebarContent()}\n {renderHostedComponents(VerticalPlacement.BOTTOM)}\n {renderCollapseButton()}\n </aside>\n </div>\n </Surface>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"sidebar.js","sourceRoot":"","sources":["../../../../../../src/components/navigation/app-level/sidebar.tsx"],"names":[],"mappings":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,CAAC,EAAE,CAAC,EAAE,CAAC,aAAa,CAAC,cAAc,EAAE,+EAA+E,CAAC,EACxH,uFAAuF,CACxF,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,YAAY,IAAI,EAAE,YAEtD,+BAAmB,UAAU,CAAC,qBAAqB,CAAC,yBAAyB,EAAE,cAAc,CAAC,EAAE,SAAS,EAAC,8BAA8B,aACrI,iBAAiB,EAAE,EACnB,oBAAoB,EAAE,EACtB,sBAAsB,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAChD,oBAAoB,EAAE,IACjB,GACJ,GACE,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { ButtonSize, CorePresetNames, FrontendComponentType, HorizontalPlacement, PlacementSide, resolvePlacementSideToRadix, SelectableVariant, ShellAppearance, ShellRegion, SidebarCompactLabelMode, SurfaceVariant, UIBehavior, VerticalPlacement } from '@wildo-ai/presets-components-models';\nimport {\n type SectionRenderProps,\n SidebarSectionInlineCreate,\n SidebarSectionContentKind,\n AnyNavigationItem,\n HierarchicalNavigationItem,\n SectionGroup,\n ApplicationLevelProps_Sidebar,\n ApplicationLevelComponentType,\n Button,\n ButtonVariants_Variant,\n InputRoot,\n ScrollArea,\n ScrollAreaType,\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n useI18n,\n IconSize,\n StandardIconReference,\n NavigationItemBadge,\n useIconRegistry,\n useUI,\n useHostedComponentInteractions,\n TruncatedText,\n useSidebarBehavior,\n useBrandPresentation,\n SidebarHomeDisplayMode,\n Sheet,\n SheetContent,\n SheetTitle,\n SidebarResourceBrowser,\n ComponentRegistryService,\n envLoader,\n cn,\n NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE,\n Surface,\n} from '@wildo-ai/saas-frontend-lib';\n\n/**\n * Which single home affordance each mode renders — the mutual exclusion as\n * DATA, so a future `SidebarHomeDisplayMode` member cannot compile without\n * declaring its answer. Two independent predicates could drift into rendering\n * both affordances (or neither); this map is the one source both renderers gate\n * on.\n */\nconst HOME_AFFORDANCE_BY_MODE: Record<SidebarHomeDisplayMode, 'brand-header' | 'navigation-row' | 'none'> = {\n [SidebarHomeDisplayMode.BRAND_HEADER]: 'brand-header',\n [SidebarHomeDisplayMode.NAVIGATION_ITEM]: 'navigation-row',\n [SidebarHomeDisplayMode.HIDDEN]: 'none',\n};\n\nexport const ApplicationLevelPreset_Sidebar_Default: React.FC<ApplicationLevelProps_Sidebar> = ({\n placement = HorizontalPlacement.START,\n isCollapsed: externalIsCollapsed,\n onToggleCollapse\n}) => {\n\n const sb = useSidebarBehavior({ placement, isCollapsed: externalIsCollapsed, onToggleCollapse });\n const { renderIcon } = useIconRegistry();\n const { tComponent, tSidebarSection, isReady } = useI18n({ component: FrontendComponentType.APPLICATION_LEVEL_SIDEBAR });\n const { UIConfig, getRecipe, shellAppearance, sidebarCompactLabelMode } = useUI();\n const { getHostedComponentProps } = useHostedComponentInteractions();\n const currentBreakpoint = UIConfig?.currentBreakpoint;\n\n // CONTINUOUS shell chrome: the sidebar is a transparent region of the shared\n // canvas (theme backgroundLayer) — no sunken slab, no separating edge border.\n const isContinuousShell = shellAppearance === ShellAppearance.CONTINUOUS;\n // Compact rail with labels under icons (theme design policy). Only relevant\n // while collapsed; expanded rendering is unchanged.\n const showCompactLabels = sb.isCollapsed && sidebarCompactLabelMode === SidebarCompactLabelMode.ICON_AND_LABEL;\n\n // Nav items consume the theme's SELECTABLE/FILLED recipe (the vocabulary for\n // \"sidebar active items\") instead of hardcoding state classes: the active\n // look is a subtle `surface-sunken-accent` overlay + `font-medium` — weight,\n // not a primary tint — and stays themable. Items opt in via `data-active`.\n // These classes are appended AFTER the Button GHOST recipe (cn/tailwind-merge\n // puts `className` last), so the sidebar hover wash wins over GHOST's.\n const selectableRecipe = getRecipe(UIBehavior.SELECTABLE, SelectableVariant.FILLED);\n const navItemStateClasses = cn(\n selectableRecipe.states.hover,\n selectableRecipe.states.selected,\n selectableRecipe.motion.transition,\n );\n\n // The brand header takes the SAME themed hover wash as navigation rows but\n // deliberately NOT the selected state — identity is not a selectable\n // destination, and a permanently-filled header on the home route reads as a\n // stuck menu item.\n const brandHoverClasses = cn(\n selectableRecipe.states.hover,\n selectableRecipe.motion.transition,\n );\n\n // Compact rail: section titles are hidden, so group boundaries are drawn as\n // thin separator lines instead (theme DIVIDER recipe — stays themable).\n const dividerRecipe = getRecipe(UIBehavior.DIVIDER);\n\n // The four decisions a surface must take before it may DRAW a brand identity — a failed asset\n // load degrading to the no-mark presentation, the latch resetting on a light/dark URL change, a\n // WORDMARK/LOCKUP replacing the name label rather than sitting beside it, and an identity with\n // neither mark nor name rendering nothing. They are rules about the DATA, so they live once in\n // `useBrandPresentation` and every surface that presents an identity reads the same answers\n // (#215). What stays HERE is layout: the rail collapses and a login card does not.\n //\n // Called unconditionally, as a hook must be: `sb.brandHeader` is `undefined` in every home mode\n // but BRAND_HEADER, and the hook answers `isEmpty` for that.\n const brand = useBrandPresentation(sb.brandHeader);\n\n const renderNavigationItem = (item: AnyNavigationItem, indent: number = 0) => {\n // Identity-keyed active check (resolved item id, not raw path) — two distinct\n // items sharing an identical urlPath must not both highlight; the behavior hook\n // elects one id. (Ids are deterministic per target, so the SAME target declared\n // in two sections shares one id and would still co-highlight — a config smell.)\n const isActive = sb.isNavigationItemActive(item);\n\n // Star affordance (favorites): only when a FAVORITES section is configured\n // and the rail is expanded (the collapsed rail has no hover surface for a\n // secondary action). Rendered as a SIBLING absolutely-positioned button —\n // a button must not contain interactive descendants — hover/focus-revealed,\n // and pinned visible while the item IS favorited (the \"star when favorite\n // is active\" cue). Favorites-section copies carry `favoriteId`, so the same\n // toggle unfavorites from there.\n const showStarAffordance = sb.hasFavoritesSection && !sb.isCollapsed;\n const isFavorite = showStarAffordance && sb.isItemFavorite(item);\n\n const itemButton = (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={() => sb.handleNavigationClick(item)}\n aria-current={isActive ? 'page' : undefined}\n data-active={isActive || undefined}\n // Resolved-item id (deterministic per target, e.g. `resolved-todos-list-default`)\n // as the i18n-independent automation hook — labels are runtime-translated.\n data-nav-item-id={item.id}\n className={cn(\n 'w-full justify-start gap-field-sm relative',\n navItemStateClasses,\n // Reserve the trailing star slot so hover-reveal does not reflow the\n // label/badge (the badge sits before the star, like Linear's row\n // action cluster).\n showStarAffordance && 'pe-8',\n sb.isCollapsed && !showCompactLabels && 'justify-center px-card-sm',\n // Icon-above-label rail item: intrinsic height (labels may wrap),\n // roomier vertical padding (`py-element` = spacing token) so each\n // entry breathes like a proper rail tile, not a squeezed row.\n showCompactLabels && 'h-auto min-h-8 flex-col items-center justify-center gap-1.5 px-1 py-element',\n )}\n style={{ paddingInlineStart: sb.isCollapsed ? undefined : `${12 + indent * 16}px` }}\n title={sb.isCollapsed && !showCompactLabels ? item.label : undefined}\n >\n {item.icon && (\n // Rail mode upsizes icons to MD (20px): with labels reduced to 11px,\n // the icon is the primary glyph and SM (16px) reads under-weighted.\n // CSS `size-*` on the wrapper wins over the svg's width/height attrs.\n <span className={cn('flex-shrink-0 relative', sb.isCollapsed && '[&_svg]:size-5')}>\n {item.icon}\n {sb.isCollapsed && item.notificationBadgeRef && (\n // Collapsed rail: the badge overlays the icon's top-end corner\n // (the expanded row shows it inline after the label instead).\n <span className=\"absolute -top-1.5 -end-1.5 z-10\">\n <NavigationItemBadge notificationBadgeRef={item.notificationBadgeRef} label={item.label} />\n </span>\n )}\n </span>\n )}\n {!sb.isCollapsed && (\n <>\n <TruncatedText className=\"flex-1 text-start\" tooltipSide={PlacementSide.END}>\n {item.label}\n </TruncatedText>\n {item.notificationBadgeRef && (\n <span className=\"ms-auto flex-shrink-0\">\n <NavigationItemBadge notificationBadgeRef={item.notificationBadgeRef} label={item.label} />\n </span>\n )}\n </>\n )}\n {showCompactLabels && (\n // The label is the primary affordance in this mode: it wraps onto\n // several lines rather than truncating (theme policy contract).\n <span className=\"w-full text-center text-[11px] leading-tight whitespace-normal break-words\">\n {item.label}\n </span>\n )}\n </Button>\n );\n\n if (!showStarAffordance) {\n return <React.Fragment key={item.id}>{itemButton}</React.Fragment>;\n }\n\n const favoriteLabel = tComponent(\n FrontendComponentType.APPLICATION_LEVEL_SIDEBAR,\n isFavorite ? 'favoriteRemove' : 'favoriteAdd',\n );\n\n return (\n <div key={item.id} className=\"relative group/navitem\">\n {itemButton}\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={(e) => {\n e.stopPropagation();\n sb.handleToggleItemFavorite(item);\n }}\n aria-pressed={isFavorite}\n aria-label={favoriteLabel}\n title={favoriteLabel}\n className={cn(\n 'absolute end-1 top-1/2 -translate-y-1/2 z-10 h-6 w-6 p-0 justify-center',\n 'text-muted-foreground hover:text-foreground',\n isFavorite\n ? 'opacity-100'\n : cn(\n 'opacity-0 transition-opacity duration-[var(--motion-duration-fast)] motion-reduce:transition-none',\n 'group-hover/navitem:opacity-100 group-focus-within/navitem:opacity-100 pointer-coarse:opacity-100',\n ),\n )}\n >\n <span className={cn('flex-shrink-0', isFavorite && '[&_svg]:fill-current')}>\n {renderIcon(StandardIconReference.STAR, { size: IconSize.XS })}\n </span>\n </Button>\n </div>\n );\n };\n\n const renderHierarchicalItem = (item: HierarchicalNavigationItem, indent: number = 0) => {\n const hasChildren = item.children && item.children.length > 0;\n const itemCollapsed = sb.isItemCollapsed(item.id);\n const isActive = sb.isNavigationItemActive(item);\n\n if (sb.isCollapsed || !hasChildren) {\n return renderNavigationItem(item, indent);\n }\n\n return (\n <Collapsible\n key={item.id}\n open={!itemCollapsed}\n onOpenChange={() => sb.handleToggleItemCollapse(item.id)}\n >\n <CollapsibleTrigger asChild>\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n aria-current={isActive ? 'page' : undefined}\n data-active={isActive || undefined}\n className={cn(\n 'w-full justify-start gap-field-sm relative',\n navItemStateClasses,\n )}\n style={{ paddingInlineStart: `${12 + indent * 16}px` }}\n >\n {item.icon && (\n <span className=\"flex-shrink-0\">\n {item.icon}\n </span>\n )}\n <TruncatedText className=\"flex-1 text-start\" tooltipSide={PlacementSide.END}>\n {item.label}\n </TruncatedText>\n <span className=\"ms-auto flex-shrink-0\">\n {renderIcon(\n itemCollapsed ? StandardIconReference.CHEVRON_RIGHT : StandardIconReference.CHEVRON_DOWN,\n { size: IconSize.XS }\n )}\n </span>\n </Button>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <div className=\"space-y-item-xs\">\n {item.children?.map(child => renderNavigationItem(child, indent + 1))}\n </div>\n </CollapsibleContent>\n </Collapsible>\n );\n };\n\n /**\n * Pinned brand header (`SidebarHomeDisplayMode.BRAND_HEADER`): the app's\n * symbol + display name at the very top of the sidebar, OUTSIDE the scroll\n * region so it stays put while navigation scrolls — and therefore above any\n * TOP-hosted component such as the command-menu search trigger. It IS the\n * home button (Slack / Linear / Notion), so no Home row renders in this mode.\n */\n const renderBrandHeader = () => {\n if (HOME_AFFORDANCE_BY_MODE[sb.homeDisplayMode] !== 'brand-header' || !sb.brandHeader) return null;\n\n const homeLabel = tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'home');\n // `logoUrl` here is already gated on a usable mark — the hook returns `undefined` for a URL\n // that 404'd, so there is no second failure check to keep in step.\n const { name, logoUrl, hasMark, markCarriesName, onMarkError } = brand;\n\n // Nothing identifiable to show (no name AND no usable mark) — render no\n // header rather than a nameless, unlabelled click target.\n if (brand.isEmpty) return null;\n // A WORDMARK/LOCKUP asset already CONTAINS the application name, so it replaces the name label\n // instead of sitting beside it, and it needs intrinsic width rather than a square icon slot.\n // Only a SYMBOL pairs with the text.\n //\n // The collapsed rail is an icon column: a wide mark cannot render there, so\n // it degrades to the framework home glyph exactly like a missing brand.\n const showSquareMark = hasMark && !markCarriesName;\n const showWideMark = hasMark && markCarriesName && !sb.isCollapsed;\n const showHomeGlyph = !showSquareMark && !showWideMark && sb.isCollapsed;\n // The name renders as text unless the mark already spells it.\n const showNameText = !sb.isCollapsed && !showWideMark;\n // Labelled rail falls back to the name ONLY when no mark resolved: a logo\n // already says which product this is, and repeating the name beneath it in\n // 11px spends rail height that navigation needs.\n const showCompactNameLabel = showCompactLabels && !showSquareMark;\n // Is the application name conveyed by something VISIBLE? A wide mark carries\n // it as `alt`; the two text branches carry it directly. When none render —\n // the logo-only rail — the button needs an explicit accessible name.\n const nameIsAnnounced = showNameText || showCompactNameLabel || showWideMark;\n\n const markImage = (className: string, alt: string) => (\n <img\n src={logoUrl}\n alt={alt}\n aria-hidden={alt === '' ? 'true' : undefined}\n onError={onMarkError}\n className={className}\n />\n );\n\n return (\n <div\n className={cn(\n 'px-card-sm pt-card-sm pb-item-xs flex items-center gap-element',\n // Rail: the mark alone, centred — the toggle lives at the bottom there.\n sb.isCollapsed && 'justify-center',\n )}\n >\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={sb.handleHomeClick}\n // `aria-current` stays truthful (the header DOES lead to the current\n // page when home is open) but NO `data-active` is set: the selected\n // fill belongs to navigation rows. The application's identity is not\n // a menu item that lights up — painting it selected made the product\n // name read as \"the highlighted row\", which is precisely the shell\n // language Linear/Notion/Slack reserve for navigation.\n aria-current={sb.isHomeActive ? 'page' : undefined}\n data-slot=\"sidebar-brand-header\"\n className={cn(\n // Its own register: taller than a nav row, hover-only affordance.\n // `min-w-0` lets the name truncate instead of pushing the collapse\n // toggle out of the row.\n 'flex-1 min-w-0 justify-start gap-field-sm h-11',\n brandHoverClasses,\n sb.isCollapsed && !showCompactLabels && 'justify-center px-card-sm',\n // Labelled rail (theme `SidebarCompactLabelMode.ICON_AND_LABEL`):\n // the brand tile follows the same icon-above-wrapped-label shape as\n // every other rail entry instead of staying an icon-only outlier.\n showCompactLabels && 'h-auto min-h-8 flex-col items-center justify-center gap-1.5 px-1 py-element',\n )}\n // Collapsed there is no visible text: the accessible name composes the\n // app name with the existing home label so the control still announces\n // WHAT it is and WHERE it leads — this covers the logo-only rail, whose\n // `alt=\"\"` mark would otherwise leave the button unnamed. When a name IS\n // visible it is the accessible name, and no `title` is set\n // (`TruncatedText` already supplies an overflow tooltip; a second one\n // would stack).\n aria-label={nameIsAnnounced ? undefined : `${name} — ${homeLabel}`}\n title={nameIsAnnounced ? undefined : `${name} — ${homeLabel}`}\n >\n {showSquareMark && markImage(cn('size-7 flex-shrink-0 rounded-md object-contain', sb.isCollapsed && 'size-5'), '')}\n {showWideMark && markImage('h-7 max-w-full flex-shrink-0 object-contain object-left', name)}\n {showHomeGlyph && (\n <span className=\"flex-shrink-0 [&_svg]:size-5\">\n {renderIcon(StandardIconReference.HOME, { size: IconSize.SM })}\n </span>\n )}\n {showNameText && (\n // Product identity type register — a step up from the 14px/500 nav\n // rows in size and weight, tightened so a longer name still reads as\n // one wordmark rather than a wrapped menu label.\n <TruncatedText className=\"flex-1 text-start text-base font-semibold tracking-tight leading-none\" tooltipSide={PlacementSide.END}>\n {name}\n </TruncatedText>\n )}\n {showCompactNameLabel && (\n // Labelled rail, but NO mark resolved: the name is the only thing\n // identifying the application, so it stands in for the logo. When a\n // mark IS present the rail shows the mark ALONE — a logo already\n // says which product this is, and repeating the name under it in\n // 11px steals rail height from navigation for no information.\n <span className=\"w-full text-center text-[11px] leading-tight whitespace-normal break-words\">\n {name}\n </span>\n )}\n </Button>\n {collapseToggleHostedInBrandHeader && (\n // Quiet by default (same fade contract as the former bottom control):\n // revealed on sidebar hover / focus-within, always visible to coarse\n // pointers, which have no hover to reveal it with.\n <span\n className={cn(\n 'flex-shrink-0',\n 'opacity-0 transition-opacity duration-[var(--motion-duration-normal)] ease-[var(--motion-easing-default)] motion-reduce:transition-none',\n 'group-hover/app-sidebar:opacity-100 group-focus-within/app-sidebar:opacity-100 pointer-coarse:opacity-100',\n )}\n >\n {renderCollapseToggle('h-8 w-8 p-0 justify-center')}\n </span>\n )}\n </div>\n );\n };\n\n const renderHomeLink = () => {\n if (HOME_AFFORDANCE_BY_MODE[sb.homeDisplayMode] !== 'navigation-row') return null;\n\n const homeLabel = tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'home');\n const homeIcon = renderIcon(\n StandardIconReference.HOME,\n { size: IconSize.SM }\n );\n\n return (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={sb.handleHomeClick}\n aria-current={sb.isHomeActive ? 'page' : undefined}\n data-active={sb.isHomeActive || undefined}\n className={cn(\n 'w-full justify-start gap-field-sm',\n navItemStateClasses,\n sb.isCollapsed && !showCompactLabels && 'justify-center px-card-sm',\n showCompactLabels && 'h-auto min-h-8 flex-col items-center justify-center gap-1.5 px-1 py-element',\n )}\n title={sb.isCollapsed && !showCompactLabels ? homeLabel : undefined}\n >\n <span className={cn('flex-shrink-0', sb.isCollapsed && '[&_svg]:size-5')}>{homeIcon}</span>\n {!sb.isCollapsed && <span>{homeLabel}</span>}\n {showCompactLabels && (\n <span className=\"w-full text-center text-[11px] leading-tight whitespace-normal break-words\">\n {homeLabel}\n </span>\n )}\n </Button>\n );\n };\n\n const renderInlineCreate = (section: SectionRenderProps) => {\n if (section.inlineCreate === SidebarSectionInlineCreate.NONE || sb.isCollapsed) {\n return null;\n }\n\n const isActive = sb.inlineCreate.activeSection === section.ref;\n const placeholder = tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'inlineCreatePlaceholder');\n\n if (section.inlineCreate === SidebarSectionInlineCreate.INPUT) {\n if (!isActive) {\n return (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={() => sb.inlineCreate.start(section.ref)}\n className=\"w-full justify-start gap-element text-muted-foreground hover:text-foreground\"\n >\n {renderIcon(\n StandardIconReference.PLUS,\n { size: IconSize.SM }\n )}\n <span className=\"text-sm\">{placeholder}</span>\n </Button>\n );\n }\n\n return (\n <div className=\"px-card-sm py-item-xs\">\n <InputRoot\n autoFocus\n type=\"text\"\n value={sb.inlineCreate.value}\n onChange={(e) => sb.inlineCreate.setValue(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n sb.inlineCreate.submit(section.ref, section.inlineCreateResourceType);\n } else if (e.key === 'Escape') {\n sb.inlineCreate.cancel();\n }\n }}\n onBlur={() => {\n setTimeout(sb.inlineCreate.cancel, 150);\n }}\n placeholder={placeholder}\n aria-label={placeholder}\n className=\"h-8 text-sm\"\n />\n </div>\n );\n }\n\n if (section.inlineCreate === SidebarSectionInlineCreate.DIALOG) {\n return (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={() => {\n if (section.inlineCreateResourceType) {\n sb.inlineCreate.submit(section.ref, section.inlineCreateResourceType);\n }\n }}\n className=\"w-full justify-start gap-element text-muted-foreground hover:text-foreground\"\n >\n {renderIcon(\n StandardIconReference.PLUS,\n { size: IconSize.SM }\n )}\n <span className=\"text-sm\">{placeholder}</span>\n </Button>\n );\n }\n\n return null;\n };\n\n const renderMoreMenu = (moreMenuItems: HierarchicalNavigationItem[]) => {\n if (moreMenuItems.length === 0 || sb.isCollapsed) return null;\n\n const displayLabel = tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'moreItems');\n\n return (\n <Collapsible>\n <CollapsibleTrigger asChild>\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n className=\"w-full justify-start gap-element text-muted-foreground hover:text-foreground\"\n >\n {renderIcon(\n StandardIconReference.MORE_HORIZONTAL,\n { size: IconSize.SM }\n )}\n <span>{displayLabel}</span>\n </Button>\n </CollapsibleTrigger>\n <CollapsibleContent className=\"space-y-item-xs ps-card\">\n {moreMenuItems.map(item => renderNavigationItem(item, 0))}\n </CollapsibleContent>\n </Collapsible>\n );\n };\n\n const renderSectionContent = (group: SectionGroup) => {\n const { contentKind } = group;\n\n if (contentKind === SidebarSectionContentKind.RESOURCE_BROWSER && group.resourceType) {\n return (\n <SidebarResourceBrowser\n resourceType={group.resourceType}\n operation={group.operation}\n operationVariant={group.operationVariant}\n navigateOperation={group.navigateOperation}\n navigateOperationVariant={group.navigateOperationVariant}\n instanceFilter={group.instanceFilter}\n onInstanceClick={group.onInstanceClick}\n isCollapsed={sb.isCollapsed}\n />\n );\n }\n\n if (contentKind === SidebarSectionContentKind.GUIDANCE_WIDGET) {\n const ref = group.guidanceRef;\n if (!ref) return null;\n const GuidanceComponent = ComponentRegistryService.resolve(ref, CorePresetNames.DEFAULT);\n if (!GuidanceComponent) {\n if (envLoader.isDevelopment()) console.warn(`[Sidebar] No registered component for guidance widget \"${ref}\"`);\n return null;\n }\n return (\n <React.Suspense fallback={<div className=\"h-8 animate-pulse motion-reduce:animate-none bg-muted rounded\" aria-hidden=\"true\" />}>\n <GuidanceComponent />\n </React.Suspense>\n );\n }\n\n if (contentKind === SidebarSectionContentKind.CUSTOM_COMPONENT) {\n const ref = group.componentRef;\n if (!ref) return null;\n const CustomComponent = ComponentRegistryService.resolve(ref, CorePresetNames.DEFAULT);\n if (!CustomComponent) {\n if (envLoader.isDevelopment()) console.warn(`[Sidebar] No registered component for custom component \"${ref}\"`);\n return null;\n }\n return (\n <React.Suspense fallback={<div className=\"h-8 animate-pulse motion-reduce:animate-none bg-muted rounded\" aria-hidden=\"true\" />}>\n <CustomComponent />\n </React.Suspense>\n );\n }\n\n return (\n <>\n {group.items.map(item => renderHierarchicalItem(item))}\n {renderMoreMenu(group.moreMenuItems)}\n {renderInlineCreate(group.section)}\n </>\n );\n };\n\n const renderSection = (group: SectionGroup) => {\n const { section } = group;\n const sectionCollapsed = sb.isSectionCollapsed(section);\n const showLabel = section.showLabel;\n const getSectionLabel = () => tSidebarSection(section.ref);\n\n if (!section.collapsible || sb.isCollapsed) {\n return (\n <div key={section.ref} className=\"space-y-item-xs\">\n {showLabel && !sb.isCollapsed && (\n <div className=\"px-card-sm py-card-sm text-xs font-medium text-muted-foreground uppercase tracking-wider\">\n {getSectionLabel()}\n </div>\n )}\n {renderSectionContent(group)}\n </div>\n );\n }\n\n return (\n <Collapsible\n key={section.ref}\n open={!sectionCollapsed}\n onOpenChange={(nextOpen) => sb.handleSetSectionCollapsed(section.ref, !nextOpen)}\n >\n {showLabel && (\n <CollapsibleTrigger asChild>\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n className=\"w-full justify-between px-card-sm py-card-sm text-xs font-medium text-muted-foreground uppercase tracking-wider hover:text-foreground\"\n >\n <span>{getSectionLabel()}</span>\n <span className=\"flex-shrink-0\">\n {renderIcon(\n sectionCollapsed ? StandardIconReference.CHEVRON_RIGHT : StandardIconReference.CHEVRON_DOWN,\n { size: IconSize.XS }\n )}\n </span>\n </Button>\n </CollapsibleTrigger>\n )}\n <CollapsibleContent className=\"space-y-item-xs\">\n {renderSectionContent(group)}\n </CollapsibleContent>\n </Collapsible>\n );\n };\n\n /**\n * The rail-collapse toggle itself. A PANEL glyph, never a chevron: a chevron is\n * the framework's NAVIGATION vocabulary (back / forward / expand-a-tree), so\n * pointing one at the edge of the shell reads as \"go back\" rather than \"fold\n * this panel\". The glyph mirrors with `placement` so it always depicts the\n * panel it toggles, and stays the SAME in both states — what changes is the\n * accessible name (`expand` / `collapse`), not the picture.\n */\n const renderCollapseToggle = (className?: string) => {\n const collapseIconRef = sb.placement === HorizontalPlacement.START\n ? StandardIconReference.PANEL_LEFT\n : StandardIconReference.PANEL_RIGHT;\n\n const collapseLabel = tComponent(\n FrontendComponentType.APPLICATION_LEVEL_SIDEBAR,\n sb.isCollapsed ? 'expand' : 'collapse'\n );\n\n return (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={sb.handleToggleCollapse}\n aria-expanded={!sb.isCollapsed}\n aria-label={collapseLabel}\n title={collapseLabel}\n data-slot=\"sidebar-collapse-toggle\"\n className={cn('text-muted-foreground hover:text-foreground', className)}\n >\n <span className=\"flex-shrink-0\">\n {renderIcon(collapseIconRef, { size: IconSize.SM })}\n </span>\n </Button>\n );\n };\n\n /**\n * BRAND_HEADER hosts the toggle at the trailing edge of its own row — which\n * costs NO extra height, because it shares the line the brand already\n * occupies. That only works while expanded: a collapsed rail is a single\n * ~64px icon column with no room beside the mark, and stacking the toggle\n * under it spends a whole extra row of the rail's scarcest axis. So the rail\n * hands the control back to the quiet bottom host. The two are mutually\n * exclusive by construction — one toggle, never two, never zero.\n */\n const collapseToggleHostedInBrandHeader =\n HOME_AFFORDANCE_BY_MODE[sb.homeDisplayMode] === 'brand-header'\n && sb.sidebarConfig.isCollapsible\n && !sb.isCollapsed;\n\n const renderCollapseButton = () => {\n if (!sb.sidebarConfig.isCollapsible || collapseToggleHostedInBrandHeader) return null;\n\n return (\n // Bottom-hosted collapse control.\n //\n // PERSISTENT while the rail is COLLAPSED, quiet-on-hover while it is expanded.\n //\n // The quiet contract — invisible until the pointer enters the sidebar, revealed\n // on focus-within for keyboard users, always shown to coarse pointers that have\n // no hover — is a deliberate reduction of chrome noise, and it holds while the\n // sidebar is EXPANDED: the surface is full of labelled rows, so it says what it\n // is and the toggle is a secondary affordance.\n //\n // It does NOT hold while the rail is COLLAPSED, and shipping it that way is what\n // made this a defect rather than a preference. In the collapsed state the toggle\n // is the ONLY chrome on the surface, nothing else on screen says the rail opens,\n // and a fine-pointer user who never happens to hover the rail has no way to\n // discover that it does. That went unnoticed for as long as every application\n // started expanded (the brand header hosts a toggle there, on the line it\n // already occupies); the moment `SIDEBAR.defaultCollapsed` let an application\n // OPEN collapsed, a first-run operator met an icon rail with no visible way out\n // of it — measured on the application-creation workbench.\n //\n // Hiding a control is only quiet when something else answers the question it\n // would have answered.\n <div\n className={cn(\n 'p-card-sm',\n sb.isCollapsed\n ? 'opacity-100'\n : cn(\n 'opacity-0 transition-opacity duration-[var(--motion-duration-normal)] ease-[var(--motion-easing-default)] motion-reduce:transition-none',\n 'group-hover/app-sidebar:opacity-100 group-focus-within/app-sidebar:opacity-100 pointer-coarse:opacity-100',\n ),\n )}\n >\n {renderCollapseToggle(cn('w-full', sb.isCollapsed ? 'justify-center' : 'justify-start'))}\n </div>\n );\n };\n\n // Container-inversion: components hosted inside the sidebar (e.g. the\n // command-menu trigger), resolved via the registry and mounted with the\n // shell-level interaction-owner props — the SAME bridge the menubar uses.\n // While the rail is COLLAPSED the full input-like trigger can't fit the narrow\n // icon column, so the hosted component is told to render COMPACT (icon-only)\n // via `compact` — this keeps the palette reachable on a collapsed desktop rail\n // AND on the mobile burger (where the rail is always collapsed), instead of\n // vanishing entirely.\n const renderHostedComponents = (placement: VerticalPlacement) => {\n const hosted = sb.hostedComponents.filter(\n comp => (comp.placement ?? VerticalPlacement.TOP) === placement,\n );\n if (hosted.length === 0) return null;\n\n return (\n <div\n className={cn(\n 'px-card-sm space-y-item-xs',\n // Edge-aligned insets: the sidebar's outer rhythm is 8px (`card-sm`,\n // matching the nav's `p-card-sm`), so the edge-facing side gets the\n // full inset while the content-facing side stays light — the adjacent\n // nav/list padding supplies the rest of the separation. The previous\n // uniform `py-item-xs` left the TOP-hosted search trigger 1px from\n // the sidebar's top edge.\n placement === VerticalPlacement.TOP ? 'pt-card-sm pb-item-xs' : 'pt-item-xs pb-card-sm',\n sb.isCollapsed && 'flex flex-col items-center',\n )}\n >\n {hosted.map(comp => {\n const Component = ComponentRegistryService.resolve(\n comp.frontendComponentType,\n comp.presetName ?? CorePresetNames.DEFAULT,\n );\n if (!Component) {\n if (envLoader.isDevelopment()) console.warn(`[Sidebar] No registered component for hosted component \"${comp.frontendComponentType}\"`);\n return null;\n }\n return (\n <React.Suspense\n key={comp.instanceId}\n fallback={<div className=\"h-9 animate-pulse motion-reduce:animate-none bg-muted rounded\" aria-hidden=\"true\" />}\n >\n <Component\n {...getHostedComponentProps(comp.component, comp.instanceId)}\n containerType={ApplicationLevelComponentType.SIDEBAR}\n containerPlacement={comp.placement}\n triggerWidth={comp.triggerWidth}\n compact={sb.isCollapsed}\n />\n </React.Suspense>\n );\n })}\n </div>\n );\n };\n\n const renderSidebarContent = () => {\n // Primary sections form ONE unlabeled group at the top (the hook already\n // forces them headerless/non-collapsible and orders them first), headed by\n // the framework Home row when `homeDisplayMode` is NAVIGATION_ITEM —\n // `renderHomeLink` returns null in the other modes, leaving the group to\n // the app's own destinations. Everything else renders as titled sections.\n const primaryGroups = sb.groupedSections.filter(group => group.section.isPrimary);\n const secondaryGroups = sb.groupedSections.filter(group => !group.section.isPrimary);\n\n return (\n <>\n {/* `min-h-0` lets the ScrollArea actually shrink inside the flex column —\n without it the nav content dictates the column height and overflow\n escapes to the shell instead of scrolling internally (E4).\n\n `type=AUTO` is load-bearing, not cosmetic. Radix drives the viewport's\n overflow from whether a scrollbar is MOUNTED\n (`overflowY: scrollbarYEnabled ? 'scroll' : 'hidden'`), and its default\n `type=\"hover\"` only mounts one on `pointerenter`. Without this the rail\n was `overflow: hidden` until hovered — content below the fold was\n unreachable, and on touch (the mobile drawer) the first gesture scrolled\n the PAGE instead. AUTO mounts the scrollbar from content overflow\n (ResizeObserver), so wheel/touch/keyboard work immediately in BOTH the\n expanded column and the collapsed rail. Radix positions the scrollbar\n `absolute`, so it overlays rather than stealing rail width.\n `overscroll-contain` keeps a scroll that reaches the end from chaining\n out to the page behind the sidebar. */}\n <ScrollArea\n className=\"flex-1 min-h-0\"\n type={ScrollAreaType.AUTO}\n viewportClassName=\"overscroll-contain\"\n >\n {/* TOP-hosted components (the command-menu search trigger) SCROLL with\n the navigation — only the brand header stays pinned. A sidebar's\n vertical placement names where a component sits in the content\n column, and the palette remains reachable at any scroll position via\n its hotkey and the menubar trigger, so pinning it here would spend\n permanent rail height for no reachability gain. */}\n {renderHostedComponents(VerticalPlacement.TOP)}\n <nav aria-label={tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'navigationLabel')} className=\"p-card-sm space-y-item\">\n {/* Home + primary navigation: one visual group, same item rhythm as\n a section body (`space-y-item-xs`), no header between them. */}\n <div className=\"space-y-item-xs\">\n {renderHomeLink()}\n {primaryGroups.map(group => (\n <React.Fragment key={group.section.ref}>\n {renderSectionContent(group)}\n </React.Fragment>\n ))}\n </div>\n\n {sb.isNavigationLoading && !sb.hasItems && (\n <div role=\"status\" aria-live=\"polite\" className=\"px-card-sm py-card-sm text-sm text-muted-foreground\">\n {tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'loading')}\n </div>\n )}\n\n {secondaryGroups\n // No emptiness filter here on purpose — `useSidebarBehavior` omits\n // an empty navigation section from `groupedSections` in BOTH modes,\n // so every preset inherits the policy and cannot disagree with it.\n // This preset used to filter for the collapsed rail alone (an empty\n // section's separator otherwise stacked against the next one into a\n // double line) while expanded mode kept the empty header; that split\n // is what shipped permanently-empty TOOLS / SETTINGS headings.\n .map((group) => (\n <React.Fragment key={group.section.ref}>\n {/* Collapsed rail: draw the group boundary the hidden section\n title would otherwise provide (before EACH section — the\n first line also separates the primary group from the rest). */}\n {sb.isCollapsed && (\n <div role=\"presentation\" className={cn(dividerRecipe.base, 'h-px mx-element')} />\n )}\n {renderSection(group)}\n </React.Fragment>\n ))}\n\n {!sb.isNavigationLoading && !sb.hasItems && (\n <div className=\"px-card-sm py-card-sm text-sm text-muted-foreground\">\n {tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'noItems')}\n </div>\n )}\n </nav>\n </ScrollArea>\n </>\n );\n };\n\n // ── Mobile overlay drawer (responsivePolicy BURGER at/below the configured\n // responsiveBreakpoint) ─────────────────────────────────────────────────────\n // The schema documents BURGER as \"burger menu / drawer overlay on mobile\":\n // nothing renders inline (width 0 — no 45%-wide rail eating the viewport);\n // the sidebar opens as a Sheet overlay instead. Radix supplies the backdrop\n // (click-closes), Escape handling, focus trap and a close button. The trigger\n // lives in the menubar (mobile-only burger) and speaks HOTKEY_SIDEBAR_TOGGLE.\n /*\n * Nothing until this component's own labels have loaded.\n *\n * `isReady` was read here and used NOWHERE, so the sidebar rendered its labels while they were\n * still arriving and showed the raw key paths instead — `components.APPLICATION_LEVEL_SIDEBAR.loading`\n * was seen on screen in the running Wonder Todos, in the loading line that exists to reassure\n * somebody during exactly that window. The labels are not MISSING (they are generated in every\n * catalog); they are not there YET, which is what readiness answers and what\n * `.claude/rules/display-text-comes-from-i18n.md` prescribes for the loading window.\n *\n * Blank rather than a skeleton, matching the other presets in this directory: the shell around it\n * renders, and the sidebar appears with its words the moment they land.\n */\n if (!isReady) return null;\n\n if (sb.isMobileDrawerMode) {\n const dir = (typeof document !== 'undefined' ? document.documentElement?.dir : undefined) || 'ltr';\n const drawerSide = resolvePlacementSideToRadix(\n sb.placement === HorizontalPlacement.START ? PlacementSide.START : PlacementSide.END,\n dir as 'ltr' | 'rtl',\n );\n\n return (\n <Sheet open={sb.isMobileDrawerOpen} onOpenChange={(open) => { if (!open) sb.closeMobileDrawer(); }}>\n <SheetContent\n side={drawerSide}\n data-component-area={ShellRegion.SIDEBAR}\n data-placement={sb.placement}\n data-responsive-policy={sb.sidebarConfig.responsivePolicy}\n data-mobile-drawer=\"true\"\n data-breakpoint={currentBreakpoint}\n className=\"gap-0\"\n style={{ width: `${sb.sidebarConfig.currentWidth}px` }}\n >\n {/* Radix Dialog a11y: the drawer needs an accessible name; visually the\n nav content is self-describing, so the title is screen-reader-only. */}\n <SheetTitle className=\"sr-only\">{tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'sidebarLabel')}</SheetTitle>\n <aside\n aria-label={tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'sidebarLabel')}\n className=\"flex-1 min-h-0 flex flex-col\"\n >\n {renderBrandHeader()}\n {renderSidebarContent()}\n {renderHostedComponents(VerticalPlacement.BOTTOM)}\n {/* No collapse chevron in the drawer: rail collapse is a desktop\n concept, and the SheetContent already renders a close button. */}\n </aside>\n </SheetContent>\n </Sheet>\n );\n }\n\n return (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div\n data-component-area={ShellRegion.SIDEBAR}\n data-placement={sb.placement}\n data-collapsible={sb.sidebarConfig.isCollapsible}\n data-collapsed={sb.isCollapsed}\n data-responsive-policy={sb.sidebarConfig.responsivePolicy}\n data-breakpoint={currentBreakpoint}\n className={cn(\n // Named group so the bottom collapse control can fade in on hover /\n // focus-within of the whole sidebar region.\n 'group/app-sidebar',\n // Height chain (E4): fill the shell row and allow the internal flex\n // column to shrink, so overflow scrolls INSIDE the ScrollArea instead\n // of stretching the whole shell vertically.\n 'h-full min-h-0',\n isContinuousShell\n // CONTINUOUS: transparent region of the shared canvas — no slab,\n // no edge border; page foreground for content.\n ? 'bg-transparent text-foreground'\n : cn(sb.sidebarConfig.placementClass, 'border-surface-sunken-border bg-surface-sunken text-surface-sunken-foreground'),\n 'transition-all duration-[var(--motion-duration-normal)] motion-reduce:transition-none',\n )}\n style={{ width: `${sb.sidebarConfig.currentWidth}px` }}\n >\n <aside aria-label={tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'sidebarLabel')} className=\"h-full min-h-0 flex flex-col\">\n {renderBrandHeader()}\n {renderSidebarContent()}\n {renderHostedComponents(VerticalPlacement.BOTTOM)}\n {renderCollapseButton()}\n </aside>\n </div>\n </Surface>\n );\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
|
-
import { ButtonSize, FrontendComponentType, SurfaceVariant, VerticalPlacement } from '@wildo-ai/presets-components-models';
|
|
3
|
+
import { ButtonSize, FrontendComponentType, ShellRegion, SurfaceVariant, VerticalPlacement } from '@wildo-ai/presets-components-models';
|
|
4
4
|
import { Button, ButtonVariants_Variant, Link, Text, TextVariant, useI18n, IconSize, StandardIconReference, useIconRegistry, useStatusBarBehavior, StatusBarDisplayInteractionType, WebSocketStatus, cn, NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, Surface, } from '@wildo-ai/saas-frontend-lib';
|
|
5
5
|
export const ApplicationLevelPreset_StatusBar_Default = ({ placement = VerticalPlacement.BOTTOM, content, children, className }) => {
|
|
6
6
|
const behavior = useStatusBarBehavior(placement);
|
|
@@ -50,7 +50,7 @@ export const ApplicationLevelPreset_StatusBar_Default = ({ placement = VerticalP
|
|
|
50
50
|
// ===================================================================
|
|
51
51
|
if (!isReady)
|
|
52
52
|
return null;
|
|
53
|
-
return (_jsx(Surface, { asChild: true, emitPolicyVars: false, variant: SurfaceVariant.SHELL, policyOverride: NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, children: _jsx("div", { role: "contentinfo", "aria-label": statusBarLabel, "data-component-area":
|
|
53
|
+
return (_jsx(Surface, { asChild: true, emitPolicyVars: false, variant: SurfaceVariant.SHELL, policyOverride: NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, children: _jsx("div", { role: "contentinfo", "aria-label": statusBarLabel, "data-component-area": ShellRegion.STATUS_BAR, "data-placement": placement, "data-viewport-responsive": true, "data-breakpoint": currentBreakpoint, className: cn(statusBarConfig.backgroundClassName, statusBarConfig.showBorder && (statusBarConfig.isTop ? 'border-b' : 'border-t'), statusBarConfig.showBorder && 'border-surface-sunken-border', 'flex items-center', statusBarConfig.isMobile ? 'px-card-sm' : 'px-card', statusBarConfig.isBottom ? 'safe-area-bottom' : statusBarConfig.isTop && 'safe-area-top', className), style: {
|
|
54
54
|
height: `${dimensions.height}px`,
|
|
55
55
|
...(customStyle ?? {})
|
|
56
56
|
}, children: _jsx("div", { className: cn('h-full flex items-center w-full', statusBarConfig.textClassName), children: renderStatusItems() }) }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-bar.js","sourceRoot":"","sources":["../../../../../../src/components/navigation/app-level/status-bar.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE3H,OAAO,EACL,MAAM,EACN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,GACF,GACE,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport { ButtonSize, FrontendComponentType, SurfaceVariant, VerticalPlacement } from '@wildo-ai/presets-components-models';\n\nimport {\n Button,\n ButtonVariants_Variant,\n Link,\n Text,\n TextVariant,\n useI18n,\n IconSize,\n StandardIconReference,\n useIconRegistry,\n useStatusBarBehavior,\n StatusBarDisplayInteractionType,\n WebSocketStatus,\n cn,\n NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE,\n Surface,\n ApplicationLevelProps_StatusBar,\n} from '@wildo-ai/saas-frontend-lib';\n\nexport const ApplicationLevelPreset_StatusBar_Default: React.FC<ApplicationLevelProps_StatusBar> = ({\n placement = VerticalPlacement.BOTTOM,\n content,\n children,\n className\n}) => {\n const behavior = useStatusBarBehavior(placement);\n const { tComponent, isReady } = useI18n({ component: FrontendComponentType.APPLICATION_LEVEL_STATUS_BAR });\n const { renderIcon } = useIconRegistry();\n\n const {\n connectionStatus,\n shouldShowConnectionStatus,\n shouldShowNotificationCount,\n memoryUsageLabel,\n notificationCountLabel,\n notificationCountAriaLabel,\n connectionStatusLabel,\n statusItems,\n dimensions,\n statusBarConfig,\n customStyle,\n currentBreakpoint,\n } = behavior;\n\n const statusBarLabel = tComponent(FrontendComponentType.APPLICATION_LEVEL_STATUS_BAR, 'statusBarLabel');\n\n const connectionIcon = useMemo(() => {\n const iconReference =\n connectionStatus === WebSocketStatus.CONNECTED\n ? StandardIconReference.CHECK\n : connectionStatus === WebSocketStatus.CONNECTING || connectionStatus === WebSocketStatus.RECONNECTING\n ? StandardIconReference.LOADING\n : StandardIconReference.WARNING;\n\n const className =\n connectionStatus === WebSocketStatus.CONNECTED\n ? 'text-success'\n : connectionStatus === WebSocketStatus.CONNECTING || connectionStatus === WebSocketStatus.RECONNECTING\n ? 'text-warning'\n : 'text-destructive';\n\n return renderIcon(\n iconReference,\n { size: IconSize.XS, className }\n );\n }, [connectionStatus, renderIcon]);\n\n const notificationIcon = useMemo(() => {\n return renderIcon(\n StandardIconReference.NOTIFICATION,\n { size: IconSize.XS }\n );\n }, [renderIcon]);\n\n // ===================================================================\n // Component Renderers\n // ===================================================================\n\n const renderDefaultContent = () => {\n return (\n <div className=\"flex items-center justify-between w-full\">\n <div className=\"flex items-center gap-item\">\n {memoryUsageLabel && (\n <Text className=\"text-xs\" variant={TextVariant.MUTED}>\n {memoryUsageLabel}\n </Text>\n )}\n </div>\n\n <div className=\"flex items-center gap-item\">\n {shouldShowNotificationCount && (\n <div\n className=\"flex items-center gap-item-xs\"\n role=\"status\"\n aria-label={notificationCountAriaLabel}\n >\n {notificationIcon}\n <Text className=\"text-xs\" variant={TextVariant.MUTED}>\n {notificationCountLabel}\n </Text>\n </div>\n )}\n\n {shouldShowConnectionStatus && (\n <div className=\"flex items-center gap-item\" role=\"status\">\n {connectionIcon}\n <Text className=\"text-xs\" variant={TextVariant.MUTED}>\n {connectionStatusLabel}\n </Text>\n </div>\n )}\n </div>\n </div>\n );\n };\n\n const renderCustomContent = () => {\n if (content) {\n return content;\n }\n\n if (children) {\n return children;\n }\n\n return renderDefaultContent();\n };\n\n const renderStatusItems = () => {\n if (statusItems.length > 0) {\n return (\n <div className=\"flex items-center gap-field w-full\">\n {statusItems.map((item) => (\n <div key={item.id} className=\"flex items-center gap-item-xs\">\n {item.iconReference && renderIcon(item.iconReference, { size: IconSize.XS })}\n\n {item.interaction.type === StatusBarDisplayInteractionType.LINK ? (\n <Link\n href={item.interaction.href}\n className=\"text-xs hover:underline\"\n >\n {item.label}\n </Link>\n ) : item.interaction.type === StatusBarDisplayInteractionType.BUTTON ? (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={item.interaction.onClick}\n className=\"text-xs p-item h-auto\"\n >\n {item.label}\n </Button>\n ) : (\n <Text className=\"text-xs\" variant={TextVariant.MUTED}>\n {item.label}\n </Text>\n )}\n\n {item.valueText !== undefined && (\n <Text className=\"text-xs font-medium\">\n {item.valueText}\n </Text>\n )}\n </div>\n ))}\n </div>\n );\n }\n\n return renderCustomContent();\n };\n\n // ===================================================================\n // Render\n // ===================================================================\n\n if (!isReady) return null;\n\n return (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div\n role=\"contentinfo\"\n aria-label={statusBarLabel}\n data-component-area={`status-bar-${placement}`}\n data-placement={placement}\n data-viewport-responsive={true}\n data-breakpoint={currentBreakpoint}\n className={cn(\n statusBarConfig.backgroundClassName,\n statusBarConfig.showBorder && (statusBarConfig.isTop ? 'border-b' : 'border-t'),\n statusBarConfig.showBorder && 'border-surface-sunken-border',\n 'flex items-center',\n statusBarConfig.isMobile ? 'px-card-sm' : 'px-card',\n statusBarConfig.isBottom ? 'safe-area-bottom' : statusBarConfig.isTop && 'safe-area-top',\n className,\n )}\n style={{\n height: `${dimensions.height}px`,\n ...(customStyle ?? {})\n }}\n >\n <div className={cn('h-full flex items-center w-full', statusBarConfig.textClassName)}>\n {renderStatusItems()}\n </div>\n </div>\n </Surface>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"status-bar.js","sourceRoot":"","sources":["../../../../../../src/components/navigation/app-level/status-bar.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExI,OAAO,EACL,MAAM,EACN,sBAAsB,EACtB,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,OAAO,EACP,QAAQ,EACR,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,+BAA+B,EAC/B,eAAe,EACf,EAAE,EACF,2CAA2C,EAC3C,OAAO,GAER,MAAM,6BAA6B,CAAC;AAErC,MAAM,CAAC,MAAM,wCAAwC,GAA8C,CAAC,EAClG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AAO,mBAAmB,EAAE,CAAC;IAC/B,CAAC,CAAC;IAEF,sEAAsE;IACtE,SAAS;IACT,sEAAsE;IAEtE,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,OAAO,CACL,KAAC,OAAO,IAAC,OAAO,QAAC,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,KAAK,EAAE,cAAc,EAAE,2CAA2C,YAChI,cACE,IAAI,EAAC,aAAa,gBACN,cAAc,yBACL,WAAW,CAAC,UAAU,oBAC3B,SAAS,8BACC,IAAI,qBACb,iBAAiB,EAClC,SAAS,EAAE,EAAE,CACX,eAAe,CAAC,mBAAmB,EACnC,eAAe,CAAC,UAAU,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,EAC/E,eAAe,CAAC,UAAU,IAAI,8BAA8B,EAC5D,mBAAmB,EACnB,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EACnD,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,IAAI,eAAe,EACxF,SAAS,CACV,EACD,KAAK,EAAE;gBACL,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,IAAI;gBAChC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC;aACvB,YAED,cAAK,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,eAAe,CAAC,aAAa,CAAC,YACjF,iBAAiB,EAAE,GAChB,GACF,GACE,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport { ButtonSize, FrontendComponentType, ShellRegion, SurfaceVariant, VerticalPlacement } from '@wildo-ai/presets-components-models';\n\nimport {\n Button,\n ButtonVariants_Variant,\n Link,\n Text,\n TextVariant,\n useI18n,\n IconSize,\n StandardIconReference,\n useIconRegistry,\n useStatusBarBehavior,\n StatusBarDisplayInteractionType,\n WebSocketStatus,\n cn,\n NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE,\n Surface,\n ApplicationLevelProps_StatusBar,\n} from '@wildo-ai/saas-frontend-lib';\n\nexport const ApplicationLevelPreset_StatusBar_Default: React.FC<ApplicationLevelProps_StatusBar> = ({\n placement = VerticalPlacement.BOTTOM,\n content,\n children,\n className\n}) => {\n const behavior = useStatusBarBehavior(placement);\n const { tComponent, isReady } = useI18n({ component: FrontendComponentType.APPLICATION_LEVEL_STATUS_BAR });\n const { renderIcon } = useIconRegistry();\n\n const {\n connectionStatus,\n shouldShowConnectionStatus,\n shouldShowNotificationCount,\n memoryUsageLabel,\n notificationCountLabel,\n notificationCountAriaLabel,\n connectionStatusLabel,\n statusItems,\n dimensions,\n statusBarConfig,\n customStyle,\n currentBreakpoint,\n } = behavior;\n\n const statusBarLabel = tComponent(FrontendComponentType.APPLICATION_LEVEL_STATUS_BAR, 'statusBarLabel');\n\n const connectionIcon = useMemo(() => {\n const iconReference =\n connectionStatus === WebSocketStatus.CONNECTED\n ? StandardIconReference.CHECK\n : connectionStatus === WebSocketStatus.CONNECTING || connectionStatus === WebSocketStatus.RECONNECTING\n ? StandardIconReference.LOADING\n : StandardIconReference.WARNING;\n\n const className =\n connectionStatus === WebSocketStatus.CONNECTED\n ? 'text-success'\n : connectionStatus === WebSocketStatus.CONNECTING || connectionStatus === WebSocketStatus.RECONNECTING\n ? 'text-warning'\n : 'text-destructive';\n\n return renderIcon(\n iconReference,\n { size: IconSize.XS, className }\n );\n }, [connectionStatus, renderIcon]);\n\n const notificationIcon = useMemo(() => {\n return renderIcon(\n StandardIconReference.NOTIFICATION,\n { size: IconSize.XS }\n );\n }, [renderIcon]);\n\n // ===================================================================\n // Component Renderers\n // ===================================================================\n\n const renderDefaultContent = () => {\n return (\n <div className=\"flex items-center justify-between w-full\">\n <div className=\"flex items-center gap-item\">\n {memoryUsageLabel && (\n <Text className=\"text-xs\" variant={TextVariant.MUTED}>\n {memoryUsageLabel}\n </Text>\n )}\n </div>\n\n <div className=\"flex items-center gap-item\">\n {shouldShowNotificationCount && (\n <div\n className=\"flex items-center gap-item-xs\"\n role=\"status\"\n aria-label={notificationCountAriaLabel}\n >\n {notificationIcon}\n <Text className=\"text-xs\" variant={TextVariant.MUTED}>\n {notificationCountLabel}\n </Text>\n </div>\n )}\n\n {shouldShowConnectionStatus && (\n <div className=\"flex items-center gap-item\" role=\"status\">\n {connectionIcon}\n <Text className=\"text-xs\" variant={TextVariant.MUTED}>\n {connectionStatusLabel}\n </Text>\n </div>\n )}\n </div>\n </div>\n );\n };\n\n const renderCustomContent = () => {\n if (content) {\n return content;\n }\n\n if (children) {\n return children;\n }\n\n return renderDefaultContent();\n };\n\n const renderStatusItems = () => {\n if (statusItems.length > 0) {\n return (\n <div className=\"flex items-center gap-field w-full\">\n {statusItems.map((item) => (\n <div key={item.id} className=\"flex items-center gap-item-xs\">\n {item.iconReference && renderIcon(item.iconReference, { size: IconSize.XS })}\n\n {item.interaction.type === StatusBarDisplayInteractionType.LINK ? (\n <Link\n href={item.interaction.href}\n className=\"text-xs hover:underline\"\n >\n {item.label}\n </Link>\n ) : item.interaction.type === StatusBarDisplayInteractionType.BUTTON ? (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={item.interaction.onClick}\n className=\"text-xs p-item h-auto\"\n >\n {item.label}\n </Button>\n ) : (\n <Text className=\"text-xs\" variant={TextVariant.MUTED}>\n {item.label}\n </Text>\n )}\n\n {item.valueText !== undefined && (\n <Text className=\"text-xs font-medium\">\n {item.valueText}\n </Text>\n )}\n </div>\n ))}\n </div>\n );\n }\n\n return renderCustomContent();\n };\n\n // ===================================================================\n // Render\n // ===================================================================\n\n if (!isReady) return null;\n\n return (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div\n role=\"contentinfo\"\n aria-label={statusBarLabel}\n data-component-area={ShellRegion.STATUS_BAR}\n data-placement={placement}\n data-viewport-responsive={true}\n data-breakpoint={currentBreakpoint}\n className={cn(\n statusBarConfig.backgroundClassName,\n statusBarConfig.showBorder && (statusBarConfig.isTop ? 'border-b' : 'border-t'),\n statusBarConfig.showBorder && 'border-surface-sunken-border',\n 'flex items-center',\n statusBarConfig.isMobile ? 'px-card-sm' : 'px-card',\n statusBarConfig.isBottom ? 'safe-area-bottom' : statusBarConfig.isTop && 'safe-area-top',\n className,\n )}\n style={{\n height: `${dimensions.height}px`,\n ...(customStyle ?? {})\n }}\n >\n <div className={cn('h-full flex items-center w-full', statusBarConfig.textClassName)}>\n {renderStatusItems()}\n </div>\n </div>\n </Surface>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../../../../src/components/navigation/app-level/toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAUL,6BAA6B,EAC9B,MAAM,6BAA6B,CAAC;AAErC,eAAO,MAAM,sCAAsC,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,
|
|
1
|
+
{"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../../../../src/components/navigation/app-level/toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAUL,6BAA6B,EAC9B,MAAM,6BAA6B,CAAC;AAErC,eAAO,MAAM,sCAAsC,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAwD1F,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { DisplayDirection } from '@wildo-ai/zod-decorators';
|
|
4
|
-
import { ButtonSize, FrontendComponentType, ShellAppearance, SurfaceVariant } from '@wildo-ai/presets-components-models';
|
|
4
|
+
import { ButtonSize, FrontendComponentType, ShellAppearance, ShellRegion, SurfaceVariant } from '@wildo-ai/presets-components-models';
|
|
5
5
|
import { Button, ButtonVariants_Variant, Separator, useI18n, useToolbarBehavior, useUI, cn, NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, Surface, } from '@wildo-ai/saas-frontend-lib';
|
|
6
6
|
export const ApplicationLevelPreset_Toolbar_Default = () => {
|
|
7
7
|
const { tComponent, isReady } = useI18n({ component: FrontendComponentType.APPLICATION_LEVEL_TOOLBAR });
|
|
@@ -14,7 +14,7 @@ export const ApplicationLevelPreset_Toolbar_Default = () => {
|
|
|
14
14
|
}
|
|
15
15
|
if (!isReady)
|
|
16
16
|
return null;
|
|
17
|
-
return (_jsx(Surface, { asChild: true, emitPolicyVars: false, variant: SurfaceVariant.SHELL, policyOverride: NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, children: _jsx("div", { "data-component-type": "toolbar", "data-breakpoint": currentBreakpoint, role: "toolbar", "aria-label": tComponent(FrontendComponentType.APPLICATION_LEVEL_TOOLBAR, 'toolbarLabel'), "aria-orientation": "horizontal", className: cn('flex items-center gap-element', isContinuousShell
|
|
17
|
+
return (_jsx(Surface, { asChild: true, emitPolicyVars: false, variant: SurfaceVariant.SHELL, policyOverride: NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE, children: _jsx("div", { "data-component-area": ShellRegion.TOOLBAR, "data-placement": toolbarConfig.placement, "data-component-type": "toolbar", "data-breakpoint": currentBreakpoint, role: "toolbar", "aria-label": tComponent(FrontendComponentType.APPLICATION_LEVEL_TOOLBAR, 'toolbarLabel'), "aria-orientation": "horizontal", className: cn('flex items-center gap-element', isContinuousShell
|
|
18
18
|
? 'bg-transparent text-foreground'
|
|
19
19
|
: cn('bg-surface-sunken text-surface-sunken-foreground border-surface-sunken-border', toolbarConfig.placement === 'bottom' ? 'border-t' : 'border-b'), toolbarConfig.compact ? 'px-card-sm py-item-xs' : 'px-card py-card-sm'), children: _jsx("div", { className: "flex items-center gap-element flex-1", children: tools.map((tool, index) => (_jsxs(React.Fragment, { children: [index > 0 && toolbarConfig.showSeparator && (_jsx(Separator, { orientation: DisplayDirection.VERTICAL, className: "h-6" })), _jsxs(Button, { variant: ButtonVariants_Variant.GHOST, size: toolbarConfig.compact ? ButtonSize.SM : ButtonSize.MD, onClick: tool.onClick, className: "flex items-center gap-element", "aria-label": tool.label, children: [tool.icon && _jsx("span", { className: "flex-shrink-0", children: tool.icon }), !toolbarConfig.compact && (!tool.iconOnly || !tool.icon) && _jsx("span", { children: tool.label })] })] }, tool.id))) }) }) }));
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.js","sourceRoot":"","sources":["../../../../../../src/components/navigation/app-level/toolbar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"toolbar.js","sourceRoot":"","sources":["../../../../../../src/components/navigation/app-level/toolbar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAEtI,OAAO,EACL,MAAM,EACN,sBAAsB,EACtB,SAAS,EACT,OAAO,EACP,kBAAkB,EAClB,KAAK,EACL,EAAE,EACF,2CAA2C,EAC3C,OAAO,GAER,MAAM,6BAA6B,CAAC;AAErC,MAAM,CAAC,MAAM,sCAAsC,GAA4C,GAAG,EAAE;IAClG,MAAM,EAAE,UAAU,EAAE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AC3C,KAAC,SAAS,IAAC,WAAW,EAAE,gBAAgB,CAAC,QAAQ,EAAE,SAAS,EAAC,KAAK,GAAG,CACtE,EACD,MAAC,MAAM,IACL,OAAO,EAAE,sBAAsB,CAAC,KAAK,EACrC,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,EAC3D,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,SAAS,EAAC,+BAA+B,gBAC7B,IAAI,CAAC,KAAK,aAErB,IAAI,CAAC,IAAI,IAAI,eAAM,SAAS,EAAC,eAAe,YAAE,IAAI,CAAC,IAAI,GAAQ,EAC/D,CAAC,aAAa,CAAC,OAAO,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,yBAAO,IAAI,CAAC,KAAK,GAAQ,IAC/E,KAbU,IAAI,CAAC,EAAE,CAcX,CAClB,CAAC,GACE,GACF,GACE,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { DisplayDirection } from '@wildo-ai/zod-decorators';\nimport { ButtonSize, FrontendComponentType, ShellAppearance, ShellRegion, SurfaceVariant } from '@wildo-ai/presets-components-models';\n\nimport {\n Button,\n ButtonVariants_Variant,\n Separator,\n useI18n,\n useToolbarBehavior,\n useUI,\n cn,\n NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE,\n Surface,\n ApplicationLevelProps_Toolbar,\n} from '@wildo-ai/saas-frontend-lib';\n\nexport const ApplicationLevelPreset_Toolbar_Default: React.FC<ApplicationLevelProps_Toolbar> = () => {\n const { tComponent, isReady } = useI18n({ component: FrontendComponentType.APPLICATION_LEVEL_TOOLBAR });\n const { tools, toolbarConfig, shouldRender, currentBreakpoint } = useToolbarBehavior();\n const { shellAppearance } = useUI();\n // CONTINUOUS shell chrome: transparent strip, no separating border.\n const isContinuousShell = shellAppearance === ShellAppearance.CONTINUOUS;\n\n if (!shouldRender) {\n return null;\n }\n\n if (!isReady) return null;\n\n return (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div\n data-component-area={ShellRegion.TOOLBAR}\n data-placement={toolbarConfig.placement}\n data-component-type=\"toolbar\"\n data-breakpoint={currentBreakpoint}\n role=\"toolbar\"\n aria-label={tComponent(FrontendComponentType.APPLICATION_LEVEL_TOOLBAR, 'toolbarLabel')}\n aria-orientation=\"horizontal\"\n className={cn(\n 'flex items-center gap-element',\n isContinuousShell\n ? 'bg-transparent text-foreground'\n : cn(\n 'bg-surface-sunken text-surface-sunken-foreground border-surface-sunken-border',\n toolbarConfig.placement === 'bottom' ? 'border-t' : 'border-b',\n ),\n toolbarConfig.compact ? 'px-card-sm py-item-xs' : 'px-card py-card-sm',\n )}\n >\n <div className=\"flex items-center gap-element flex-1\">\n {tools.map((tool, index) => (\n <React.Fragment key={tool.id}>\n {index > 0 && toolbarConfig.showSeparator && (\n <Separator orientation={DisplayDirection.VERTICAL} className=\"h-6\" />\n )}\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={toolbarConfig.compact ? ButtonSize.SM : ButtonSize.MD}\n onClick={tool.onClick}\n className=\"flex items-center gap-element\"\n aria-label={tool.label}\n >\n {tool.icon && <span className=\"flex-shrink-0\">{tool.icon}</span>}\n {!toolbarConfig.compact && (!tool.iconOnly || !tool.icon) && <span>{tool.label}</span>}\n </Button>\n </React.Fragment>\n ))}\n </div>\n </div>\n </Surface>\n );\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ButtonSize, CorePresetNames, FrontendComponentType, HorizontalPlacement, PlacementSide,
|
|
3
|
+
import { ButtonSize, CorePresetNames, FrontendComponentType, HorizontalPlacement, PlacementSide, resolvePlacementSideToRadix, ShellRegion, SurfaceVariant } from '@wildo-ai/presets-components-models';
|
|
4
4
|
import { Button, ButtonVariants_Variant, ComponentRegistryService, IconSize, resolveComponentLabel, Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger, StandardIconReference, useI18n, useIconRegistry, useUtilityPanelBehavior, Surface, FlowsActorsView, LauncherItemTargetKind, } from '@wildo-ai/saas-frontend-lib';
|
|
5
5
|
/**
|
|
6
6
|
* Maps horizontal placement to logical placement side.
|
|
@@ -110,6 +110,6 @@ export const ApplicationLevelPreset_UtilityPanel_Default = ({ position = Horizon
|
|
|
110
110
|
};
|
|
111
111
|
if (!isReady)
|
|
112
112
|
return null;
|
|
113
|
-
return (_jsx("div", { "data-component-type": "utility-panel", "data-breakpoint": currentBreakpoint, children: _jsxs(Sheet, { open: isOpen, onOpenChange: setIsOpen, children: [_jsx(SheetTrigger, { asChild: true, children: _jsx(Button, { variant: ButtonVariants_Variant.GHOST, size: ButtonSize.SM, "aria-label": toggleLabel, className: "relative", children: panelIcon }) }), _jsxs(SheetContent, { side: sheetSide, className: "w-[36rem] sm:max-w-[36rem] max-w-[100vw]", children: [_jsx(SheetHeader, { children: _jsx(SheetTitle, { children: titleLabel }) }), _jsxs("div", { className: "flex-1 min-h-0 overflow-y-auto flex flex-col gap-item pe-card pb-card", children: [resolvedItems.length > 0 && resolvedItems.map(renderItem), resolvedItems.length === 0 && (_jsx("div", { className: "text-sm text-muted-foreground text-center py-section-xl", children: emptyStateLabel }))] })] })] }) }));
|
|
113
|
+
return (_jsx("div", { "data-component-area": ShellRegion.UTILITY_PANEL, "data-placement": position, "data-component-type": "utility-panel", "data-breakpoint": currentBreakpoint, children: _jsxs(Sheet, { open: isOpen, onOpenChange: setIsOpen, children: [_jsx(SheetTrigger, { asChild: true, children: _jsx(Button, { variant: ButtonVariants_Variant.GHOST, size: ButtonSize.SM, "aria-label": toggleLabel, className: "relative", children: panelIcon }) }), _jsxs(SheetContent, { side: sheetSide, className: "w-[36rem] sm:max-w-[36rem] max-w-[100vw]", children: [_jsx(SheetHeader, { children: _jsx(SheetTitle, { children: titleLabel }) }), _jsxs("div", { className: "flex-1 min-h-0 overflow-y-auto flex flex-col gap-item pe-card pb-card", children: [resolvedItems.length > 0 && resolvedItems.map(renderItem), resolvedItems.length === 0 && (_jsx("div", { className: "text-sm text-muted-foreground text-center py-section-xl", children: emptyStateLabel }))] })] })] }) }));
|
|
114
114
|
};
|
|
115
115
|
//# sourceMappingURL=utility-panel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility-panel.js","sourceRoot":"","sources":["../../../../../../src/components/navigation/app-level/utility-panel.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,aAAa,EAAE,cAAc,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAE1L,OAAO,EACL,MAAM,EACN,sBAAsB,EACtB,wBAAwB,EACxB,QAAQ,EACR,qBAAqB,EACrB,KAAK,EACL,YAAY,EACZ,WAAW,EACX,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,OAAO,EACP,eAAe,EACf,uBAAuB,EACvB,OAAO,EAGP,eAAe,EACf,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AAErC;;;GAGG;AACH,SAAS,kCAAkC,CAAC,SAAgC;IAC1E,OAAO,SAAS,KAAK,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC;AAC3F,CAAC;AAED,SAAS,4BAA4B,CAAC,SAAgC;IACpE,OAAO,SAAS,KAAK,mBAAmB,CAAC,KAAK;QAC5C,CAAC,CAAC,qBAAqB,CAAC,UAAU;QAClC,CAAC,CAAC,qBAAqB,CAAC,aAAa,CAAC;AAC1C,CAAC;AAED,MAAM,CAAC,MAAM,2CAA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UAAU,cAAE,UAAU,GAAc,GACzB,EAQd,eAAK,SAAS,EAAC,uEAAuE,aACnF,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,EAGzD,aAAa,CAAC,MAAM,KAAK,CAAC,IAAI,CAC7B,cAAK,SAAS,EAAC,yDAAyD,YACrE,eAAe,GACZ,CACP,IACG,IACO,IACT,GACJ,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { ButtonSize, CorePresetNames, FrontendComponentType, HorizontalPlacement, PlacementSide, SurfaceVariant, resolvePlacementSideToRadix } from '@wildo-ai/presets-components-models';\n\nimport {\n Button,\n ButtonVariants_Variant,\n ComponentRegistryService,\n IconSize,\n resolveComponentLabel,\n Sheet,\n SheetContent,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n StandardIconReference,\n useI18n,\n useIconRegistry,\n useUtilityPanelBehavior,\n Surface,\n ApplicationLevelProps_UtilityPanel,\n UtilityPanelPlacement,\n FlowsActorsView,\n LauncherItemTargetKind,\n} from '@wildo-ai/saas-frontend-lib';\n\n/**\n * Maps horizontal placement to logical placement side.\n * Physical side resolution is delegated to the shared RTL-aware helper.\n */\nfunction getSheetPlacementSideFromPlacement(placement: UtilityPanelPlacement): PlacementSide {\n return placement === HorizontalPlacement.START ? PlacementSide.START : PlacementSide.END;\n}\n\nfunction getUtilityPanelIconReference(placement: UtilityPanelPlacement): StandardIconReference {\n return placement === HorizontalPlacement.START\n ? StandardIconReference.PANEL_LEFT\n : StandardIconReference.CHEVRON_RIGHT;\n}\n\nexport const ApplicationLevelPreset_UtilityPanel_Default: React.FC<ApplicationLevelProps_UtilityPanel> = ({\n position = HorizontalPlacement.END,\n items,\n}) => {\n const behavior = useUtilityPanelBehavior(position, items);\n const { tComponent, isReady } = useI18n({ component: FrontendComponentType.APPLICATION_LEVEL_UTILITY_PANEL });\n const { renderIcon } = useIconRegistry();\n\n const {\n isOpen,\n setIsOpen,\n items: resolvedItems,\n position: resolvedPosition,\n currentBreakpoint,\n } = behavior;\n\n // I-7: no English fallbacks — missing keys surface as `components.<type>.<key>`\n // for translation debugging (intentional, framework-wide i18n discipline).\n const t = (key: string): string => resolveComponentLabel({\n tComponent,\n componentType: FrontendComponentType.APPLICATION_LEVEL_UTILITY_PANEL,\n key,\n });\n const titleLabel = t('title');\n const toggleLabel = t('toggle');\n const emptyStateLabel = t('emptyState');\n\n // Follow the engine convention: keep logical placement until the last moment,\n // then resolve it against the current document direction.\n const sheetPlacementSide = getSheetPlacementSideFromPlacement(resolvedPosition);\n const dir = (typeof document !== 'undefined' ? document.documentElement?.dir : undefined) || 'ltr';\n const sheetSide = resolvePlacementSideToRadix(sheetPlacementSide, dir as 'ltr' | 'rtl');\n\n // Utility panel icon (panel icon for side panel concept)\n const panelIcon = renderIcon(getUtilityPanelIconReference(resolvedPosition), { size: IconSize.MD });\n\n /**\n * Renders a single utility panel item.\n *\n * Custom components render inline, and that is the whole behaviour — nothing here navigates\n * (#504). If a rendered utility view ever pushes a view, it will need a zone of its own, because a\n * push from inside a side sheet otherwise lands in `PRIMARY` and replaces the workspace the panel\n * exists to sit beside. That zone is worth adding then, and not before it has anything to hold.\n */\n /**\n * The shape shown when an item names something this panel cannot host.\n *\n * It prints the offending REF, in destructive colour. It used to print the item's LABEL in a\n * neutral grey box — the shape of a component that rendered fine and had little to say — so a\n * misconfigured panel looked like a working one. Same rule a missing i18n label follows: make the\n * gap visible, never substitute something plausible (#504).\n */\n const renderUnresolved = (ref: string) => (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <div className=\"text-xs text-destructive bg-destructive/10 p-card-sm rounded\" role=\"status\">\n {t('unresolvedComponent')} <code>{ref}</code>\n </div>\n </Surface>\n );\n\n /**\n * Renders a single utility panel item.\n *\n * Both kinds render INLINE, and nothing here navigates (#504). If a hosted view ever pushes a\n * view, it will need a zone of its own, because a push from inside a side sheet otherwise lands in\n * `PRIMARY` and replaces the workspace the panel exists to sit beside. That zone is worth adding\n * then, and not before it has anything to hold — and the first question will be whether it IS\n * `COMPANION`, which already describes persistent supplementary content.\n *\n * `VIEW` dispatches to exactly ONE host today, because `FlowsActorsViewDefinition` is the only\n * application-scoped view kind the panel can host. Adding a second means extending this switch and\n * the behaviour hook's validation TOGETHER — the hook decides whether a ref is known, this decides\n * what renders it, and a kind added to one and not the other is a ref that validates and shows\n * nothing.\n */\n const renderItem = (item: typeof resolvedItems[number], index: number) => {\n const itemIcon = renderIcon(item.icon, { size: IconSize.SM });\n\n const body = item.kind === LauncherItemTargetKind.VIEW\n ? (item.resolvedViewRef !== null\n ? <FlowsActorsView viewRef={item.resolvedViewRef} />\n : renderUnresolved(item.viewRef))\n : (() => {\n const CustomComponent = item.resolvedComponentRef\n ? ComponentRegistryService.resolve(item.resolvedComponentRef, CorePresetNames.DEFAULT)\n : null;\n return CustomComponent ? (\n <React.Suspense\n fallback={<div className=\"h-8 animate-pulse motion-reduce:animate-none bg-muted rounded\" aria-hidden=\"true\" />}\n >\n <CustomComponent />\n </React.Suspense>\n ) : renderUnresolved(item.componentRef);\n })();\n\n const itemRef = item.kind === LauncherItemTargetKind.VIEW ? item.viewRef : item.componentRef;\n /*\n * A hosted VIEW names itself and sizes itself, so the item adds neither a heading nor a height.\n *\n * - No heading: `FlowsActorsView` renders its own header (the system's name and its status). The\n * item's icon-and-label row above it printed the same name twice, one line apart — seen in the\n * running app with the Todo Assistant. The item's `label` still names the item wherever the\n * panel lists it without rendering it.\n * - Its height: the view is a full-height chat (`height: 100%`, its conversation scrolling\n * inside). Inside a scroll area it had no definite height to fill, so it collapsed to its\n * content and left most of the sheet empty. It now takes the remaining height, with a floor so\n * several views still get a usable chat each.\n *\n * A CUSTOM component keeps both: it is a widget of unknown shape, the label is the only thing\n * that names it, and its natural height is the right one.\n */\n const isView = item.kind === LauncherItemTargetKind.VIEW;\n\n return (\n <Surface key={`${itemRef}:${index}`} asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <div\n /*\n * `min-w-0` is load-bearing, not cosmetic. A flex/grid child defaults to `min-width: auto`,\n * so it refuses to shrink below its own content width and overflows its host instead —\n * which is exactly how a 514px view came to be clipped by a 320px sheet rather than\n * laying itself out narrower. Widening the sheet alone would only move the threshold.\n */\n className={isView\n ? \"border rounded-md p-card-sm min-w-0 flex flex-col flex-1 min-h-[24rem]\"\n : \"border rounded-md p-card-sm space-y-item min-w-0 shrink-0\"}\n data-utility-item={itemRef}\n data-utility-item-kind={item.kind}\n >\n {!isView && (\n <div className=\"flex items-center gap-element-sm\">\n {itemIcon}\n <span className=\"text-sm font-medium\">{item.label}</span>\n </div>\n )}\n {body}\n </div>\n </Surface>\n );\n };\n\n if (!isReady) return null;\n\n return (\n <div data-component-type=\"utility-panel\" data-breakpoint={currentBreakpoint}>\n <Sheet open={isOpen} onOpenChange={setIsOpen}>\n <SheetTrigger asChild>\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n aria-label={toggleLabel}\n className=\"relative\"\n >\n {panelIcon}\n </Button>\n </SheetTrigger>\n\n {/*\n * Sized to the content it HOSTS, not to the rail it began as (#504).\n *\n * This was `w-80` (320px), which is right for a small widget and wrong for a VIEW. Measured\n * in the running app: the Todo Assistant's MIN-CONTENT width is 514px — it cannot lay out\n * narrower, so it overflowed and was clipped by 194px, its prompt input running off one\n * edge and its description off the other. `min-w-0` on the item does not help against a\n * min-content floor; only giving it the width does.\n *\n * `sm:max-w-[36rem]` is not redundant with `w-[36rem]`. `SheetContent`'s own base classes\n * carry `sm:max-w-sm` (384px), which silently CAPPED an earlier attempt at `w-[26rem]` —\n * the computed width came back 384px and the panel still clipped. A width class alone loses\n * to that cap, which is exactly the kind of thing only a browser measurement finds.\n *\n * `max-w-[100vw]` keeps a narrow window whole.\n */}\n <SheetContent side={sheetSide} className=\"w-[36rem] sm:max-w-[36rem] max-w-[100vw]\">\n <SheetHeader>\n <SheetTitle>{titleLabel}</SheetTitle>\n </SheetHeader>\n\n {/*\n * The body takes the sheet's remaining height (`SheetContent` is a full-height flex\n * column), so a hosted view can fill it. It scrolls only when the items need more than\n * the sheet has — several views at their floor, or tall widgets. It used to be a scroll\n * area of fixed `calc(100vh-120px)` height, which gave its children no height to fill.\n */}\n <div className=\"flex-1 min-h-0 overflow-y-auto flex flex-col gap-item pe-card pb-card\">\n {resolvedItems.length > 0 && resolvedItems.map(renderItem)}\n\n {/* Empty state */}\n {resolvedItems.length === 0 && (\n <div className=\"text-sm text-muted-foreground text-center py-section-xl\">\n {emptyStateLabel}\n </div>\n )}\n </div>\n </SheetContent>\n </Sheet>\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"utility-panel.js","sourceRoot":"","sources":["../../../../../../src/components/navigation/app-level/utility-panel.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,aAAa,EAAE,2BAA2B,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAEvM,OAAO,EACL,MAAM,EACN,sBAAsB,EACtB,wBAAwB,EACxB,QAAQ,EACR,qBAAqB,EACrB,KAAK,EACL,YAAY,EACZ,WAAW,EACX,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,OAAO,EACP,eAAe,EACf,uBAAuB,EACvB,OAAO,EAGP,eAAe,EACf,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AAErC;;;GAGG;AACH,SAAS,kCAAkC,CAAC,SAAgC;IAC1E,OAAO,SAAS,KAAK,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC;AAC3F,CAAC;AAED,SAAS,4BAA4B,CAAC,SAAgC;IACpE,OAAO,SAAS,KAAK,mBAAmB,CAAC,KAAK;QAC5C,CAAC,CAAC,qBAAqB,CAAC,UAAU;QA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AAU,YAEnB,SAAS,GACH,GACI,EAkBf,MAAC,YAAY,IAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAC,0CAA0C,aACjF,KAAC,WAAW,cACV,KAAC,UAAU,cAAE,UAAU,GAAc,GACzB,EAQd,eAAK,SAAS,EAAC,uEAAuE,aACnF,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,EAGzD,aAAa,CAAC,MAAM,KAAK,CAAC,IAAI,CAC7B,cAAK,SAAS,EAAC,yDAAyD,YACrE,eAAe,GACZ,CACP,IACG,IACO,IACT,GACJ,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { ButtonSize, CorePresetNames, FrontendComponentType, HorizontalPlacement, PlacementSide, resolvePlacementSideToRadix, ShellRegion, SurfaceVariant } from '@wildo-ai/presets-components-models';\n\nimport {\n Button,\n ButtonVariants_Variant,\n ComponentRegistryService,\n IconSize,\n resolveComponentLabel,\n Sheet,\n SheetContent,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n StandardIconReference,\n useI18n,\n useIconRegistry,\n useUtilityPanelBehavior,\n Surface,\n ApplicationLevelProps_UtilityPanel,\n UtilityPanelPlacement,\n FlowsActorsView,\n LauncherItemTargetKind,\n} from '@wildo-ai/saas-frontend-lib';\n\n/**\n * Maps horizontal placement to logical placement side.\n * Physical side resolution is delegated to the shared RTL-aware helper.\n */\nfunction getSheetPlacementSideFromPlacement(placement: UtilityPanelPlacement): PlacementSide {\n return placement === HorizontalPlacement.START ? PlacementSide.START : PlacementSide.END;\n}\n\nfunction getUtilityPanelIconReference(placement: UtilityPanelPlacement): StandardIconReference {\n return placement === HorizontalPlacement.START\n ? StandardIconReference.PANEL_LEFT\n : StandardIconReference.CHEVRON_RIGHT;\n}\n\nexport const ApplicationLevelPreset_UtilityPanel_Default: React.FC<ApplicationLevelProps_UtilityPanel> = ({\n position = HorizontalPlacement.END,\n items,\n}) => {\n const behavior = useUtilityPanelBehavior(position, items);\n const { tComponent, isReady } = useI18n({ component: FrontendComponentType.APPLICATION_LEVEL_UTILITY_PANEL });\n const { renderIcon } = useIconRegistry();\n\n const {\n isOpen,\n setIsOpen,\n items: resolvedItems,\n position: resolvedPosition,\n currentBreakpoint,\n } = behavior;\n\n // I-7: no English fallbacks — missing keys surface as `components.<type>.<key>`\n // for translation debugging (intentional, framework-wide i18n discipline).\n const t = (key: string): string => resolveComponentLabel({\n tComponent,\n componentType: FrontendComponentType.APPLICATION_LEVEL_UTILITY_PANEL,\n key,\n });\n const titleLabel = t('title');\n const toggleLabel = t('toggle');\n const emptyStateLabel = t('emptyState');\n\n // Follow the engine convention: keep logical placement until the last moment,\n // then resolve it against the current document direction.\n const sheetPlacementSide = getSheetPlacementSideFromPlacement(resolvedPosition);\n const dir = (typeof document !== 'undefined' ? document.documentElement?.dir : undefined) || 'ltr';\n const sheetSide = resolvePlacementSideToRadix(sheetPlacementSide, dir as 'ltr' | 'rtl');\n\n // Utility panel icon (panel icon for side panel concept)\n const panelIcon = renderIcon(getUtilityPanelIconReference(resolvedPosition), { size: IconSize.MD });\n\n /**\n * Renders a single utility panel item.\n *\n * Custom components render inline, and that is the whole behaviour — nothing here navigates\n * (#504). If a rendered utility view ever pushes a view, it will need a zone of its own, because a\n * push from inside a side sheet otherwise lands in `PRIMARY` and replaces the workspace the panel\n * exists to sit beside. That zone is worth adding then, and not before it has anything to hold.\n */\n /**\n * The shape shown when an item names something this panel cannot host.\n *\n * It prints the offending REF, in destructive colour. It used to print the item's LABEL in a\n * neutral grey box — the shape of a component that rendered fine and had little to say — so a\n * misconfigured panel looked like a working one. Same rule a missing i18n label follows: make the\n * gap visible, never substitute something plausible (#504).\n */\n const renderUnresolved = (ref: string) => (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <div className=\"text-xs text-destructive bg-destructive/10 p-card-sm rounded\" role=\"status\">\n {t('unresolvedComponent')} <code>{ref}</code>\n </div>\n </Surface>\n );\n\n /**\n * Renders a single utility panel item.\n *\n * Both kinds render INLINE, and nothing here navigates (#504). If a hosted view ever pushes a\n * view, it will need a zone of its own, because a push from inside a side sheet otherwise lands in\n * `PRIMARY` and replaces the workspace the panel exists to sit beside. That zone is worth adding\n * then, and not before it has anything to hold — and the first question will be whether it IS\n * `COMPANION`, which already describes persistent supplementary content.\n *\n * `VIEW` dispatches to exactly ONE host today, because `FlowsActorsViewDefinition` is the only\n * application-scoped view kind the panel can host. Adding a second means extending this switch and\n * the behaviour hook's validation TOGETHER — the hook decides whether a ref is known, this decides\n * what renders it, and a kind added to one and not the other is a ref that validates and shows\n * nothing.\n */\n const renderItem = (item: typeof resolvedItems[number], index: number) => {\n const itemIcon = renderIcon(item.icon, { size: IconSize.SM });\n\n const body = item.kind === LauncherItemTargetKind.VIEW\n ? (item.resolvedViewRef !== null\n ? <FlowsActorsView viewRef={item.resolvedViewRef} />\n : renderUnresolved(item.viewRef))\n : (() => {\n const CustomComponent = item.resolvedComponentRef\n ? ComponentRegistryService.resolve(item.resolvedComponentRef, CorePresetNames.DEFAULT)\n : null;\n return CustomComponent ? (\n <React.Suspense\n fallback={<div className=\"h-8 animate-pulse motion-reduce:animate-none bg-muted rounded\" aria-hidden=\"true\" />}\n >\n <CustomComponent />\n </React.Suspense>\n ) : renderUnresolved(item.componentRef);\n })();\n\n const itemRef = item.kind === LauncherItemTargetKind.VIEW ? item.viewRef : item.componentRef;\n /*\n * A hosted VIEW names itself and sizes itself, so the item adds neither a heading nor a height.\n *\n * - No heading: `FlowsActorsView` renders its own header (the system's name and its status). The\n * item's icon-and-label row above it printed the same name twice, one line apart — seen in the\n * running app with the Todo Assistant. The item's `label` still names the item wherever the\n * panel lists it without rendering it.\n * - Its height: the view is a full-height chat (`height: 100%`, its conversation scrolling\n * inside). Inside a scroll area it had no definite height to fill, so it collapsed to its\n * content and left most of the sheet empty. It now takes the remaining height, with a floor so\n * several views still get a usable chat each.\n *\n * A CUSTOM component keeps both: it is a widget of unknown shape, the label is the only thing\n * that names it, and its natural height is the right one.\n */\n const isView = item.kind === LauncherItemTargetKind.VIEW;\n\n return (\n <Surface key={`${itemRef}:${index}`} asChild emitPolicyVars={false} variant={SurfaceVariant.INSET}>\n <div\n /*\n * `min-w-0` is load-bearing, not cosmetic. A flex/grid child defaults to `min-width: auto`,\n * so it refuses to shrink below its own content width and overflows its host instead —\n * which is exactly how a 514px view came to be clipped by a 320px sheet rather than\n * laying itself out narrower. Widening the sheet alone would only move the threshold.\n */\n className={isView\n ? \"border rounded-md p-card-sm min-w-0 flex flex-col flex-1 min-h-[24rem]\"\n : \"border rounded-md p-card-sm space-y-item min-w-0 shrink-0\"}\n data-utility-item={itemRef}\n data-utility-item-kind={item.kind}\n >\n {!isView && (\n <div className=\"flex items-center gap-element-sm\">\n {itemIcon}\n <span className=\"text-sm font-medium\">{item.label}</span>\n </div>\n )}\n {body}\n </div>\n </Surface>\n );\n };\n\n if (!isReady) return null;\n\n return (\n <div data-component-area={ShellRegion.UTILITY_PANEL} data-placement={position} data-component-type=\"utility-panel\" data-breakpoint={currentBreakpoint}>\n <Sheet open={isOpen} onOpenChange={setIsOpen}>\n <SheetTrigger asChild>\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n aria-label={toggleLabel}\n className=\"relative\"\n >\n {panelIcon}\n </Button>\n </SheetTrigger>\n\n {/*\n * Sized to the content it HOSTS, not to the rail it began as (#504).\n *\n * This was `w-80` (320px), which is right for a small widget and wrong for a VIEW. Measured\n * in the running app: the Todo Assistant's MIN-CONTENT width is 514px — it cannot lay out\n * narrower, so it overflowed and was clipped by 194px, its prompt input running off one\n * edge and its description off the other. `min-w-0` on the item does not help against a\n * min-content floor; only giving it the width does.\n *\n * `sm:max-w-[36rem]` is not redundant with `w-[36rem]`. `SheetContent`'s own base classes\n * carry `sm:max-w-sm` (384px), which silently CAPPED an earlier attempt at `w-[26rem]` —\n * the computed width came back 384px and the panel still clipped. A width class alone loses\n * to that cap, which is exactly the kind of thing only a browser measurement finds.\n *\n * `max-w-[100vw]` keeps a narrow window whole.\n */}\n <SheetContent side={sheetSide} className=\"w-[36rem] sm:max-w-[36rem] max-w-[100vw]\">\n <SheetHeader>\n <SheetTitle>{titleLabel}</SheetTitle>\n </SheetHeader>\n\n {/*\n * The body takes the sheet's remaining height (`SheetContent` is a full-height flex\n * column), so a hosted view can fill it. It scrolls only when the items need more than\n * the sheet has — several views at their floor, or tall widgets. It used to be a scroll\n * area of fixed `calc(100vh-120px)` height, which gave its children no height to fill.\n */}\n <div className=\"flex-1 min-h-0 overflow-y-auto flex flex-col gap-item pe-card pb-card\">\n {resolvedItems.length > 0 && resolvedItems.map(renderItem)}\n\n {/* Empty state */}\n {resolvedItems.length === 0 && (\n <div className=\"text-sm text-muted-foreground text-center py-section-xl\">\n {emptyStateLabel}\n </div>\n )}\n </div>\n </SheetContent>\n </Sheet>\n </div>\n );\n};\n"]}
|
|
@@ -33,7 +33,7 @@ function BreadcrumbEllipsis({ className, ...props }) {
|
|
|
33
33
|
const { renderIcon } = useIconRegistry();
|
|
34
34
|
const { tComponent } = useI18n({ component: FrontendComponentType.LOW_LEVEL_BREADCRUMB });
|
|
35
35
|
const moreLabel = tComponent(FrontendComponentType.LOW_LEVEL_BREADCRUMB, 'more');
|
|
36
|
-
return (_jsxs("span", { "data-slot": "breadcrumb-ellipsis",
|
|
36
|
+
return (_jsxs("span", { "data-slot": "breadcrumb-ellipsis", className: cn("flex size-9 items-center justify-center", className), ...props, children: [_jsx("span", { "aria-hidden": "true", children: renderIcon(StandardIconReference.MORE_HORIZONTAL, { size: IconSize.SM }) }), _jsx("span", { className: "sr-only", children: moreLabel })] }));
|
|
37
37
|
}
|
|
38
38
|
export const Breadcrumb = createCompoundPreset(BreadcrumbRoot, {
|
|
39
39
|
List: BreadcrumbList,
|