themelia-react-ui 2.0.3 → 2.0.5
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/CHANGELOG.md +185 -0
- package/README.md +168 -36
- package/dist/{accordion-Cjb6sx0G.js → accordion-B9MHG0cT.js} +11 -11
- package/dist/accordion-B9MHG0cT.js.map +1 -0
- package/dist/action-menu-Dr8K-ghE.js +284 -0
- package/dist/action-menu-Dr8K-ghE.js.map +1 -0
- package/dist/{affordance-geometry.generated-tF36bREk.js → affordance-geometry.generated-P-aVJisu.js} +42 -36
- package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
- package/dist/{ai-artifact-DvTwDVyL.js → ai-artifact-C58tQcBy.js} +387 -350
- package/dist/ai-artifact-C58tQcBy.js.map +1 -0
- package/dist/app-shell-B_IuNWOo.js +321 -0
- package/dist/app-shell-B_IuNWOo.js.map +1 -0
- package/dist/{attachment-BxDfL2mw.js → attachment-Dg_69lPS.js} +9 -9
- package/dist/{attachment-BxDfL2mw.js.map → attachment-Dg_69lPS.js.map} +1 -1
- package/dist/{auth-BGua8ouh.js → auth-DTkkshS8.js} +44 -47
- package/dist/auth-DTkkshS8.js.map +1 -0
- package/dist/{avatar-DAPlDvhJ.js → avatar-CeZaFmNH.js} +8 -8
- package/dist/avatar-CeZaFmNH.js.map +1 -0
- package/dist/{badge-HpFqoqSY.js → badge-xIiV_E7f.js} +5 -5
- package/dist/{badge-HpFqoqSY.js.map → badge-xIiV_E7f.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +2 -372
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +2 -2
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +3 -3
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +7 -7
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +12 -12
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/signature-pad.js +7 -7
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +4 -4
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +36 -36
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-DnUJ21NQ.js → batch-action-bar-Cb8cuvyy.js} +6 -6
- package/dist/batch-action-bar-Cb8cuvyy.js.map +1 -0
- package/dist/blocks/admin.js +23 -23
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +230 -216
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +326 -307
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1247 -1169
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-C-oqs1sQ.js → breadcrumbs-J-K2kl4c.js} +6 -6
- package/dist/{breadcrumbs-C-oqs1sQ.js.map → breadcrumbs-J-K2kl4c.js.map} +1 -1
- package/dist/{button-DVzspB_G.js → button-S2Cubiiz.js} +3 -3
- package/dist/button-S2Cubiiz.js.map +1 -0
- package/dist/{buttons-DPZekJFu.js → buttons-BedGfygC.js} +16 -16
- package/dist/buttons-BedGfygC.js.map +1 -0
- package/dist/cards-rNX1M4Xn.js +69 -0
- package/dist/cards-rNX1M4Xn.js.map +1 -0
- package/dist/cascader-B1MiqkBq.js +439 -0
- package/dist/cascader-B1MiqkBq.js.map +1 -0
- package/dist/chart-Darg_0Kv.js +162 -0
- package/dist/chart-Darg_0Kv.js.map +1 -0
- package/dist/{checkbox-AWIhNhmo.js → checkbox-fflqmODR.js} +9 -5
- package/dist/checkbox-fflqmODR.js.map +1 -0
- package/dist/choice-inputs-zUgBZfE4.js +777 -0
- package/dist/choice-inputs-zUgBZfE4.js.map +1 -0
- package/dist/{code-block-DeneBJR_.js → code-block-BzmM9Eig.js} +9 -9
- package/dist/code-block-BzmM9Eig.js.map +1 -0
- package/dist/{collapsible-C-_l4hpy.js → collapsible-BkAI_XD4.js} +5 -5
- package/dist/{collapsible-C-_l4hpy.js.map → collapsible-BkAI_XD4.js.map} +1 -1
- package/dist/{collection-content-By56pLog.js → collection-content-gDh1v6O4.js} +3 -3
- package/dist/{collection-content-By56pLog.js.map → collection-content-gDh1v6O4.js.map} +1 -1
- package/dist/combobox-BEx0vJgF.js +362 -0
- package/dist/combobox-BEx0vJgF.js.map +1 -0
- package/dist/{combobox-Dxo2fAYQ.js → combobox-BwzoXFSG.js} +254 -247
- package/dist/combobox-BwzoXFSG.js.map +1 -0
- package/dist/{command-C25VMRII.js → command-CrlPIL6m.js} +12 -12
- package/dist/command-CrlPIL6m.js.map +1 -0
- package/dist/{comments-DD0DUPwJ.js → comments-Dmpp0YIc.js} +380 -379
- package/dist/comments-Dmpp0YIc.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +9 -1
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/cards/card.recipes.d.ts +16 -7
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -2
- package/dist/components/base/cards/partials/smart-card-header-row.d.ts +3 -1
- package/dist/components/base/cards/smart-card.types.d.ts +11 -7
- package/dist/components/base/cascader/cascader-panel.d.ts +76 -0
- package/dist/components/base/chart/chart.d.ts +6 -1
- package/dist/components/base/choice-inputs/checkbox.d.ts +7 -2
- package/dist/components/base/choice-inputs/choice-types.d.ts +1 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +7 -0
- package/dist/components/base/choice-inputs/toggle-field.d.ts +7 -0
- package/dist/components/base/combobox/index.d.ts +4 -2
- package/dist/components/base/date-pickers/datepicker.types.d.ts +7 -0
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/forms/controlled-form-field.d.ts +6 -6
- package/dist/components/base/forms/form-field.d.ts +5 -3
- package/dist/components/base/forms/form-sizing.d.ts +7 -7
- package/dist/components/base/forms/index.d.ts +1 -0
- package/dist/components/base/forms/server-errors.d.ts +16 -0
- package/dist/components/base/forms/workflow.d.ts +11 -2
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -0
- package/dist/components/base/metadata-list/metadata-list.d.ts +3 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
- package/dist/components/base/navigation/page-header/page-header-commands.d.ts +14 -7
- package/dist/components/base/navigation/page-header/page-header.d.ts +13 -4
- package/dist/components/base/popover/popover.d.ts +3 -3
- package/dist/components/base/popover/popover.recipes.d.ts +10 -6
- package/dist/components/base/sheet/sheet.d.ts +2 -0
- package/dist/components/base/sidebar/index.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +27 -5
- package/dist/components/base/structure/composition.recipes.d.ts +17 -0
- package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +7 -2
- package/dist/components/base/text-inputs/input.d.ts +4 -2
- package/dist/components/base/text-inputs/textarea.d.ts +4 -2
- package/dist/components/base/toaster/index.d.ts +1 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +2 -1
- package/dist/components/base/value-inputs/slider.d.ts +5 -1
- package/dist/components/base/value-inputs/tags-input.d.ts +5 -1
- package/dist/components/blocks/ai/ai-file-tree/types.d.ts +1 -1
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +3 -1
- package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
- package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +1 -1
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +3 -1
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +1 -1
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +3 -1
- package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +11 -2
- package/dist/components/blocks/commerce/index.d.ts +7 -6
- package/dist/components/blocks/commerce/inventory-section/inventory-section.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +7 -2
- package/dist/components/blocks/commerce/invoice-header/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-header/types.d.ts +20 -6
- package/dist/components/blocks/commerce/invoice-line-items/invoice-line-items.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +24 -7
- package/dist/components/blocks/commerce/invoice-mini/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-mini/types.d.ts +7 -1
- package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +1 -1
- package/dist/components/blocks/commerce/order-customer/types.d.ts +9 -1
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +1 -1
- package/dist/components/blocks/commerce/refund-status/types.d.ts +3 -1
- package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
- package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +3 -1
- package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
- package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +3 -1
- package/dist/components/features/activities/activities.types.d.ts +8 -2
- package/dist/components/features/activities/partials/activity-marker.d.ts +7 -3
- package/dist/components/features/activities/partials/activity-row.d.ts +24 -0
- package/dist/components/features/event-calendar/colors.d.ts +2 -2
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +4 -0
- package/dist/components/features/filters/facets/select-facet.d.ts +2 -1
- package/dist/components/features/filters/filters.strings.d.ts +4 -0
- package/dist/components/features/filters/filters.types.d.ts +3 -0
- package/dist/components/features/filters/partials/filter-editor-header.d.ts +16 -0
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +1 -1
- package/dist/components/features/filters/partials/nested-filter-options.d.ts +21 -0
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +2 -1
- package/dist/components/features/filters/utils/filter-utils.d.ts +21 -3
- package/dist/components/features/global-search/global-search.types.d.ts +2 -0
- package/dist/components/features/global-search/partials/global-search-input.d.ts +10 -0
- package/dist/components/features/global-search/partials/global-search-result-row.d.ts +7 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
- package/dist/components/features/media-library/media-library.types.d.ts +14 -4
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- package/dist/components/features/products/components/product-options-matrix.d.ts +1 -1
- package/dist/components/features/products/components/product-variant-editor.d.ts +1 -1
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/products.strings.d.ts +9 -1
- package/dist/components/features/products/products.types.d.ts +43 -6
- package/dist/components/features/resource/resource.d.ts +5 -1
- package/dist/components/features/resource/resource.types.d.ts +12 -1
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +1 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +12 -2
- package/dist/components/features/table/partials/resource-cell.d.ts +22 -5
- package/dist/components/features/table/table.types.d.ts +1 -1
- package/dist/components/layout/app-shell/app-shell.types.d.ts +35 -6
- package/dist/components/layout/app-shell/index.d.ts +1 -1
- package/dist/components/layout/app-shell/shell-regions.d.ts +27 -0
- package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/containers/two-column-layout.d.ts +2 -0
- package/dist/components/layout/header/header.recipes.d.ts +6 -0
- package/dist/components/layout/header/header.types.d.ts +6 -6
- package/dist/components/layout/navigation/section-nav/section-nav.d.ts +5 -0
- package/dist/components/layout/page/index.d.ts +2 -1
- package/dist/components/layout/page/page.d.ts +1 -0
- package/dist/components/layout/page/page.strings.d.ts +11 -0
- package/dist/components/layout/page/page.types.d.ts +69 -17
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/settings/settings.d.ts +9 -2
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/index.d.ts +2 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +36 -0
- package/dist/components/layout/sidebar/sidebar.context.d.ts +5 -7
- package/dist/components/layout/sidebar/sidebar.types.d.ts +48 -10
- package/dist/components/layout/sidebar/sidebar.utils.d.ts +9 -1
- package/dist/components/layout/workspace/workspace.types.d.ts +8 -1
- package/dist/components/typography/text.styles.d.ts +26 -1
- package/dist/components/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/overlay-layer.d.ts +18 -0
- package/dist/components/ui/sheet.d.ts +5 -1
- package/dist/components/ui/sidebar-state.d.ts +82 -0
- package/dist/components/ui/sidebar.d.ts +5 -17
- package/dist/composition.recipes-COdiFhxB.js +19 -0
- package/dist/composition.recipes-COdiFhxB.js.map +1 -0
- package/dist/containers-CIxwbZt5.js +112 -0
- package/dist/containers-CIxwbZt5.js.map +1 -0
- package/dist/{control-group-recipes-DBXmfh2E.js → control-group-recipes-fMuFo0H7.js} +6 -6
- package/dist/control-group-recipes-fMuFo0H7.js.map +1 -0
- package/dist/{copyable-ClBuk_UK.js → copyable-DIznBqiT.js} +7 -7
- package/dist/{copyable-ClBuk_UK.js.map → copyable-DIznBqiT.js.map} +1 -1
- package/dist/{data-display-DT_khPl_.js → data-display-BdgCAw8T.js} +277 -285
- package/dist/data-display-BdgCAw8T.js.map +1 -0
- package/dist/{date-DCrsDTZc.js → date-Cq8ioE4o.js} +5 -5
- package/dist/{date-DCrsDTZc.js.map → date-Cq8ioE4o.js.map} +1 -1
- package/dist/{date-picker-B2K3ucWn.js → date-picker-RlIzKom_.js} +501 -480
- package/dist/date-picker-RlIzKom_.js.map +1 -0
- package/dist/date-pickers-DY-CpXS1.js +179 -0
- package/dist/date-pickers-DY-CpXS1.js.map +1 -0
- package/dist/{display-hAc1HjpI.js → display-KsZLw9Ov.js} +9 -9
- package/dist/{display-hAc1HjpI.js.map → display-KsZLw9Ov.js.map} +1 -1
- package/dist/dropdown-menu-CLs8Lihj.js +194 -0
- package/dist/dropdown-menu-CLs8Lihj.js.map +1 -0
- package/dist/features/activities.js +302 -253
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +15 -14
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +222 -220
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +11 -10
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +13 -13
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer.js +249 -249
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +264 -269
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +167 -138
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +6 -7
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +269 -260
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +827 -777
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1246 -1169
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +13 -13
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +127 -123
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +254 -253
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +95 -96
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-BYIhtitP.js → feedback-Dm4izqFn.js} +81 -80
- package/dist/feedback-Dm4izqFn.js.map +1 -0
- package/dist/{field-affordance-recipes-DZhnIL_Y.js → field-affordance-recipes-DWcNcOjh.js} +4 -4
- package/dist/field-affordance-recipes-DWcNcOjh.js.map +1 -0
- package/dist/{filters-DJVAveHA.js → filters-DzgSJpMK.js} +693 -645
- package/dist/filters-DzgSJpMK.js.map +1 -0
- package/dist/{form-field-CwH9y77i.js → form-field-BriWAXyg.js} +14 -8
- package/dist/form-field-BriWAXyg.js.map +1 -0
- package/dist/{form-sizing-BdP_Mf5p.js → form-sizing-Bs2qFUeE.js} +4 -4
- package/dist/form-sizing-Bs2qFUeE.js.map +1 -0
- package/dist/forms-C0RGnJTe.js +216 -0
- package/dist/forms-C0RGnJTe.js.map +1 -0
- package/dist/{forms-numeric-B_jraJaQ.js → forms-numeric-DIhghX1Q.js} +295 -291
- package/dist/forms-numeric-DIhghX1Q.js.map +1 -0
- package/dist/{header-BSfIEWbI.js → header-DMMxG__r.js} +67 -63
- package/dist/header-DMMxG__r.js.map +1 -0
- package/dist/header.recipes-BigdJjw1.js +6 -0
- package/dist/header.recipes-BigdJjw1.js.map +1 -0
- package/dist/hooks/useFormErrors.d.ts +1 -1
- package/dist/{hooks-ClH9thn4.js → hooks-DB6CJ4MR.js} +26 -14
- package/dist/hooks-DB6CJ4MR.js.map +1 -0
- package/dist/{icon-badge-DYKIwvOV.js → icon-badge-DZF-YjQp.js} +4 -4
- package/dist/{icon-badge-DYKIwvOV.js.map → icon-badge-DZF-YjQp.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/input-CvyDQlY7.js +289 -0
- package/dist/input-CvyDQlY7.js.map +1 -0
- package/dist/input-DMBwAZmr.js +21 -0
- package/dist/input-DMBwAZmr.js.map +1 -0
- package/dist/item-DjCcM18E.js +277 -0
- package/dist/item-DjCcM18E.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +2 -2
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +3 -3
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +11 -11
- package/dist/lib/affordance-geometry.generated.d.ts +41 -35
- package/dist/lib/control-group-recipes.d.ts +5 -5
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- package/dist/lib/motion-recipes.d.ts +3 -0
- package/dist/lib/navigation-row-recipes.d.ts +7 -7
- package/dist/lib/overlay-anatomy-recipes.d.ts +3 -3
- package/dist/lib/portal-recipes.d.ts +3 -0
- package/dist/lib/token-merge.generated.d.ts +13 -10
- package/dist/lib/ui-provider/types.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/map-demo-tile.svg +1 -1
- package/dist/{media-gallery-3zIVLMWH.js → media-gallery-C-vChPmE.js} +6 -6
- package/dist/{media-gallery-3zIVLMWH.js.map → media-gallery-C-vChPmE.js.map} +1 -1
- package/dist/{mentions-CGlEJ15c.js → mentions-0_4nWuI-.js} +10 -10
- package/dist/{mentions-CGlEJ15c.js.map → mentions-0_4nWuI-.js.map} +1 -1
- package/dist/{message-DZ_ruyUV.js → message-g8p7eVtN.js} +7 -7
- package/dist/message-g8p7eVtN.js.map +1 -0
- package/dist/metadata-list-C3MkU-Om.js +443 -0
- package/dist/metadata-list-C3MkU-Om.js.map +1 -0
- package/dist/{motion-recipes-ChBg4HBq.js → motion-recipes-DitYv6P2.js} +10 -2
- package/dist/motion-recipes-DitYv6P2.js.map +1 -0
- package/dist/navigation-C90-oQFq.js +255 -0
- package/dist/navigation-C90-oQFq.js.map +1 -0
- package/dist/{navigation-BzhHI3lo.js → navigation-DaRjthVk.js} +101 -82
- package/dist/navigation-DaRjthVk.js.map +1 -0
- package/dist/{navigation-row-recipes-BFLCk_Aq.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
- package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
- package/dist/{number-DbV1Dija.js → number-CRU3kGuk.js} +5 -5
- package/dist/{number-DbV1Dija.js.map → number-CRU3kGuk.js.map} +1 -1
- package/dist/overflow-tab-bar-IVFVQFV6.js +172 -0
- package/dist/overflow-tab-bar-IVFVQFV6.js.map +1 -0
- package/dist/overlays-BSgCtM2v.js +1013 -0
- package/dist/overlays-BSgCtM2v.js.map +1 -0
- package/dist/page-DUUKDAjo.js +331 -0
- package/dist/page-DUUKDAjo.js.map +1 -0
- package/dist/page-header-commands-7P3sfE9u.js +193 -0
- package/dist/page-header-commands-7P3sfE9u.js.map +1 -0
- package/dist/{pagination-BL25hu2s.js → pagination-CgCjElfu.js} +7 -7
- package/dist/{pagination-BL25hu2s.js.map → pagination-CgCjElfu.js.map} +1 -1
- package/dist/popover-B85RenIl.js +201 -0
- package/dist/popover-B85RenIl.js.map +1 -0
- package/dist/{popover-menu-Cn9rUkdc.js → popover-menu-DlnQ2zlR.js} +7 -7
- package/dist/{popover-menu-Cn9rUkdc.js.map → popover-menu-DlnQ2zlR.js.map} +1 -1
- package/dist/{popover.recipes-D3j8R8Yp.js → popover.recipes-DdiEp0rd.js} +18 -11
- package/dist/popover.recipes-DdiEp0rd.js.map +1 -0
- package/dist/portal-recipes-BpsV_iRw.js +9 -0
- package/dist/portal-recipes-BpsV_iRw.js.map +1 -0
- package/dist/{primitives-BFK08r9M.js → primitives-ByWgGUgt.js} +6 -6
- package/dist/{primitives-BFK08r9M.js.map → primitives-ByWgGUgt.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-B1VnCT0K.js → progress-BJhQP9WX.js} +9 -9
- package/dist/{progress-B1VnCT0K.js.map → progress-BJhQP9WX.js.map} +1 -1
- package/dist/{receipt-BVSOH3Xo.js → receipt-tOc7B3hw.js} +7 -7
- package/dist/receipt-tOc7B3hw.js.map +1 -0
- package/dist/{rich-text-GOUyKQ-s.js → rich-text-Dth5E882.js} +4 -4
- package/dist/{rich-text-GOUyKQ-s.js.map → rich-text-Dth5E882.js.map} +1 -1
- package/dist/{rich-text-editor-cRLC-eBK.js → rich-text-editor-C1fOjBTd.js} +429 -430
- package/dist/rich-text-editor-C1fOjBTd.js.map +1 -0
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js → rich-text-editor-toolbar-laT3tpBT.js} +33 -29
- package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +1 -0
- package/dist/{scroll-area-DcI-M1UT.js → scroll-area-B0dB2cBi.js} +2 -2
- package/dist/{scroll-area-DcI-M1UT.js.map → scroll-area-B0dB2cBi.js.map} +1 -1
- package/dist/{separator-Bom7NsGO.js → separator-Bb17I4pu.js} +2 -2
- package/dist/{separator-Bom7NsGO.js.map → separator-Bb17I4pu.js.map} +1 -1
- package/dist/{separator-BDV-Y648.js → separator-Ct_WSWTJ.js} +3 -3
- package/dist/{separator-BDV-Y648.js.map → separator-Ct_WSWTJ.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-Bar5wiSo.js +167 -0
- package/dist/settings-Bar5wiSo.js.map +1 -0
- package/dist/sheet-BGPERY55.js +250 -0
- package/dist/sheet-BGPERY55.js.map +1 -0
- package/dist/sidebar-D-JYMMbY.js +686 -0
- package/dist/sidebar-D-JYMMbY.js.map +1 -0
- package/dist/sidebar-f9gRWXIR.js +1001 -0
- package/dist/sidebar-f9gRWXIR.js.map +1 -0
- package/dist/skeleton-BapcJd9C.js +265 -0
- package/dist/skeleton-BapcJd9C.js.map +1 -0
- package/dist/smart-card-CW0hjetE.js +617 -0
- package/dist/smart-card-CW0hjetE.js.map +1 -0
- package/dist/{structure-BmisBK-3.js → structure-DuxKl954.js} +3 -3
- package/dist/{structure-BmisBK-3.js.map → structure-DuxKl954.js.map} +1 -1
- package/dist/{structure.recipes-EPz60cU8.js → structure.recipes-BB4-n58V.js} +2 -2
- package/dist/{structure.recipes-EPz60cU8.js.map → structure.recipes-BB4-n58V.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-DsfzoUia.js → table-B4TE7iOV.js} +3 -3
- package/dist/{table-DsfzoUia.js.map → table-B4TE7iOV.js.map} +1 -1
- package/dist/{table-BweFy_P9.js → table-CFOWY9pQ.js} +394 -388
- package/dist/table-CFOWY9pQ.js.map +1 -0
- package/dist/{tabs-CDocW5D1.js → tabs-e7ko9S2o.js} +11 -11
- package/dist/tabs-e7ko9S2o.js.map +1 -0
- package/dist/{text-inputs-f9Ia-aCi.js → text-inputs-B1culiSK.js} +107 -104
- package/dist/text-inputs-B1culiSK.js.map +1 -0
- package/dist/{text.styles-g4He6UIW.js → text.styles-B64My8RZ.js} +25 -10
- package/dist/text.styles-B64My8RZ.js.map +1 -0
- package/dist/theme.css +192 -149
- package/dist/{timelines-CwM_9IhD.js → timelines-D3Sl9ueq.js} +13 -12
- package/dist/timelines-D3Sl9ueq.js.map +1 -0
- package/dist/tooltip-8wz5S_Zr.js +113 -0
- package/dist/tooltip-8wz5S_Zr.js.map +1 -0
- package/dist/{tree-WnKQzwbq.js → tree-CzUJHnFs.js} +9 -9
- package/dist/{tree-WnKQzwbq.js.map → tree-CzUJHnFs.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-BQnine1k.js +117 -0
- package/dist/typography-BQnine1k.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/ui-provider-C-74NVLc.js +178 -0
- package/dist/ui-provider-C-74NVLc.js.map +1 -0
- package/dist/ui-provider.js +2 -3
- package/dist/{upload-CXyxmQBP.js → upload-BOW6U2tI.js} +25 -24
- package/dist/upload-BOW6U2tI.js.map +1 -0
- package/dist/{upload-queue-Boscubn9.js → upload-queue-qUXn1ykN.js} +16 -14
- package/dist/upload-queue-qUXn1ykN.js.map +1 -0
- package/dist/{usage-card-BhO5eqkX.js → usage-card-BeSLY0i0.js} +145 -137
- package/dist/usage-card-BeSLY0i0.js.map +1 -0
- package/dist/{utils-BRhFDwuU.js → utils-B6kKb8jB.js} +303 -144
- package/dist/utils-B6kKb8jB.js.map +1 -0
- package/dist/value-inputs-skdVB2zh.js +980 -0
- package/dist/value-inputs-skdVB2zh.js.map +1 -0
- package/dist/{value-typography-BP8OG6h5.js → value-typography-uAmWUAL1.js} +2 -2
- package/dist/{value-typography-BP8OG6h5.js.map → value-typography-uAmWUAL1.js.map} +1 -1
- package/dist/workspace-DHeHv0qw.js +411 -0
- package/dist/workspace-DHeHv0qw.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +15 -129
- package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
- package/docs/consumer-skill/examples/app-layout.tsx +74 -13
- package/docs/consumer-skill/examples/authentication.tsx +77 -0
- package/docs/consumer-skill/examples/commerce-lines.tsx +271 -0
- package/docs/consumer-skill/examples/custom-composition.tsx +21 -0
- package/docs/consumer-skill/examples/detail.tsx +5 -4
- package/docs/consumer-skill/examples/edit.tsx +30 -38
- package/docs/consumer-skill/examples/editable-sections.tsx +38 -0
- package/docs/consumer-skill/examples/index-table.tsx +4 -4
- package/docs/consumer-skill/examples/manifest.json +88 -1
- package/docs/consumer-skill/examples/product-media.tsx +41 -0
- package/docs/consumer-skill/examples/product-parts.tsx +81 -0
- package/docs/consumer-skill/examples/rhf-bindings.tsx +86 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +141 -0
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +105 -0
- package/docs/consumer-skill/examples/rhf-transport.tsx +28 -0
- package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
- package/docs/consumer-skill/references/agents-md.md +23 -11
- package/docs/consumer-skill/references/analytics.md +18 -1
- package/docs/consumer-skill/references/authentication.md +42 -0
- package/docs/consumer-skill/references/commerce-composition.md +97 -0
- package/docs/consumer-skill/references/component-contracts.json +325201 -0
- package/docs/consumer-skill/references/composition-mapping.md +106 -0
- package/docs/consumer-skill/references/composition.md +198 -46
- package/docs/consumer-skill/references/critique-rubric.md +98 -0
- package/docs/consumer-skill/references/custom-composition.md +261 -0
- package/docs/consumer-skill/references/data-reading.md +79 -0
- package/docs/consumer-skill/references/design-contract.md +43 -9
- package/docs/consumer-skill/references/discovery.md +109 -8
- package/docs/consumer-skill/references/domain-structures.md +124 -0
- package/docs/consumer-skill/references/installation.md +51 -36
- package/docs/consumer-skill/references/integration.md +41 -2
- package/docs/consumer-skill/references/product-composition.md +94 -0
- package/docs/consumer-skill/references/public-api.json +4390 -475
- package/docs/consumer-skill/references/review.md +47 -5
- package/docs/consumer-skill/references/rhf-workflows.md +93 -0
- package/docs/consumer-skill/references/screen-archetypes.md +34 -0
- package/docs/consumer-skill/references/screen-decisions.md +126 -0
- package/docs/consumer-skill/references/theming.md +25 -27
- package/docs/consumer-skill/references/tokens.json +20 -11
- package/docs/consumer-skill/references/view-craft.md +153 -0
- package/docs/consumer-skill/references/view-spec.md +73 -0
- package/docs/consumer-skill/references/workflows.md +9 -2
- package/docs/consumer-skill/scripts/composition-policy.mjs +39 -3
- package/docs/consumer-skill/scripts/composition-schema.d.mts +2 -0
- package/docs/consumer-skill/scripts/composition-schema.mjs +32 -0
- package/docs/consumer-skill/scripts/composition.mjs +254 -0
- package/docs/consumer-skill/scripts/discovery.mjs +96 -10
- package/docs/consumer-skill/scripts/inspect-component.mjs +11 -0
- package/docs/consumer-skill/scripts/inspect-tokens.mjs +11 -0
- package/docs/consumer-skill/scripts/inspection.mjs +193 -0
- package/docs/consumer-skill/scripts/map-composition.mjs +12 -0
- package/docs/consumer-skill/scripts/setup-skills.mjs +111 -0
- package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
- package/docs/consumer-skills/themelia-components/SKILL.md +31 -0
- package/docs/consumer-skills/themelia-composition/SKILL.md +34 -0
- package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
- package/docs/consumer-skills/themelia-forms/SKILL.md +12 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +15 -0
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +42 -0
- package/package.json +4 -2
- package/templates/README.md +39 -0
- package/templates/admin-shell-template.tsx +382 -0
- package/templates/analytics-operations-template.tsx +376 -0
- package/templates/customers-template.tsx +509 -0
- package/templates/index.ts +29 -0
- package/templates/orders-template.tsx +1102 -0
- package/templates/products-template.tsx +834 -0
- package/templates/user-permissions-template.tsx +450 -0
- package/dist/accordion-Cjb6sx0G.js.map +0 -1
- package/dist/action-menu-CllU52Mm.js +0 -280
- package/dist/action-menu-CllU52Mm.js.map +0 -1
- package/dist/affordance-geometry.generated-tF36bREk.js.map +0 -1
- package/dist/ai-artifact-DvTwDVyL.js.map +0 -1
- package/dist/app-shell-C4FhvCqF.js +0 -236
- package/dist/app-shell-C4FhvCqF.js.map +0 -1
- package/dist/auth-BGua8ouh.js.map +0 -1
- package/dist/avatar-DAPlDvhJ.js.map +0 -1
- package/dist/base/cascader.js.map +0 -1
- package/dist/batch-action-bar-DnUJ21NQ.js.map +0 -1
- package/dist/button-DVzspB_G.js.map +0 -1
- package/dist/buttons-DPZekJFu.js.map +0 -1
- package/dist/cards-BaBZR-AU.js +0 -68
- package/dist/cards-BaBZR-AU.js.map +0 -1
- package/dist/chart-ZOYyK2xG.js +0 -155
- package/dist/chart-ZOYyK2xG.js.map +0 -1
- package/dist/checkbox-AWIhNhmo.js.map +0 -1
- package/dist/choice-inputs-CNHvARCJ.js +0 -770
- package/dist/choice-inputs-CNHvARCJ.js.map +0 -1
- package/dist/code-block-DeneBJR_.js.map +0 -1
- package/dist/combobox-DaHESuiL.js +0 -355
- package/dist/combobox-DaHESuiL.js.map +0 -1
- package/dist/combobox-Dxo2fAYQ.js.map +0 -1
- package/dist/command-C25VMRII.js.map +0 -1
- package/dist/comments-DD0DUPwJ.js.map +0 -1
- package/dist/containers-Mu1LMGV1.js +0 -103
- package/dist/containers-Mu1LMGV1.js.map +0 -1
- package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
- package/dist/data-display-DT_khPl_.js.map +0 -1
- package/dist/date-picker-B2K3ucWn.js.map +0 -1
- package/dist/date-pickers-Ds8gLaoP.js +0 -175
- package/dist/date-pickers-Ds8gLaoP.js.map +0 -1
- package/dist/dropdown-menu-Cl4X7L5S.js +0 -193
- package/dist/dropdown-menu-Cl4X7L5S.js.map +0 -1
- package/dist/feedback-BYIhtitP.js.map +0 -1
- package/dist/field-affordance-recipes-DZhnIL_Y.js.map +0 -1
- package/dist/filters-DJVAveHA.js.map +0 -1
- package/dist/form-field-CwH9y77i.js.map +0 -1
- package/dist/form-sizing-BdP_Mf5p.js.map +0 -1
- package/dist/forms-B9G_xwzi.js +0 -194
- package/dist/forms-B9G_xwzi.js.map +0 -1
- package/dist/forms-numeric-B_jraJaQ.js.map +0 -1
- package/dist/header-BSfIEWbI.js.map +0 -1
- package/dist/hooks-ClH9thn4.js.map +0 -1
- package/dist/input-CZw8iU99.js +0 -21
- package/dist/input-CZw8iU99.js.map +0 -1
- package/dist/input-DQdEd0YD.js +0 -263
- package/dist/input-DQdEd0YD.js.map +0 -1
- package/dist/item-K5_ghvze.js +0 -275
- package/dist/item-K5_ghvze.js.map +0 -1
- package/dist/message-DZ_ruyUV.js.map +0 -1
- package/dist/metadata-list-8N16ZMW_.js +0 -405
- package/dist/metadata-list-8N16ZMW_.js.map +0 -1
- package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
- package/dist/navigation-Bnotn4AQ.js +0 -145
- package/dist/navigation-Bnotn4AQ.js.map +0 -1
- package/dist/navigation-BzhHI3lo.js.map +0 -1
- package/dist/navigation-row-recipes-BFLCk_Aq.js.map +0 -1
- package/dist/overflow-tab-bar-CWY7Nogn.js +0 -282
- package/dist/overflow-tab-bar-CWY7Nogn.js.map +0 -1
- package/dist/overlays-tMkF-VAN.js +0 -1003
- package/dist/overlays-tMkF-VAN.js.map +0 -1
- package/dist/page-CL9YeH_V.js +0 -224
- package/dist/page-CL9YeH_V.js.map +0 -1
- package/dist/page-header-commands-DOb6WsfD.js +0 -126
- package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
- package/dist/popover-gnTOhbFM.js +0 -198
- package/dist/popover-gnTOhbFM.js.map +0 -1
- package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
- package/dist/receipt-BVSOH3Xo.js.map +0 -1
- package/dist/rich-text-editor-cRLC-eBK.js.map +0 -1
- package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +0 -1
- package/dist/settings-ybnjVwbd.js +0 -171
- package/dist/settings-ybnjVwbd.js.map +0 -1
- package/dist/sheet-ijlsjq-n.js +0 -213
- package/dist/sheet-ijlsjq-n.js.map +0 -1
- package/dist/sidebar-Db6gkh3U.js +0 -619
- package/dist/sidebar-Db6gkh3U.js.map +0 -1
- package/dist/sidebar-DkTO4VTO.js +0 -512
- package/dist/sidebar-DkTO4VTO.js.map +0 -1
- package/dist/skeleton-Byjnt7qr.js +0 -264
- package/dist/skeleton-Byjnt7qr.js.map +0 -1
- package/dist/smart-card-DiC5aac3.js +0 -604
- package/dist/smart-card-DiC5aac3.js.map +0 -1
- package/dist/table-BweFy_P9.js.map +0 -1
- package/dist/tabs-CDocW5D1.js.map +0 -1
- package/dist/text-inputs-f9Ia-aCi.js.map +0 -1
- package/dist/text.styles-g4He6UIW.js.map +0 -1
- package/dist/theme-scope-BJ6eE2xt.js +0 -50
- package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
- package/dist/timelines-CwM_9IhD.js.map +0 -1
- package/dist/tooltip-yiRJUFjp.js +0 -111
- package/dist/tooltip-yiRJUFjp.js.map +0 -1
- package/dist/typography-UTnveOEy.js +0 -117
- package/dist/typography-UTnveOEy.js.map +0 -1
- package/dist/ui-provider-C_U0Xma4.js +0 -136
- package/dist/ui-provider-C_U0Xma4.js.map +0 -1
- package/dist/upload-CXyxmQBP.js.map +0 -1
- package/dist/upload-queue-Boscubn9.js.map +0 -1
- package/dist/usage-card-BhO5eqkX.js.map +0 -1
- package/dist/use-mobile-vaLKwgyf.js +0 -15
- package/dist/use-mobile-vaLKwgyf.js.map +0 -1
- package/dist/utils-BRhFDwuU.js.map +0 -1
- package/dist/value-inputs-TaX4OjNk.js +0 -963
- package/dist/value-inputs-TaX4OjNk.js.map +0 -1
- package/dist/workspace-B-OEm3Kf.js +0 -408
- package/dist/workspace-B-OEm3Kf.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai-artifact-DvTwDVyL.js","names":["_Fragment","STATUS_VARIANT","_Fragment","NumberValue","_Fragment","_Fragment","_Fragment","cn","Button","Text","DisplayLabel","TextLink","focusRecipes","Stack","toneRecipes","Card","interactionRecipes","SecondaryValue","MonoValue","Duration","Number","IconBadge","Badge","AttachmentFileIcon","AttachmentTitle","AttachmentDescription","AttachmentActions","AttachmentMedia","AttachmentContent","AttachmentProgress","Attachment","Message","CodeBlock","Fragment$1","useCopyFeedback","copied","setCopied","useState","failed","setFailed","mounted","useRef","attempt","timer","useEffect","source","request","text","error","onCopyError","defaultAiMessageBubbleStrings","AiMessageBubble","stringsProp","strings","useStrings","copyText","plainText","children","renderedAvatar","avatar","role","User","Bot","avatarLabel","showActions","onCopy","onRegenerate","authorName","className","loading","copy","Copy","RotateCcw","defaultAiToolCallStrings","STATUS_BADGE","DurationValue","label","ms","AiToolCall","IconComponent","expandedProp","internalExpanded","setInternalExpanded","defaultExpanded","expanded","setExpanded","next","onExpandedChange","labelByStatus","statusBadge","status","hasDetails","args","result","name","durationMs","jsx","ChevronDown","ChevronRight","DetailBlock","tone","AiShimmer","paused","style","duration","defaultAiCodeBlockStrings","AiCodeBlock","props","defaultAiAttachmentStrings","AiAttachment","Icon","showProgress","errored","progress","thumbnailUrl","AlertCircle","meta","onRemove","X","defaultAiAgentStrings","STATUS_VARIANT$1","AiAgent","icon","variant","live","StatusPill","subtitle","trailing","defaultAiConfirmationStrings","TONE","AiConfirmation","toneCfg","title","description","details","onReject","rejectLabel","onApprove","approveLabel","Check","defaultAiSourcesStrings","interpolate","template","v","params","k","m","AiSources","mergeStrings","titleText","sources","AvatarStrip","maxAvatars","visible","AvatarStack","SourceRow","idx","onSelect","max","overflow","visual","s","SourceFavicon","i","visitLabel","src","Globe","interactive","rowClassName","rowContent","index","ExternalLink","defaultAiReasoningStrings","renderThoughtFor","durationParts","seconds","AiReasoning","streaming","expandWhileStreaming","headerLabel","durationSeconds","Brain","defaultAiChainOfThoughtStrings","STATUS_VISUAL","Circle","Loader2","AiChainOfThought","hideHeader","steps","step","isLast","defaultAiTaskStrings","STATUS_ICON","XCircle","MinusCircle","STATUS_VARIANT","AiTask","TaskRow","task","item","hasChildren","open","setOpen","density","depth","mutedTitle","indent","child","defaultAiArtifactStrings","AiArtifact","FileText","actions","ActionIcon","action","onDownload","Download","onOpen","collapsed"],"sources":["../src/components/blocks/ai/use-copy-feedback.ts","../src/components/blocks/ai/ai-message-bubble/types.ts","../src/components/blocks/ai/ai-message-bubble/ai-message-bubble.tsx","../src/components/blocks/ai/ai-tool-call/types.ts","../src/components/blocks/ai/ai-tool-call/ai-tool-call.tsx","../src/components/blocks/ai/ai-shimmer/ai-shimmer.tsx","../src/components/blocks/ai/ai-code-block/types.ts","../src/components/blocks/ai/ai-code-block/ai-code-block.tsx","../src/components/blocks/ai/ai-attachment/types.ts","../src/components/blocks/ai/ai-attachment/ai-attachment.tsx","../src/components/blocks/ai/ai-agent/types.ts","../src/components/blocks/ai/ai-agent/ai-agent.tsx","../src/components/blocks/ai/ai-confirmation/types.ts","../src/components/blocks/ai/ai-confirmation/ai-confirmation.tsx","../src/components/blocks/ai/ai-sources/types.ts","../src/components/blocks/ai/ai-sources/ai-sources.tsx","../src/components/blocks/ai/ai-reasoning/types.ts","../src/components/blocks/ai/ai-reasoning/ai-reasoning.tsx","../src/components/blocks/ai/ai-chain-of-thought/types.ts","../src/components/blocks/ai/ai-chain-of-thought/ai-chain-of-thought.tsx","../src/components/blocks/ai/ai-task/types.ts","../src/components/blocks/ai/ai-task/ai-task.tsx","../src/components/blocks/ai/ai-artifact/types.ts","../src/components/blocks/ai/ai-artifact/ai-artifact.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\n/** Shared clipboard lifecycle for AI surfaces; callbacks and text stay per mount. */\nexport function useCopyFeedback(onCopyError?: (error: unknown) => void, source?: string) {\n\tconst [copied, setCopied] = useState(false);\n\tconst [failed, setFailed] = useState(false);\n\tconst mounted = useRef(false);\n\tconst attempt = useRef(0);\n\tconst timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n\tuseEffect(() => {\n\t\tmounted.current = true;\n\t\tsetCopied(false);\n\t\tsetFailed(false);\n\t\treturn () => {\n\t\t\tmounted.current = false;\n\t\t\tattempt.current += 1;\n\t\t\tclearTimeout(timer.current);\n\t\t};\n\t}, [source]);\n\n\tconst copy = async (text: string) => {\n\t\tconst request = ++attempt.current;\n\t\tclearTimeout(timer.current);\n\t\tsetCopied(false);\n\t\tsetFailed(false);\n\t\ttry {\n\t\t\tif (typeof navigator === 'undefined' || !navigator.clipboard?.writeText) {\n\t\t\t\tthrow new Error('Clipboard unavailable');\n\t\t\t}\n\t\t\tawait navigator.clipboard.writeText(text);\n\t\t} catch (error) {\n\t\t\tif (mounted.current && request === attempt.current) {\n\t\t\t\tsetFailed(true);\n\t\t\t\tonCopyError?.(error);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tif (!mounted.current || request !== attempt.current) return false;\n\t\tsetCopied(true);\n\t\ttimer.current = setTimeout(() => setCopied(false), 1500);\n\t\treturn true;\n\t};\n\n\treturn { copied, failed, copy };\n}\n","import type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type AiMessageRole = 'assistant' | 'user' | 'system';\n\nexport interface AiMessageBubbleStrings {\n\t/** Optional localized loading announcement. */\n\tloading?: string;\n\tcopyAria: string;\n /** Failure feedback, additive for existing string dictionaries. */\n copyError?: string;\n\tcopied: string;\n\tregenerateAria: string;\n}\n\nexport const defaultAiMessageBubbleStrings: AiMessageBubbleStrings = {\n copyError: 'Could not copy. Please try again.',\n\tcopyAria: 'Copy message',\n\tcopied: 'Copied',\n\tregenerateAria: 'Regenerate response',\n};\n\nexport interface AiMessageBubbleProps {\n\trole?: AiMessageRole;\n\t/** Leading avatar. */\n\tavatar?: ReactNode;\n\tavatarLabel?: string;\n\tauthorName?: ReactNode;\n\t/** Formatted time for the entry. */\n\ttimestamp?: ReactNode;\n\tchildren?: ReactNode;\n\t/** Plain-text version of the message content; used for the copy action. */\n\tplainText?: string;\n\tloading?: boolean;\n\t/** Fired when an entry is copied. */\n\tonCopy?: () => void;\n\tonRegenerate?: () => void;\n\t/** Merged onto the outermost node. */\n\t/** Called when the clipboard is unavailable or the write fails. */\n onCopyError?: (error: unknown) => void;\n className?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiMessageBubbleStrings>;\n}\n","import { Bot, Copy, RotateCcw, User } from 'lucide-react';\nimport { Button } from '../../../base/buttons';\nimport { IconBadge } from '../../../base/display';\nimport { Message } from '../../collaboration/message';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\nimport { useCopyFeedback } from '../use-copy-feedback';\nimport { defaultAiMessageBubbleStrings, type AiMessageBubbleProps } from './types';\n/** AI-specific copy/regenerate actions on the generic message presentation owner. */\nexport function AiMessageBubble({ role = 'assistant', avatar, avatarLabel, authorName, timestamp, children, plainText, loading = false, onCopy, onRegenerate, onCopyError, className, strings: stringsProp }: AiMessageBubbleProps) {\n const strings = useStrings(defaultAiMessageBubbleStrings, stringsProp);\n const copyText = plainText ?? (typeof children === 'string' ? children : '');\n const { copied, failed, copy } = useCopyFeedback(onCopyError, copyText);\n const Icon = role === 'user' ? User : Bot;\n // The default author mark is the shared compact avatar disc; a label names it as an image.\n const renderedAvatar = avatar ?? <IconBadge icon={Icon} tone=\"neutral\" size=\"sm\" aria-label={avatarLabel} />;\n const showActions = (onCopy !== undefined || plainText || onRegenerate) && role === 'assistant';\n return <Message align={role === 'user' ? 'end' : 'start'} tone={role === 'user' ? 'primary' : role === 'system' ? 'muted' : 'surface'} avatar={renderedAvatar} author={authorName} timestamp={timestamp} loading={loading} strings={{ loading: strings.loading }} className={cn('ai-message-bubble--component', className)} actions={showActions ? <>\n <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly aria-label={strings.copyAria} disabled={!copyText || loading} onClick={async () => { if (copyText && await copy(copyText)) onCopy?.(); }}><Copy aria-hidden=\"true\" className=\"size-icon-md\" /></Button>\n {copied && <Text size=\"xs\" type=\"success\">{strings.copied}</Text>}\n {onRegenerate && <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly aria-label={strings.regenerateAria} onClick={onRegenerate}><RotateCcw aria-hidden=\"true\" className=\"size-icon-md\" /></Button>}\n {failed && <Text role=\"alert\" size=\"xs\" type=\"error\">{strings.copyError ?? defaultAiMessageBubbleStrings.copyError}</Text>}\n </> : undefined}>{children}</Message>;\n}\nAiMessageBubble.displayName = 'AiMessageBubble';\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type AiToolCallStatus = 'pending' | 'running' | 'success' | 'error';\n\nexport interface AiToolCallStrings {\n\tpending: string;\n\trunning: string;\n\tsuccess: string;\n\terror: string;\n\texpand: string;\n\tcollapse: string;\n\targs: string;\n\tresult: string;\n\tdurationLabel: string;\n}\n\nexport const defaultAiToolCallStrings: AiToolCallStrings = {\n\tpending: 'Queued',\n\trunning: 'Running',\n\tsuccess: 'Success',\n\terror: 'Failed',\n\texpand: 'Show details',\n\tcollapse: 'Hide details',\n\targs: 'Arguments',\n\tresult: 'Result',\n\tdurationLabel: 'Took',\n};\n\nexport interface AiToolCallProps {\n\t/** Display name. */\n\tname: string;\n\tstatus: AiToolCallStatus;\n\t/** Leading glyph. */\n\ticon?: LucideIcon;\n\targs?: ReactNode;\n\tresult?: ReactNode;\n\terror?: ReactNode;\n\t/** Duration in ms; rendered as \"Took 1.2s\". */\n\tdurationMs?: number;\n\t/** Expanded state, for controlled use. */\n\texpanded?: boolean;\n\t/** Initial expanded state, for uncontrolled use. */\n\tdefaultExpanded?: boolean;\n\t/** Fired whenever the disclosure state changes. */\n\tonExpandedChange?: (expanded: boolean) => void;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiToolCallStrings>;\n}\n","/**\n * AiToolCall — collapsible trace for a model-invoked tool / function. Header\n * shows the tool name, status pill, and an expand/collapse toggle. Expanded\n * content reveals JSON-style `args` and `result` blocks (or an error block\n * when status is `error`) plus an optional duration. Use to surface tool-use\n * transparency in chat / agent UIs. Strings overridable for i18n.\n */\nimport {\n\tuseState,\n\ttype ReactNode } from 'react';\nimport { ChevronDown, ChevronRight } from 'lucide-react';\nimport { Badge } from '../../../base/badge';\nimport { Button } from '../../../base/buttons';\nimport { Card } from '../../../base/cards';\nimport { IconBadge,\n} from '../../../base/display';\nimport { Stack } from '../../../base/structure';\nimport { Duration, MonoValue, SecondaryValue } from '../../../primitives';\nimport { DisplayLabel } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport {\n\tdefaultAiToolCallStrings,\n\ttype AiToolCallProps,\n\ttype AiToolCallStatus,\n} from './types';\nimport { interactionRecipes } from '../../../../lib/interaction-recipes';\nimport { toneRecipes } from '../../../../lib/tone-recipes';\n\n// The badge text states the status; only a running call adds the shared live dot.\n// Primary is reserved for the main command, so a running call reads as info.\nconst STATUS_BADGE: Record<\n\tAiToolCallStatus,\n\t{ tone: 'secondary' | 'info' | 'success' | 'destructive'; live?: boolean }\n> = {\n\tpending: { tone: 'secondary' },\n\trunning: { tone: 'info', live: true },\n\tsuccess: { tone: 'success' },\n\terror: { tone: 'destructive' },\n};\n\nfunction DurationValue({ label, ms }: { label: string; ms: number }) {\n\treturn (\n\t\t<span className=\"inline-flex shrink-0 items-baseline gap-space-xs\">\n\t\t\t<SecondaryValue size=\"xs\">\n\t\t\t\t{label}\n\t\t\t</SecondaryValue>\n\t\t\t<Duration\n\t\t\t\tvalue={ms}\n\t\t\t\tfrom=\"milliseconds\"\n\t\t\t\tmaxParts={1}\n\t\t\t\tsize=\"xs\"\n\t\t\t\talign=\"left\"\n\t\t\t\ttype=\"secondary\"\n\t\t\t\tmaximumFractionDigits={ms < 10_000 ? 1 : 0}\n\t\t\t/>\n\t\t</span>\n\t);\n}\n\nexport function AiToolCall({\n\tname,\n\tstatus,\n\ticon: IconComponent,\n\targs,\n\tresult,\n\terror,\n\tdurationMs,\n\texpanded: expandedProp,\n\tdefaultExpanded = false,\n\tonExpandedChange,\n\tclassName,\n\tstrings: stringsProp,\n}: AiToolCallProps) {\n\tconst strings = useStrings(defaultAiToolCallStrings, stringsProp);\n\tconst [internalExpanded, setInternalExpanded] = useState(defaultExpanded);\n\tconst expanded = expandedProp ?? internalExpanded;\n\tconst setExpanded = (next: boolean) => {\n\t\tif (expandedProp === undefined) setInternalExpanded(next);\n\t\tonExpandedChange?.(next);\n\t};\n\tconst labelByStatus: Record<AiToolCallStatus, string> = {\n\t\tpending: strings.pending,\n\t\trunning: strings.running,\n\t\tsuccess: strings.success,\n\t\terror: strings.error,\n\t};\n\tconst statusBadge = STATUS_BADGE[status];\n\n\tconst hasDetails = Boolean(args || result || error);\n\n\treturn (\n\t\t// The public Card owns the frame and its `@container/card` query root; the\n\t\t// trigger and details own their insets. An error swaps the frame to the\n\t\t// destructive edge and wash.\n\t\t<Card\n\t\t\tsurface=\"card\"\n\t\t\tpadding=\"none\"\n\t\t\tclassName={cn('ai-tool-call--component',\n\t\t\t\tstatus === 'error' && cn(toneRecipes.destructive.edge, toneRecipes.destructive.wash),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<Button\n\t\t\t\ttype=\"button\"\n\t\t\t\ttone=\"secondary\"\n\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\tsize=\"md\"\n\t\t\t\tonClick={() => hasDetails && setExpanded(!expanded)}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'ai-tool-call--trigger h-auto min-h-0 w-full flex-wrap justify-start gap-space-md whitespace-normal rounded-none px-space-lg py-space-md text-left @md/card:flex-nowrap',\n\t\t\t\t\thasDetails ? `cursor-pointer ${interactionRecipes.rowHover}` : 'cursor-default',\n\t\t\t\t)}\n\t\t\t\taria-expanded={hasDetails ? expanded : undefined}\n\t\t\t\taria-label={hasDetails ? (expanded ? strings.collapse : strings.expand) : undefined}\n\t\t\t>\n\t\t\t\t{/* No default glyph: the monospace tool name identifies the call. */}\n\t\t\t\t{!!IconComponent && <IconBadge icon={IconComponent} tone=\"neutral\" size=\"md\" shape=\"square\" />}\n\t\t\t\t<div className=\"min-w-0 flex-1\">\n\t\t\t\t\t<MonoValue type=\"inherit\" className=\"truncate\">\n\t\t\t\t\t\t{name}\n\t\t\t\t\t</MonoValue>\n\t\t\t\t</div>\n\t\t\t\t<span className=\"ai-tool-call--meta order-last flex w-full flex-wrap items-center gap-space-sm @md/card:order-none @md/card:w-auto @md/card:flex-nowrap\">\n\t\t\t\t\t<Badge tone={statusBadge.tone} dot={statusBadge.live} pulse={statusBadge.live}>\n\t\t\t\t\t\t{labelByStatus[status]}\n\t\t\t\t\t</Badge>\n\t\t\t\t\t{!!durationMs && (\n\t\t\t\t\t\t<DurationValue label={strings.durationLabel} ms={durationMs} />\n\t\t\t\t\t)}\n\t\t\t\t</span>\n\t\t\t\t{hasDetails &&\n\t\t\t\t\t(expanded ? (\n\t\t\t\t\t\t<ChevronDown className=\"size-icon-md shrink-0 text-muted-foreground\" />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<ChevronRight className=\"size-icon-md shrink-0 text-muted-foreground\" />\n\t\t\t\t\t))}\n\t\t\t</Button>\n\n\t\t\t{!!expanded && hasDetails && (\n\t\t\t\t<Stack gap=\"md\" className=\"ai-tool-call--details border-t border-border/60 bg-muted/30 px-space-lg py-space-md\">\n\t\t\t\t\t{!!args && (\n\t\t\t\t\t\t<DetailBlock label={strings.args}>{args}</DetailBlock>\n\t\t\t\t\t)}\n\t\t\t\t\t{status === 'error' && !!error ? (\n\t\t\t\t\t\t<DetailBlock label={strings.error} tone=\"destructive\">\n\t\t\t\t\t\t\t{error}\n\t\t\t\t\t\t</DetailBlock>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t!!result && <DetailBlock label={strings.result}>{result}</DetailBlock>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t)}\n\t\t</Card>\n\t);\n}\n\nAiToolCall.displayName = 'AiToolCall';\n\nfunction DetailBlock({\n\tlabel,\n\tchildren,\n\ttone = 'neutral',\n}: {\n\t/** Display label. */\n\tlabel: string;\n\tchildren: ReactNode;\n\ttone?: 'neutral' | 'destructive';\n}) {\n\treturn (\n\t\t<Stack gap=\"sm\" className=\"ai-tool-call--detail-block\">\n\t\t\t<DisplayLabel>\n\t\t\t\t{label}\n\t\t\t</DisplayLabel>\n\t\t\t<pre\n\t\t\t\ttabIndex={0}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'box-border m-0 max-w-full overflow-x-auto rounded-inner bg-card text-card-foreground px-space-md py-space-md font-mono text-xs leading-relaxed',\n\t\t\t\t\ttone === 'destructive' && cn(toneRecipes.destructive.ink, toneRecipes.destructive.wash),\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</pre>\n\t\t</Stack>\n\t);\n}\n","/**\n * AiShimmer — gradient text shimmer for streaming / loading copy. Renders\n * children with a moving highlight band that draws the eye while a model is\n * thinking. Use anywhere a static \"Loading…\" feels too inert: agent typing,\n * tool warm-up, awaiting first token.\n */\nimport type { CSSProperties } from 'react';\nimport { Text } from '../../../typography';\nimport { cn } from '../../../../lib/utils';\n\nimport type { AiShimmerProps } from './types';\n\nexport function AiShimmer({\n\tchildren = 'Thinking…',\n\tpaused = false,\n\tduration = 2.4,\n\tsize,\n\tclassName,\n}: AiShimmerProps) {\n\tif (paused) {\n\t\treturn (\n\t\t\t<Text tag=\"span\" type=\"secondary\" size={size} weight=\"medium\" className={cn('ai-shimmer--component', className)}>\n\t\t\t\t{children}\n\t\t\t</Text>\n\t\t);\n\t}\n\n\t// `CSSProperties` has no index signature for custom properties, which is the\n\t// only reason this needed a cast. Widening the annotation states the intent\n\t// — one known custom property — instead of switching the key off.\n\tconst style: CSSProperties & Record<'--ai-shimmer-duration', string> = {\n\t\t'--ai-shimmer-duration': `${duration}s`,\n\t};\n\n\treturn (\n\t\t<Text\n\t\t\ttag=\"span\"\n\t\t\tsize={size}\n\t\t\tweight=\"medium\"\n\t\t\tdata-ai-shimmer\n\t\t\trole=\"status\"\n\t\t\taria-live=\"polite\"\n\t\t\tclassName={cn(\n\t\t\t\t'ai-shimmer--component inline-block bg-clip-text text-transparent',\n\t\t\t\t// foreground -> muted -> foreground gradient swept across\n\t\t\t\t'bg-[linear-gradient(110deg,var(--ai-shimmer-base,var(--muted-foreground))_30%,var(--ai-shimmer-highlight,var(--foreground))_50%,var(--ai-shimmer-base,var(--muted-foreground))_70%)]',\n\t\t\t\t'bg-[length:200%_100%]',\n\t\t\t\t'animate-[ai-shimmer-sweep_var(--ai-shimmer-duration,2.4s)_linear_infinite] motion-reduce:animate-none',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={style}\n\t\t>\n\t\t\t{children}\n\t\t</Text>\n\t);\n}\n\nAiShimmer.displayName = 'AiShimmer';\n","import type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport interface AiCodeBlockStrings {\n\tcopy: string;\n\tcopied: string;\n\tcopyAria: string;\n /** Failure feedback, additive for existing string dictionaries. */\n copyError?: string;\n\t/** Header label when no language is provided. */\n\tdefaultLanguageLabel: string;\n}\n\nexport const defaultAiCodeBlockStrings: AiCodeBlockStrings = {\n\tcopy: 'Copy',\n\tcopied: 'Copied',\n copyError: 'Could not copy. Please try again.',\n\tcopyAria: 'Copy code',\n\tdefaultLanguageLabel: 'Code',\n};\n\nexport interface AiCodeBlockProps {\n\t/** The code to render. Pre-formatted text. */\n\tcode: string;\n\t/** Display label for the language (e.g. \"TypeScript\", \"shell\"). */\n\tlanguage?: string;\n\t/** Optional filename rendered in the header next to the language label. */\n\tfilename?: string;\n\t/** Render with line numbers. */\n\tshowLineNumbers?: boolean;\n\t/** Highlight specific 1-indexed line numbers. */\n\thighlightLines?: ReadonlyArray<number>;\n\t/** Hide the header strip entirely. */\n\thideHeader?: boolean;\n\t/** Force max-height before scroll. */\n\tmaxHeight?: number | string;\n\t/** Trailing slot inside the header (e.g. extra action button). */\n\theaderActions?: ReactNode;\n\t/** Fired when the user copies (after the navigator.clipboard write). */\n\tonCopy?: () => void;\n\t/** Merged onto the outermost node. */\n\t/** Called when the clipboard is unavailable or the write fails. */\n onCopyError?: (error: unknown) => void;\n className?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiCodeBlockStrings>;\n}\n","import { CodeBlock } from '../../../base/code-block';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\nimport { defaultAiCodeBlockStrings, type AiCodeBlockProps } from './types';\n/** Compatibility adapter; the generic code display owns layout and copying. */\nexport function AiCodeBlock({ strings: stringsProp, className, onCopy, ...props }: AiCodeBlockProps) {\n const strings = useStrings(defaultAiCodeBlockStrings, stringsProp);\n return <CodeBlock {...props} className={cn('ai-code-block--component', className)} onCopy={onCopy ? () => onCopy() : undefined} strings={{ copyAria: strings.copyAria, copied: strings.copied, copyError: strings.copyError, defaultLanguageLabel: strings.defaultLanguageLabel }} />;\n}\nAiCodeBlock.displayName = 'AiCodeBlock';\n","import type { LucideIcon } from 'lucide-react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type AiAttachmentKind = 'image' | 'document' | 'audio' | 'video' | 'code' | 'archive' | 'generic';\n\nexport interface AiAttachmentStrings {\n\tremoveAria: string;\n\topenAria: string;\n\tuploadProgressAria: string;\n\t/** Text feedback when the attachment cannot be used. */\n\terror?: string;\n}\n\nexport const defaultAiAttachmentStrings: AiAttachmentStrings = {\n\tremoveAria: 'Remove attachment',\n\topenAria: 'Open attachment',\n\tuploadProgressAria: 'Upload progress',\n\terror: 'Failed',\n};\n\nexport interface AiAttachmentProps {\n\t/** Filename / display label. */\n\tname: string;\n\t/** Optional secondary label — formatted size, file extension, etc. */\n\tmeta?: string;\n\t/** Pre-categorized kind. Defaults to \"generic\" — drives the fallback icon. */\n\tkind?: AiAttachmentKind;\n\t/** Override the auto-picked kind icon. */\n\ticon?: LucideIcon;\n\t/** When set, renders the chip as a thumbnail tile with this image. */\n\tthumbnailUrl?: string;\n\t/** Show a small loading bar (in-flight upload). */\n\tprogress?: number; // 0..1\n\t/** Show as errored — overrides progress. */\n\terrored?: boolean;\n\t/** Open / download callback (clicking the chip body). */\n\tonOpen?: () => void;\n\t/** Render a remove (×) action. */\n\tonRemove?: () => void;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiAttachmentStrings>;\n}\n","/** Compatibility presentation for staged AI files; Attachment owns the file anatomy. */\nimport { AlertCircle, X } from 'lucide-react';\nimport { Attachment, AttachmentMedia, AttachmentContent, AttachmentTitle, AttachmentDescription, AttachmentActions, AttachmentProgress, AttachmentFileIcon } from '../../../base/attachment';\nimport { Button } from '../../../base/buttons';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\nimport { defaultAiAttachmentStrings, type AiAttachmentProps } from './types';\n\nexport function AiAttachment({ name, meta, kind = 'generic', icon: Icon, thumbnailUrl, progress, errored = false, onOpen, onRemove, className, strings: stringsProp }: AiAttachmentProps) {\n const strings = useStrings(defaultAiAttachmentStrings, stringsProp);\n const showProgress = !errored && typeof progress === 'number' && progress >= 0 && progress < 1;\n return <Attachment name={name} layout=\"compact\" status={errored ? 'error' : showProgress ? 'uploading' : undefined} onOpen={onOpen} strings={{ preview: () => strings.openAria }} className={cn('ai-attachment--component inline-flex w-auto', className)}>\n <AttachmentMedia variant={thumbnailUrl ? 'image' : 'icon'}>\n {thumbnailUrl ? <img src={thumbnailUrl} alt=\"\" /> : errored ? <AlertCircle aria-hidden=\"true\" /> : Icon ? <Icon aria-hidden=\"true\" /> : <AttachmentFileIcon name={name} kind={kind} />}\n </AttachmentMedia>\n <AttachmentContent>\n <AttachmentTitle title={name}>{name}</AttachmentTitle>\n {meta && <AttachmentDescription clamp={1}>{meta}</AttachmentDescription>}\n {errored && <AttachmentDescription clamp=\"none\"><Text tag=\"span\" size=\"xs\" type=\"error\" role=\"alert\">{strings.error ?? defaultAiAttachmentStrings.error}</Text></AttachmentDescription>}\n {showProgress && <AttachmentProgress value={Math.round((progress ?? 0) * 100)} size=\"sm\" aria-label={strings.uploadProgressAria} />}\n </AttachmentContent>\n {onRemove && <AttachmentActions><Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly aria-label={strings.removeAria} onClick={onRemove}><X aria-hidden=\"true\" className=\"size-icon-sm\" /></Button></AttachmentActions>}\n </Attachment>;\n}\nAiAttachment.displayName = 'AiAttachment';\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type AiAgentStatus = 'idle' | 'thinking' | 'working' | 'done' | 'error' | 'offline';\n\nexport interface AiAgentStrings {\n\tstatusLabels: Record<AiAgentStatus, string>;\n}\n\nexport const defaultAiAgentStrings: AiAgentStrings = {\n\tstatusLabels: {\n\t\tidle: 'Idle',\n\t\tthinking: 'Thinking',\n\t\tworking: 'Working',\n\t\tdone: 'Done',\n\t\terror: 'Error',\n\t\toffline: 'Offline',\n\t},\n};\n\nexport interface AiAgentProps {\n\t/** Display name (e.g. \"Atlas\", \"Claude\"). */\n\tname: string;\n\t/** Avatar / mark — typically an icon or short emoji. */\n\ticon?: LucideIcon;\n\t/** Override avatar with arbitrary content (image, gradient mark, etc.). */\n\tavatar?: ReactNode;\n\t/** Short blurb / model identifier rendered under the name. */\n\tsubtitle?: ReactNode;\n\t/** Tone color for the avatar wash. */\n\ttone?: 'primary' | 'success' | 'warning' | 'destructive' | 'info' | 'neutral';\n\t/** Live status displayed as a pill next to the name. */\n\tstatus?: AiAgentStatus;\n\t/** Density variant — `inline` is a single-line chip, `card` is a tile. */\n\tvariant?: 'inline' | 'card';\n\t/** Trailing slot — typically actions, badges. */\n\ttrailing?: ReactNode;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiAgentStrings>;\n}\n","/**\n * AiAgent — identity card for an AI persona / model. Renders avatar (icon\n * or custom), name, optional subtitle (model id, role), and a live status\n * pill. `variant='inline'` is a one-line chip (header strips, breadcrumbs);\n * `variant='card'` is a small tile (model picker, agent dock).\n */\nimport { Bot, type LucideIcon } from 'lucide-react';\nimport { Badge } from '../../../base/badge';\nimport { Card } from '../../../base/cards';\nimport { IconBadge } from '../../../base/display';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { Stack } from '../../../base/structure';\nimport { cn } from '../../../../lib/utils';\n\nimport {\n\tdefaultAiAgentStrings,\n\ttype AiAgentProps,\n\ttype AiAgentStatus,\n} from './types';\n\n// Live states use the info status tone; primary is reserved for the main command.\nconst STATUS_VARIANT: Record<\n\tAiAgentStatus,\n\t'secondary' | 'info' | 'success' | 'warning' | 'destructive'\n> = {\n\tidle: 'secondary',\n\tthinking: 'info',\n\tworking: 'info',\n\tdone: 'success',\n\terror: 'destructive',\n\toffline: 'secondary',\n};\n\nexport function AiAgent({\n\tname,\n\ticon,\n\tavatar,\n\tsubtitle,\n\ttone = 'primary',\n\tstatus,\n\tvariant = 'inline',\n\ttrailing,\n\tclassName,\n\tstrings: stringsProp,\n}: AiAgentProps) {\n\tconst strings = useStrings(defaultAiAgentStrings, stringsProp);\n\tconst Icon: LucideIcon = icon ?? Bot;\n\n\t// The tile takes the default avatar disc; the one-line chip takes the compact one.\n\tconst renderedAvatar =\n\t\tavatar ?? <IconBadge icon={Icon} tone={tone} size={variant === 'card' ? 'md' : 'sm'} />;\n\n\t// Live states pulse the Badge's own status dot.\n\tconst live = status === 'thinking' || status === 'working';\n\tconst StatusPill = !!status && (\n\t\t<Badge tone={STATUS_VARIANT[status]} dot pulse={live}>\n\t\t\t{strings.statusLabels[status]}\n\t\t</Badge>\n\t);\n\n\tif (variant === 'card') {\n\t\t// The public Card owns the tile's frame and compact inset.\n\t\treturn (\n\t\t\t<Card surface=\"card\" padding=\"sm\" className={cn('ai-agent--component', className)}>\n\t\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"lg\">\n\t\t\t\t{renderedAvatar}\n\t\t\t\t\t<Stack gap=\"dense\" className=\"min-w-0 flex-1\">\n\t\t\t\t\t<div className=\"flex items-center gap-space-md\">\n\t\t\t\t\t\t<Text type=\"inherit\" weight=\"semibold\" className=\"truncate\">\n\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t{StatusPill}\n\t\t\t\t\t</div>\n\t\t\t\t\t{!!subtitle && (\n\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"line-clamp-1\">\n\t\t\t\t\t\t\t{subtitle}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t\t</Stack>\n\t\t\t\t{!!trailing && <div className=\"ml-auto flex items-center gap-space-xs\">{trailing}</div>}\n\t\t\t</Stack>\n\t\t\t</Card>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className={cn('ai-agent--component', 'inline-flex items-center gap-space-md', className)}>\n\t\t\t{renderedAvatar}\n\t\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"md\" className=\"min-w-0\">\n\t\t\t\t<Text type=\"inherit\" weight=\"medium\" className=\"truncate\">\n\t\t\t\t\t{name}\n\t\t\t\t</Text>\n\t\t\t\t{!!subtitle && (\n\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"truncate\">\n\t\t\t\t\t\t{subtitle}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t\t{StatusPill}\n\t\t\t</Stack>\n\t\t\t{!!trailing && <div className=\"ml-1 flex items-center gap-space-xs\">{trailing}</div>}\n\t\t</div>\n\t);\n}\n\nAiAgent.displayName = 'AiAgent';\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\nimport type { SemanticTone } from '../../../../lib/component-vocabulary';\n\nexport type AiConfirmationTone = Extract<\n\tSemanticTone,\n\t'neutral' | 'destructive' | 'warning' | 'info' | 'primary'\n>;\n\nexport interface AiConfirmationStrings {\n\tapprove: string;\n\treject: string;\n\tpending: string;\n\tapproved: string;\n\trejected: string;\n}\n\nexport const defaultAiConfirmationStrings: AiConfirmationStrings = {\n\tapprove: 'Approve',\n\treject: 'Reject',\n\tpending: 'Awaiting your approval',\n\tapproved: 'Approved',\n\trejected: 'Rejected',\n};\n\nexport type AiConfirmationStatus = 'pending' | 'approved' | 'rejected';\n\nexport interface AiConfirmationProps {\n\t/** Title — short, action-oriented (e.g. \"Run npm install\"). */\n\ttitle: ReactNode;\n\t/** Body description / details. */\n\tdescription?: ReactNode;\n\t/** Decorative icon. */\n\ticon?: LucideIcon;\n\t/** Semantic color intent. */\n\ttone?: AiConfirmationTone;\n\t/** Current status — when set, the action row is replaced with a result pill. */\n\tstatus?: AiConfirmationStatus;\n\t/** Approve callback. */\n\tonApprove?: () => void;\n\t/** Reject callback. */\n\tonReject?: () => void;\n\t/** Override the approve button label. */\n\tapproveLabel?: ReactNode;\n\t/** Override the reject button label. */\n\trejectLabel?: ReactNode;\n\t/** Render a \"details\" expandable area. */\n\tdetails?: ReactNode;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiConfirmationStrings>;\n}\n","/**\n * AiConfirmation — inline approval prompt rendered in-stream when an agent\n * needs user permission before taking a side-effecting action (run command,\n * call write API, charge a card). Carries title, description, icon, optional\n * details, and an approve/reject pair. After resolution, the action row\n * collapses into a status pill.\n */\nimport { Check, X } from 'lucide-react';\nimport { Button } from '../../../base/buttons';\nimport { Card } from '../../../base/cards';\nimport { IconBadge,\n} from '../../../base/display';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { Stack } from '../../../base/structure';\nimport { cn } from '../../../../lib/utils';\n\nimport {\n\tdefaultAiConfirmationStrings,\n\ttype AiConfirmationProps,\n\ttype AiConfirmationTone,\n} from './types';\nimport { toneRecipes } from '../../../../lib/tone-recipes';\n\n// Neutral keeps the Card's own frame; a risk tone swaps it for that tone's edge and wash.\nconst TONE: Record<\n\tAiConfirmationTone,\n\t{ ring?: string; icon: 'neutral' | 'primary' | 'success' | 'warning' | 'destructive' | 'info' }\n> = {\n\tneutral: { icon: 'neutral' },\n\tdestructive: { ring: `${toneRecipes.destructive.edge} ${toneRecipes.destructive.wash}`, icon: 'destructive' },\n\twarning: { ring: `${toneRecipes.warning.edge} ${toneRecipes.warning.wash}`, icon: 'warning' },\n\tinfo: { ring: `${toneRecipes.info.edge} ${toneRecipes.info.wash}`, icon: 'info' },\n\tprimary: { ring: `${toneRecipes.primary.edge} ${toneRecipes.primary.wash}`, icon: 'primary' },\n};\n\nexport function AiConfirmation({\n\ttitle,\n\tdescription,\n\ticon,\n\ttone = 'neutral',\n\tstatus = 'pending',\n\tonApprove,\n\tonReject,\n\tapproveLabel,\n\trejectLabel,\n\tdetails,\n\tclassName,\n\tstrings: stringsProp,\n}: AiConfirmationProps) {\n\tconst strings = useStrings(defaultAiConfirmationStrings, stringsProp);\n\t// No default glyph: the title states the action and the tone states the risk.\n\tconst Icon = icon;\n\tconst toneCfg = TONE[tone];\n\n\t// The public Card owns the frame, its compact inset and the `@container/card`\n\t// query root. Header, details and the action row are spaced by the Stack gaps.\n\treturn (\n\t\t<Card\n\t\t\trole=\"region\"\n\t\t\taria-live=\"polite\"\n\t\t\tsurface=\"card\"\n\t\t\tpadding=\"sm\"\n\t\t\tclassName={cn('ai-confirmation--component', toneCfg.ring, className)}\n\t\t>\n\t\t\t<Stack gap=\"lg\">\n\t\t\t<div className=\"ai-confirmation--header flex items-start gap-space-lg\">\n\t\t\t\t{!!Icon && <IconBadge icon={Icon} tone={toneCfg.icon} size=\"md\" shape=\"square\" />}\n\t\t\t\t<Stack gap=\"md\" className=\"min-w-0 flex-1\">\n\t\t\t\t\t<Stack gap=\"normal\">\n\t\t\t\t\t<Text type=\"inherit\" weight=\"semibold\">{title}</Text>\n\t\t\t\t\t{!!description && (\n\t\t\t\t\t\t<Text type=\"secondary\">\n\t\t\t\t\t\t\t{description}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t\t</Stack>\n\t\t\t\t\t{!!details && <div className=\"ai-confirmation--details min-w-0\">{details}</div>}\n\t\t\t\t</Stack>\n\t\t\t</div>\n\n\t\t\t{status === 'pending' ? (\n\t\t\t\t<div className=\"ai-confirmation--footer flex flex-col items-stretch gap-space-md @sm/card:flex-row @sm/card:items-center @sm/card:justify-between\">\n\t\t\t\t\t<Text size=\"xs\" type=\"secondary\">\n\t\t\t\t\t\t{strings.pending}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Stack direction=\"horizontal\" align=\"center\" justify=\"end\" gap=\"md\" className=\"ai-confirmation--actions\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\tonClick={onReject}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{rejectLabel ?? strings.reject}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone={tone === 'destructive' ? 'destructive' : 'primary'}\n\t\t\t\t\t\t\tonClick={onApprove}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{approveLabel ?? strings.approve}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</Stack>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<div className=\"ai-confirmation--footer flex items-center gap-space-md\">\n\t\t\t\t\t{status === 'approved' ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Check aria-hidden=\"true\" className=\"size-icon-md text-success\" />\n\t\t\t\t\t\t\t<Text size=\"xs\" type=\"success\" weight=\"medium\">\n\t\t\t\t\t\t\t\t{strings.approved}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<X aria-hidden=\"true\" className=\"size-icon-md text-muted-foreground\" />\n\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" weight=\"medium\">\n\t\t\t\t\t\t\t\t{strings.rejected}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t</Stack>\n\t\t</Card>\n\t);\n}\n\nAiConfirmation.displayName = 'AiConfirmation';\n","import type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport interface AiSourceItem {\n\t/** Stable identity for this entry. */\n\tid: string;\n\t/** Surface title. */\n\ttitle: ReactNode;\n\turl?: string;\n\t/** Hostname / publisher / \"doc-section\" — rendered under the title. */\n\tpublisher?: string;\n\t/** Favicon / logo URL — rendered as a small avatar; falls back to a globe. */\n\tfaviconUrl?: string;\n\t/** Optional short snippet shown only in the expanded variant. */\n\tsnippet?: ReactNode;\n}\n\nexport interface AiSourcesStrings {\n\t/** Header title — `{{count}}` placeholder for the source count. */\n\ttitle: string;\n\texpand: string;\n\tcollapse: string;\n\tvisit: string;\n}\n\nexport const defaultAiSourcesStrings: AiSourcesStrings = {\n\ttitle: '{{count}} sources',\n\texpand: 'Show all sources',\n\tcollapse: 'Hide sources',\n\tvisit: 'Visit source',\n};\n\nexport type AiSourcesVariant = 'list' | 'avatars';\n\nexport interface AiSourcesProps {\n\t/** Source list. Order is significant — index drives the displayed number. */\n\tsources: ReadonlyArray<AiSourceItem>;\n\t/** `list` is a vertical row layout; `avatars` is a stacked-favicons strip. */\n\tvariant?: AiSourcesVariant;\n\t/** Number of sources rendered in the avatar strip before the \"+N\" overflow. */\n\tmaxAvatars?: number;\n\t/** Expanded state, for controlled use in the list variant. */\n\texpanded?: boolean;\n\t/** Render the list expanded by default (only applies to `list` variant). */\n\tdefaultExpanded?: boolean;\n\t/** Fired whenever the disclosure state changes. */\n\tonExpandedChange?: (expanded: boolean) => void;\n\t/** Click handler — preferred over `url` for SPA routing. */\n\tonSelect?: (source: AiSourceItem, index: number) => void;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiSourcesStrings>;\n}\n","/**\n * AiSources — light-weight source list rendered under streamed content. Two\n * shapes: `list` is a vertical stack of source rows (favicon + title + host);\n * `avatars` is a compact stacked-favicon strip used when space is tight (chat\n * footer, side panel header). For richer \"expandable\" footnote-style sources\n * with relevance bars and snippets, see `<AiCitation>`.\n */\nimport { useEffect, useState } from 'react';\nimport { ChevronDown, ChevronRight, ExternalLink, Globe } from 'lucide-react';\nimport { Button } from '../../../base/buttons';\nimport { Card } from '../../../base/cards';\nimport { Stack } from '../../../base/structure';\nimport { Number as NumberValue, SecondaryValue } from '../../../primitives';\nimport { Text, TextLink } from '../../../typography';\nimport { mergeStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport { defaultAiSourcesStrings, type AiSourceItem, type AiSourcesProps } from './types';\nimport { focusRecipes } from '../../../../lib/focus-recipes';\nimport { interactionRecipes } from '../../../../lib/interaction-recipes';\nimport { IconBadge } from '../../../base/display';\n\nfunction interpolate(template: string, params: Record<string, string | number>): string {\n\treturn template.replace(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (m, k) => {\n\t\tconst v = params[k];\n\t\treturn v === undefined ? m : String(v);\n\t});\n}\n\nexport function AiSources({\n\tsources,\n\tvariant = 'list',\n\tmaxAvatars = 5,\n\texpanded: expandedProp,\n\tdefaultExpanded = false,\n\tonExpandedChange,\n\tonSelect,\n\tclassName,\n\tstrings: stringsProp,\n}: AiSourcesProps) {\n\tconst strings = mergeStrings(defaultAiSourcesStrings, stringsProp);\n\tconst [internalExpanded, setInternalExpanded] = useState(defaultExpanded);\n\tconst expanded = expandedProp ?? internalExpanded;\n\tconst setExpanded = (next: boolean) => {\n\t\tif (expandedProp === undefined) setInternalExpanded(next);\n\t\tonExpandedChange?.(next);\n\t};\n\tconst titleText = interpolate(strings.title, { count: sources.length });\n\n\tif (variant === 'avatars') {\n\t\treturn (\n\t\t\t<AvatarStrip\n\t\t\t\tsources={sources}\n\t\t\t\tmax={maxAvatars}\n\t\t\t\ttitle={titleText}\n\t\t\t\tvisitLabel={strings.visit}\n\t\t\t\tonSelect={onSelect}\n\t\t\t\tclassName={cn('ai-sources--component', className)}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst visible = expanded ? sources : sources.slice(0, 0);\n\n\t// The public Card owns the frame; the trigger and list own their compact insets.\n\treturn (\n\t\t<Card surface=\"card\" padding=\"none\" className={cn('ai-sources--component', className)}>\n\t\t\t<Button\n\t\t\t\ttype=\"button\"\n\t\t\t\ttone=\"secondary\"\n\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\tsize=\"md\"\n\t\t\t\tonClick={() => setExpanded(!expanded)}\n\t\t\t\taria-expanded={expanded}\n\t\t\t\taria-label={expanded ? strings.collapse : strings.expand}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'ai-sources--trigger h-auto min-h-0 w-full justify-start gap-space-md px-surface-xs py-row-y text-left',\n\t\t\t\t\t`rounded-inner ${interactionRecipes.rowHover}`,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<AvatarStack sources={sources.slice(0, 4)} />\n\t\t\t\t<Text type=\"inherit\" weight=\"medium\" className=\"flex-1\">\n\t\t\t\t\t{titleText}\n\t\t\t\t</Text>\n\t\t\t\t{expanded ? (\n\t\t\t\t\t<ChevronDown className=\"size-icon-md text-muted-foreground\" />\n\t\t\t\t) : (\n\t\t\t\t\t<ChevronRight className=\"size-icon-md text-muted-foreground\" />\n\t\t\t\t)}\n\t\t\t</Button>\n\n\t\t\t{expanded && (\n\t\t\t\t<div className=\"ai-sources--list border-t border-border/60 px-surface-xs py-row-y\">\n\t\t\t\t\t<Stack render={<ol />} gap=\"2xs\" className=\"m-0 list-none p-0 font-sans\">\n\t\t\t\t\t\t{visible.map((source, idx) => (\n\t\t\t\t\t\t\t<SourceRow\n\t\t\t\t\t\t\t\tkey={source.id}\n\t\t\t\t\t\t\t\tsource={source}\n\t\t\t\t\t\t\t\tindex={idx + 1}\n\t\t\t\t\t\t\t\tonSelect={onSelect ? () => onSelect(source, idx) : undefined}\n\t\t\t\t\t\t\t\tvisitLabel={strings.visit}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</Stack>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</Card>\n\t);\n}\n\nAiSources.displayName = 'AiSources';\n\nfunction AvatarStrip({\n\tsources,\n\tmax,\n\ttitle,\n\tvisitLabel,\n\tonSelect,\n\tclassName,\n}: {\n\tsources: ReadonlyArray<AiSourceItem>;\n\tmax: number;\n\ttitle: string;\n\tvisitLabel: string;\n\tonSelect?: (source: AiSourceItem, index: number) => void;\n\tclassName?: string;\n}) {\n\tconst visible = sources.slice(0, max);\n\tconst overflow = sources.length - visible.length;\n\treturn (\n\t\t<div className={cn('inline-flex items-center gap-space-md', className)}>\n\t\t\t<AvatarStack sources={visible} onSelect={onSelect} visitLabel={visitLabel} />\n\t\t\t<Text size=\"xs\" type=\"secondary\">\n\t\t\t\t{title}\n\t\t\t</Text>\n\t\t\t{overflow > 0 && (\n\t\t\t\t<SecondaryValue size=\"xs\" className=\"tabular-nums\">\n\t\t\t\t\t+\n\t\t\t\t\t<NumberValue value={overflow} size=\"xs\" type=\"secondary\" align=\"left\" />\n\t\t\t\t</SecondaryValue>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nfunction AvatarStack({\n\tsources,\n\tonSelect,\n\tvisitLabel,\n}: {\n\tsources: ReadonlyArray<AiSourceItem>;\n\tonSelect?: (source: AiSourceItem, index: number) => void;\n\tvisitLabel?: string;\n}) {\n\treturn (\n\t\t<div className={cn('flex', onSelect ? 'gap-space-2xs' : '-space-x-space-sm')}>\n\t\t\t{sources.map((s, i) => {\n\t\t\t\tconst visual = (\n\t\t\t\t\t<span\n\t\t\t\t\t\tkey={s.id}\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\ttitle={typeof s.title === 'string' ? s.title : undefined}\n\t\t\t\t\t\tclassName=\"inline-flex size-icon-lg items-center justify-center overflow-hidden rounded-full border border-card bg-muted text-muted-foreground ring-1 ring-border/60\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<SourceFavicon src={s.faviconUrl} />\n\t\t\t\t\t</span>\n\t\t\t\t);\n\t\t\t\tif (onSelect) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tkey={s.id}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tonClick={() => onSelect(s, i)}\n\t\t\t\t\t\t\taria-label={typeof s.title === 'string' ? `${visitLabel}: ${s.title}` : visitLabel}\n\t\t\t\t\t\t\tclassName={`${interactionRecipes.nativeButtonReset} inline-flex size-action-xs shrink-0 items-center justify-center rounded-inner focus-visible:outline-none ${focusRecipes.edge}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{visual}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn visual;\n\t\t\t})}\n\t\t</div>\n\t);\n}\n\nfunction SourceFavicon({ src }: { src?: string }) {\n\tconst [failed, setFailed] = useState(false);\n\n\tuseEffect(() => {\n\t\tsetFailed(false);\n\t}, [src]);\n\n\tif (!src || failed) {\n\t\treturn <Globe className=\"size-icon-sm\" />;\n\t}\n\n\treturn <img src={src} alt=\"\" className=\"size-full object-cover\" onError={() => setFailed(true)} />;\n}\n\nfunction SourceRow({\n\tsource,\n\tindex,\n\tonSelect,\n\tvisitLabel,\n}: {\n\tsource: AiSourceItem;\n\tindex: number;\n\tonSelect?: () => void;\n\tvisitLabel: string;\n}) {\n\tconst interactive = Boolean(source.url || onSelect);\n\tconst rowClassName = cn(\n\t\tinteractionRecipes.nativeButtonReset,\n\t\t'group flex w-full items-start gap-space-lg rounded-inner px-row-x py-row-y-sm text-left text-foreground',\n\t\tinteractive && `${interactionRecipes.rowHover} focus-visible:outline-none ${focusRecipes.edge}`,\n\t);\n\tconst rowContent = (\n\t\t<>\n\t\t\t{/* The source number stays readable: it is how a citation names its source. */}\n\t\t\t<IconBadge tone=\"neutral\" size=\"sm\" aria-hidden={false} className=\"shrink-0\">\n\t\t\t\t<NumberValue value={index} size=\"xs\" weight=\"semibold\" type=\"secondary\" align=\"center\" />\n\t\t\t</IconBadge>\n\t\t\t<Stack gap=\"dense\" className=\"min-w-0 flex-1\">\n\t\t\t\t<Text type=\"inherit\" weight=\"medium\" className=\"truncate\">\n\t\t\t\t\t{source.title}\n\t\t\t\t\t{!!source.url && (\n\t\t\t\t\t\t<ExternalLink className=\"ml-1 inline size-icon-sm text-muted-foreground align-baseline\" />\n\t\t\t\t\t)}\n\t\t\t\t</Text>\n\t\t\t\t{!!source.publisher && (\n\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"truncate\">\n\t\t\t\t\t\t{source.publisher}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t\t{!!source.snippet && (\n\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"line-clamp-2\">\n\t\t\t\t\t\t{source.snippet}\n\t\t\t\t\t</Text>\n\t\t\t\t)}\n\t\t\t</Stack>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<li>\n\t\t\t{source.url && !onSelect ? (\n\t\t\t\t<TextLink\n\t\t\t\t\thref={source.url}\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\tsize=\"inherit\"\n\t\t\t\t\tunderline={false}\n\t\t\t\t\tclassName={rowClassName}\n\t\t\t\t\taria-label={visitLabel}\n\t\t\t\t>\n\t\t\t\t\t{rowContent}\n\t\t\t\t</TextLink>\n\t\t\t) : onSelect ? (\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tonClick={onSelect}\n\t\t\t\t\tclassName={cn(rowClassName, 'h-auto justify-start whitespace-normal')}\n\t\t\t\t\taria-label={source.url ? visitLabel : undefined}\n\t\t\t\t>\n\t\t\t\t\t{rowContent}\n\t\t\t\t</button>\n\t\t\t) : (\n\t\t\t\t<span className={rowClassName}>{rowContent}</span>\n\t\t\t)}\n\t\t</li>\n\t);\n}\n","import type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport interface AiReasoningStrings {\n\t/** Header label when collapsed and reasoning is in progress. */\n\tthinking: string;\n\t/** Header label when reasoning is complete. Use `{{duration}}` for the formatted elapsed time. */\n\tthoughtFor: string;\n\t/** Header label when no duration is available. */\n\tthoughtDone: string;\n\texpandAria: string;\n\tcollapseAria: string;\n}\n\nexport const defaultAiReasoningStrings: AiReasoningStrings = {\n\tthinking: 'Thinking…',\n\tthoughtFor: 'Thought for {{duration}}',\n\tthoughtDone: 'Reasoning complete',\n\texpandAria: 'Expand reasoning',\n\tcollapseAria: 'Collapse reasoning',\n};\n\nexport interface AiReasoningProps {\n\t/** Reasoning trace — typically streamed plaintext. */\n\tchildren?: ReactNode;\n\t/** Show the live \"Thinking…\" header with shimmer. */\n\tstreaming?: boolean;\n\t/** Total elapsed time in seconds — shown in the collapsed-done header. */\n\tdurationSeconds?: number;\n\t/** Auto-expand while streaming. */\n\texpandWhileStreaming?: boolean;\n\t/** Initial expanded state. */\n\tdefaultExpanded?: boolean;\n\t/** Controlled expanded state. */\n\texpanded?: boolean;\n\tonExpandedChange?: (expanded: boolean) => void;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiReasoningStrings>;\n}\n","/**\n * AiReasoning — collapsible \"thinking\" trace shown above the assistant's\n * final answer. While `streaming` is true the header runs the shimmer label\n * and the body is auto-expanded; once streaming ends, the header switches\n * to a localized duration summary and the body collapses to a peek.\n *\n * Accept the trace as `children` so the consumer can stream raw text, JSX\n * blocks (substeps, code), or Markdown via their own renderer.\n */\nimport { useEffect, useState, type ReactNode } from 'react';\nimport { Brain, ChevronDown, ChevronRight } from 'lucide-react';\nimport { Button } from '../../../base/buttons';\nimport { Duration } from '../../../primitives';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport { AiShimmer } from '../ai-shimmer/ai-shimmer';\nimport { defaultAiReasoningStrings, type AiReasoningProps } from './types';\nimport { interactionRecipes } from '../../../../lib/interaction-recipes';\n\nfunction renderThoughtFor(template: string, seconds: number): ReactNode {\n\tconst durationParts = template.split(/\\{\\{\\s*duration\\s*\\}\\}/);\n\tif (durationParts.length === 1) return template;\n\n\treturn (\n\t\t<>\n\t\t\t{durationParts[0]}\n\t\t\t<Duration value={seconds} maxParts={1} align=\"left\" />\n\t\t\t{durationParts.slice(1).join('{{duration}}')}\n\t\t</>\n\t);\n}\n\nexport function AiReasoning({\n\tchildren,\n\tstreaming = false,\n\tdurationSeconds,\n\texpandWhileStreaming = true,\n\tdefaultExpanded = false,\n\texpanded: expandedProp,\n\tonExpandedChange,\n\tclassName,\n\tstrings: stringsProp,\n}: AiReasoningProps) {\n\tconst strings = useStrings(defaultAiReasoningStrings, stringsProp);\n\tconst [internalExpanded, setInternalExpanded] = useState(defaultExpanded);\n\tconst expanded = expandedProp ?? internalExpanded;\n\tconst setExpanded = (next: boolean) => {\n\t\tif (expandedProp === undefined) setInternalExpanded(next);\n\t\tonExpandedChange?.(next);\n\t};\n\n\tuseEffect(() => {\n\t\tif (streaming && expandWhileStreaming && !expanded) {\n\t\t\tsetExpanded(true);\n\t\t}\n\t\tif (!streaming && expandWhileStreaming && expanded && !defaultExpanded && expandedProp === undefined) {\n\t\t\t// auto-collapse only once when streaming flips off and consumer hasn't pinned state\n\t\t\tsetExpanded(false);\n\t\t}\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [streaming]);\n\n\tconst headerLabel: ReactNode = streaming ? (\n\t\t<AiShimmer className=\"flex-1\">{strings.thinking}</AiShimmer>\n\t) : durationSeconds !== undefined ? (\n\t\t<Text type=\"inherit\" weight=\"medium\" className=\"flex-1\">\n\t\t\t{renderThoughtFor(strings.thoughtFor, durationSeconds)}\n\t\t</Text>\n\t) : (\n\t\t<Text type=\"inherit\" weight=\"medium\" className=\"flex-1\">\n\t\t\t{strings.thoughtDone}\n\t\t</Text>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('ai-reasoning--component', \n\t\t\t\t'overflow-hidden rounded-radius border border-border/60 bg-muted/30',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<Button\n\t\t\t\ttype=\"button\"\n\t\t\t\ttone=\"secondary\"\n\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\tsize=\"md\"\n\t\t\t\tonClick={() => setExpanded(!expanded)}\n\t\t\t\taria-expanded={expanded}\n\t\t\t\taria-label={expanded ? strings.collapseAria : strings.expandAria}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'ai-reasoning--trigger h-auto min-h-0 w-full justify-start gap-space-md rounded-none px-surface-xs py-row-y text-left',\n\t\t\t\t\tinteractionRecipes.rowHover,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<Brain className=\"size-icon-md text-muted-foreground\" />\n\t\t\t\t{headerLabel}\n\t\t\t\t{expanded ? (\n\t\t\t\t\t<ChevronDown className=\"size-icon-md text-muted-foreground\" />\n\t\t\t\t) : (\n\t\t\t\t\t<ChevronRight className=\"size-icon-md text-muted-foreground\" />\n\t\t\t\t)}\n\t\t\t</Button>\n\n\t\t\t{expanded && (\n\t\t\t\t<div className=\"ai-reasoning--body border-t border-border/60 p-surface-xs\">\n\t\t\t\t\t{typeof children === 'string' ? (\n\t\t\t\t\t\t<Text type=\"secondary\" lineHeight=\"relaxed\" className=\"whitespace-pre-wrap\">\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"whitespace-pre-wrap\">{children}</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nAiReasoning.displayName = 'AiReasoning';\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type AiChainStepStatus = 'pending' | 'active' | 'completed' | 'failed';\n\nexport interface AiChainStep {\n\t/** Stable identity for this entry. */\n\tid: string;\n\t/** Surface title. */\n\ttitle: ReactNode;\n\t/** Optional rationale rendered under the title. */\n\tdescription?: ReactNode;\n\t/** Step status — drives the marker style. */\n\tstatus?: AiChainStepStatus;\n\t/** Custom icon override for the step marker. */\n\ticon?: LucideIcon;\n\t/** Free-form children rendered inside the step body (substeps, code, …). */\n\tbody?: ReactNode;\n}\n\nexport interface AiChainOfThoughtStrings {\n\t/** Surface title. */\n\ttitle: string;\n\tstreamingHint: string;\n}\n\nexport const defaultAiChainOfThoughtStrings: AiChainOfThoughtStrings = {\n\ttitle: 'Reasoning',\n\tstreamingHint: 'Working through the steps…',\n};\n\nexport interface AiChainOfThoughtProps {\n\t/** Step list — order is significant. */\n\tsteps: ReadonlyArray<AiChainStep>;\n\t/** Hide the header strip. */\n\thideHeader?: boolean;\n\t/** Show the streaming hint under the header. */\n\tstreaming?: boolean;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiChainOfThoughtStrings>;\n}\n","/**\n * AiChainOfThought — vertical timeline of reasoning steps an agent took (or\n * is taking) to reach a conclusion. Status-aware markers; per-step body slot\n * for nested content (tool calls, code, sub-steps). Pair with `AiReasoning`\n * (free-form trace) when the model emits structured plan steps.\n */\nimport { AlertCircle, Check, Circle, Loader2, type LucideIcon } from 'lucide-react';\nimport { Card } from '../../../base/cards';\nimport { IconBadge, type IconBadgeTone } from '../../../base/display';\nimport { Stack } from '../../../base/structure';\nimport { DisplayLabel, Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport { AiShimmer } from '../ai-shimmer/ai-shimmer';\nimport {\n\tdefaultAiChainOfThoughtStrings,\n\ttype AiChainOfThoughtProps,\n\ttype AiChainStepStatus,\n} from './types';\n\n// Each status is one IconBadge recipe: pending is a quiet neutral disc, the\n// active step takes the primary tint, and settled steps fill solid.\nconst STATUS_VISUAL: Record<\n\tAiChainStepStatus,\n\t{ icon: LucideIcon; tone: IconBadgeTone; solid?: boolean; spin?: boolean }\n> = {\n\tpending: { icon: Circle, tone: 'neutral' },\n\tactive: { icon: Loader2, tone: 'primary', spin: true },\n\tcompleted: { icon: Check, tone: 'success', solid: true },\n\tfailed: { icon: AlertCircle, tone: 'destructive', solid: true },\n};\n\nexport function AiChainOfThought({\n\tsteps,\n\thideHeader = false,\n\tstreaming = false,\n\tclassName,\n\tstrings: stringsProp,\n}: AiChainOfThoughtProps) {\n\tconst strings = useStrings(defaultAiChainOfThoughtStrings, stringsProp);\n\n\treturn (\n\t\t// The public Card owns the frame and its one inset; the header flows into\n\t\t// the steps by the Stack gap rather than sitting on a rule of its own.\n\t\t<Card surface=\"card\" className={cn('ai-chain-of-thought--component', className)}>\n\t\t\t<Stack gap=\"lg\">\n\t\t\t{!hideHeader && (\n\t\t\t\t<div className=\"ai-chain-of-thought--header\">\n\t\t\t\t<Stack direction=\"horizontal\" gap=\"sm\" wrap={false}>\n\t\t\t\t\t<DisplayLabel>\n\t\t\t\t\t\t{strings.title}\n\t\t\t\t\t</DisplayLabel>\n\t\t\t\t\t{streaming && (\n\t\t\t\t\t\t<AiShimmer size=\"xs\" className=\"ml-auto\">\n\t\t\t\t\t\t\t{strings.streamingHint}\n\t\t\t\t\t\t</AiShimmer>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<ol className=\"ai-chain-of-thought--body m-0 list-none p-0 font-sans\">\n\t\t\t\t{steps.map((step, idx) => {\n\t\t\t\t\tconst status: AiChainStepStatus = step.status ?? 'pending';\n\t\t\t\t\tconst visual = STATUS_VISUAL[status];\n\t\t\t\t\tconst Icon = step.icon ?? visual.icon;\n\t\t\t\t\tconst isLast = idx === steps.length - 1;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<li key={step.id} className=\"ai-chain-of-thought--step flex gap-space-lg\">\n\t\t\t\t\t\t\t{/* The marker column stretches to the step's full height, so the\n\t\t\t\t\t\t\t rail runs from this disc to the next one whatever the disc size. */}\n\t\t\t\t\t\t\t<span aria-hidden className=\"ai-chain-of-thought--marker flex shrink-0 flex-col items-center\">\n\t\t\t\t\t\t\t\t<IconBadge tone={visual.tone} solid={visual.solid} size=\"sm\">\n\t\t\t\t\t\t\t\t\t<Icon className={cn(visual.spin && 'animate-spin')} />\n\t\t\t\t\t\t\t\t</IconBadge>\n\t\t\t\t\t\t\t\t{!isLast && <span className=\"ai-chain-of-thought--rail w-px flex-1 bg-border/60\" />}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{/* The step's bottom inset is the space the rail crosses to the next disc. */}\n\t\t\t\t\t\t\t<Stack gap=\"md\" className={cn('min-w-0 flex-1', !isLast && 'pb-space-lg')}>\n\t\t\t\t\t\t\t\t<Stack gap=\"dense\">\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tweight={status === 'active' ? 'semibold' : 'medium'}\n\t\t\t\t\t\t\t\t\ttype={status === 'pending' ? 'secondary' : 'inherit'}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{step.title}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t{!!step.description && (\n\t\t\t\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t{step.description}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t\t{!!step.body && (\n\t\t\t\t\t\t\t\t\t<div className=\"ai-chain-of-thought--step-body min-w-0\">{step.body}</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</ol>\n\t\t\t</Stack>\n\t\t</Card>\n\t);\n}\n\nAiChainOfThought.displayName = 'AiChainOfThought';\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport type AiTaskStatus = 'queued' | 'running' | 'completed' | 'failed' | 'cancelled' | 'skipped';\n\nexport interface AiTaskItem {\n\t/** Stable identity for this entry. */\n\tid: string;\n\t/** Surface title. */\n\ttitle: ReactNode;\n\t/** Status — drives the marker pill and icon. */\n\tstatus?: AiTaskStatus;\n\t/** Optional sub-task list rendered nested. */\n\tchildren?: ReadonlyArray<AiTaskItem>;\n\t/** Decorative icon override. */\n\ticon?: LucideIcon;\n\t/** Right-aligned slot — duration, byte count, etc. */\n\trightSlot?: ReactNode;\n\t/** Free-form body rendered under the title (logs, code, …). */\n\tbody?: ReactNode;\n}\n\nexport interface AiTaskStrings {\n\tstatusLabels: Record<AiTaskStatus, string>;\n\tcollapseSubtasks: string;\n\texpandSubtasks: string;\n}\n\nexport const defaultAiTaskStrings: AiTaskStrings = {\n\tstatusLabels: {\n\t\tqueued: 'Queued',\n\t\trunning: 'Running',\n\t\tcompleted: 'Done',\n\t\tfailed: 'Failed',\n\t\tcancelled: 'Cancelled',\n\t\tskipped: 'Skipped',\n\t},\n\tcollapseSubtasks: 'Collapse subtasks',\n\texpandSubtasks: 'Expand subtasks',\n};\n\nexport interface AiTaskProps {\n\t/** Top-level task. */\n\ttask: AiTaskItem;\n\t/** Compact = single row with collapsible children; expanded = always show. */\n\tdensity?: 'compact' | 'expanded';\n\t/** Indentation width per nesting level (px). */\n\tindent?: number;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiTaskStrings>;\n}\n","/**\n * AiTask — single task (with optional sub-tasks) used by agent surfaces to\n * surface long-running plans: scaffolding, package installs, multi-file\n * edits. Each row carries a status marker, a title, and optional body /\n * right-slot. Children render nested under the parent and are auto-\n * collapsed by default in the `compact` density.\n */\nimport { useState } from 'react';\nimport {\n\tAlertCircle,\n\tCheck,\n\tChevronDown,\n\tChevronRight,\n\tCircle,\n\tLoader2,\n\tMinusCircle,\n\tXCircle,\n\ttype LucideIcon,\n} from 'lucide-react';\nimport { Badge } from '../../../base/badge';\nimport { Button } from '../../../base/buttons';\nimport { Card } from '../../../base/cards';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { cn } from '../../../../lib/utils';\n\nimport {\n\tdefaultAiTaskStrings,\n\ttype AiTaskItem,\n\ttype AiTaskProps,\n\ttype AiTaskStatus,\n} from './types';\n\nconst STATUS_ICON: Record<AiTaskStatus, { icon: LucideIcon; cls: string; spin?: boolean }> = {\n\tqueued: { icon: Circle, cls: 'text-muted-foreground' },\n\trunning: { icon: Loader2, cls: 'text-primary-accent', spin: true },\n\tcompleted: { icon: Check, cls: 'text-success' },\n\tfailed: { icon: AlertCircle, cls: 'text-destructive' },\n\tcancelled: { icon: XCircle, cls: 'text-muted-foreground' },\n\tskipped: { icon: MinusCircle, cls: 'text-muted-foreground' },\n};\n\n// A running task states a live status (info); primary is reserved for the main command.\nconst STATUS_VARIANT: Record<\n\tAiTaskStatus,\n\t'secondary' | 'info' | 'success' | 'destructive' | 'warning'\n> = {\n\tqueued: 'secondary',\n\trunning: 'info',\n\tcompleted: 'success',\n\tfailed: 'destructive',\n\tcancelled: 'secondary',\n\tskipped: 'secondary',\n};\n\nexport function AiTask({\n\ttask,\n\tdensity = 'compact',\n\tindent = 18,\n\tclassName,\n\tstrings: stringsProp,\n}: AiTaskProps) {\n\tconst strings = useStrings(defaultAiTaskStrings, stringsProp);\n\t// The public Card owns the frame; rows own their own inset, so the card adds none.\n\treturn (\n\t\t<Card surface=\"card\" padding=\"none\" className={cn('ai-task--component', className)}>\n\t\t\t<TaskRow\n\t\t\t\titem={task}\n\t\t\t\tdepth={0}\n\t\t\t\tdensity={density}\n\t\t\t\tindent={indent}\n\t\t\t\tstrings={strings}\n\t\t\t/>\n\t\t</Card>\n\t);\n}\n\nAiTask.displayName = 'AiTask';\n\nfunction TaskRow({\n\titem,\n\tdepth,\n\tdensity,\n\tindent,\n\tstrings,\n}: {\n\titem: AiTaskItem;\n\tdepth: number;\n\tdensity: 'compact' | 'expanded';\n\tindent: number;\n\tstrings: ReturnType<typeof useStrings<typeof defaultAiTaskStrings>>;\n}) {\n\tconst status: AiTaskStatus = item.status ?? 'queued';\n\tconst visual = STATUS_ICON[status];\n\tconst Icon = item.icon ?? visual.icon;\n\tconst hasChildren = !!item.children?.length;\n\tconst [open, setOpen] = useState(density === 'expanded' || depth === 0 ? true : false);\n\n\t// Muted rows read secondary through the Text role; a cancelled title is also struck through.\n\tconst mutedTitle = status === 'queued' || status === 'cancelled' || status === 'skipped';\n\n\treturn (\n\t\t<>\n\t\t\t{/* Two tracks: the leading cluster (disclosure + status glyph) and the\n\t\t\t title line share one centred row, and the body sits under the title.\n\t\t\t Alignment comes from the grid, so no marker needs an optical nudge. */}\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'ai-task--row grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-space-md gap-y-space-md px-row-x py-row-y',\n\t\t\t\t\tdepth > 0 && 'border-t border-border/60',\n\t\t\t\t)}\n\t\t\t\tstyle={{ paddingInlineStart: `calc(var(--row-x) * var(--space-scale) + ${depth * indent}px)` }}\n\t\t\t>\n\t\t\t\t<span className=\"ai-task--marker flex items-center gap-space-md\">\n\t\t\t\t\t{hasChildren ? (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\ticonOnly\n\t\t\t\t\t\t\tonClick={() => setOpen((v) => !v)}\n\t\t\t\t\t\t\taria-expanded={open}\n\t\t\t\t\t\t\taria-label={open ? strings.collapseSubtasks : strings.expandSubtasks}\n\t\t\t\t\t\t\tclassName=\"ai-task--toggle\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{open ? (\n\t\t\t\t\t\t\t\t<ChevronDown aria-hidden=\"true\" className=\"size-icon-md\" />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ChevronRight aria-hidden=\"true\" className=\"size-icon-md\" />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// Nested leaves keep the disclosure track so sibling status glyphs align.\n\t\t\t\t\t\tdepth > 0 && <span aria-hidden className=\"w-action-sm shrink-0\" />\n\t\t\t\t\t)}\n\t\t\t\t\t<Icon\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclassName={cn('size-icon-md shrink-0', visual.cls, visual.spin && 'animate-spin')}\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t\t<div className=\"flex min-w-0 items-center gap-space-md\">\n\t\t\t\t\t<Text\n\t\t\t\t\t\tweight={status === 'running' ? 'semibold' : 'medium'}\n\t\t\t\t\t\ttype={mutedTitle ? 'secondary' : 'inherit'}\n\t\t\t\t\t\tclassName={cn('flex-1 truncate', status === 'cancelled' && 'line-through')}\n\t\t\t\t\t>\n\t\t\t\t\t\t{item.title}\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Badge tone={STATUS_VARIANT[status]}>\n\t\t\t\t\t\t{strings.statusLabels[status]}\n\t\t\t\t\t</Badge>\n\t\t\t\t\t{!!item.rightSlot && (\n\t\t\t\t\t\t<span className=\"tabular-nums text-muted-foreground\">\n\t\t\t\t\t\t\t{item.rightSlot}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{!!item.body && <div className=\"ai-task--body col-start-2 min-w-0\">{item.body}</div>}\n\t\t\t</div>\n\t\t\t{hasChildren && open && (\n\t\t\t\t<div>\n\t\t\t\t\t{item.children!.map((child) => (\n\t\t\t\t\t\t<TaskRow\n\t\t\t\t\t\t\tkey={child.id}\n\t\t\t\t\t\t\titem={child}\n\t\t\t\t\t\t\tdepth={depth + 1}\n\t\t\t\t\t\t\tdensity={density}\n\t\t\t\t\t\t\tindent={indent}\n\t\t\t\t\t\t\tstrings={strings}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</>\n\t);\n}\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport type { StringsProp } from '../../../../lib/strings';\n\nexport interface AiArtifactStrings {\n\topenAria: string;\n\tcopy: string;\n\tcopied: string;\n\tcopyAria: string;\n /** Failure feedback, additive for existing string dictionaries. */\n copyError?: string;\n\tdownloadAria: string;\n\texpandAria: string;\n}\n\nexport const defaultAiArtifactStrings: AiArtifactStrings = {\n\topenAria: 'Open artifact',\n\tcopy: 'Copy',\n\tcopied: 'Copied',\n copyError: 'Could not copy. Please try again.',\n\tcopyAria: 'Copy artifact',\n\tdownloadAria: 'Download artifact',\n\texpandAria: 'Expand artifact',\n};\n\nexport interface AiArtifactAction {\n\t/** Stable identity for this entry. */\n\tid: string;\n\t/** Display label. */\n\tlabel: string;\n\t/** Leading glyph. */\n\ticon?: LucideIcon;\n\t/** Fired when an entry is activated. */\n\tonSelect?: () => void;\n}\n\nexport interface AiArtifactProps {\n\t/** Title — typically the artifact name (e.g. \"App.tsx\", \"design-spec.md\"). */\n\ttitle: ReactNode;\n\t/** Subtitle — typically the kind / language (\"React component\", \"Markdown\"). */\n\tsubtitle?: ReactNode;\n\t/** Icon override for the leading badge. */\n\ticon?: LucideIcon;\n\t/** Plain text content used by the default copy action. */\n\tcopyText?: string;\n\t/** Body content — preview, code, sandbox iframe, etc. */\n\tchildren?: ReactNode;\n\t/** Hide the body and render the artifact as a clickable preview-only chip. */\n\tcollapsed?: boolean;\n\t/** Click handler for the whole header (e.g. open in side panel). */\n\tonOpen?: () => void;\n\t/** Custom actions in the header. */\n\tactions?: ReadonlyArray<AiArtifactAction>;\n\t/** Provide a download handler — adds a download button. */\n\tonDownload?: () => void;\n\t/** Merged onto the outermost node. */\n\t/** Called when the clipboard is unavailable or the write fails. */\n onCopyError?: (error: unknown) => void;\n className?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<AiArtifactStrings>;\n}\n","import { useCopyFeedback } from '../use-copy-feedback';\n/**\n * AiArtifact — generic shell for a model-produced asset (code file, document,\n * design spec, sandbox preview, …). Header carries a leading icon, title /\n * subtitle, and an action toolbar (open, copy, download, custom actions).\n * Body slot accepts the preview itself: `<AiCodeBlock>`, an `<iframe>`, an\n * `<AiPackageInfo>`, etc.\n */\n\nimport {\n\tCheck,\n\tCopy,\n\tDownload,\n\tExternalLink,\n\tFileText,\n\ttype LucideIcon,\n\t} from 'lucide-react';\nimport { Button } from '../../../base/buttons';\nimport { Card } from '../../../base/cards';\nimport { IconBadge,\n} from '../../../base/display';\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { Stack } from '../../../base/structure';\nimport { cn } from '../../../../lib/utils';\n\nimport { defaultAiArtifactStrings, type AiArtifactProps } from './types';\n\nexport function AiArtifact({\n\ttitle,\n\tsubtitle,\n\ticon,\n\tcopyText,\n\tchildren,\n\tcollapsed = false,\n\tonOpen,\n\tactions,\n\tonDownload,\n\tonCopyError,\n\tclassName,\n\tstrings: stringsProp,\n}: AiArtifactProps) {\n\tconst strings = useStrings(defaultAiArtifactStrings, stringsProp);\n\tconst Icon: LucideIcon = icon ?? FileText;\n\tconst { copied, failed, copy } = useCopyFeedback(onCopyError, copyText);\n\n\tconst handleCopy = async () => {\n\t\tif (copyText) await copy(copyText);\n\t};\n\n\treturn (\n\t\t// The public Card owns the frame; the header band and the flush preview body\n\t\t// own their own insets, so the card adds none.\n\t\t<Card surface=\"card\" padding=\"none\" className={cn('ai-artifact--component', className)}>\n\t\t\t<div className=\"ai-artifact--header @container/ai-artifact-header border-b border-border/60 bg-muted/50 p-surface\">\n\t\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"lg\">\n\t\t\t\t<div className=\"ai-artifact--identity flex min-w-0 basis-full items-center gap-space-lg @sm/ai-artifact-header:flex-1 @sm/ai-artifact-header:basis-0\">\n\t\t\t\t<IconBadge icon={Icon} tone=\"neutral\" size=\"md\" shape=\"square\" />\n\t\t\t\t<div className=\"min-w-0 flex-1\">\n\t\t\t\t\t<Text type=\"inherit\" weight=\"semibold\" className=\"break-words\">\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</Text>\n\t\t\t\t\t{!!subtitle && (\n\t\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"break-words\">\n\t\t\t\t\t\t\t{subtitle}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"ai-artifact--actions flex flex-wrap items-center gap-space-xs\">\n\t\t\t\t\t{actions?.map((action) => {\n\t\t\t\t\t\tconst ActionIcon = action.icon;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tkey={action.id}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\tonClick={action.onSelect}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{!!ActionIcon && <ActionIcon className=\"size-icon-md\" />}\n\t\t\t\t\t\t\t\t{action.label}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t\t{!!copyText && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\t\taria-label={strings.copyAria}\n\t\t\t\t\t\t\tonClick={handleCopy}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{copied ? (\n\t\t\t\t\t\t\t\t<Check className=\"size-icon-md text-success\" />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Copy className=\"size-icon-md\" />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)}\n\t\t\t\t\t{!!onDownload && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\t\taria-label={strings.downloadAria}\n\t\t\t\t\t\t\tonClick={onDownload}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Download className=\"size-icon-md\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)}\n\t\t\t\t\t{!!onOpen && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\t\taria-label={strings.openAria}\n\t\t\t\t\t\t\tonClick={onOpen}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ExternalLink className=\"size-icon-md\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</Stack>\n\t\t\t</div>\n\t\t\t{!collapsed && !!children && <div className=\"ai-artifact--body min-w-0\">{children}</div>}\n\n\t\t\t{failed && <div className=\"px-control py-row-y\"><Text role=\"alert\" size=\"xs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QAET,UAAA,kBAAC7C,GAAD,EAAc,WAAU,eAAgB,CAAA;OACjC,CAAA;MAEL;KACC,CAAA,CAAA;;GACF,CAAA;GACJ,CAAC8C,KAAa,CAAC,CAAChK,KAAY,kBAAC,OAAD;IAAK,WAAU;IAA6B;GAAc,CAAA;GAEtFnB,KAAU,kBAAC,OAAD;IAAK,WAAU;IAAsB,UAAA,kBAAC7B,GAAD;KAAM,MAAK;KAAQ,MAAK;KAAK,MAAK;KAAS,UAAA4C,EAAQ,aAAa2J,EAAyB;IAAgB,CAAA;GAAM,CAAA;EAC1J;;AAER;AAEA,GAAW,cAAc"}
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { i as e, n as t } from "./theme-scope-BJ6eE2xt.js";
|
|
3
|
-
import { t as n } from "./utils-BRhFDwuU.js";
|
|
4
|
-
import { t as r } from "./structure-BmisBK-3.js";
|
|
5
|
-
import { i, r as a } from "./containers-Mu1LMGV1.js";
|
|
6
|
-
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
-
//#region src/components/layout/app-shell/topbar-sidebar-layout.tsx
|
|
8
|
-
var l = {
|
|
9
|
-
light: "light",
|
|
10
|
-
dark: "dark"
|
|
11
|
-
};
|
|
12
|
-
function u({ children: i, headerTheme: u = "light", sidebarSide: d = "left", mobileSidebarMode: f = "drawer", headerHeight: p, sidebarWidth: m, sidebarTrigger: h, logo: g, headerActions: _, sidebar: v, slots: y, contentAs: b = "main", className: x, headerClassName: S, headerInnerClassName: C, bodyClassName: w, sidebarClassName: T, contentClassName: E, style: D, ...O }) {
|
|
13
|
-
let k = {
|
|
14
|
-
...p ? { "--shell-header-height": p } : null,
|
|
15
|
-
...m ? { "--shell-sidebar-width": m } : null,
|
|
16
|
-
...D
|
|
17
|
-
}, A = y?.sidebarTrigger ?? h, j = e(), M = y?.logo ?? g, N = y?.headerActions ?? _, P = y?.sidebar ?? v, F = y?.content ?? i, I = !!P, L = /* @__PURE__ */ s(a, {
|
|
18
|
-
render: /* @__PURE__ */ s(b, {}),
|
|
19
|
-
className: n("topbar-sidebar-layout--content bg-background", E),
|
|
20
|
-
children: F
|
|
21
|
-
}), R = I ? /* @__PURE__ */ s("aside", {
|
|
22
|
-
className: n("topbar-sidebar-layout--sidebar min-h-0 min-w-0 overflow-hidden bg-sidebar text-sidebar-foreground", f === "drawer" ? "hidden md:block group-data-[mobile=true]/sidebar-wrapper:hidden" : null, T),
|
|
23
|
-
children: P
|
|
24
|
-
}) : null;
|
|
25
|
-
return /* @__PURE__ */ c("div", {
|
|
26
|
-
className: n("topbar-sidebar-layout--component @container/app-shell isolate flex min-h-svh min-w-0 w-full flex-col overflow-hidden bg-background font-sans text-foreground", "shell-sidebar-vars", "has-[[data-slot=sidebar][data-collapsible=icon]]:shell-sidebar-icon-current", "has-[[data-slot=sidebar][data-collapsible=offcanvas]]:shell-sidebar-offcanvas-current", x),
|
|
27
|
-
style: k,
|
|
28
|
-
"data-header-theme": u,
|
|
29
|
-
"data-sidebar-side": d,
|
|
30
|
-
"data-mobile-sidebar-mode": f,
|
|
31
|
-
...O,
|
|
32
|
-
children: [/* @__PURE__ */ s(t, {
|
|
33
|
-
value: j.context,
|
|
34
|
-
children: /* @__PURE__ */ s("header", {
|
|
35
|
-
ref: j.attachHost,
|
|
36
|
-
"data-theme-scope": "",
|
|
37
|
-
className: n("topbar-sidebar-layout--header z-40 flex min-h-shell-header shrink-0 items-center border-b border-border bg-background px-surface py-space-sm text-foreground", l[u], S),
|
|
38
|
-
children: /* @__PURE__ */ s(r, {
|
|
39
|
-
direction: "horizontal",
|
|
40
|
-
align: "center",
|
|
41
|
-
gap: "lg",
|
|
42
|
-
wrap: !0,
|
|
43
|
-
className: n("topbar-sidebar-layout--header-inner min-h-action w-full min-w-0 @3xl/app-shell:gap-space-2xl", C),
|
|
44
|
-
children: y?.header ?? /* @__PURE__ */ c(o, { children: [
|
|
45
|
-
!!A && /* @__PURE__ */ s("div", {
|
|
46
|
-
className: "topbar-sidebar-layout--sidebar-trigger flex shrink-0 items-center",
|
|
47
|
-
children: A
|
|
48
|
-
}),
|
|
49
|
-
!!M && /* @__PURE__ */ s("div", {
|
|
50
|
-
className: "topbar-sidebar-layout--logo flex min-w-0 shrink-0 items-center",
|
|
51
|
-
children: M
|
|
52
|
-
}),
|
|
53
|
-
!!y?.headerStart && /* @__PURE__ */ s("div", {
|
|
54
|
-
className: "topbar-sidebar-layout--header-start flex min-w-0 items-center",
|
|
55
|
-
children: y.headerStart
|
|
56
|
-
}),
|
|
57
|
-
!!y?.headerCenter && /* @__PURE__ */ s("div", {
|
|
58
|
-
className: "topbar-sidebar-layout--header-center hidden min-w-0 flex-1 items-center @3xl/app-shell:flex",
|
|
59
|
-
children: y.headerCenter
|
|
60
|
-
}),
|
|
61
|
-
!!(N || y?.headerEnd) && /* @__PURE__ */ c("div", {
|
|
62
|
-
className: "topbar-sidebar-layout--header-trailing ms-auto flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm @3xl/app-shell:gap-space-md [&>*]:max-w-full",
|
|
63
|
-
children: [!!N && /* @__PURE__ */ s("div", {
|
|
64
|
-
className: "topbar-sidebar-layout--header-actions flex min-w-0 max-w-full flex-wrap items-center gap-space-sm @3xl/app-shell:gap-space-md [&>*]:max-w-full",
|
|
65
|
-
children: N
|
|
66
|
-
}), !!y?.headerEnd && /* @__PURE__ */ s("div", {
|
|
67
|
-
className: "topbar-sidebar-layout--header-end flex min-w-0 max-w-full flex-wrap items-center gap-space-sm @3xl/app-shell:gap-space-md [&>*]:max-w-full",
|
|
68
|
-
children: y.headerEnd
|
|
69
|
-
})]
|
|
70
|
-
})
|
|
71
|
-
] })
|
|
72
|
-
})
|
|
73
|
-
})
|
|
74
|
-
}), /* @__PURE__ */ s("div", {
|
|
75
|
-
className: n("topbar-sidebar-layout--body grid min-h-0 flex-1 grid-cols-1", I && f === "drawer" && "group-data-[mobile=true]/sidebar-wrapper:grid-cols-1", I && (d === "left" ? "md:shell-grid-left" : "md:shell-grid-right"), w),
|
|
76
|
-
children: d === "left" ? /* @__PURE__ */ c(o, { children: [R, L] }) : /* @__PURE__ */ c(o, { children: [L, R] })
|
|
77
|
-
})]
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
//#endregion
|
|
81
|
-
//#region src/components/layout/app-shell/sidebar-inset-layout.tsx
|
|
82
|
-
function d({ children: e, sidebarSide: t = "left", surface: i = "inset", toolbar: l = !0, sidebarWidth: u, sidebar: d, sidebarTrigger: f, slots: p, contentAs: m = "main", className: h, sidebarClassName: g, toolbarClassName: _, contentClassName: v, style: y, ...b }) {
|
|
83
|
-
let x = {
|
|
84
|
-
...u ? { "--shell-sidebar-width": u } : null,
|
|
85
|
-
...y
|
|
86
|
-
}, S = p?.sidebar ?? d, C = p?.sidebarTrigger ?? f, w = p?.content ?? e, T = !!S, E = i === "inset", D = T ? /* @__PURE__ */ s("aside", {
|
|
87
|
-
className: n("sidebar-inset-layout--sidebar min-h-0 min-w-0 shrink-0 overflow-hidden bg-sidebar text-sidebar-foreground", "hidden md:block group-data-[mobile=true]/sidebar-wrapper:hidden", g),
|
|
88
|
-
children: S
|
|
89
|
-
}) : null, O = l ? /* @__PURE__ */ s("header", {
|
|
90
|
-
className: n("sidebar-inset-layout--toolbar @container/toolbar flex min-h-shell-header shrink-0 items-center gap-space-md px-surface py-space-sm", "border-b border-border", _),
|
|
91
|
-
children: p?.toolbar ?? /* @__PURE__ */ c(r, {
|
|
92
|
-
direction: "horizontal",
|
|
93
|
-
align: "center",
|
|
94
|
-
gap: "md",
|
|
95
|
-
wrap: !0,
|
|
96
|
-
className: "sidebar-inset-layout--toolbar-inner min-h-action w-full min-w-0",
|
|
97
|
-
children: [
|
|
98
|
-
!!C && /* @__PURE__ */ s("div", {
|
|
99
|
-
className: "sidebar-inset-layout--sidebar-trigger flex shrink-0 items-center",
|
|
100
|
-
children: C
|
|
101
|
-
}),
|
|
102
|
-
!!p?.toolbarStart && /* @__PURE__ */ s("div", {
|
|
103
|
-
className: "sidebar-inset-layout--toolbar-start flex min-w-0 flex-1 basis-32 items-center [&>*]:min-w-0 [&>*]:max-w-full",
|
|
104
|
-
children: p.toolbarStart
|
|
105
|
-
}),
|
|
106
|
-
!!p?.toolbarEnd && /* @__PURE__ */ s("div", {
|
|
107
|
-
className: "sidebar-inset-layout--toolbar-end ms-auto flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm [&>*]:max-w-full",
|
|
108
|
-
children: p.toolbarEnd
|
|
109
|
-
})
|
|
110
|
-
]
|
|
111
|
-
})
|
|
112
|
-
}) : null, k = /* @__PURE__ */ c("div", {
|
|
113
|
-
className: n("sidebar-inset-layout--main flex min-h-0 min-w-0 flex-1 flex-col bg-background text-foreground", E && "md:m-space-md md:overflow-hidden md:rounded-radius md:border md:border-border md:shadow-sm"),
|
|
114
|
-
children: [O, /* @__PURE__ */ s(a, {
|
|
115
|
-
render: /* @__PURE__ */ s(m, {}),
|
|
116
|
-
className: n("sidebar-inset-layout--content", v),
|
|
117
|
-
children: w
|
|
118
|
-
})]
|
|
119
|
-
});
|
|
120
|
-
return /* @__PURE__ */ s("div", {
|
|
121
|
-
className: n("sidebar-inset-layout--component isolate grid min-h-svh min-w-0 w-full grid-cols-1 overflow-hidden font-sans text-foreground", T && (t === "left" ? "md:shell-grid-left" : "md:shell-grid-right"), E ? "bg-sidebar" : "bg-background", "shell-sidebar-vars group-data-[mobile=true]/sidebar-wrapper:grid-cols-1", "has-[[data-slot=sidebar][data-collapsible=icon]]:shell-sidebar-icon-current", "has-[[data-slot=sidebar][data-collapsible=offcanvas]]:shell-sidebar-offcanvas-current", h),
|
|
122
|
-
style: x,
|
|
123
|
-
"data-sidebar-side": t,
|
|
124
|
-
"data-surface": i,
|
|
125
|
-
...b,
|
|
126
|
-
children: t === "left" ? /* @__PURE__ */ c(o, { children: [D, k] }) : /* @__PURE__ */ c(o, { children: [k, D] })
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
//#endregion
|
|
130
|
-
//#region src/components/layout/app-shell/stacked-layout.tsx
|
|
131
|
-
var f = {
|
|
132
|
-
light: "light",
|
|
133
|
-
dark: "dark"
|
|
134
|
-
};
|
|
135
|
-
function p({ children: l, headerTheme: u = "light", contentWidth: d = "contained", headerHeight: p, logo: m, nav: h, slots: g, contentAs: _ = "main", className: v, headerClassName: y, subheaderClassName: b, contentClassName: x, style: S, ...C }) {
|
|
136
|
-
let w = {
|
|
137
|
-
...p ? { "--shell-header-height": p } : null,
|
|
138
|
-
...S
|
|
139
|
-
}, T = e(), E = g?.logo ?? m, D = g?.nav ?? h, O = g?.content ?? l;
|
|
140
|
-
return /* @__PURE__ */ c("div", {
|
|
141
|
-
className: n("stacked-layout--component @container/stacked-shell isolate flex min-h-svh min-w-0 w-full flex-col bg-background font-sans text-foreground", v),
|
|
142
|
-
style: w,
|
|
143
|
-
"data-header-theme": u,
|
|
144
|
-
"data-content-width": d,
|
|
145
|
-
...C,
|
|
146
|
-
children: [
|
|
147
|
-
/* @__PURE__ */ s(t, {
|
|
148
|
-
value: T.context,
|
|
149
|
-
children: /* @__PURE__ */ s("header", {
|
|
150
|
-
ref: T.attachHost,
|
|
151
|
-
"data-theme-scope": "",
|
|
152
|
-
className: n("stacked-layout--header z-40 flex shrink-0 items-center border-b border-border bg-background px-surface py-space-sm text-foreground @3xl/stacked-shell:min-h-shell-header @3xl/stacked-shell:py-0", f[u], y),
|
|
153
|
-
children: /* @__PURE__ */ s(r, {
|
|
154
|
-
direction: "horizontal",
|
|
155
|
-
align: "center",
|
|
156
|
-
gap: "lg",
|
|
157
|
-
wrap: !0,
|
|
158
|
-
className: "stacked-layout--header-inner min-h-action w-full min-w-0 @3xl/stacked-shell:flex-nowrap @3xl/stacked-shell:gap-space-2xl",
|
|
159
|
-
children: g?.header ?? /* @__PURE__ */ c(o, { children: [
|
|
160
|
-
!!E && /* @__PURE__ */ s("div", {
|
|
161
|
-
className: "stacked-layout--logo flex min-w-0 shrink-0 items-center @3xl/stacked-shell:order-1",
|
|
162
|
-
children: E
|
|
163
|
-
}),
|
|
164
|
-
!!D && /* @__PURE__ */ s("nav", {
|
|
165
|
-
onFocusCapture: (e) => {
|
|
166
|
-
let t = e.currentTarget;
|
|
167
|
-
if (!t.contains(e.target)) return;
|
|
168
|
-
let n = t.getBoundingClientRect(), r = e.target.getBoundingClientRect(), i = getComputedStyle(t), a = n.left + (parseFloat(i.paddingLeft) || 0), o = n.right - (parseFloat(i.paddingRight) || 0);
|
|
169
|
-
r.left < a ? t.scrollLeft += r.left - a : r.right > o && (t.scrollLeft += r.right - o);
|
|
170
|
-
},
|
|
171
|
-
className: "stacked-layout--nav order-last flex w-full min-w-0 flex-nowrap items-center overflow-x-auto p-space-sm @3xl/stacked-shell:order-2 @3xl/stacked-shell:w-auto @3xl/stacked-shell:flex-1 [&>*]:shrink-0 [&>*]:flex-nowrap",
|
|
172
|
-
children: D
|
|
173
|
-
}),
|
|
174
|
-
!!g?.headerEnd && /* @__PURE__ */ s("div", {
|
|
175
|
-
className: "stacked-layout--header-end ms-auto flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm @3xl/stacked-shell:order-3 @3xl/stacked-shell:gap-space-md [&>*]:max-w-full",
|
|
176
|
-
children: g.headerEnd
|
|
177
|
-
})
|
|
178
|
-
] })
|
|
179
|
-
})
|
|
180
|
-
})
|
|
181
|
-
}),
|
|
182
|
-
!!g?.subheader && /* @__PURE__ */ s("div", {
|
|
183
|
-
className: n("stacked-layout--subheader shrink-0 border-b border-border bg-background px-surface", b),
|
|
184
|
-
children: g.subheader
|
|
185
|
-
}),
|
|
186
|
-
/* @__PURE__ */ s(a, {
|
|
187
|
-
render: /* @__PURE__ */ s(_, {}),
|
|
188
|
-
className: n("stacked-layout--content bg-background", x),
|
|
189
|
-
children: d === "contained" ? /* @__PURE__ */ s(i, {
|
|
190
|
-
maxWidth: "2xl",
|
|
191
|
-
gutter: "lg",
|
|
192
|
-
className: "stacked-layout--measure",
|
|
193
|
-
children: O
|
|
194
|
-
}) : O
|
|
195
|
-
})
|
|
196
|
-
]
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
//#endregion
|
|
200
|
-
//#region src/components/layout/app-shell/app-layout.tsx
|
|
201
|
-
function m(e) {
|
|
202
|
-
let t = {
|
|
203
|
-
"data-app-layout": e.variant ?? "light-header",
|
|
204
|
-
className: n("app-layout--component", e.className)
|
|
205
|
-
};
|
|
206
|
-
switch (e.variant) {
|
|
207
|
-
case "stacked": {
|
|
208
|
-
let { variant: n, ...r } = e;
|
|
209
|
-
return /* @__PURE__ */ s(p, {
|
|
210
|
-
...r,
|
|
211
|
-
...t
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
case "sidebar":
|
|
215
|
-
case "inset": {
|
|
216
|
-
let { variant: n, ...r } = e;
|
|
217
|
-
return /* @__PURE__ */ s(d, {
|
|
218
|
-
...r,
|
|
219
|
-
...t,
|
|
220
|
-
surface: n === "sidebar" ? "flush" : "inset"
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
default: {
|
|
224
|
-
let { variant: n = "light-header", ...r } = e;
|
|
225
|
-
return /* @__PURE__ */ s(u, {
|
|
226
|
-
...r,
|
|
227
|
-
...t,
|
|
228
|
-
headerTheme: n === "dark-header" ? "dark" : "light"
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
//#endregion
|
|
234
|
-
export { u as i, p as n, d as r, m as t };
|
|
235
|
-
|
|
236
|
-
//# sourceMappingURL=app-shell-C4FhvCqF.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-shell-C4FhvCqF.js","names":["HEADER_THEME_CLASS","_Fragment","_Fragment","_Fragment","useThemeScopeHost","ThemeScopeHostProvider","cn","Stack","PageViewport","HEADER_THEME_CLASS$1","TopbarSidebarLayout","Content","props","headerStyle","headerHeight","sidebarWidth","style","resolvedSidebarTrigger","slots","sidebarTrigger","headerScope","resolvedLogo","logo","resolvedHeaderActions","headerActions","resolvedSidebar","sidebar","resolvedContent","children","hasSidebar","contentNode","contentClassName","sidebarNode","mobileSidebarMode","sidebarClassName","className","headerTheme","sidebarSide","headerClassName","headerInnerClassName","Fragment","bodyClassName","SidebarInsetLayout","shellStyle","resolvedTrigger","isInset","surface","toolbarNode","toolbar","toolbarClassName","mainNode","HEADER_THEME_CLASS","StackedLayout","resolvedNav","nav","contentWidth","event","viewport","action","insets","left","right","subheaderClassName","Container","AppLayout","presentation","_variant","shell","variant"],"sources":["../src/components/layout/app-shell/topbar-sidebar-layout.tsx","../src/components/layout/app-shell/sidebar-inset-layout.tsx","../src/components/layout/app-shell/stacked-layout.tsx","../src/components/layout/app-shell/app-layout.tsx"],"sourcesContent":["/**\n * TopbarSidebarLayout — header-first app shell with a two-column body.\n *\n * This shell is intentionally separate from the default shadcn sidebar layout:\n * the logo belongs in the header, while the sidebar and content occupy the\n * remaining page height below the header.\n */\nimport { cn } from '../../../lib/utils';\nimport { ThemeScopeHostProvider, useThemeScopeHost } from '../../../lib/theme-scope';\n\nimport { Stack } from '../../base/structure';\nimport { PageViewport } from '../containers';\n\nimport type {\n\tTopbarSidebarLayoutProps,\n\tTopbarSidebarLayoutStyle,\n} from './app-shell.types';\n\n/**\n * Header theme is just a token scope. `.light` / `.dark` remap the shadcn\n * palette for the header subtree (see css/themes/shadcn.default.css), so header\n * partials use ordinary tokens (`bg-background`, `text-foreground`, `bg-accent`\n * …) and invert against the header surface automatically — no header-specific\n * color variables required. `light` keeps the header light even on a dark page;\n * `dark` gives a dark topbar on a light page.\n */\nconst HEADER_THEME_CLASS: Record<NonNullable<TopbarSidebarLayoutProps['headerTheme']>, string> = {\n\tlight: 'light',\n\tdark: 'dark',\n};\n\nexport function TopbarSidebarLayout({\n\tchildren,\n\theaderTheme = 'light',\n\tsidebarSide = 'left',\n\tmobileSidebarMode = 'drawer',\n\theaderHeight,\n\tsidebarWidth,\n\tsidebarTrigger,\n\tlogo,\n\theaderActions,\n\tsidebar,\n\tslots,\n\tcontentAs: Content = 'main',\n\tclassName,\n\theaderClassName,\n\theaderInnerClassName,\n\tbodyClassName,\n\tsidebarClassName,\n\tcontentClassName,\n\tstyle,\n\t...props\n}: TopbarSidebarLayoutProps) {\n\tconst headerStyle = {\n\t\t...(headerHeight ? { '--shell-header-height': headerHeight } : null),\n\t\t...(sidebarWidth ? { '--shell-sidebar-width': sidebarWidth } : null),\n\t\t...style,\n\t} as TopbarSidebarLayoutStyle;\n\tconst resolvedSidebarTrigger = slots?.sidebarTrigger ?? sidebarTrigger;\n\tconst headerScope = useThemeScopeHost<HTMLElement>();\n\tconst resolvedLogo = slots?.logo ?? logo;\n\tconst resolvedHeaderActions = slots?.headerActions ?? headerActions;\n\tconst resolvedSidebar = slots?.sidebar ?? sidebar;\n\tconst resolvedContent = slots?.content ?? children;\n\tconst hasSidebar = Boolean(resolvedSidebar);\n\tconst contentNode = (\n\t\t<PageViewport\n\t\t\trender={<Content />}\n\t\t\tclassName={cn(\n\t\t\t\t'topbar-sidebar-layout--content bg-background',\n\t\t\t\tcontentClassName,\n\t\t\t)}\n\t\t>\n\t\t\t{resolvedContent}\n\t\t</PageViewport>\n\t);\n\tconst sidebarNode = hasSidebar ? (\n\t\t<aside\n\t\t\tclassName={cn(\n\t\t\t\t'topbar-sidebar-layout--sidebar min-h-0 min-w-0 overflow-hidden bg-sidebar text-sidebar-foreground',\n\t\t\t\tmobileSidebarMode === 'drawer' ? 'hidden md:block group-data-[mobile=true]/sidebar-wrapper:hidden' : null,\n\t\t\t\tsidebarClassName,\n\t\t\t)}\n\t\t>\n\t\t\t{resolvedSidebar}\n\t\t</aside>\n\t) : null;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'topbar-sidebar-layout--component @container/app-shell isolate flex min-h-svh min-w-0 w-full flex-col overflow-hidden bg-background font-sans text-foreground',\n\t\t\t\t'shell-sidebar-vars',\n\t\t\t\t'has-[[data-slot=sidebar][data-collapsible=icon]]:shell-sidebar-icon-current',\n\t\t\t\t'has-[[data-slot=sidebar][data-collapsible=offcanvas]]:shell-sidebar-offcanvas-current',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={headerStyle}\n\t\t\tdata-header-theme={headerTheme}\n\t\t\tdata-sidebar-side={sidebarSide}\n\t\t\tdata-mobile-sidebar-mode={mobileSidebarMode}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ThemeScopeHostProvider value={headerScope.context}>\n\t\t\t<header\n\t\t\t\tref={headerScope.attachHost}\n\t\t\t\tdata-theme-scope=\"\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'topbar-sidebar-layout--header z-40 flex min-h-shell-header shrink-0 items-center border-b border-border bg-background px-surface py-space-sm text-foreground',\n\t\t\t\t\tHEADER_THEME_CLASS[headerTheme],\n\t\t\t\t\theaderClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"lg\" wrap\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'topbar-sidebar-layout--header-inner min-h-action w-full min-w-0 @3xl/app-shell:gap-space-2xl',\n\t\t\t\t\t\theaderInnerClassName,\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{slots?.header ?? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{!!resolvedSidebarTrigger && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--sidebar-trigger flex shrink-0 items-center\">\n\t\t\t\t\t\t\t\t\t{resolvedSidebarTrigger}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!resolvedLogo && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--logo flex min-w-0 shrink-0 items-center\">\n\t\t\t\t\t\t\t\t\t{resolvedLogo}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!slots?.headerStart && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-start flex min-w-0 items-center\">\n\t\t\t\t\t\t\t\t\t{slots.headerStart}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!slots?.headerCenter && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-center hidden min-w-0 flex-1 items-center @3xl/app-shell:flex\">\n\t\t\t\t\t\t\t\t\t{slots.headerCenter}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!(resolvedHeaderActions || slots?.headerEnd) && (\n\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-trailing ms-auto flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm @3xl/app-shell:gap-space-md [&>*]:max-w-full\">\n\t\t\t\t\t\t\t\t\t{!!resolvedHeaderActions && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-actions flex min-w-0 max-w-full flex-wrap items-center gap-space-sm @3xl/app-shell:gap-space-md [&>*]:max-w-full\">\n\t\t\t\t\t\t\t\t\t\t\t{resolvedHeaderActions}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{!!slots?.headerEnd && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"topbar-sidebar-layout--header-end flex min-w-0 max-w-full flex-wrap items-center gap-space-sm @3xl/app-shell:gap-space-md [&>*]:max-w-full\">\n\t\t\t\t\t\t\t\t\t\t\t{slots.headerEnd}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t</header>\n\t\t\t</ThemeScopeHostProvider>\n\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'topbar-sidebar-layout--body grid min-h-0 flex-1 grid-cols-1',\n\t\t\t\t\t\thasSidebar && mobileSidebarMode === 'drawer' && 'group-data-[mobile=true]/sidebar-wrapper:grid-cols-1',\n\t\t\t\t\thasSidebar && (\n\t\t\t\t\t\tsidebarSide === 'left'\n\t\t\t\t\t\t\t? 'md:shell-grid-left'\n\t\t\t\t\t\t\t: 'md:shell-grid-right'\n\t\t\t\t\t),\n\t\t\t\t\tbodyClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{sidebarSide === 'left' ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{sidebarNode}\n\t\t\t\t\t\t{contentNode}\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{contentNode}\n\t\t\t\t\t\t{sidebarNode}\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * SidebarInsetLayout — sidebar-first app shell with no global header.\n *\n * The counterpart to `TopbarSidebarLayout`. There the header spans the page and\n * owns the logo, with the sidebar below it; here the sidebar owns the full page\n * height and the logo sits inside it, so the content column carries only a slim\n * toolbar of its own. This is the shape shadcn's dashboard uses, and it is the\n * one to reach for when navigation should read as the primary frame.\n *\n * `toolbar={false}` removes even that row, for a shell with no header chrome.\n */\nimport { cn } from '../../../lib/utils';\n\nimport { Stack } from '../../base/structure';\nimport { PageViewport } from '../containers';\n\nimport type {\n\tSidebarInsetLayoutProps,\n\tTopbarSidebarLayoutStyle,\n} from './app-shell.types';\n\nexport function SidebarInsetLayout({\n\tchildren,\n\tsidebarSide = 'left',\n\tsurface = 'inset',\n\ttoolbar = true,\n\tsidebarWidth,\n\tsidebar,\n\tsidebarTrigger,\n\tslots,\n\tcontentAs: Content = 'main',\n\tclassName,\n\tsidebarClassName,\n\ttoolbarClassName,\n\tcontentClassName,\n\tstyle,\n\t...props\n}: SidebarInsetLayoutProps) {\n\tconst shellStyle = {\n\t\t...(sidebarWidth ? { '--shell-sidebar-width': sidebarWidth } : null),\n\t\t...style,\n\t} as TopbarSidebarLayoutStyle;\n\n\tconst resolvedSidebar = slots?.sidebar ?? sidebar;\n\tconst resolvedTrigger = slots?.sidebarTrigger ?? sidebarTrigger;\n\tconst resolvedContent = slots?.content ?? children;\n\tconst hasSidebar = Boolean(resolvedSidebar);\n\tconst isInset = surface === 'inset';\n\n\tconst sidebarNode = hasSidebar ? (\n\t\t<aside\n\t\t\tclassName={cn(\n\t\t\t\t'sidebar-inset-layout--sidebar min-h-0 min-w-0 shrink-0 overflow-hidden bg-sidebar text-sidebar-foreground',\n\t\t\t\t// Below `md` the column is hidden so `SidebarTrigger` can open the\n\t\t\t\t// sheet instead, matching `TopbarSidebarLayout`'s drawer behaviour.\n\t\t\t\t'hidden md:block group-data-[mobile=true]/sidebar-wrapper:hidden',\n\t\t\t\tsidebarClassName,\n\t\t\t)}\n\t\t>\n\t\t\t{resolvedSidebar}\n\t\t</aside>\n\t) : null;\n\n\tconst toolbarNode = toolbar ? (\n\t\t<header\n\t\t\tclassName={cn(\n\t\t\t\t'sidebar-inset-layout--toolbar @container/toolbar flex min-h-shell-header shrink-0 items-center gap-space-md px-surface py-space-sm',\n\t\t\t\t// The toolbar and scrolling body share one surface boundary.\n\t\t\t\t'border-b border-border',\n\t\t\t\ttoolbarClassName,\n\t\t\t)}\n\t\t>\n\t\t\t{slots?.toolbar ?? (\n\t\t\t\t<Stack\n\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tgap=\"md\" wrap\n\t\t\t\t\tclassName=\"sidebar-inset-layout--toolbar-inner min-h-action w-full min-w-0\"\n\t\t\t\t>\n\t\t\t\t\t{!!resolvedTrigger && (\n\t\t\t\t\t\t<div className=\"sidebar-inset-layout--sidebar-trigger flex shrink-0 items-center\">\n\t\t\t\t\t\t\t{resolvedTrigger}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{!!slots?.toolbarStart && (\n\t\t\t\t\t\t<div className=\"sidebar-inset-layout--toolbar-start flex min-w-0 flex-1 basis-32 items-center [&>*]:min-w-0 [&>*]:max-w-full\">\n\t\t\t\t\t\t\t{slots.toolbarStart}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{!!slots?.toolbarEnd && (\n\t\t\t\t\t\t<div className=\"sidebar-inset-layout--toolbar-end ms-auto flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm [&>*]:max-w-full\">\n\t\t\t\t\t\t\t{slots.toolbarEnd}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t)}\n\t\t</header>\n\t) : null;\n\n\tconst mainNode = (\n\t\t<div className={cn('sidebar-inset-layout--main flex min-h-0 min-w-0 flex-1 flex-col bg-background text-foreground', isInset && 'md:m-space-md md:overflow-hidden md:rounded-radius md:border md:border-border md:shadow-sm')}>\n\t\t\t{toolbarNode}\n\t\t\t<PageViewport\n\t\t\t\trender={<Content />}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'sidebar-inset-layout--content',\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{resolvedContent}\n\t\t\t</PageViewport>\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t// Grid, not flex: the sidebar column's width lives in\n\t\t\t\t// `--shell-sidebar-width-current`, which `shell-grid-left/right`\n\t\t\t\t// consume and the `has-[…]` variants below rewrite for the icon and\n\t\t\t\t// offcanvas collapse modes. A flex column has no intrinsic width here\n\t\t\t\t// — the shadcn sidebar inside it is positioned — so it collapses to 0.\n\t\t\t\t'sidebar-inset-layout--component isolate grid min-h-svh min-w-0 w-full grid-cols-1 overflow-hidden font-sans text-foreground',\n\t\t\t\thasSidebar && (sidebarSide === 'left' ? 'md:shell-grid-left' : 'md:shell-grid-right'),\n\t\t\t\tisInset ? 'bg-sidebar' : 'bg-background',\n\t\t\t\t'shell-sidebar-vars group-data-[mobile=true]/sidebar-wrapper:grid-cols-1',\n\t\t\t\t'has-[[data-slot=sidebar][data-collapsible=icon]]:shell-sidebar-icon-current',\n\t\t\t\t'has-[[data-slot=sidebar][data-collapsible=offcanvas]]:shell-sidebar-offcanvas-current',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={shellStyle}\n\t\t\tdata-sidebar-side={sidebarSide}\n\t\t\tdata-surface={surface}\n\t\t\t{...props}\n\t\t>\n\t\t\t{sidebarSide === 'left' ? (\n\t\t\t\t<>\n\t\t\t\t\t{sidebarNode}\n\t\t\t\t\t{mainNode}\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t{mainNode}\n\t\t\t\t\t{sidebarNode}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","/**\n * StackedLayout — header-only app shell with horizontal navigation.\n *\n * The third shape alongside `TopbarSidebarLayout` (header over sidebar) and\n * `SidebarInsetLayout` (sidebar owns the page). Here there is no sidebar at all:\n * primary navigation runs across the header and the page stacks beneath it.\n *\n * Reach for this when the navigation is shallow enough to fit a row — settings,\n * marketing consoles, single-resource tools — where a sidebar would be mostly\n * empty. `contentWidth=\"contained\"` holds the page to a reading measure;\n * `\"full\"` lets dashboards span. Header flow follows the shell width: below\n * 48rem navigation owns a full row; wider shells place it beside the logo.\n */\nimport { cn } from '../../../lib/utils';\nimport { ThemeScopeHostProvider, useThemeScopeHost } from '../../../lib/theme-scope';\n\nimport { Stack } from '../../base/structure';\nimport { Container, PageViewport } from '../containers';\n\nimport type {\n\tStackedLayoutProps,\n\tTopbarSidebarLayoutStyle,\n} from './app-shell.types';\n\n/** Same token-scope trick as `TopbarSidebarLayout` — see its note. */\nconst HEADER_THEME_CLASS: Record<NonNullable<StackedLayoutProps['headerTheme']>, string> = {\n\tlight: 'light',\n\tdark: 'dark',\n};\n\nexport function StackedLayout({\n\tchildren,\n\theaderTheme = 'light',\n\tcontentWidth = 'contained',\n\theaderHeight,\n\tlogo,\n\tnav,\n\tslots,\n\tcontentAs: Content = 'main',\n\tclassName,\n\theaderClassName,\n\tsubheaderClassName,\n\tcontentClassName,\n\tstyle,\n\t...props\n}: StackedLayoutProps) {\n\tconst shellStyle = {\n\t\t...(headerHeight ? { '--shell-header-height': headerHeight } : null),\n\t\t...style,\n\t} as TopbarSidebarLayoutStyle;\n\n\tconst headerScope = useThemeScopeHost<HTMLElement>();\n\tconst resolvedLogo = slots?.logo ?? logo;\n\tconst resolvedNav = slots?.nav ?? nav;\n\tconst resolvedContent = slots?.content ?? children;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'stacked-layout--component @container/stacked-shell isolate flex min-h-svh min-w-0 w-full flex-col bg-background font-sans text-foreground',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tstyle={shellStyle}\n\t\t\tdata-header-theme={headerTheme}\n\t\t\tdata-content-width={contentWidth}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ThemeScopeHostProvider value={headerScope.context}>\n\t\t\t<header\n\t\t\t\tref={headerScope.attachHost}\n\t\t\t\tdata-theme-scope=\"\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'stacked-layout--header z-40 flex shrink-0 items-center border-b border-border bg-background px-surface py-space-sm text-foreground @3xl/stacked-shell:min-h-shell-header @3xl/stacked-shell:py-0',\n\t\t\t\t\tHEADER_THEME_CLASS[headerTheme],\n\t\t\t\t\theaderClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<Stack\n\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tgap=\"lg\"\n\t\t\t\t\twrap\n\t\t\t\t\t// The shell width owns header adaptation, including narrow parents\n\t\t\t\t\t// on wide viewports. Children keep their identity across both flows.\n\t\t\t\t\tclassName=\"stacked-layout--header-inner min-h-action w-full min-w-0 @3xl/stacked-shell:flex-nowrap @3xl/stacked-shell:gap-space-2xl\"\n\t\t\t\t>\n\t\t\t\t\t{slots?.header ?? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{!!resolvedLogo && (\n\t\t\t\t\t\t\t\t<div className=\"stacked-layout--logo flex min-w-0 shrink-0 items-center @3xl/stacked-shell:order-1\">\n\t\t\t\t\t\t\t\t\t{resolvedLogo}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!resolvedNav && (\n\t\t\t\t\t\t\t\t// This shell has no sidebar, so hiding the nav in narrow shells left\n\t\t\t\t\t\t\t\t// the app with no navigation at all — logo and account menu\n\t\t\t\t\t\t\t\t// only. Instead it drops to its own full-width row and scrolls\n\t\t\t\t\t\t\t\t// horizontally, and returns inline when its parent is wide enough.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// Rendered once, not duplicated per breakpoint: a second copy\n\t\t\t\t\t\t\t\t// would put every nav link in the accessibility tree twice.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// Keep navigation intrinsic and single-line inside its scroller.\n\t\t\t\t\t\t\t\t// The shared inset reserves room for outer focus rings on every side.\n\t\t\t\t\t\t\t\t<nav\n\t\t\t\t\t\t\t\t\tonFocusCapture={(event) => {\n\t\t\t\t\t\t\t\t\t\t// Native focus can leave a partially visible action clipped.\n\t\t\t\t\t\t\t\t\t\t// Reveal only within this horizontal owner; preserve page scroll.\n\t\t\t\t\t\t\t\t\t\tconst nav = event.currentTarget;\n\t\t\t\t\t\t\t\t\t\t// React portal focus bubbles through its logical nav ancestry.\n\t\t\t\t\t\t\t\t\t\tif (!nav.contains(event.target)) return;\n\t\t\t\t\t\t\t\t\t\tconst viewport = nav.getBoundingClientRect();\n\t\t\t\t\t\t\t\t\t\tconst action = event.target.getBoundingClientRect();\n\t\t\t\t\t\t\t\t\t\tconst insets = getComputedStyle(nav);\n\t\t\t\t\t\t\t\t\t\tconst left = viewport.left + (parseFloat(insets.paddingLeft) || 0);\n\t\t\t\t\t\t\t\t\t\tconst right = viewport.right - (parseFloat(insets.paddingRight) || 0);\n\t\t\t\t\t\t\t\t\t\tif (action.left < left) nav.scrollLeft += action.left - left;\n\t\t\t\t\t\t\t\t\t\telse if (action.right > right) nav.scrollLeft += action.right - right;\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tclassName=\"stacked-layout--nav order-last flex w-full min-w-0 flex-nowrap items-center overflow-x-auto p-space-sm @3xl/stacked-shell:order-2 @3xl/stacked-shell:w-auto @3xl/stacked-shell:flex-1 [&>*]:shrink-0 [&>*]:flex-nowrap\">\n\t\t\t\t\t\t\t\t\t{resolvedNav}\n\t\t\t\t\t\t\t\t</nav>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{!!slots?.headerEnd && (\n\t\t\t\t\t\t\t\t<div className=\"stacked-layout--header-end ms-auto flex min-w-0 max-w-full flex-wrap items-center justify-end gap-space-sm @3xl/stacked-shell:order-3 @3xl/stacked-shell:gap-space-md [&>*]:max-w-full\">\n\t\t\t\t\t\t\t\t\t{slots.headerEnd}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t</header>\n\t\t\t</ThemeScopeHostProvider>\n\n\t\t\t{!!slots?.subheader && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'stacked-layout--subheader shrink-0 border-b border-border bg-background px-surface',\n\t\t\t\t\t\tsubheaderClassName,\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{slots.subheader}\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t<PageViewport\n\t\t\t\trender={<Content />}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'stacked-layout--content bg-background',\n\t\t\t\t\tcontentClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{contentWidth === 'contained' ? (\n\t\t\t\t\t<Container maxWidth=\"2xl\" gutter=\"lg\" className=\"stacked-layout--measure\">\n\t\t\t\t\t\t{resolvedContent}\n\t\t\t\t\t</Container>\n\t\t\t\t) : (\n\t\t\t\t\tresolvedContent\n\t\t\t\t)}\n\t\t\t</PageViewport>\n\t\t</div>\n\t);\n}\n","import { cn } from '../../../lib/utils';\nimport { SidebarInsetLayout } from './sidebar-inset-layout';\nimport { StackedLayout } from './stacked-layout';\nimport { TopbarSidebarLayout } from './topbar-sidebar-layout';\nimport type { SidebarInsetLayoutProps, StackedLayoutProps, TopbarSidebarLayoutProps } from './app-shell.types';\n\n/** Presets select chrome; each underlying shell retains its own typed slots and behavior. */\nexport type AppLayoutProps =\n | (Omit<TopbarSidebarLayoutProps, 'headerTheme'> & {variant?: 'light-header' | 'dark-header'})\n | (Omit<SidebarInsetLayoutProps, 'surface'> & {variant: 'sidebar' | 'inset'})\n | (StackedLayoutProps & {variant: 'stacked'});\n\nexport type AppLayoutVariant = NonNullable<AppLayoutProps['variant']>;\n\n/** Five ready compositions using three shell owners, with one page viewport. */\nexport function AppLayout(props: AppLayoutProps) {\n const presentation = {'data-app-layout': props.variant ?? 'light-header', className: cn('app-layout--component', props.className)};\n switch (props.variant) {\n case 'stacked': {\n const {variant: _variant, ...shell} = props;\n return <StackedLayout {...shell} {...presentation} />;\n }\n case 'sidebar':\n case 'inset': {\n const {variant, ...shell} = props;\n return <SidebarInsetLayout {...shell} {...presentation} surface={variant === 'sidebar' ? 'flush' : 'inset'} />;\n }\n default: {\n const {variant = 'light-header', ...shell} = props;\n return <TopbarSidebarLayout {...shell} {...presentation} headerTheme={variant === 'dark-header' ? 'dark' : 'light'} />;\n }\n }\n}\n"],"mappings":";;;;;;;AA0BA,IAAMA,IAA2F;CAChG,OAAO;CACP,MAAM;AACP;AAEA,SAAgBU,EAAoB,EACnC,aACA,iBAAc,SACd,iBAAc,QACd,uBAAoB,UACpB,iBACA,iBACA,mBACA,SACA,kBACA,YACA,U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