@adea-ai/ui 0.148.0 → 0.149.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/composites/about-dialog/about-dialog.js +2 -3
- package/dist/components/composites/about-dialog/index.js +1 -2
- package/dist/components/composites/accent-picker/accent-picker.js +2 -3
- package/dist/components/composites/accent-picker/index.js +1 -2
- package/dist/components/composites/account-menu/account-menu.js +3 -4
- package/dist/components/composites/account-menu/index.js +1 -2
- package/dist/components/composites/action-button/action-button.js +2 -3
- package/dist/components/composites/action-button/index.js +1 -2
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js +1 -2
- package/dist/components/composites/appearance-editor/appearance-choices.js +2 -3
- package/dist/components/composites/appearance-editor/appearance-editor.js +5 -6
- package/dist/components/composites/appearance-editor/appearance-rows.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-rows.js +4 -4
- package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
- package/dist/components/composites/appearance-editor/font-settings-group.js +3 -4
- package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
- package/dist/components/composites/appearance-editor/index.js +2 -2
- package/dist/components/composites/appearance-editor/theme-preview.js +1 -2
- package/dist/components/composites/catalog-browser/catalog-browser-group.js +3 -4
- package/dist/components/composites/catalog-browser/catalog-browser.js +4 -5
- package/dist/components/composites/catalog-browser/catalog-detail.js +1 -2
- package/dist/components/composites/chain-of-thought/chain-of-thought.js +1 -2
- package/dist/components/composites/chain-of-thought/index.js +1 -2
- package/dist/components/composites/chat/chat.js +1 -2
- package/dist/components/composites/chat/index.js +1 -2
- package/dist/components/composites/checkpoint/checkpoint-model.js +1 -2
- package/dist/components/composites/checkpoint/checkpoint.js +4 -5
- package/dist/components/composites/checkpoint/index.js +1 -1
- package/dist/components/composites/confirmation/confirmation-model.js +1 -2
- package/dist/components/composites/confirmation/confirmation.js +1 -2
- package/dist/components/composites/confirmation/index.js +1 -1
- package/dist/components/composites/context/context-model.js +1 -2
- package/dist/components/composites/context/context.js +1 -2
- package/dist/components/composites/context/index.js +1 -1
- package/dist/components/composites/file-tree/build-file-tree.js +1 -2
- package/dist/components/composites/file-tree/file-tree.js +2 -3
- package/dist/components/composites/file-tree/index.js +1 -1
- package/dist/components/composites/help-center/help-center.js +3 -4
- package/dist/components/composites/help-center/index.js +1 -2
- package/dist/components/composites/icon-picker/icon-picker.js +1 -2
- package/dist/components/composites/icon-picker/image-data-url.js +1 -2
- package/dist/components/composites/icon-picker/index.js +1 -1
- package/dist/components/composites/icon-picker/shell-icons.js +1 -2
- package/dist/components/composites/inline-citation/citation.d.ts.map +1 -1
- package/dist/components/composites/inline-citation/citation.js +2 -3
- package/dist/components/composites/inline-citation/citation.js.map +1 -1
- package/dist/components/composites/inline-citation/index.js +1 -1
- package/dist/components/composites/inline-citation/inline-citation.js +2 -3
- package/dist/components/composites/list-row/index.js +1 -1
- package/dist/components/composites/list-row/list-row-control.js +1 -2
- package/dist/components/composites/list-row/list-row.js +3 -4
- package/dist/components/composites/message-scroller/index.js +1 -1
- package/dist/components/composites/message-scroller/message-scroller.js +1 -2
- package/dist/components/composites/message-scroller/scroll-anchor.js +1 -2
- package/dist/components/composites/model-selector/index.js +1 -1
- package/dist/components/composites/model-selector/model-selector.js +2 -3
- package/dist/components/composites/model-selector/model-selector.js.map +1 -1
- package/dist/components/composites/model-selector/models.js +1 -2
- package/dist/components/composites/plan/index.js +1 -2
- package/dist/components/composites/plan/plan.js +1 -2
- package/dist/components/composites/queue/index.js +1 -2
- package/dist/components/composites/queue/queue.js +1 -2
- package/dist/components/composites/reasoning/index.js +1 -2
- package/dist/components/composites/reasoning/reasoning.js +1 -2
- package/dist/components/composites/scene-controls/index.js +1 -2
- package/dist/components/composites/scene-controls/scene-controls.js +1 -2
- package/dist/components/composites/settings/index.js +1 -1
- package/dist/components/composites/settings/settings-layout.js +1 -2
- package/dist/components/composites/settings/settings-navigation.js +3 -4
- package/dist/components/composites/settings/settings.js +3 -4
- package/dist/components/composites/sources/index.js +1 -1
- package/dist/components/composites/sources/source.js +1 -2
- package/dist/components/composites/sources/sources.js +1 -2
- package/dist/components/composites/stack-trace/index.js +1 -1
- package/dist/components/composites/stack-trace/parse-stack-trace.js +1 -2
- package/dist/components/composites/stack-trace/stack-trace.js +3 -4
- package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
- package/dist/components/composites/stat/index.js +1 -2
- package/dist/components/composites/stat/stat.js +1 -2
- package/dist/components/composites/subagent/index.js +1 -2
- package/dist/components/composites/subagent/subagent.js +1 -2
- package/dist/components/composites/suggestion/index.js +1 -2
- package/dist/components/composites/suggestion/suggestion.js +1 -2
- package/dist/components/composites/task/index.js +1 -2
- package/dist/components/composites/task/task.js +2 -3
- package/dist/components/composites/terminal/ansi.js +1 -2
- package/dist/components/composites/terminal/index.js +1 -1
- package/dist/components/composites/terminal/terminal-model.js +1 -2
- package/dist/components/composites/terminal/terminal.js +2 -3
- package/dist/components/composites/test-results/index.js +1 -1
- package/dist/components/composites/test-results/test-results-model.js +1 -2
- package/dist/components/composites/test-results/test-results.js +2 -3
- package/dist/components/composites/tool/format-tool-value.js +1 -2
- package/dist/components/composites/tool/index.js +1 -1
- package/dist/components/composites/tool/tool.js +1 -2
- package/dist/components/composites/tree/index.js +1 -2
- package/dist/components/composites/tree/tree-navigation.js +1 -2
- package/dist/components/composites/tree/tree.js +1 -2
- package/dist/components/composites/update-dialog/channel-control.js +2 -3
- package/dist/components/composites/update-dialog/update-dialog.js +9 -7
- package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
- package/dist/components/composites/workspace-mark/index.js +1 -2
- package/dist/components/composites/workspace-mark/workspace-mark.d.ts.map +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.js +24 -16
- package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
- package/dist/components/composites/workspace-switcher/index.js +1 -1
- package/dist/components/composites/workspace-switcher/workspace-order.js +1 -2
- package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js +1 -2
- package/dist/components/composites/workspace-switcher/workspace-switcher.d.ts.map +1 -1
- package/dist/components/composites/workspace-switcher/workspace-switcher.js +28 -21
- package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
- package/dist/components/conversation/atomic/chat-composer.js +2 -3
- package/dist/components/conversation/atomic/index.js +1 -2
- package/dist/components/conversation/busy-send-button.js +1 -2
- package/dist/components/conversation/chat-composer.js +1 -2
- package/dist/components/conversation/composer-menu.js +1 -2
- package/dist/components/conversation/conversation-avatar.js +1 -2
- package/dist/components/conversation/conversation-pane.js +1 -2
- package/dist/components/conversation/conversation-surface.js +1 -2
- package/dist/components/conversation/ime-guard.js +1 -2
- package/dist/components/conversation/index.js +1 -1
- package/dist/components/conversation/internal/chat-composer-shell.js +5 -3
- package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
- package/dist/components/conversation/message-composer.js +2 -3
- package/dist/components/conversation/message-row.js +1 -2
- package/dist/components/conversation/paste-preview.js +0 -1
- package/dist/components/conversation/paste-token-editor.js +1 -2
- package/dist/components/conversation/paste-tokens.js +1 -2
- package/dist/components/conversation/scroll-follow-core.js +0 -1
- package/dist/components/conversation/scroll-follow.js +1 -2
- package/dist/components/conversation/thread-panel.js +1 -2
- package/dist/components/conversation/transcript-composition.js +1 -2
- package/dist/components/conversation/transcript-folding.js +1 -2
- package/dist/components/conversation/transcript-grouping.js +1 -2
- package/dist/components/layout/app-shell/app-shell.js +1 -2
- package/dist/components/layout/app-shell/skip-link.js +1 -2
- package/dist/components/layout/contextual-sidebar/contextual-sidebar.js +1 -2
- package/dist/components/layout/contextual-sidebar/index.js +1 -1
- package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js +1 -2
- package/dist/components/layout/floating-preview/floating-preview.js +1 -2
- package/dist/components/layout/floating-preview/model.js +1 -2
- package/dist/components/layout/orbit-layout/index.js +1 -2
- package/dist/components/layout/orbit-layout/orbit-layout.js +1 -2
- package/dist/components/layout/page/index.js +1 -2
- package/dist/components/layout/page/page.js +1 -2
- package/dist/components/layout/panel/index.js +1 -2
- package/dist/components/layout/panel/panel.js +1 -2
- package/dist/components/layout/pixel-pane/index.js +1 -2
- package/dist/components/layout/pixel-pane/pixel-pane.js +1 -2
- package/dist/components/layout/pixel-resize-handle/index.js +1 -2
- package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +1 -2
- package/dist/components/layout/shell-rail/index.js +1 -2
- package/dist/components/layout/shell-rail/shell-rail.js +2 -3
- package/dist/components/layout/shell-top-bar/index.js +1 -2
- package/dist/components/layout/shell-top-bar/shell-top-bar.js +1 -2
- package/dist/components/layout/side-rail/index.js +1 -1
- package/dist/components/layout/side-rail/side-rail-context.js +1 -2
- package/dist/components/layout/side-rail/side-rail.js +2 -3
- package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js +1 -2
- package/dist/components/layout/sidebar-nav/sidebar-nav.js +1 -2
- package/dist/components/layout/split-layout/drop.js +1 -2
- package/dist/components/layout/split-layout/geometry.js +1 -2
- package/dist/components/layout/split-layout/model.js +1 -2
- package/dist/components/layout/split-layout/resize-controller-core-retry.js +1 -2
- package/dist/components/layout/split-layout/resize-controller-core.js +1 -2
- package/dist/components/layout/split-layout/resize-controller-retry-2.js +1 -2
- package/dist/components/layout/split-layout/resize-controller-retry.js +1 -2
- package/dist/components/layout/split-layout/resize-controller.js +1 -2
- package/dist/components/layout/split-layout/split-layout.d.ts.map +1 -1
- package/dist/components/layout/split-layout/split-layout.js +31 -17
- package/dist/components/layout/split-layout/split-layout.js.map +1 -1
- package/dist/components/layout/split-layout/tree.js +1 -2
- package/dist/components/layout/status-bar/index.js +1 -2
- package/dist/components/layout/status-bar/status-bar.js +1 -2
- package/dist/components/layout/top-bar/index.js +1 -2
- package/dist/components/layout/top-bar/top-bar.js +1 -2
- package/dist/components/layout/virtual-window/index.js +1 -2
- package/dist/components/layout/virtual-window/virtual-window.js +1 -2
- package/dist/components/motion/presence.js +1 -2
- package/dist/components/theme/appearance-panel.js +4 -5
- package/dist/components/theme/index.js +2 -2
- package/dist/components/theme/lazy.js +4 -4
- package/dist/components/theme/script.js +1 -2
- package/dist/components/theme/theme-catalogue-source.js +1 -2
- package/dist/components/theme/theme-context.js +1 -2
- package/dist/components/theme/theme-document-core.js +3 -4
- package/dist/components/theme/theme-mode-toggle.js +2 -3
- package/dist/components/theme/theme-persistence.js +4 -5
- package/dist/components/theme/theme-picker.js +1 -2
- package/dist/components/theme/theme-provider-core.js +1 -2
- package/dist/components/theme/theme-provider-lazy.js +2 -3
- package/dist/components/theme/theme-provider-value.js +2 -3
- package/dist/components/theme/theme-provider.js +1 -2
- package/dist/components/theme/theme-script.js +4 -5
- package/dist/components/theme/theme-state-core.js +3 -4
- package/dist/components/theme/theme-toggle.js +1 -2
- package/dist/components/ui/accordion/accordion.js +1 -2
- package/dist/components/ui/accordion/index.js +1 -2
- package/dist/components/ui/alert/alert.js +2 -3
- package/dist/components/ui/alert/index.js +1 -2
- package/dist/components/ui/alert-dialog/alert-dialog.js +2 -3
- package/dist/components/ui/alert-dialog/index.js +1 -2
- package/dist/components/ui/annotation-surface/annotation-surface.js +1 -2
- package/dist/components/ui/annotation-surface/geometry.js +1 -2
- package/dist/components/ui/annotation-surface/index.js +1 -2
- package/dist/components/ui/aspect-ratio/aspect-ratio.js +1 -2
- package/dist/components/ui/aspect-ratio/index.js +1 -2
- package/dist/components/ui/attachment/attachment.js +1 -2
- package/dist/components/ui/attachment/index.js +1 -2
- package/dist/components/ui/avatar/avatar.js +1 -2
- package/dist/components/ui/avatar/index.js +1 -2
- package/dist/components/ui/badge/badge.js +2 -3
- package/dist/components/ui/badge/index.js +1 -2
- package/dist/components/ui/board/board.js +2 -3
- package/dist/components/ui/board/index.js +1 -2
- package/dist/components/ui/breadcrumb/breadcrumb.js +1 -2
- package/dist/components/ui/breadcrumb/index.js +1 -2
- package/dist/components/ui/bubble/bubble.js +1 -2
- package/dist/components/ui/bubble/index.js +1 -2
- package/dist/components/ui/button/button.js +2 -3
- package/dist/components/ui/button/index.js +1 -2
- package/dist/components/ui/button-group/button-group.js +1 -2
- package/dist/components/ui/button-group/index.js +1 -2
- package/dist/components/ui/calendar/calendar.js +1 -2
- package/dist/components/ui/calendar/index.js +1 -2
- package/dist/components/ui/callout/callout.js +2 -3
- package/dist/components/ui/callout/index.js +1 -2
- package/dist/components/ui/card/card.js +2 -3
- package/dist/components/ui/card/index.js +1 -2
- package/dist/components/ui/carousel/carousel.js +1 -2
- package/dist/components/ui/carousel/index.js +1 -2
- package/dist/components/ui/chart/chart-options.js +1 -2
- package/dist/components/ui/chart/chart.js +1 -2
- package/dist/components/ui/checkbox/checkbox.js +2 -3
- package/dist/components/ui/checkbox/index.js +1 -2
- package/dist/components/ui/code-block/code-block.js +2 -3
- package/dist/components/ui/code-block/index.js +1 -2
- package/dist/components/ui/collapsible/collapsible.js +1 -2
- package/dist/components/ui/collapsible/index.js +1 -2
- package/dist/components/ui/combobox/combobox.js +2 -3
- package/dist/components/ui/combobox/value-combobox.js +1 -2
- package/dist/components/ui/command/command.js +3 -4
- package/dist/components/ui/command/index.js +1 -2
- package/dist/components/ui/context-menu/context-menu.js +2 -3
- package/dist/components/ui/context-menu/index.js +1 -2
- package/dist/components/ui/detail-panel/detail-panel.js +2 -3
- package/dist/components/ui/detail-panel/index.js +1 -2
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog/dialog.js +3 -3
- package/dist/components/ui/dialog/dialog.js.map +1 -1
- package/dist/components/ui/dialog/index.js +1 -2
- package/dist/components/ui/diff-block/diff-block.js +2 -3
- package/dist/components/ui/diff-block/index.js +1 -2
- package/dist/components/ui/drawer/drawer.js +1 -2
- package/dist/components/ui/drawer/index.js +1 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +2 -3
- package/dist/components/ui/dropdown-menu/index.js +1 -2
- package/dist/components/ui/empty/empty-state.js +3 -4
- package/dist/components/ui/empty/empty.js +1 -2
- package/dist/components/ui/entity-icon/entity-icon.js +2 -3
- package/dist/components/ui/entity-icon/index.js +1 -2
- package/dist/components/ui/field/field.js +3 -4
- package/dist/components/ui/field/number-field.js +1 -2
- package/dist/components/ui/hover-card/hover-card.js +2 -3
- package/dist/components/ui/hover-card/index.js +1 -2
- package/dist/components/ui/input/index.js +1 -1
- package/dist/components/ui/input/input-control.js +1 -2
- package/dist/components/ui/input/input.js +1 -2
- package/dist/components/ui/input-group/input-group.js +2 -3
- package/dist/components/ui/input-group/secret-input-group.js +2 -3
- package/dist/components/ui/input-otp/index.js +1 -2
- package/dist/components/ui/input-otp/input-otp.js +1 -2
- package/dist/components/ui/item/index.js +1 -2
- package/dist/components/ui/item/item.js +2 -3
- package/dist/components/ui/kbd/kbd.js +2 -3
- package/dist/components/ui/kbd/platform-modifier.js +1 -2
- package/dist/components/ui/label/index.js +1 -2
- package/dist/components/ui/label/label.js +1 -2
- package/dist/components/ui/marker/index.js +1 -2
- package/dist/components/ui/marker/marker.js +1 -2
- package/dist/components/ui/menubar/index.js +1 -2
- package/dist/components/ui/menubar/menubar.js +2 -3
- package/dist/components/ui/message/cite-ranges.js +1 -2
- package/dist/components/ui/message/index.js +1 -1
- package/dist/components/ui/message/message.js +1 -2
- package/dist/components/ui/message/parse-message-text.js +1 -2
- package/dist/components/ui/modal-dialog/index.js +1 -2
- package/dist/components/ui/modal-dialog/modal-dialog.js +1 -2
- package/dist/components/ui/native-select/index.js +1 -2
- package/dist/components/ui/native-select/native-select.js +2 -3
- package/dist/components/ui/navigation-menu/index.js +1 -2
- package/dist/components/ui/navigation-menu/navigation-menu.js +1 -2
- package/dist/components/ui/pagination/index.js +1 -2
- package/dist/components/ui/pagination/pagination.js +1 -2
- package/dist/components/ui/popover/index.js +1 -2
- package/dist/components/ui/popover/popover.js +2 -3
- package/dist/components/ui/progress/index.js +1 -2
- package/dist/components/ui/progress/progress.js +1 -2
- package/dist/components/ui/questionnaire/index.js +1 -2
- package/dist/components/ui/questionnaire/questionnaire.js +1 -2
- package/dist/components/ui/radio-group/index.js +1 -2
- package/dist/components/ui/radio-group/radio-group.js +2 -3
- package/dist/components/ui/resizable/index.js +1 -2
- package/dist/components/ui/resizable/resizable.js +1 -2
- package/dist/components/ui/scroll-area/index.js +1 -2
- package/dist/components/ui/scroll-area/scroll-area.js +1 -2
- package/dist/components/ui/select/index.js +1 -2
- package/dist/components/ui/select/select.js +2 -3
- package/dist/components/ui/separator/index.js +1 -2
- package/dist/components/ui/separator/separator.js +1 -2
- package/dist/components/ui/sheet/index.js +1 -2
- package/dist/components/ui/sheet/sheet.js +2 -3
- package/dist/components/ui/skeleton/index.js +1 -2
- package/dist/components/ui/skeleton/skeleton.js +1 -2
- package/dist/components/ui/slider/index.js +1 -2
- package/dist/components/ui/slider/slider.js +1 -2
- package/dist/components/ui/spinner/index.js +1 -2
- package/dist/components/ui/spinner/spinner.js +2 -3
- package/dist/components/ui/status-chip/index.js +1 -2
- package/dist/components/ui/status-chip/status-chip.js +2 -3
- package/dist/components/ui/switch/index.js +1 -2
- package/dist/components/ui/switch/switch.js +2 -3
- package/dist/components/ui/table/index.js +1 -2
- package/dist/components/ui/table/table.js +1 -2
- package/dist/components/ui/tabs/index.js +1 -2
- package/dist/components/ui/tabs/tabs.js +1 -2
- package/dist/components/ui/text-link/index.js +1 -2
- package/dist/components/ui/text-link/text-link.js +1 -2
- package/dist/components/ui/textarea/index.js +1 -2
- package/dist/components/ui/textarea/textarea.js +2 -3
- package/dist/components/ui/toast/index.js +1 -2
- package/dist/components/ui/toast/toast.js +1 -2
- package/dist/components/ui/toggle/index.js +1 -2
- package/dist/components/ui/toggle/toggle.js +2 -3
- package/dist/components/ui/toggle-group/index.js +1 -2
- package/dist/components/ui/toggle-group/toggle-group.js +1 -2
- package/dist/components/ui/tooltip/index.js +1 -2
- package/dist/components/ui/tooltip/tooltip.js +2 -3
- package/dist/components/ui/trace/index.js +1 -2
- package/dist/components/ui/trace/trace.js +1 -2
- package/dist/components/ui/typography/index.js +1 -2
- package/dist/components/ui/typography/typography.js +2 -3
- package/dist/index.js +11 -11
- package/dist/lib/accent-presets.js +1 -2
- package/dist/lib/accent-roles.js +1 -2
- package/dist/lib/appearance-font-settings.js +1 -2
- package/dist/lib/clipboard.js +1 -2
- package/dist/lib/cn-tables.generated.js +8 -9
- package/dist/lib/cn-tables.generated.js.map +1 -1
- package/dist/lib/download.js +1 -2
- package/dist/lib/font-catalog.js +0 -1
- package/dist/lib/font-zoom.js +1 -2
- package/dist/lib/form-field.js +1 -2
- package/dist/lib/keyed-rows.js +1 -2
- package/dist/lib/overlay.js +1 -2
- package/dist/lib/preference-store.js +1 -2
- package/dist/lib/safe-script.js +1 -2
- package/dist/lib/theme-accents.js +1 -2
- package/dist/lib/theme-catalogue.js +1 -2
- package/dist/lib/theme-css.js +1 -2
- package/dist/lib/theme-defaults.generated.js +1 -2
- package/dist/lib/theme-defaults.js +1 -2
- package/dist/lib/theme-engine-light.js +1 -2
- package/dist/lib/theme-engine.js +1 -2
- package/dist/lib/theme-projection.js +1 -2
- package/dist/lib/theme-records.js +1 -2
- package/dist/lib/theme-surface.js +1 -2
- package/dist/lib/themes.js +2 -3
- package/dist/lib/tokens.js +1 -2
- package/dist/lib/tooltip-focus-gate.js +1 -2
- package/dist/lib/utils.js +1 -2
- package/dist/lib/variants.js +1 -2
- package/dist/lib/version-notes.js +1 -2
- package/dist/lint.js +1 -2
- package/dist/r/about-dialog.json +1 -1
- package/dist/r/accordion.json +1 -1
- package/dist/r/account-menu.json +1 -1
- package/dist/r/alert.json +1 -1
- package/dist/r/appearance-editor.json +2 -2
- package/dist/r/attachment.json +1 -1
- package/dist/r/breadcrumb.json +1 -1
- package/dist/r/calendar.json +1 -1
- package/dist/r/carousel.json +1 -1
- package/dist/r/catalog-browser.json +1 -1
- package/dist/r/chain-of-thought.json +1 -1
- package/dist/r/chat.json +1 -1
- package/dist/r/checkbox.json +1 -1
- package/dist/r/checkpoint.json +1 -1
- package/dist/r/code-block.json +1 -1
- package/dist/r/combobox.json +1 -1
- package/dist/r/command.json +1 -1
- package/dist/r/confirmation.json +1 -1
- package/dist/r/context-menu.json +1 -1
- package/dist/r/context.json +1 -1
- package/dist/r/conversation.json +1 -1
- package/dist/r/detail-panel.json +1 -1
- package/dist/r/dialog.json +1 -1
- package/dist/r/dropdown-menu.json +1 -1
- package/dist/r/empty.json +1 -1
- package/dist/r/file-tree.json +1 -1
- package/dist/r/floating-preview.json +1 -1
- package/dist/r/help-center.json +1 -1
- package/dist/r/icon-picker.json +1 -1
- package/dist/r/inline-citation.json +1 -1
- package/dist/r/lib.json +2 -2
- package/dist/r/menubar.json +1 -1
- package/dist/r/message-scroller.json +1 -1
- package/dist/r/model-selector.json +1 -1
- package/dist/r/native-select.json +1 -1
- package/dist/r/navigation-menu.json +1 -1
- package/dist/r/pagination.json +1 -1
- package/dist/r/pixel-resize-handle.json +1 -1
- package/dist/r/plan.json +1 -1
- package/dist/r/questionnaire.json +1 -1
- package/dist/r/queue.json +1 -1
- package/dist/r/radio-group.json +1 -1
- package/dist/r/reasoning.json +1 -1
- package/dist/r/registry.json +70 -70
- package/dist/r/resizable.json +1 -1
- package/dist/r/scene-controls.json +1 -1
- package/dist/r/select.json +1 -1
- package/dist/r/settings.json +1 -1
- package/dist/r/sheet.json +1 -1
- package/dist/r/shell-rail.json +1 -1
- package/dist/r/sidebar-nav.json +1 -1
- package/dist/r/sources.json +1 -1
- package/dist/r/spinner.json +1 -1
- package/dist/r/split-layout.json +1 -1
- package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +4 -5
- package/dist/r/src/components/composites/appearance-editor/font-settings-group.tsx +1 -1
- package/dist/r/src/components/composites/inline-citation/citation.ts +4 -1
- package/dist/r/src/components/composites/model-selector/model-selector.tsx +1 -1
- package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +1 -1
- package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +2 -2
- package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +23 -12
- package/dist/r/src/components/composites/workspace-switcher/workspace-switcher.tsx +10 -5
- package/dist/r/src/components/conversation/internal/chat-composer-shell.tsx +2 -2
- package/dist/r/src/components/layout/split-layout/split-layout.tsx +44 -29
- package/dist/r/src/components/ui/dialog/dialog.tsx +1 -0
- package/dist/r/src/lib/cn-tables.generated.ts +7 -7
- package/dist/r/stack-trace.json +1 -1
- package/dist/r/stat.json +1 -1
- package/dist/r/subagent.json +1 -1
- package/dist/r/task.json +1 -1
- package/dist/r/terminal.json +1 -1
- package/dist/r/test-results.json +1 -1
- package/dist/r/theming.json +2 -2
- package/dist/r/toast.json +1 -1
- package/dist/r/tool.json +1 -1
- package/dist/r/top-bar.json +1 -1
- package/dist/r/trace.json +1 -1
- package/dist/r/tree.json +1 -1
- package/dist/r/update-dialog.json +1 -1
- package/dist/r/workspace-switcher.json +1 -1
- package/dist/vite/index.d.ts +2 -0
- package/dist/vite/index.d.ts.map +1 -0
- package/dist/vite/source-parser.d.ts +57 -0
- package/dist/vite/source-parser.d.ts.map +1 -0
- package/dist/vite/source-parser.js +247 -0
- package/dist/vite/source-parser.js.map +1 -0
- package/dist/vite/tailwind-sources.d.ts +111 -0
- package/dist/vite/tailwind-sources.d.ts.map +1 -0
- package/dist/vite/tailwind-sources.js +500 -0
- package/dist/vite/tailwind-sources.js.map +1 -0
- package/dist/vite.js +1 -0
- package/package.json +32 -19
- package/registry.json +70 -70
- package/src/components/composites/appearance-editor/appearance-rows.tsx +4 -5
- package/src/components/composites/appearance-editor/font-settings-group.tsx +1 -1
- package/src/components/composites/inline-citation/citation.ts +4 -1
- package/src/components/composites/model-selector/model-selector.tsx +1 -1
- package/src/components/composites/stack-trace/stack-trace.tsx +1 -1
- package/src/components/composites/update-dialog/update-dialog.tsx +2 -2
- package/src/components/composites/workspace-mark/workspace-mark.tsx +23 -12
- package/src/components/composites/workspace-switcher/workspace-switcher.tsx +10 -5
- package/src/components/conversation/internal/chat-composer-shell.tsx +2 -2
- package/src/components/layout/split-layout/split-layout.tsx +44 -29
- package/src/components/ui/dialog/dialog.tsx +1 -0
- package/src/lib/cn-tables.generated.ts +7 -7
- package/src/vite/index.ts +17 -0
- package/src/vite/source-parser.ts +358 -0
- package/src/vite/tailwind-sources.ts +754 -0
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { parse } from '@babel/parser'
|
|
2
|
+
import { extname } from 'node:path'
|
|
3
|
+
|
|
4
|
+
// Babel's node unions are too wide to narrow usefully across this many shapes;
|
|
5
|
+
// every reader below checks `type` before it touches a field.
|
|
6
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
7
|
+
export type SyntaxNode = any
|
|
8
|
+
|
|
9
|
+
export type Selection = { kind: 'all' } | { kind: 'named'; names: string[] }
|
|
10
|
+
|
|
11
|
+
export interface StaticRuntimeImport {
|
|
12
|
+
specifier: string
|
|
13
|
+
kind: 'side-effect' | 'bindings'
|
|
14
|
+
bindings: Array<{ imported: string; local: string }>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type RuntimeReexport =
|
|
18
|
+
| { kind: 'star'; source: string }
|
|
19
|
+
| { kind: 'empty'; source: string }
|
|
20
|
+
| { kind: 'namespace'; source?: string; exported: string }
|
|
21
|
+
| { kind: 'named'; source?: string; exported: string; imported: string }
|
|
22
|
+
|
|
23
|
+
/** Parse source without depending on the TypeScript compiler's JavaScript API. */
|
|
24
|
+
export function parseSource(file: string, source: string): SyntaxNode {
|
|
25
|
+
const extension = extname(file).toLowerCase()
|
|
26
|
+
const typed = ['.ts', '.tsx', '.mts', '.cts'].includes(extension)
|
|
27
|
+
const jsx = ['.jsx', '.tsx'].includes(extension)
|
|
28
|
+
const ast = parse(source, {
|
|
29
|
+
sourceFilename: file,
|
|
30
|
+
sourceType: 'unambiguous',
|
|
31
|
+
allowUndeclaredExports: true,
|
|
32
|
+
allowReturnOutsideFunction: extension === '.cjs',
|
|
33
|
+
allowNewTargetOutsideFunction: extension === '.cjs',
|
|
34
|
+
plugins: [...(typed ? (['typescript'] as const) : []), ...(jsx ? (['jsx'] as const) : [])],
|
|
35
|
+
})
|
|
36
|
+
Object.defineProperty(ast, 'sourceText', { value: source })
|
|
37
|
+
return ast
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Visit syntax nodes with their actual parent, without traversing location metadata. */
|
|
41
|
+
export function visitSource(
|
|
42
|
+
node: SyntaxNode,
|
|
43
|
+
visit: (node: SyntaxNode, parent: SyntaxNode) => void,
|
|
44
|
+
parent: SyntaxNode = null
|
|
45
|
+
): void {
|
|
46
|
+
if (!node || typeof node !== 'object' || typeof node.type !== 'string') return
|
|
47
|
+
visit(node, parent)
|
|
48
|
+
for (const [key, value] of Object.entries(node)) {
|
|
49
|
+
if (key === 'loc' || key === 'tokens' || key === 'comments' || key === 'errors') continue
|
|
50
|
+
if (Array.isArray(value)) {
|
|
51
|
+
for (const child of value) visitSource(child, visit, node)
|
|
52
|
+
} else visitSource(value, visit, node)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Describe statically imported runtime bindings without treating type imports as runtime edges. */
|
|
57
|
+
export function staticRuntimeImports(ast: SyntaxNode): StaticRuntimeImport[] {
|
|
58
|
+
const imports: StaticRuntimeImport[] = []
|
|
59
|
+
for (const declaration of ast.program.body) {
|
|
60
|
+
if (declaration.type !== 'ImportDeclaration' || declaration.importKind === 'type') continue
|
|
61
|
+
if (declaration.specifiers.length === 0) {
|
|
62
|
+
const prefix = ast.sourceText
|
|
63
|
+
.slice(declaration.start, declaration.source.start)
|
|
64
|
+
.replace(/\/\*[\s\S]*?\*\/|\/\/[^\n\r]*/g, '')
|
|
65
|
+
.trim()
|
|
66
|
+
// Preserve the existing collector's distinction between bare imports and `import {}`.
|
|
67
|
+
if (prefix === 'import')
|
|
68
|
+
imports.push({
|
|
69
|
+
specifier: declaration.source.value,
|
|
70
|
+
kind: 'side-effect',
|
|
71
|
+
bindings: [],
|
|
72
|
+
})
|
|
73
|
+
continue
|
|
74
|
+
}
|
|
75
|
+
const bindings: StaticRuntimeImport['bindings'] = []
|
|
76
|
+
for (const binding of declaration.specifiers) {
|
|
77
|
+
if (binding.importKind === 'type') continue
|
|
78
|
+
const imported =
|
|
79
|
+
binding.type === 'ImportDefaultSpecifier'
|
|
80
|
+
? 'default'
|
|
81
|
+
: binding.type === 'ImportNamespaceSpecifier'
|
|
82
|
+
? '*'
|
|
83
|
+
: (binding.imported.name ?? binding.imported.value)
|
|
84
|
+
bindings.push({ imported, local: binding.local.name })
|
|
85
|
+
}
|
|
86
|
+
if (bindings.length)
|
|
87
|
+
imports.push({
|
|
88
|
+
specifier: declaration.source.value,
|
|
89
|
+
kind: 'bindings',
|
|
90
|
+
bindings,
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
return imports
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Conservatively select members used through a namespace import. */
|
|
97
|
+
export function selectNamespace(
|
|
98
|
+
ast: SyntaxNode,
|
|
99
|
+
local: string,
|
|
100
|
+
ignoredBinding: SyntaxNode = null
|
|
101
|
+
): Selection | undefined {
|
|
102
|
+
const names = new Set<string>()
|
|
103
|
+
let used = false
|
|
104
|
+
let opaque = false
|
|
105
|
+
let shadowed = false
|
|
106
|
+
visitSource(ast, (node, parent) => {
|
|
107
|
+
if (
|
|
108
|
+
!parent ||
|
|
109
|
+
node === ignoredBinding ||
|
|
110
|
+
!['Identifier', 'JSXIdentifier'].includes(node.type) ||
|
|
111
|
+
node.name !== local
|
|
112
|
+
)
|
|
113
|
+
return
|
|
114
|
+
if (parent.type.startsWith('Import')) return
|
|
115
|
+
const binding =
|
|
116
|
+
(parent.type === 'VariableDeclarator' && parent.id === node) ||
|
|
117
|
+
(parent.type === 'CatchClause' && parent.param === node) ||
|
|
118
|
+
(/^(?:Function|Class|TSInterface|TSTypeAlias|TSEnum|TSModule)/.test(parent.type) &&
|
|
119
|
+
(parent.id === node || parent.params?.includes(node)))
|
|
120
|
+
if (binding) {
|
|
121
|
+
shadowed = true
|
|
122
|
+
return
|
|
123
|
+
}
|
|
124
|
+
if (['MemberExpression', 'OptionalMemberExpression'].includes(parent.type)) {
|
|
125
|
+
if (parent.property === node && !parent.computed) return
|
|
126
|
+
if (parent.object === node) {
|
|
127
|
+
used = true
|
|
128
|
+
if (!parent.computed && parent.property.type === 'Identifier')
|
|
129
|
+
names.add(parent.property.name)
|
|
130
|
+
else if (parent.computed && parent.property.type === 'StringLiteral')
|
|
131
|
+
names.add(String(parent.property.value))
|
|
132
|
+
else if (
|
|
133
|
+
parent.computed &&
|
|
134
|
+
parent.property.type === 'TemplateLiteral' &&
|
|
135
|
+
parent.property.expressions.length === 0 &&
|
|
136
|
+
typeof parent.property.quasis[0].value.cooked === 'string'
|
|
137
|
+
)
|
|
138
|
+
names.add(parent.property.quasis[0].value.cooked)
|
|
139
|
+
else opaque = true
|
|
140
|
+
return
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
if (parent.type === 'JSXMemberExpression') {
|
|
144
|
+
if (parent.property === node) return
|
|
145
|
+
if (parent.object === node) {
|
|
146
|
+
used = true
|
|
147
|
+
names.add(parent.property.name)
|
|
148
|
+
return
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (parent.type === 'JSXAttribute' && parent.name === node) return
|
|
152
|
+
used = true
|
|
153
|
+
opaque = true
|
|
154
|
+
})
|
|
155
|
+
if (!used) return undefined
|
|
156
|
+
return shadowed || opaque ? { kind: 'all' } : { kind: 'named', names: [...names].toSorted() }
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** Collect literal dynamic imports and require edges, rejecting opaque dynamic paths. */
|
|
160
|
+
export function dynamicRuntimeImports(
|
|
161
|
+
ast: SyntaxNode,
|
|
162
|
+
file: string,
|
|
163
|
+
label = 'ui-tailwind-sources'
|
|
164
|
+
): Array<{ specifier: string; selection: Selection }> {
|
|
165
|
+
const parents = new WeakMap<SyntaxNode, SyntaxNode>()
|
|
166
|
+
const nodes: SyntaxNode[] = []
|
|
167
|
+
visitSource(ast, (node, parent) => {
|
|
168
|
+
if (parent) parents.set(node, parent)
|
|
169
|
+
if (['ImportExpression', 'CallExpression', 'OptionalCallExpression'].includes(node.type))
|
|
170
|
+
nodes.push(node)
|
|
171
|
+
})
|
|
172
|
+
const result: Array<{ specifier: string; selection: Selection }> = []
|
|
173
|
+
for (const node of nodes) {
|
|
174
|
+
if (node.type === 'ImportExpression') {
|
|
175
|
+
const argument = node.source
|
|
176
|
+
const specifier: string | undefined =
|
|
177
|
+
argument.type === 'StringLiteral'
|
|
178
|
+
? argument.value
|
|
179
|
+
: argument.type === 'TemplateLiteral' && argument.expressions.length === 0
|
|
180
|
+
? argument.quasis[0].value.cooked
|
|
181
|
+
: undefined
|
|
182
|
+
if (specifier == null)
|
|
183
|
+
throw new Error(
|
|
184
|
+
`[${label}] non-literal runtime import in ${file}; use a literal import path so shared UI sources remain discoverable`
|
|
185
|
+
)
|
|
186
|
+
let selection: Selection = { kind: 'all' }
|
|
187
|
+
let current = node
|
|
188
|
+
while (parents.has(current)) {
|
|
189
|
+
current = parents.get(current)
|
|
190
|
+
if (
|
|
191
|
+
['CallExpression', 'OptionalCallExpression'].includes(current.type) &&
|
|
192
|
+
['MemberExpression', 'OptionalMemberExpression'].includes(current.callee.type) &&
|
|
193
|
+
!current.callee.computed &&
|
|
194
|
+
current.callee.property.name === 'then'
|
|
195
|
+
) {
|
|
196
|
+
const callback = current.arguments[0]
|
|
197
|
+
const parameter = ['ArrowFunctionExpression', 'FunctionExpression'].includes(
|
|
198
|
+
callback?.type
|
|
199
|
+
)
|
|
200
|
+
? callback.params[0]
|
|
201
|
+
: undefined
|
|
202
|
+
if (parameter?.type === 'Identifier')
|
|
203
|
+
selection = selectNamespace(callback, parameter.name, parameter) ?? selection
|
|
204
|
+
else if (parameter?.type === 'ObjectPattern') {
|
|
205
|
+
const names: string[] = []
|
|
206
|
+
let valid = true
|
|
207
|
+
for (const property of parameter.properties) {
|
|
208
|
+
if (
|
|
209
|
+
property.type !== 'ObjectProperty' ||
|
|
210
|
+
property.computed ||
|
|
211
|
+
(property.value.type !== 'Identifier' &&
|
|
212
|
+
!(
|
|
213
|
+
property.value.type === 'AssignmentPattern' &&
|
|
214
|
+
property.value.left.type === 'Identifier'
|
|
215
|
+
)) ||
|
|
216
|
+
!['Identifier', 'StringLiteral', 'NumericLiteral'].includes(property.key.type)
|
|
217
|
+
) {
|
|
218
|
+
valid = false
|
|
219
|
+
break
|
|
220
|
+
}
|
|
221
|
+
names.push(String(property.key.name ?? property.key.value))
|
|
222
|
+
}
|
|
223
|
+
if (valid && names.length) selection = { kind: 'named', names: names.toSorted() }
|
|
224
|
+
}
|
|
225
|
+
break
|
|
226
|
+
}
|
|
227
|
+
if (current.type.endsWith('Statement') || current.type === 'Program') break
|
|
228
|
+
}
|
|
229
|
+
result.push({ specifier, selection })
|
|
230
|
+
} else if (
|
|
231
|
+
node.callee?.type === 'Identifier' &&
|
|
232
|
+
node.callee.name === 'require' &&
|
|
233
|
+
node.arguments[0]?.type === 'StringLiteral'
|
|
234
|
+
) {
|
|
235
|
+
result.push({
|
|
236
|
+
specifier: node.arguments[0].value,
|
|
237
|
+
selection: { kind: 'all' },
|
|
238
|
+
})
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return result
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function bindingNames(node: SyntaxNode): string[] {
|
|
245
|
+
if (!node) return []
|
|
246
|
+
if (node.type === 'Identifier') return [node.name]
|
|
247
|
+
if (node.type === 'RestElement') return bindingNames(node.argument)
|
|
248
|
+
if (node.type === 'AssignmentPattern') return bindingNames(node.left)
|
|
249
|
+
if (node.type === 'ArrayPattern') return node.elements.flatMap(bindingNames)
|
|
250
|
+
if (node.type === 'ObjectPattern')
|
|
251
|
+
return node.properties.flatMap((property: SyntaxNode) =>
|
|
252
|
+
bindingNames(property.type === 'RestElement' ? property.argument : property.value)
|
|
253
|
+
)
|
|
254
|
+
return []
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function declarationNames(declaration: SyntaxNode, includeModule = true): string[] {
|
|
258
|
+
if (!declaration || declaration.declare) return []
|
|
259
|
+
if (declaration.type === 'VariableDeclaration')
|
|
260
|
+
return declaration.declarations.flatMap((item: SyntaxNode) => bindingNames(item.id))
|
|
261
|
+
if (
|
|
262
|
+
[
|
|
263
|
+
'FunctionDeclaration',
|
|
264
|
+
'ClassDeclaration',
|
|
265
|
+
'TSEnumDeclaration',
|
|
266
|
+
...(includeModule ? ['TSModuleDeclaration'] : []),
|
|
267
|
+
].includes(declaration.type)
|
|
268
|
+
)
|
|
269
|
+
return declaration.id?.type === 'Identifier' ? [declaration.id.name] : []
|
|
270
|
+
return []
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/** Runtime declarations exported directly with a modifier or default export. */
|
|
274
|
+
export function directRuntimeExports(ast: SyntaxNode): string[] {
|
|
275
|
+
const names: string[] = []
|
|
276
|
+
for (const statement of ast.program.body) {
|
|
277
|
+
if (statement.type === 'ExportDefaultDeclaration') {
|
|
278
|
+
if (
|
|
279
|
+
['TSInterfaceDeclaration', 'TSTypeAliasDeclaration'].includes(statement.declaration.type) ||
|
|
280
|
+
statement.declaration.declare
|
|
281
|
+
)
|
|
282
|
+
continue
|
|
283
|
+
names.push(...declarationNames(statement.declaration), 'default')
|
|
284
|
+
} else if (
|
|
285
|
+
statement.type === 'ExportNamedDeclaration' &&
|
|
286
|
+
statement.exportKind !== 'type' &&
|
|
287
|
+
statement.declaration
|
|
288
|
+
) {
|
|
289
|
+
names.push(...declarationNames(statement.declaration))
|
|
290
|
+
} else if (statement.type === 'TSExportAssignment') names.push('default')
|
|
291
|
+
}
|
|
292
|
+
return names
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/** Runtime declarations local to this module, excluding type-only declarations. */
|
|
296
|
+
export function hasRuntimeDeclaration(ast: SyntaxNode, name: string): boolean {
|
|
297
|
+
return ast.program.body.some((statement: SyntaxNode) => {
|
|
298
|
+
const declaration = ['ExportDefaultDeclaration', 'ExportNamedDeclaration'].includes(
|
|
299
|
+
statement.type
|
|
300
|
+
)
|
|
301
|
+
? statement.declaration
|
|
302
|
+
: statement
|
|
303
|
+
return declarationNames(declaration, false).includes(name)
|
|
304
|
+
})
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/** Runtime re-exports, preserving aliases and type-only exclusions. */
|
|
308
|
+
export function runtimeReexports(ast: SyntaxNode): RuntimeReexport[] {
|
|
309
|
+
const entries: RuntimeReexport[] = []
|
|
310
|
+
for (const statement of ast.program.body) {
|
|
311
|
+
if (statement.exportKind === 'type') continue
|
|
312
|
+
if (statement.type === 'ExportAllDeclaration') {
|
|
313
|
+
entries.push({ kind: 'star', source: statement.source.value })
|
|
314
|
+
} else if (statement.type === 'ExportNamedDeclaration' && !statement.declaration) {
|
|
315
|
+
const first = entries.length
|
|
316
|
+
for (const specifier of statement.specifiers) {
|
|
317
|
+
if (specifier.exportKind === 'type') continue
|
|
318
|
+
const exported = specifier.exported.name ?? specifier.exported.value
|
|
319
|
+
if (specifier.type === 'ExportNamespaceSpecifier') {
|
|
320
|
+
entries.push({
|
|
321
|
+
kind: 'namespace',
|
|
322
|
+
source: statement.source?.value,
|
|
323
|
+
exported,
|
|
324
|
+
})
|
|
325
|
+
} else if (specifier.type === 'ExportSpecifier') {
|
|
326
|
+
entries.push({
|
|
327
|
+
kind: 'named',
|
|
328
|
+
source: statement.source?.value,
|
|
329
|
+
exported,
|
|
330
|
+
imported: specifier.local.name ?? specifier.local.value,
|
|
331
|
+
})
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
if (statement.source && entries.length === first)
|
|
335
|
+
entries.push({ kind: 'empty', source: statement.source.value })
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
return entries
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export function defaultExport(
|
|
342
|
+
ast: SyntaxNode
|
|
343
|
+
): { kind: 'expression' } | { kind: 'identifier'; name: string } | undefined {
|
|
344
|
+
const statement = ast.program.body.find(
|
|
345
|
+
(item: SyntaxNode) =>
|
|
346
|
+
item.type === 'ExportDefaultDeclaration' || item.type === 'TSExportAssignment'
|
|
347
|
+
)
|
|
348
|
+
if (!statement) return undefined
|
|
349
|
+
if (statement.type === 'TSExportAssignment') return { kind: 'expression' }
|
|
350
|
+
if (
|
|
351
|
+
['TSInterfaceDeclaration', 'TSTypeAliasDeclaration'].includes(statement.declaration.type) ||
|
|
352
|
+
statement.declaration.declare
|
|
353
|
+
)
|
|
354
|
+
return undefined
|
|
355
|
+
return statement.declaration.type === 'Identifier'
|
|
356
|
+
? { kind: 'identifier', name: statement.declaration.name }
|
|
357
|
+
: { kind: 'expression' }
|
|
358
|
+
}
|