@orbit-work/ui 0.1.2-preview.0 → 0.1.2
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/README.md +59 -57
- package/dist/about-window.cjs +271 -1
- package/dist/about-window.cjs.map +1 -0
- package/dist/about-window.d.cts +20 -2
- package/dist/about-window.d.ts +20 -2
- package/dist/about-window.js +271 -1
- package/dist/about-window.js.map +1 -0
- package/dist/appearance-D7uh_ZTy.d.cts +192 -0
- package/dist/appearance-D7uh_ZTy.d.ts +192 -0
- package/dist/appearance.cjs +39 -1
- package/dist/appearance.cjs.map +1 -0
- package/dist/appearance.d.cts +1 -1
- package/dist/appearance.d.ts +1 -1
- package/dist/appearance.js +39 -1
- package/dist/appearance.js.map +1 -0
- package/dist/browser-annotation-popup.cjs +9 -1
- package/dist/browser-annotation-popup.cjs.map +1 -0
- package/dist/browser-annotation-popup.d.cts +6 -6
- package/dist/browser-annotation-popup.d.ts +6 -6
- package/dist/browser-annotation-popup.js +9 -1
- package/dist/browser-annotation-popup.js.map +1 -0
- package/dist/chunk-66VEV7G2.js +111 -0
- package/dist/chunk-66VEV7G2.js.map +1 -0
- package/dist/chunk-KRP43SUA.cjs +1130 -0
- package/dist/chunk-KRP43SUA.cjs.map +1 -0
- package/dist/chunk-QS55W5Q5.cjs +111 -0
- package/dist/chunk-QS55W5Q5.cjs.map +1 -0
- package/dist/chunk-S3R5QFO4.js +1130 -0
- package/dist/chunk-S3R5QFO4.js.map +1 -0
- package/dist/chunk-UT5LC6MR.js +38 -0
- package/dist/chunk-UT5LC6MR.js.map +1 -0
- package/dist/chunk-ZZTEY4YX.cjs +38 -0
- package/dist/chunk-ZZTEY4YX.cjs.map +1 -0
- package/dist/core.css +7886 -0
- package/dist/file-tree.css +85 -0
- package/dist/index-nLo7jMlP.d.cts +166 -0
- package/dist/index-nLo7jMlP.d.ts +166 -0
- package/dist/index.cjs +39161 -26
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3769 -3032
- package/dist/index.d.ts +3769 -3032
- package/dist/index.js +39161 -26
- package/dist/index.js.map +1 -0
- package/dist/locale.cjs +15 -0
- package/dist/locale.cjs.map +1 -0
- package/dist/locale.d.cts +28 -0
- package/dist/locale.d.ts +28 -0
- package/dist/locale.js +15 -0
- package/dist/locale.js.map +1 -0
- package/dist/office.css +1146 -0
- package/dist/slot-core.cjs +200 -0
- package/dist/slot-core.cjs.map +1 -0
- package/dist/slot-core.d.cts +146 -0
- package/dist/slot-core.d.ts +146 -0
- package/dist/slot-core.js +200 -0
- package/dist/slot-core.js.map +1 -0
- package/dist/slot-react.cjs +153 -0
- package/dist/slot-react.cjs.map +1 -0
- package/dist/slot-react.d.cts +36 -0
- package/dist/slot-react.d.ts +36 -0
- package/dist/slot-react.js +153 -0
- package/dist/slot-react.js.map +1 -0
- package/dist/tailwind.css +137 -0
- package/dist/workbench.css +9014 -0
- package/package.json +112 -47
- package/dist/appearance-D5uQ53j3.d.cts +0 -210
- package/dist/appearance-D5uQ53j3.d.ts +0 -210
- package/dist/chunk-3KT7IU4X.js +0 -13
- package/dist/chunk-5VLBKOG7.cjs +0 -194
- package/dist/chunk-7YJY64LZ.js +0 -82
- package/dist/chunk-EF2BSN3K.cjs +0 -13
- package/dist/chunk-GMMYDILD.cjs +0 -82
- package/dist/chunk-VG7FQQ7K.js +0 -194
- package/dist/fonts/JetBrainsMono-Medium.ttf +0 -0
- package/dist/fonts/JetBrainsMono-Regular.ttf +0 -0
- package/dist/fonts/SpaceGrotesk-700-latin-ext.woff2 +0 -0
- package/dist/fonts/SpaceGrotesk-700-latin.woff2 +0 -0
- package/dist/index.css +0 -1
- package/dist/orbitwork.css +0 -22209
- package/src/components/Layout/AppLayout/AppLayout.stories.tsx +0 -246
- package/src/components/Layout/AppLayout/AppLayoutSource.test.mjs +0 -37
- package/src/components/Layout/AppLayout/index.tsx +0 -122
- package/src/components/Layout/Sidebar/index.tsx +0 -13
- package/src/components/Layout/SidebarShell/SidebarShell.stories.tsx +0 -676
- package/src/components/Layout/SidebarShell/SidebarShellSource.test.mjs +0 -161
- package/src/components/Layout/SidebarShell/index.tsx +0 -326
- package/src/components/Layout/index.ts +0 -10
- package/src/components/composite/ActionBar/ActionBar.stories.tsx +0 -26
- package/src/components/composite/ActionBar/index.tsx +0 -31
- package/src/components/composite/ActionStatus/ActionStatus.stories.tsx +0 -60
- package/src/components/composite/ActionStatus/index.tsx +0 -21
- package/src/components/composite/AskQuestionCardView/AskQuestionCardView.stories.tsx +0 -175
- package/src/components/composite/AskQuestionCardView/AskQuestionCardViewSource.test.mjs +0 -92
- package/src/components/composite/AskQuestionCardView/index.tsx +0 -119
- package/src/components/composite/AssistantChannelCard/AssistantChannelCard.stories.tsx +0 -265
- package/src/components/composite/AssistantChannelCard/AssistantChannelCardSource.test.mjs +0 -45
- package/src/components/composite/AssistantChannelCard/index.tsx +0 -102
- package/src/components/composite/AssistantToggleRow/AssistantToggleRow.stories.tsx +0 -197
- package/src/components/composite/AssistantToggleRow/index.tsx +0 -35
- package/src/components/composite/AttachmentCard/AttachmentCard.stories.tsx +0 -125
- package/src/components/composite/AttachmentCard/index.tsx +0 -80
- package/src/components/composite/BackButton/BackButton.stories.tsx +0 -93
- package/src/components/composite/BackButton/BackButtonSource.test.mjs +0 -29
- package/src/components/composite/BackButton/index.tsx +0 -48
- package/src/components/composite/Banner/Banner.stories.tsx +0 -180
- package/src/components/composite/Banner/BannerSource.test.mjs +0 -67
- package/src/components/composite/Banner/index.tsx +0 -125
- package/src/components/composite/BeaconIcons/BeaconIcons.stories.tsx +0 -153
- package/src/components/composite/BeaconIcons/index.tsx +0 -265
- package/src/components/composite/BeaconSpinner/BeaconSpinner.stories.tsx +0 -144
- package/src/components/composite/BeaconSpinner/index.tsx +0 -185
- package/src/components/composite/CatalogStates/CatalogEmptyState.stories.tsx +0 -108
- package/src/components/composite/CatalogStates/CatalogStates.stories.tsx +0 -53
- package/src/components/composite/CatalogStates/CatalogStatesSource.test.mjs +0 -149
- package/src/components/composite/CatalogStates/index.tsx +0 -113
- package/src/components/composite/Charts/Charts.stories.tsx +0 -174
- package/src/components/composite/Charts/ChartsSource.test.mjs +0 -111
- package/src/components/composite/Charts/index.tsx +0 -385
- package/src/components/composite/CodeBlock/CodeBlock.stories.tsx +0 -308
- package/src/components/composite/CodeBlock/CodeFaceSource.test.mjs +0 -89
- package/src/components/composite/CodeBlock/index.tsx +0 -300
- package/src/components/composite/CodeDiff/CodeDiff.stories.tsx +0 -169
- package/src/components/composite/CodeDiff/index.tsx +0 -373
- package/src/components/composite/CodePreview/CodePreview.stories.tsx +0 -127
- package/src/components/composite/CodePreview/CodePreviewSource.test.mjs +0 -43
- package/src/components/composite/CodePreview/index.tsx +0 -98
- package/src/components/composite/CommandPalette/CommandPalette.stories.tsx +0 -89
- package/src/components/composite/CommandPalette/CommandPaletteSource.test.mjs +0 -61
- package/src/components/composite/CommandPalette/index.tsx +0 -310
- package/src/components/composite/ContentRecommendation/ContentRecommendation.stories.tsx +0 -300
- package/src/components/composite/ContentRecommendation/ContentRecommendationSource.test.mjs +0 -48
- package/src/components/composite/ContentRecommendation/index.tsx +0 -116
- package/src/components/composite/ContextChip/ContextChip.stories.tsx +0 -123
- package/src/components/composite/ContextChip/ContextChipSource.test.mjs +0 -24
- package/src/components/composite/ContextChip/index.tsx +0 -25
- package/src/components/composite/ContextUsageIndicatorView/ContextUsageIndicatorSizeSource.test.mjs +0 -15
- package/src/components/composite/ContextUsageIndicatorView/ContextUsageIndicatorView.stories.tsx +0 -110
- package/src/components/composite/ContextUsageIndicatorView/ContextUsageLoadingSource.test.mjs +0 -23
- package/src/components/composite/ContextUsageIndicatorView/index.tsx +0 -139
- package/src/components/composite/Controls/Controls.stories.tsx +0 -227
- package/src/components/composite/Controls/index.tsx +0 -15
- package/src/components/composite/CreateProjectDialog/CreateProjectDialog.stories.tsx +0 -56
- package/src/components/composite/CreateProjectDialog/index.tsx +0 -70
- package/src/components/composite/DataManagementSectionView/DataManagementSectionView.stories.tsx +0 -123
- package/src/components/composite/DataManagementSectionView/DataManagementSectionViewSource.test.mjs +0 -45
- package/src/components/composite/DataManagementSectionView/index.tsx +0 -110
- package/src/components/composite/DataTable/DataTable.stories.tsx +0 -159
- package/src/components/composite/DataTable/DataTableSource.test.mjs +0 -96
- package/src/components/composite/DataTable/index.tsx +0 -373
- package/src/components/composite/DetailChrome/DetailChrome.stories.tsx +0 -61
- package/src/components/composite/DetailChrome/DetailChromeSource.test.mjs +0 -31
- package/src/components/composite/DetailChrome/index.tsx +0 -94
- package/src/components/composite/DetailPanel/DetailPanel.stories.tsx +0 -185
- package/src/components/composite/DetailPanel/DetailPanelSource.test.mjs +0 -49
- package/src/components/composite/DetailPanel/index.tsx +0 -120
- package/src/components/composite/DetailScaffold/DetailScaffold.stories.tsx +0 -203
- package/src/components/composite/DetailScaffold/DetailScaffoldSource.test.mjs +0 -38
- package/src/components/composite/DetailScaffold/index.tsx +0 -114
- package/src/components/composite/Dialog/Dialog.stories.tsx +0 -343
- package/src/components/composite/Dialog/DialogSource.test.mjs +0 -130
- package/src/components/composite/Dialog/index.tsx +0 -333
- package/src/components/composite/DropZone/DropZone.stories.tsx +0 -105
- package/src/components/composite/DropZone/DropZoneSource.test.mjs +0 -68
- package/src/components/composite/DropZone/index.tsx +0 -196
- package/src/components/composite/FSelect/FSelect.stories.tsx +0 -64
- package/src/components/composite/FSelect/index.tsx +0 -29
- package/src/components/composite/FeedbackContextMenuView/FeedbackContextMenuView.stories.tsx +0 -106
- package/src/components/composite/FeedbackContextMenuView/index.tsx +0 -51
- package/src/components/composite/FeedbackDialogView/FeedbackDialogView.stories.tsx +0 -291
- package/src/components/composite/FeedbackDialogView/index.tsx +0 -95
- package/src/components/composite/FileReferenceCard/FileReferenceCard.stories.tsx +0 -364
- package/src/components/composite/FileReferenceCard/FileReferenceCardSource.test.mjs +0 -48
- package/src/components/composite/FileReferenceCard/index.tsx +0 -122
- package/src/components/composite/FilterBar/FilterBar.stories.tsx +0 -167
- package/src/components/composite/FilterBar/FilterBarSource.test.mjs +0 -75
- package/src/components/composite/FilterBar/index.tsx +0 -206
- package/src/components/composite/FormField/FormField.stories.tsx +0 -158
- package/src/components/composite/FormField/FormFieldSource.test.mjs +0 -56
- package/src/components/composite/FormField/index.tsx +0 -219
- package/src/components/composite/HomeBackdrop/HomeBackdrop.stories.tsx +0 -54
- package/src/components/composite/HomeBackdrop/HomeBackdropSource.test.mjs +0 -50
- package/src/components/composite/HomeBackdrop/index.tsx +0 -53
- package/src/components/composite/Icons/Icons.stories.tsx +0 -153
- package/src/components/composite/Icons/IconsSource.test.mjs +0 -23
- package/src/components/composite/Icons/index.tsx +0 -1367
- package/src/components/composite/ImageCard/ImageCard.stories.tsx +0 -54
- package/src/components/composite/ImageCard/index.tsx +0 -33
- package/src/components/composite/ImagePreview/ImagePreview.stories.tsx +0 -172
- package/src/components/composite/ImagePreview/ImagePreviewSource.test.mjs +0 -95
- package/src/components/composite/ImagePreview/index.tsx +0 -339
- package/src/components/composite/ListRow/ListRow.stories.tsx +0 -257
- package/src/components/composite/ListRow/ListRowSource.test.mjs +0 -101
- package/src/components/composite/ListRow/index.tsx +0 -309
- package/src/components/composite/Markdown/Markdown.stories.tsx +0 -192
- package/src/components/composite/Markdown/MarkdownSource.test.mjs +0 -126
- package/src/components/composite/Markdown/MarkdownStyleSource.test.mjs +0 -167
- package/src/components/composite/Markdown/index.tsx +0 -702
- package/src/components/composite/MarkdownPreview/MarkdownPreview.stories.tsx +0 -174
- package/src/components/composite/MarkdownPreview/MarkdownPreviewTabsSource.test.mjs +0 -31
- package/src/components/composite/MarkdownPreview/MarkdownRenderedStyleSource.test.mjs +0 -84
- package/src/components/composite/MarkdownPreview/index.tsx +0 -140
- package/src/components/composite/MarkdownPreviewModalView/MarkdownPreviewModalView.stories.tsx +0 -104
- package/src/components/composite/MarkdownPreviewModalView/index.tsx +0 -85
- package/src/components/composite/MessageFeedbackDialog/MessageFeedbackDialog.stories.tsx +0 -66
- package/src/components/composite/MessageFeedbackDialog/index.tsx +0 -115
- package/src/components/composite/ModelCatalogErrorState/ModelCatalogErrorState.stories.tsx +0 -101
- package/src/components/composite/ModelCatalogErrorState/ModelCatalogRetrySource.test.mjs +0 -86
- package/src/components/composite/ModelCatalogErrorState/index.tsx +0 -59
- package/src/components/composite/ModelModalityFlow/ModelModalityFlow.stories.tsx +0 -224
- package/src/components/composite/ModelModalityFlow/ModelModalityFlowSource.test.mjs +0 -56
- package/src/components/composite/ModelModalityFlow/index.tsx +0 -113
- package/src/components/composite/ModelPickerList/ModelPickerList.stories.tsx +0 -313
- package/src/components/composite/ModelPickerList/index.tsx +0 -142
- package/src/components/composite/ModelSelect/ModelSelect.stories.tsx +0 -90
- package/src/components/composite/ModelSelect/index.tsx +0 -148
- package/src/components/composite/ModelsSettingsSectionView/ModelsSettingsSectionView.stories.tsx +0 -170
- package/src/components/composite/ModelsSettingsSectionView/index.tsx +0 -139
- package/src/components/composite/NativeControls/NativeControls.stories.tsx +0 -386
- package/src/components/composite/NativeControls/NativeControlsStyleSource.test.mjs +0 -63
- package/src/components/composite/NativeControls/index.tsx +0 -97
- package/src/components/composite/NavMenu/NavMenu.stories.tsx +0 -383
- package/src/components/composite/NavMenu/NavMenuSource.test.mjs +0 -56
- package/src/components/composite/NavMenu/index.tsx +0 -142
- package/src/components/composite/NoPlanPanelView/NoPlanPanelView.stories.tsx +0 -344
- package/src/components/composite/NoPlanPanelView/NoPlanPanelViewSource.test.mjs +0 -34
- package/src/components/composite/NoPlanPanelView/index.tsx +0 -97
- package/src/components/composite/OpenWithButton/OpenWithButton.stories.tsx +0 -78
- package/src/components/composite/OpenWithButton/index.tsx +0 -46
- package/src/components/composite/OrbitworkLogo/OrbitworkLogo.stories.tsx +0 -192
- package/src/components/composite/OrbitworkLogo/index.tsx +0 -207
- package/src/components/composite/OrbitworkModal/OrbitworkModal.stories.tsx +0 -58
- package/src/components/composite/OrbitworkModal/index.tsx +0 -31
- package/src/components/composite/PageHead/PageHead.stories.tsx +0 -235
- package/src/components/composite/PageHead/PageHeadSource.test.mjs +0 -76
- package/src/components/composite/PageHead/index.tsx +0 -128
- package/src/components/composite/PlanFeatureIcon/PlanFeatureIcon.stories.tsx +0 -205
- package/src/components/composite/PlanFeatureIcon/PlanFeatureIconSource.test.mjs +0 -38
- package/src/components/composite/PlanFeatureIcon/index.tsx +0 -48
- package/src/components/composite/PlanSettingsSectionView/PlanSettingsSectionView.stories.tsx +0 -231
- package/src/components/composite/PlanSettingsSectionView/PlanSettingsSectionViewSource.test.mjs +0 -85
- package/src/components/composite/PlanSettingsSectionView/index.tsx +0 -264
- package/src/components/composite/Popover/Popover.stories.tsx +0 -175
- package/src/components/composite/Popover/PopoverSource.test.mjs +0 -59
- package/src/components/composite/Popover/index.tsx +0 -176
- package/src/components/composite/PptxRenderer/ElementDispatcher/index.tsx +0 -70
- package/src/components/composite/PptxRenderer/PptxChromeStyleSource.test.mjs +0 -36
- package/src/components/composite/PptxRenderer/PptxRenderer.stories.tsx +0 -128
- package/src/components/composite/PptxRenderer/PptxSlide/index.tsx +0 -48
- package/src/components/composite/PptxRenderer/constants.ts +0 -2
- package/src/components/composite/PptxRenderer/elements/AudioElement/index.tsx +0 -48
- package/src/components/composite/PptxRenderer/elements/ChartElement/index.tsx +0 -172
- package/src/components/composite/PptxRenderer/elements/DiagramElement/index.tsx +0 -46
- package/src/components/composite/PptxRenderer/elements/GroupElement/index.tsx +0 -28
- package/src/components/composite/PptxRenderer/elements/ImageElement/index.tsx +0 -61
- package/src/components/composite/PptxRenderer/elements/MathElement/index.tsx +0 -57
- package/src/components/composite/PptxRenderer/elements/ShapeElement/index.tsx +0 -327
- package/src/components/composite/PptxRenderer/elements/TableElement/index.tsx +0 -90
- package/src/components/composite/PptxRenderer/elements/TextElement/index.tsx +0 -57
- package/src/components/composite/PptxRenderer/elements/VideoElement/index.tsx +0 -43
- package/src/components/composite/PptxRenderer/index.ts +0 -24
- package/src/components/composite/PptxRenderer/types.ts +0 -326
- package/src/components/composite/PptxRenderer/utils.ts +0 -129
- package/src/components/composite/ProjectSelect/ProjectSelect.stories.tsx +0 -112
- package/src/components/composite/ProjectSelect/ProjectSelectSource.test.mjs +0 -34
- package/src/components/composite/ProjectSelect/index.tsx +0 -155
- package/src/components/composite/RadioCard/RadioCard.stories.tsx +0 -130
- package/src/components/composite/RadioCard/RadioCardSource.test.mjs +0 -42
- package/src/components/composite/RadioCard/index.tsx +0 -171
- package/src/components/composite/RowOverflowMenu/RowOverflowMenu.stories.tsx +0 -113
- package/src/components/composite/RowOverflowMenu/RowOverflowMenuSource.test.mjs +0 -59
- package/src/components/composite/RowOverflowMenu/index.tsx +0 -101
- package/src/components/composite/SandboxPermissionPrompt/SandboxPermissionPrompt.stories.tsx +0 -159
- package/src/components/composite/SandboxPermissionPrompt/SandboxPermissionPromptSource.test.mjs +0 -71
- package/src/components/composite/SandboxPermissionPrompt/index.tsx +0 -157
- package/src/components/composite/SearchInput/SearchInput.stories.tsx +0 -127
- package/src/components/composite/SearchInput/index.tsx +0 -91
- package/src/components/composite/SearchResult/SearchResult.stories.tsx +0 -305
- package/src/components/composite/SearchResult/SearchResultSource.test.mjs +0 -45
- package/src/components/composite/SearchResult/index.tsx +0 -148
- package/src/components/composite/Section/Section.stories.tsx +0 -148
- package/src/components/composite/Section/SectionSource.test.mjs +0 -59
- package/src/components/composite/Section/index.tsx +0 -105
- package/src/components/composite/SelectionBulkBar/SelectionBulkBar.stories.tsx +0 -111
- package/src/components/composite/SelectionBulkBar/SelectionBulkBarSource.test.mjs +0 -44
- package/src/components/composite/SelectionBulkBar/index.tsx +0 -99
- package/src/components/composite/ShareStrip/ShareStrip.stories.tsx +0 -123
- package/src/components/composite/ShareStrip/index.tsx +0 -83
- package/src/components/composite/ShortcutSheet/ShortcutSheet.stories.tsx +0 -90
- package/src/components/composite/ShortcutSheet/ShortcutSheetSource.test.mjs +0 -49
- package/src/components/composite/ShortcutSheet/index.tsx +0 -163
- package/src/components/composite/SitesArtifactCardView/SitesArtifactCardView.stories.tsx +0 -328
- package/src/components/composite/SitesArtifactCardView/SitesArtifactCardViewSource.test.mjs +0 -45
- package/src/components/composite/SitesArtifactCardView/index.tsx +0 -100
- package/src/components/composite/Skeleton/Skeleton.stories.tsx +0 -188
- package/src/components/composite/Skeleton/SkeletonSource.test.mjs +0 -25
- package/src/components/composite/Skeleton/index.tsx +0 -152
- package/src/components/composite/Splash/Splash.stories.tsx +0 -150
- package/src/components/composite/Splash/index.tsx +0 -229
- package/src/components/composite/StatusTag/StatusTag.stories.tsx +0 -66
- package/src/components/composite/StatusTag/StatusTagSource.test.mjs +0 -64
- package/src/components/composite/StatusTag/index.tsx +0 -78
- package/src/components/composite/StepList/StepList.stories.tsx +0 -352
- package/src/components/composite/StepList/index.tsx +0 -23
- package/src/components/composite/Tag/Tag.stories.tsx +0 -279
- package/src/components/composite/Tag/TagSource.test.mjs +0 -67
- package/src/components/composite/Tag/index.tsx +0 -229
- package/src/components/composite/TimePicker/TimePicker.stories.tsx +0 -91
- package/src/components/composite/TimePicker/TimePickerSource.test.mjs +0 -98
- package/src/components/composite/TimePicker/index.tsx +0 -208
- package/src/components/composite/TitleBar/TitleBar.stories.tsx +0 -329
- package/src/components/composite/TitleBar/TitleBarSource.test.mjs +0 -140
- package/src/components/composite/TitleBar/index.tsx +0 -350
- package/src/components/composite/Toast/Toast.stories.tsx +0 -304
- package/src/components/composite/Toast/ToastSource.test.mjs +0 -63
- package/src/components/composite/Toast/index.tsx +0 -135
- package/src/components/composite/Tooltip/Tooltip.stories.tsx +0 -304
- package/src/components/composite/Tooltip/TooltipSource.test.mjs +0 -34
- package/src/components/composite/Tooltip/index.tsx +0 -204
- package/src/components/composite/TranscriptDividers/TranscriptDividers.stories.tsx +0 -160
- package/src/components/composite/TranscriptDividers/TranscriptDividersSource.test.mjs +0 -90
- package/src/components/composite/TranscriptDividers/index.tsx +0 -352
- package/src/components/composite/WCardShell/WCardShell.stories.tsx +0 -228
- package/src/components/composite/WCardShell/index.tsx +0 -101
- package/src/components/composite/index.ts +0 -81
- package/src/components/domain/artifacts/ArtifactPreviewSidebarView/ArtifactPreviewSidebarView.stories.tsx +0 -128
- package/src/components/domain/artifacts/ArtifactPreviewSidebarView/ArtifactPreviewSidebarViewSource.test.mjs +0 -69
- package/src/components/domain/artifacts/ArtifactPreviewSidebarView/index.tsx +0 -212
- package/src/components/domain/artifacts/index.ts +0 -1
- package/src/components/domain/browser/BrowserAnnotationPopupView/BrowserAnnotationPopupView.stories.tsx +0 -211
- package/src/components/domain/browser/BrowserAnnotationPopupView/BrowserAnnotationPopupViewSource.test.mjs +0 -82
- package/src/components/domain/browser/BrowserAnnotationPopupView/index.tsx +0 -235
- package/src/components/domain/browser/BrowserDeviceToolbarView/BrowserDeviceToolbarView.stories.tsx +0 -260
- package/src/components/domain/browser/BrowserDeviceToolbarView/BrowserDeviceToolbarViewSource.test.mjs +0 -12
- package/src/components/domain/browser/BrowserDeviceToolbarView/index.tsx +0 -154
- package/src/components/domain/browser/BrowserFindBarView/BrowserFindBarView.stories.tsx +0 -52
- package/src/components/domain/browser/BrowserFindBarView/index.tsx +0 -111
- package/src/components/domain/browser/BrowserImportDialogView/BrowserImportDialogView.stories.tsx +0 -89
- package/src/components/domain/browser/BrowserImportDialogView/index.tsx +0 -155
- package/src/components/domain/browser/BrowserLoadErrorView/BrowserLoadErrorView.stories.tsx +0 -197
- package/src/components/domain/browser/BrowserLoadErrorView/BrowserLoadErrorViewSource.test.mjs +0 -29
- package/src/components/domain/browser/BrowserLoadErrorView/index.tsx +0 -45
- package/src/components/domain/browser/BrowserMoreMenuView/BrowserMoreMenuView.stories.tsx +0 -66
- package/src/components/domain/browser/BrowserMoreMenuView/index.tsx +0 -268
- package/src/components/domain/browser/BrowserNavBarView/BrowserNavBarView.stories.tsx +0 -149
- package/src/components/domain/browser/BrowserNavBarView/index.tsx +0 -156
- package/src/components/domain/browser/BrowserTabBarView/index.tsx +0 -18
- package/src/components/domain/browser/SubAgentPane/SubAgentPane.stories.tsx +0 -96
- package/src/components/domain/browser/SubAgentPane/SubAgentPaneSource.test.mjs +0 -48
- package/src/components/domain/browser/SubAgentPane/index.tsx +0 -121
- package/src/components/domain/browser/TerminalPane/TerminalPane.stories.tsx +0 -95
- package/src/components/domain/browser/TerminalPane/TerminalPaneSource.test.mjs +0 -52
- package/src/components/domain/browser/TerminalPane/index.tsx +0 -75
- package/src/components/domain/browser/WebPreview/WebPreview.stories.tsx +0 -71
- package/src/components/domain/browser/WebPreview/index.tsx +0 -141
- package/src/components/domain/browser/WebPreviewConsole/WebPreviewConsole.stories.tsx +0 -61
- package/src/components/domain/browser/WebPreviewConsole/WebPreviewConsoleSource.test.mjs +0 -66
- package/src/components/domain/browser/WebPreviewConsole/index.tsx +0 -239
- package/src/components/domain/browser/WebPreviewDialog/WebPreviewDialog.stories.tsx +0 -288
- package/src/components/domain/browser/WebPreviewDialog/WebPreviewDialogSource.test.mjs +0 -62
- package/src/components/domain/browser/WebPreviewDialog/index.tsx +0 -82
- package/src/components/domain/browser/WebPreviewNav/WebPreviewNav.stories.tsx +0 -462
- package/src/components/domain/browser/WebPreviewNav/WebPreviewNavSource.test.mjs +0 -353
- package/src/components/domain/browser/WebPreviewNav/index.tsx +0 -351
- package/src/components/domain/browser/WebPreviewShell/WebPreviewShell.stories.tsx +0 -226
- package/src/components/domain/browser/WebPreviewShell/WebPreviewShellSource.test.mjs +0 -172
- package/src/components/domain/browser/WebPreviewShell/index.tsx +0 -324
- package/src/components/domain/browser/index.ts +0 -45
- package/src/components/domain/chat/AgentLoopSegment/AgentLoopSegment.stories.tsx +0 -107
- package/src/components/domain/chat/AgentLoopSegment/AgentLoopSegmentSource.test.mjs +0 -45
- package/src/components/domain/chat/AgentLoopSegment/index.tsx +0 -29
- package/src/components/domain/chat/AgentTurn/AgentTurn.stories.tsx +0 -162
- package/src/components/domain/chat/AgentTurn/AgentTurnSource.test.mjs +0 -98
- package/src/components/domain/chat/AgentTurn/beaconContext.ts +0 -37
- package/src/components/domain/chat/AgentTurn/index.tsx +0 -226
- package/src/components/domain/chat/ArtifactCard/ArtifactCard.stories.tsx +0 -127
- package/src/components/domain/chat/ArtifactCard/index.tsx +0 -249
- package/src/components/domain/chat/Attachment/Attachment.stories.tsx +0 -235
- package/src/components/domain/chat/Attachment/AttachmentSource.test.mjs +0 -160
- package/src/components/domain/chat/Attachment/index.tsx +0 -857
- package/src/components/domain/chat/AuthorizationCard/AuthorizationCard.stories.tsx +0 -53
- package/src/components/domain/chat/AuthorizationCard/AuthorizationCardSource.test.mjs +0 -80
- package/src/components/domain/chat/AuthorizationCard/index.tsx +0 -89
- package/src/components/domain/chat/ChatBubble/ChatBubble.stories.tsx +0 -32
- package/src/components/domain/chat/ChatBubble/index.tsx +0 -24
- package/src/components/domain/chat/ChatMessage/ChatMessage.stories.tsx +0 -31
- package/src/components/domain/chat/ChatMessage/index.tsx +0 -23
- package/src/components/domain/chat/ChatR2ReviewSource.test.mjs +0 -98
- package/src/components/domain/chat/ChatThinking/ChatThinking.stories.tsx +0 -125
- package/src/components/domain/chat/ChatThinking/index.tsx +0 -55
- package/src/components/domain/chat/Chatbot/Chatbot.stories.tsx +0 -49
- package/src/components/domain/chat/Chatbot/index.tsx +0 -37
- package/src/components/domain/chat/Composer/Composer.stories.tsx +0 -227
- package/src/components/domain/chat/Composer/ComposerSource.test.mjs +0 -175
- package/src/components/domain/chat/Composer/index.tsx +0 -450
- package/src/components/domain/chat/Composer/parts/ComposerAudioSpectrum.stories.tsx +0 -203
- package/src/components/domain/chat/Composer/parts/ComposerAudioSpectrum.tsx +0 -110
- package/src/components/domain/chat/Composer/parts/ComposerAudioSpectrumSource.test.mjs +0 -54
- package/src/components/domain/chat/Composer/parts/ComposerAuthorization.stories.tsx +0 -155
- package/src/components/domain/chat/Composer/parts/ComposerAuthorization.tsx +0 -108
- package/src/components/domain/chat/Composer/parts/ComposerMentions.stories.tsx +0 -76
- package/src/components/domain/chat/Composer/parts/ComposerMentions.tsx +0 -83
- package/src/components/domain/chat/Composer/parts/ComposerMentionsSource.test.mjs +0 -85
- package/src/components/domain/chat/Composer/parts/ComposerMenu.stories.tsx +0 -266
- package/src/components/domain/chat/Composer/parts/ComposerMenu.tsx +0 -232
- package/src/components/domain/chat/Composer/parts/ComposerMenuPopover.stories.tsx +0 -166
- package/src/components/domain/chat/Composer/parts/ComposerMenuPopover.tsx +0 -87
- package/src/components/domain/chat/Composer/parts/ComposerMenuPopoverSource.test.mjs +0 -56
- package/src/components/domain/chat/Composer/parts/ComposerPopover.stories.tsx +0 -257
- package/src/components/domain/chat/Composer/parts/ComposerPopover.tsx +0 -221
- package/src/components/domain/chat/Composer/parts/ComposerPopoverSource.test.mjs +0 -71
- package/src/components/domain/chat/Composer/parts/ComposerProjectPicker.stories.tsx +0 -260
- package/src/components/domain/chat/Composer/parts/ComposerProjectPicker.tsx +0 -246
- package/src/components/domain/chat/Composer/parts/ComposerProjectPickerSource.test.mjs +0 -46
- package/src/components/domain/chat/Composer/parts/ComposerQueue.stories.tsx +0 -275
- package/src/components/domain/chat/Composer/parts/ComposerQueue.tsx +0 -155
- package/src/components/domain/chat/Composer/parts/ComposerQueueSource.test.mjs +0 -95
- package/src/components/domain/chat/Composer/parts/ComposerVoiceInput.stories.tsx +0 -77
- package/src/components/domain/chat/Composer/parts/ComposerVoiceInput.tsx +0 -70
- package/src/components/domain/chat/Composer/parts/mountChip.ts +0 -21
- package/src/components/domain/chat/ContextUsage/ContextUsage.stories.tsx +0 -62
- package/src/components/domain/chat/ContextUsage/index.tsx +0 -69
- package/src/components/domain/chat/ExecutionSummary/ExecutionSummary.stories.tsx +0 -238
- package/src/components/domain/chat/ExecutionSummary/ExecutionSummarySource.test.mjs +0 -210
- package/src/components/domain/chat/ExecutionSummary/index.tsx +0 -487
- package/src/components/domain/chat/Message/Message.stories.tsx +0 -264
- package/src/components/domain/chat/Message/index.tsx +0 -44
- package/src/components/domain/chat/MessageActions/MessageActions.stories.tsx +0 -132
- package/src/components/domain/chat/MessageActions/MessageActionsSource.test.mjs +0 -79
- package/src/components/domain/chat/MessageActions/index.tsx +0 -186
- package/src/components/domain/chat/PlanCard/PlanCard.stories.tsx +0 -87
- package/src/components/domain/chat/PlanCard/index.tsx +0 -170
- package/src/components/domain/chat/RichContent/RichContent.stories.tsx +0 -102
- package/src/components/domain/chat/RichContent/RichContentSource.test.mjs +0 -82
- package/src/components/domain/chat/RichContent/index.tsx +0 -465
- package/src/components/domain/chat/SubAgentThread/SubAgentThread.stories.tsx +0 -119
- package/src/components/domain/chat/SubAgentThread/index.tsx +0 -104
- package/src/components/domain/chat/Thinking/Thinking.stories.tsx +0 -196
- package/src/components/domain/chat/Thinking/ThinkingInlineSource.test.mjs +0 -154
- package/src/components/domain/chat/Thinking/index.tsx +0 -237
- package/src/components/domain/chat/ToolCallRow/ToolCallRow.stories.tsx +0 -105
- package/src/components/domain/chat/ToolCallRow/ToolCallRowSource.test.mjs +0 -83
- package/src/components/domain/chat/ToolCallRow/index.tsx +0 -113
- package/src/components/domain/chat/Transcript/Transcript.stories.tsx +0 -296
- package/src/components/domain/chat/Transcript/TranscriptSource.test.mjs +0 -189
- package/src/components/domain/chat/Transcript/index.tsx +0 -187
- package/src/components/domain/chat/TranscriptSpine/TranscriptSpine.stories.tsx +0 -124
- package/src/components/domain/chat/TranscriptSpine/index.tsx +0 -245
- package/src/components/domain/chat/UserTurn/UserTurn.stories.tsx +0 -176
- package/src/components/domain/chat/UserTurn/UserTurnSource.test.mjs +0 -150
- package/src/components/domain/chat/UserTurn/index.tsx +0 -194
- package/src/components/domain/chat/index.ts +0 -22
- package/src/components/domain/desktop/DesktopAccountMenuView/DesktopAccountMenuView.stories.tsx +0 -116
- package/src/components/domain/desktop/DesktopAccountMenuView/DesktopAccountMenuViewSource.test.mjs +0 -80
- package/src/components/domain/desktop/DesktopAccountMenuView/index.tsx +0 -355
- package/src/components/domain/desktop/DesktopAppearanceSettings/DesktopAppearanceSettings.stories.tsx +0 -96
- package/src/components/domain/desktop/DesktopAppearanceSettings/DesktopAppearanceSettingsSource.test.mjs +0 -89
- package/src/components/domain/desktop/DesktopAppearanceSettings/index.tsx +0 -155
- package/src/components/domain/desktop/DesktopAssistantConfigView/DesktopAssistantConfigView.stories.tsx +0 -275
- package/src/components/domain/desktop/DesktopAssistantConfigView/DesktopAssistantConfigViewSource.test.mjs +0 -37
- package/src/components/domain/desktop/DesktopAssistantConfigView/index.tsx +0 -221
- package/src/components/domain/desktop/DesktopCatalogView/DesktopCatalogView.stories.tsx +0 -537
- package/src/components/domain/desktop/DesktopCatalogView/DesktopCatalogViewSource.test.mjs +0 -339
- package/src/components/domain/desktop/DesktopCatalogView/index.tsx +0 -1074
- package/src/components/domain/desktop/DesktopChatBranchDivider/DesktopChatBranchDivider.stories.tsx +0 -58
- package/src/components/domain/desktop/DesktopChatBranchDivider/index.tsx +0 -33
- package/src/components/domain/desktop/DesktopChatEmptyStateView/DesktopChatEmptyStateView.stories.tsx +0 -75
- package/src/components/domain/desktop/DesktopChatEmptyStateView/DesktopChatEmptyStateViewSource.test.mjs +0 -54
- package/src/components/domain/desktop/DesktopChatEmptyStateView/index.tsx +0 -64
- package/src/components/domain/desktop/DesktopChatHeaderView/DesktopChatHeaderView.stories.tsx +0 -83
- package/src/components/domain/desktop/DesktopChatHeaderView/DesktopChatHeaderViewSource.test.mjs +0 -126
- package/src/components/domain/desktop/DesktopChatHeaderView/index.tsx +0 -169
- package/src/components/domain/desktop/DesktopChatMessageView/DesktopChatMessageView.stories.tsx +0 -170
- package/src/components/domain/desktop/DesktopChatMessageView/DesktopChatMessageViewSource.test.mjs +0 -47
- package/src/components/domain/desktop/DesktopChatMessageView/index.tsx +0 -213
- package/src/components/domain/desktop/DesktopChatTurnView/DesktopChatTurnView.stories.tsx +0 -498
- package/src/components/domain/desktop/DesktopChatTurnView/DesktopChatTurnViewSource.test.mjs +0 -187
- package/src/components/domain/desktop/DesktopChatTurnView/index.tsx +0 -490
- package/src/components/domain/desktop/DesktopComposer/DesktopComposer.stories.tsx +0 -195
- package/src/components/domain/desktop/DesktopComposer/DesktopComposerModelPickerSource.test.mjs +0 -132
- package/src/components/domain/desktop/DesktopComposer/DesktopComposerMountChipSource.test.mjs +0 -43
- package/src/components/domain/desktop/DesktopComposer/DesktopComposerResponsiveSource.test.mjs +0 -44
- package/src/components/domain/desktop/DesktopComposer/DesktopMcpFormThemeSource.test.mjs +0 -30
- package/src/components/domain/desktop/DesktopComposer/index.tsx +0 -206
- package/src/components/domain/desktop/DesktopConnectorDetailView/DesktopConnectorDetailView.stories.tsx +0 -72
- package/src/components/domain/desktop/DesktopConnectorDetailView/DesktopConnectorDetailViewSource.test.mjs +0 -81
- package/src/components/domain/desktop/DesktopConnectorDetailView/index.tsx +0 -301
- package/src/components/domain/desktop/DesktopHomeView/DesktopHomeView.stories.tsx +0 -103
- package/src/components/domain/desktop/DesktopHomeView/DesktopHomeViewSource.test.mjs +0 -51
- package/src/components/domain/desktop/DesktopHomeView/index.tsx +0 -122
- package/src/components/domain/desktop/DesktopLibraryAuthorizationDialog/DesktopLibraryAuthorizationDialog.stories.tsx +0 -55
- package/src/components/domain/desktop/DesktopLibraryAuthorizationDialog/DesktopLibraryAuthorizationDialogSource.test.mjs +0 -22
- package/src/components/domain/desktop/DesktopLibraryAuthorizationDialog/index.tsx +0 -171
- package/src/components/domain/desktop/DesktopLibraryPageView/DesktopLibraryPageView.stories.tsx +0 -49
- package/src/components/domain/desktop/DesktopLibraryPageView/index.tsx +0 -49
- package/src/components/domain/desktop/DesktopLoginView/DesktopLoginView.css +0 -75
- package/src/components/domain/desktop/DesktopLoginView/DesktopLoginView.stories.tsx +0 -230
- package/src/components/domain/desktop/DesktopLoginView/DesktopLoginViewSource.test.mjs +0 -156
- package/src/components/domain/desktop/DesktopLoginView/index.tsx +0 -432
- package/src/components/domain/desktop/DesktopOnboardingTourView/DesktopOnboardingTourView.stories.tsx +0 -103
- package/src/components/domain/desktop/DesktopOnboardingTourView/DesktopOnboardingTourViewSource.test.mjs +0 -57
- package/src/components/domain/desktop/DesktopOnboardingTourView/index.tsx +0 -189
- package/src/components/domain/desktop/DesktopPet/DesktopPet.fixture.ts +0 -243
- package/src/components/domain/desktop/DesktopPet/DesktopPet.stories.tsx +0 -337
- package/src/components/domain/desktop/DesktopPet/DesktopPetSource.test.mjs +0 -191
- package/src/components/domain/desktop/DesktopPet/index.tsx +0 -591
- package/src/components/domain/desktop/DesktopPetSettings/DesktopPetSettings.stories.tsx +0 -159
- package/src/components/domain/desktop/DesktopPetSettings/DesktopPetSettingsSource.test.mjs +0 -76
- package/src/components/domain/desktop/DesktopPetSettings/index.tsx +0 -140
- package/src/components/domain/desktop/DesktopRunStatusView/DesktopRunStatusView.stories.tsx +0 -166
- package/src/components/domain/desktop/DesktopRunStatusView/DesktopRunStatusViewSource.test.mjs +0 -51
- package/src/components/domain/desktop/DesktopRunStatusView/index.tsx +0 -34
- package/src/components/domain/desktop/DesktopSelectionCard/DesktopSelectionCard.stories.tsx +0 -122
- package/src/components/domain/desktop/DesktopSelectionCard/DesktopSelectionCardSource.test.mjs +0 -42
- package/src/components/domain/desktop/DesktopSelectionCard/index.tsx +0 -75
- package/src/components/domain/desktop/DesktopSettingsMemorySection/DesktopSettingsMemorySection.stories.tsx +0 -225
- package/src/components/domain/desktop/DesktopSettingsMemorySection/DesktopSettingsMemorySectionSource.test.mjs +0 -105
- package/src/components/domain/desktop/DesktopSettingsMemorySection/index.tsx +0 -340
- package/src/components/domain/desktop/DesktopSettingsView/DesktopSettingsView.stories.tsx +0 -177
- package/src/components/domain/desktop/DesktopSettingsView/DesktopSettingsViewSource.test.mjs +0 -195
- package/src/components/domain/desktop/DesktopSettingsView/index.tsx +0 -176
- package/src/components/domain/desktop/DesktopShareSelectionBarView/DesktopShareSelectionBarView.stories.tsx +0 -77
- package/src/components/domain/desktop/DesktopShareSelectionBarView/DesktopShareSelectionBarViewSource.test.mjs +0 -76
- package/src/components/domain/desktop/DesktopShareSelectionBarView/index.tsx +0 -55
- package/src/components/domain/desktop/DesktopSidebarView/DesktopSidebarView.stories.tsx +0 -454
- package/src/components/domain/desktop/DesktopSidebarView/DesktopSidebarViewSource.test.mjs +0 -388
- package/src/components/domain/desktop/DesktopSidebarView/index.tsx +0 -1111
- package/src/components/domain/desktop/DesktopSiteReleasesView/DesktopSiteReleasesView.stories.tsx +0 -369
- package/src/components/domain/desktop/DesktopSiteReleasesView/DesktopSiteReleasesViewSource.test.mjs +0 -123
- package/src/components/domain/desktop/DesktopSiteReleasesView/index.tsx +0 -392
- package/src/components/domain/desktop/DesktopSitesListView/DesktopSitesListView.stories.tsx +0 -244
- package/src/components/domain/desktop/DesktopSitesListView/DesktopSitesListViewSource.test.mjs +0 -198
- package/src/components/domain/desktop/DesktopSitesListView/index.tsx +0 -417
- package/src/components/domain/desktop/DesktopSkillsPageView/DesktopSkillsPageView.stories.tsx +0 -230
- package/src/components/domain/desktop/DesktopSkillsPageView/DesktopSkillsPageViewSource.test.mjs +0 -149
- package/src/components/domain/desktop/DesktopSkillsPageView/index.tsx +0 -235
- package/src/components/domain/desktop/DesktopTaskDetailView/index.tsx +0 -111
- package/src/components/domain/desktop/DesktopToolCallView/DesktopToolCallListViewSource.test.mjs +0 -302
- package/src/components/domain/desktop/DesktopToolCallView/DesktopToolCallView.stories.tsx +0 -409
- package/src/components/domain/desktop/DesktopToolCallView/index.tsx +0 -388
- package/src/components/domain/desktop/DesktopWorkbenchShell/DesktopWorkbenchShell.stories.tsx +0 -418
- package/src/components/domain/desktop/DesktopWorkbenchShell/DesktopWorkbenchShellSource.test.mjs +0 -151
- package/src/components/domain/desktop/DesktopWorkbenchShell/index.tsx +0 -167
- package/src/components/domain/desktop/DesktopWorkspacePageView/DesktopWorkspacePageView.stories.tsx +0 -135
- package/src/components/domain/desktop/DesktopWorkspacePageView/DesktopWorkspacePageViewSource.test.mjs +0 -57
- package/src/components/domain/desktop/DesktopWorkspacePageView/index.tsx +0 -114
- package/src/components/domain/desktop/DesktopWorkspaceView/DesktopWorkspaceView.stories.tsx +0 -227
- package/src/components/domain/desktop/DesktopWorkspaceView/DesktopWorkspaceViewSource.test.mjs +0 -175
- package/src/components/domain/desktop/DesktopWorkspaceView/index.tsx +0 -580
- package/src/components/domain/desktop/ResourceManagement/ResourceManagement.stories.tsx +0 -19
- package/src/components/domain/desktop/ResourceManagement/ResourceManagementSource.test.mjs +0 -54
- package/src/components/domain/desktop/ResourceManagement/SharesList.tsx +0 -323
- package/src/components/domain/desktop/ResourceManagement/SnapshotViews.tsx +0 -92
- package/src/components/domain/desktop/ResourceManagement/SnapshotViewsSource.test.mjs +0 -15
- package/src/components/domain/desktop/ResourceManagement/index.tsx +0 -246
- package/src/components/domain/desktop/ShareSettingsDialogView/index.tsx +0 -234
- package/src/components/domain/desktop/SidePanelEmpty/SidePanelEmpty.stories.tsx +0 -100
- package/src/components/domain/desktop/SidePanelEmpty/SidePanelEmptySource.test.mjs +0 -67
- package/src/components/domain/desktop/SidePanelEmpty/index.tsx +0 -113
- package/src/components/domain/desktop/StarterCapsules/StarterCapsules.stories.tsx +0 -65
- package/src/components/domain/desktop/StarterCapsules/StarterCapsulesSource.test.mjs +0 -43
- package/src/components/domain/desktop/StarterCapsules/index.tsx +0 -90
- package/src/components/domain/desktop/WorkbenchSidePanel/WorkbenchSidePanel.stories.tsx +0 -59
- package/src/components/domain/desktop/WorkbenchSidePanel/WorkbenchSidePanelSource.test.mjs +0 -51
- package/src/components/domain/desktop/WorkbenchSidePanel/index.tsx +0 -74
- package/src/components/domain/desktop/WorkspaceMigrateConfirm/WorkspaceMigrateConfirm.stories.tsx +0 -79
- package/src/components/domain/desktop/WorkspaceMigrateConfirm/WorkspaceMigrateConfirmSource.test.mjs +0 -34
- package/src/components/domain/desktop/WorkspaceMigrateConfirm/index.tsx +0 -92
- package/src/components/domain/desktop/index.ts +0 -64
- package/src/components/domain/files/FileBrowser/FileBrowser.stories.tsx +0 -397
- package/src/components/domain/files/FileBrowser/FileBrowserSource.test.mjs +0 -75
- package/src/components/domain/files/FileBrowser/index.tsx +0 -221
- package/src/components/domain/files/FileIcon/FileIcon.stories.tsx +0 -207
- package/src/components/domain/files/FileIcon/FileIconSource.test.mjs +0 -39
- package/src/components/domain/files/FileIcon/index.tsx +0 -133
- package/src/components/domain/files/FilePreviewContentView/FilePreviewContentView.stories.tsx +0 -242
- package/src/components/domain/files/FilePreviewContentView/FilePreviewContentViewSource.test.mjs +0 -44
- package/src/components/domain/files/FilePreviewContentView/index.tsx +0 -125
- package/src/components/domain/files/FileTree/FileTree.stories.tsx +0 -204
- package/src/components/domain/files/FileTree/FileTreeSource.test.mjs +0 -18
- package/src/components/domain/files/FileTree/index.tsx +0 -106
- package/src/components/domain/files/PreviewDialog/PreviewDialog.stories.tsx +0 -178
- package/src/components/domain/files/PreviewDialog/PreviewDialogSource.test.mjs +0 -92
- package/src/components/domain/files/PreviewDialog/index.tsx +0 -294
- package/src/components/domain/files/index.ts +0 -5
- package/src/components/domain/index.ts +0 -8
- package/src/components/domain/office/CsvPreview/CsvPreview.stories.tsx +0 -264
- package/src/components/domain/office/CsvPreview/CsvPreviewSource.test.mjs +0 -77
- package/src/components/domain/office/CsvPreview/index.tsx +0 -224
- package/src/components/domain/office/OfficePreview/OfficePreview.stories.tsx +0 -265
- package/src/components/domain/office/OfficePreview/OfficePreviewDialog.stories.tsx +0 -71
- package/src/components/domain/office/OfficePreview/OfficePreviewDialog.tsx +0 -43
- package/src/components/domain/office/OfficePreview/OfficePreviewSource.test.mjs +0 -126
- package/src/components/domain/office/OfficePreview/index.tsx +0 -782
- package/src/components/domain/office/PdfPreview/PdfPreview.stories.tsx +0 -280
- package/src/components/domain/office/PdfPreview/PdfPreviewDialog.stories.tsx +0 -61
- package/src/components/domain/office/PdfPreview/PdfPreviewDialog.tsx +0 -61
- package/src/components/domain/office/PdfPreview/PdfPreviewSource.test.mjs +0 -70
- package/src/components/domain/office/PdfPreview/index.tsx +0 -217
- package/src/components/domain/office/index.ts +0 -5
- package/src/components/domain/skills/McpServerListView/McpServerListView.stories.tsx +0 -510
- package/src/components/domain/skills/McpServerListView/McpServerListViewSource.test.mjs +0 -101
- package/src/components/domain/skills/McpServerListView/index.tsx +0 -250
- package/src/components/domain/skills/SkillAvatarView/SkillAvatarView.stories.tsx +0 -121
- package/src/components/domain/skills/SkillAvatarView/SkillAvatarViewSource.test.mjs +0 -67
- package/src/components/domain/skills/SkillAvatarView/index.tsx +0 -112
- package/src/components/domain/skills/SkillCardView/SkillCardView.stories.tsx +0 -374
- package/src/components/domain/skills/SkillCardView/SkillCardViewSource.test.mjs +0 -35
- package/src/components/domain/skills/SkillCardView/index.tsx +0 -88
- package/src/components/domain/skills/SkillDetailPanelView/SkillDetailPanelView.stories.tsx +0 -113
- package/src/components/domain/skills/SkillDetailPanelView/index.tsx +0 -115
- package/src/components/domain/skills/SkillDetailView/SkillDetailView.stories.tsx +0 -274
- package/src/components/domain/skills/SkillDetailView/index.tsx +0 -121
- package/src/components/domain/skills/SkillImportDialogView/SkillImportDialogView.stories.tsx +0 -128
- package/src/components/domain/skills/SkillImportDialogView/SkillImportDialogViewSource.test.mjs +0 -11
- package/src/components/domain/skills/SkillImportDialogView/index.tsx +0 -147
- package/src/components/domain/skills/ToolDetailModalView/ToolDetailModalView.stories.tsx +0 -160
- package/src/components/domain/skills/ToolDetailModalView/ToolDetailModalViewSource.test.mjs +0 -99
- package/src/components/domain/skills/ToolDetailModalView/index.tsx +0 -160
- package/src/components/domain/skills/index.ts +0 -7
- package/src/components/domain/tasks/ScheduledTaskCardView/ScheduledTaskCardView.stories.tsx +0 -120
- package/src/components/domain/tasks/ScheduledTaskCardView/ScheduledTaskCardViewSource.test.mjs +0 -40
- package/src/components/domain/tasks/ScheduledTaskCardView/index.tsx +0 -135
- package/src/components/domain/tasks/ScheduledTaskDeleteDialog/ScheduledTaskDeleteDialog.stories.tsx +0 -56
- package/src/components/domain/tasks/ScheduledTaskDeleteDialog/ScheduledTaskDeleteDialogSource.test.mjs +0 -35
- package/src/components/domain/tasks/ScheduledTaskDeleteDialog/index.tsx +0 -73
- package/src/components/domain/tasks/ScheduledTaskDetailView/ScheduledTaskDetailView.stories.tsx +0 -121
- package/src/components/domain/tasks/ScheduledTaskDetailView/ScheduledTaskDetailViewSource.test.mjs +0 -115
- package/src/components/domain/tasks/ScheduledTaskDetailView/index.tsx +0 -223
- package/src/components/domain/tasks/ScheduledTasksSpaceView/ScheduledTasksSpaceView.stories.tsx +0 -526
- package/src/components/domain/tasks/ScheduledTasksSpaceView/ScheduledTasksSpaceViewSource.test.mjs +0 -85
- package/src/components/domain/tasks/ScheduledTasksSpaceView/index.tsx +0 -118
- package/src/components/domain/tasks/index.ts +0 -4
- package/src/components/domain/theme/SkinManager.stories.tsx +0 -43
- package/src/components/domain/theme/SkinManagerUI.tsx +0 -382
- package/src/components/domain/theme/ThemeDemo.stories.tsx +0 -12
- package/src/components/domain/theme/ThemeDemo.tsx +0 -224
- package/src/components/index.ts +0 -11
- package/src/components/primitives/Avatar/Avatar.stories.tsx +0 -170
- package/src/components/primitives/Avatar/AvatarSource.test.mjs +0 -37
- package/src/components/primitives/Avatar/index.tsx +0 -180
- package/src/components/primitives/BackTop/BackTop.stories.tsx +0 -122
- package/src/components/primitives/BackTop/BackTopSource.test.mjs +0 -61
- package/src/components/primitives/BackTop/index.tsx +0 -93
- package/src/components/primitives/Badge/Badge.stories.tsx +0 -376
- package/src/components/primitives/Badge/BadgeSource.test.mjs +0 -27
- package/src/components/primitives/Badge/index.tsx +0 -65
- package/src/components/primitives/Button/Button.stories.tsx +0 -287
- package/src/components/primitives/Button/ButtonSource.test.mjs +0 -84
- package/src/components/primitives/Button/index.tsx +0 -219
- package/src/components/primitives/Card/Card.stories.tsx +0 -186
- package/src/components/primitives/Card/CardSource.test.mjs +0 -73
- package/src/components/primitives/Card/index.tsx +0 -137
- package/src/components/primitives/Checkbox/Checkbox.stories.tsx +0 -79
- package/src/components/primitives/Checkbox/CheckboxSource.test.mjs +0 -43
- package/src/components/primitives/Checkbox/index.tsx +0 -87
- package/src/components/primitives/Chip/Chip.stories.tsx +0 -149
- package/src/components/primitives/Chip/ChipSource.test.mjs +0 -73
- package/src/components/primitives/Chip/index.tsx +0 -252
- package/src/components/primitives/Divider/Divider.stories.tsx +0 -68
- package/src/components/primitives/Divider/DividerSource.test.mjs +0 -26
- package/src/components/primitives/Divider/index.tsx +0 -65
- package/src/components/primitives/Dropdown/Dropdown.stories.tsx +0 -38
- package/src/components/primitives/Dropdown/DropdownSource.test.mjs +0 -23
- package/src/components/primitives/Dropdown/index.tsx +0 -29
- package/src/components/primitives/EmptyState/EmptyState.stories.tsx +0 -159
- package/src/components/primitives/EmptyState/EmptyStateSource.test.mjs +0 -169
- package/src/components/primitives/EmptyState/index.tsx +0 -185
- package/src/components/primitives/ErrorCard/ErrorCard.stories.tsx +0 -50
- package/src/components/primitives/ErrorCard/index.tsx +0 -78
- package/src/components/primitives/Field/Field.stories.tsx +0 -208
- package/src/components/primitives/Field/FieldSource.test.mjs +0 -70
- package/src/components/primitives/Field/index.tsx +0 -297
- package/src/components/primitives/InlineMessage/InlineMessage.stories.tsx +0 -137
- package/src/components/primitives/InlineMessage/InlineMessageSource.test.mjs +0 -50
- package/src/components/primitives/InlineMessage/index.tsx +0 -141
- package/src/components/primitives/Input/Input.stories.tsx +0 -30
- package/src/components/primitives/Input/index.tsx +0 -12
- package/src/components/primitives/Keycap/Keycap.stories.tsx +0 -93
- package/src/components/primitives/Keycap/KeycapSource.test.mjs +0 -30
- package/src/components/primitives/Keycap/index.tsx +0 -67
- package/src/components/primitives/Menu/Menu.stories.tsx +0 -416
- package/src/components/primitives/Menu/MenuEmptySource.test.mjs +0 -23
- package/src/components/primitives/Menu/MenuSource.test.mjs +0 -207
- package/src/components/primitives/Menu/index.tsx +0 -923
- package/src/components/primitives/Pagination/Pagination.stories.tsx +0 -77
- package/src/components/primitives/Pagination/PaginationSource.test.mjs +0 -24
- package/src/components/primitives/Pagination/index.tsx +0 -85
- package/src/components/primitives/Pagination/pagination.ts +0 -25
- package/src/components/primitives/Pagination/paginationModel.test.mjs +0 -18
- package/src/components/primitives/ProgressBar/ProgressBar.stories.tsx +0 -103
- package/src/components/primitives/ProgressBar/ProgressBarSource.test.mjs +0 -44
- package/src/components/primitives/ProgressBar/index.tsx +0 -68
- package/src/components/primitives/Radio/Radio.stories.tsx +0 -84
- package/src/components/primitives/Radio/RadioSource.test.mjs +0 -38
- package/src/components/primitives/Radio/index.tsx +0 -161
- package/src/components/primitives/SegmentedControl/SegmentedControl.stories.tsx +0 -110
- package/src/components/primitives/SegmentedControl/SegmentedControlSource.test.mjs +0 -75
- package/src/components/primitives/SegmentedControl/index.tsx +0 -188
- package/src/components/primitives/Select/Select.stories.tsx +0 -158
- package/src/components/primitives/Select/SelectSource.test.mjs +0 -94
- package/src/components/primitives/Select/index.tsx +0 -406
- package/src/components/primitives/Spinner/index.tsx +0 -58
- package/src/components/primitives/Switch/Switch.stories.tsx +0 -64
- package/src/components/primitives/Switch/SwitchSource.test.mjs +0 -38
- package/src/components/primitives/Switch/index.tsx +0 -84
- package/src/components/primitives/Tabs/Tabs.stories.tsx +0 -230
- package/src/components/primitives/Tabs/TabsSource.test.mjs +0 -91
- package/src/components/primitives/Tabs/index.tsx +0 -183
- package/src/components/primitives/index.ts +0 -24
- package/src/examples/ResourceManagementExample.tsx +0 -119
- package/src/examples/SiteWorkbenchExample.tsx +0 -96
- package/src/hooks/index.ts +0 -7
- package/src/hooks/useClickOutside.ts +0 -20
- package/src/hooks/useDragReorder.ts +0 -29
- package/src/hooks/useImeAwareEnter.ts +0 -59
- package/src/hooks/useImeAwareEnterSource.test.mjs +0 -65
- package/src/hooks/useKeyboard.ts +0 -16
- package/src/hooks/usePopover.ts +0 -67
- package/src/hooks/useSelectedOptionLocator.ts +0 -33
- package/src/hooks/useSidebarResize.ts +0 -107
- package/src/hooks/useTenantTheme.ts +0 -53
- package/src/hooks/useUnifiedTheme.ts +0 -85
- package/src/index.ts +0 -6
- package/src/lib/InjectedStyleTokenMirrorSource.test.mjs +0 -67
- package/src/lib/about-window.test.mjs +0 -46
- package/src/lib/about-window.ts +0 -218
- package/src/lib/appearance.test.mjs +0 -283
- package/src/lib/appearance.ts +0 -46
- package/src/lib/browser-annotation-popup.ts +0 -151
- package/src/lib/focusTrap.ts +0 -51
- package/src/lib/index.ts +0 -5
- package/src/lib/shortcut.test.mjs +0 -100
- package/src/lib/shortcut.ts +0 -97
- package/src/lib/twMergeOw.ts +0 -18
- package/src/lib/utils.ts +0 -6
- package/src/screens/Browser.stories.tsx +0 -353
- package/src/screens/Chat.stories.tsx +0 -808
- package/src/screens/Home.stories.tsx +0 -253
- package/src/screens/Login.stories.tsx +0 -134
- package/src/screens/McpManager.stories.tsx +0 -159
- package/src/screens/Onboarding.stories.tsx +0 -155
- package/src/screens/ScheduledTasks.stories.tsx +0 -134
- package/src/screens/ScreenFrameSource.test.mjs +0 -77
- package/src/screens/SettingsAppearance.stories.tsx +0 -117
- package/src/screens/SettingsMemory.stories.tsx +0 -128
- package/src/screens/SettingsModels.stories.tsx +0 -228
- package/src/screens/SettingsSections.stories.tsx +0 -164
- package/src/screens/Share.stories.tsx +0 -202
- package/src/screens/SharePage.stories.tsx +0 -29
- package/src/screens/Sites.stories.tsx +0 -183
- package/src/screens/Skills.stories.tsx +0 -83
- package/src/screens/Workspace.stories.tsx +0 -191
- package/src/screens/_home.tsx +0 -46
- package/src/screens/_screen.tsx +0 -355
- package/src/screens/_settingsNav.ts +0 -27
- package/src/screens/_skillsCatalog.tsx +0 -372
- package/src/theme/SkinDenylistSyncSource.test.mjs +0 -124
- package/src/theme/__tests__/skins.test.mjs +0 -84
- package/src/theme/core/semanticAdapter.ts +0 -116
- package/src/theme/core/skin.ts +0 -605
- package/src/theme/core/skinScoped.ts +0 -289
- package/src/theme/core/tenantTheme.test.mjs +0 -127
- package/src/theme/core/tenantTheme.ts +0 -124
- package/src/theme/core/types.ts +0 -60
- package/src/theme/core/unifiedTheme.ts +0 -157
- package/src/theme/index.ts +0 -33
- package/src/theme/providers/BrandingProvider.tsx +0 -57
- package/src/theme/providers/ThemeProvider.tsx +0 -221
- package/src/theme/skinDs2PropertyGate.test.mjs +0 -109
- package/src/theme/skins/index.ts +0 -107
- package/src/theme/utils/cssSafety.ts +0 -92
- package/src/theme/utils/skinManager.ts +0 -159
- package/src/theme/utils/themeApplier.ts +0 -75
- package/src/tokens/DesktopSurfacesSweep15Source.test.mjs +0 -77
- package/src/tokens/SharedStyleSheetsSource.test.mjs +0 -90
- package/src/tokens/TailwindThemeSupplySource.test.mjs +0 -129
- package/src/tokens/base.ts +0 -199
- package/src/tokens/dark.ts +0 -288
- package/src/tokens/index.ts +0 -4
- package/src/tokens/light.ts +0 -320
- package/src/tokens/tailwind.ts +0 -216
- package/src/types/desktop-pet.ts +0 -100
- package/src/types/file-browser.ts +0 -51
- package/src/types/file-tree.ts +0 -34
- package/src/types/index.ts +0 -3
- package/src/types/xspreadsheet.d.ts +0 -4
- package/src/utils/cn.ts +0 -6
- package/src/utils/glyphColor.ts +0 -32
- package/src/utils/index.ts +0 -4
- package/src/utils/localPathInline.test.mjs +0 -45
- package/src/utils/localPathInline.ts +0 -49
- package/src/utils/markdownFileRefs.test.mjs +0 -88
- package/src/utils/markdownFileRefs.ts +0 -140
- package/src/utils/office-excel.ts +0 -452
- package/src/utils/shiki.ts +0 -156
|
@@ -1,1111 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import { useEffect, useRef, useState } from "react"
|
|
4
|
-
import { createPortal } from "react-dom" // ui-imports-guard-disable-line
|
|
5
|
-
import { useImeAwareEnter } from "../../../../hooks/useImeAwareEnter"
|
|
6
|
-
import type { Theme } from "../../../../lib/appearance"
|
|
7
|
-
import { SidebarShell, type SidebarShellPlatform } from "../../../Layout/SidebarShell"
|
|
8
|
-
import { CreateProjectDialog } from "../../../composite/CreateProjectDialog"
|
|
9
|
-
import { Dialog } from "../../../composite/Dialog"
|
|
10
|
-
import {
|
|
11
|
-
Archive,
|
|
12
|
-
Branch,
|
|
13
|
-
ChevDown,
|
|
14
|
-
ChevRight,
|
|
15
|
-
Clock,
|
|
16
|
-
Download,
|
|
17
|
-
Edit,
|
|
18
|
-
Folder,
|
|
19
|
-
Grid,
|
|
20
|
-
Icon,
|
|
21
|
-
Memo,
|
|
22
|
-
More,
|
|
23
|
-
Package,
|
|
24
|
-
PanelSidebar,
|
|
25
|
-
Plus,
|
|
26
|
-
Refresh,
|
|
27
|
-
Share,
|
|
28
|
-
ThreadDot,
|
|
29
|
-
Trash,
|
|
30
|
-
} from "../../../composite/Icons"
|
|
31
|
-
import { TextField } from "../../../composite/NativeControls"
|
|
32
|
-
import { OrbitworkLockup, OrbitworkMark } from "../../../composite/OrbitworkLogo"
|
|
33
|
-
import { ProjectSelect } from "../../../composite/ProjectSelect"
|
|
34
|
-
import { Avatar, Button } from "../../../primitives"
|
|
35
|
-
import { MenuSurface } from "../../../primitives/Menu"
|
|
36
|
-
import type { MenuItem } from "../../../primitives/Menu"
|
|
37
|
-
import { Spinner } from "../../../primitives/Spinner"
|
|
38
|
-
import { DesktopAccountMenuView, updateRowText } from "../DesktopAccountMenuView"
|
|
39
|
-
|
|
40
|
-
export type DesktopSidebarNavId = "new" | "skills" | "sites" | "cron" | "files" | "library"
|
|
41
|
-
export type DesktopSidebarSourceIcon = "WeCom" | "DingTalk" | "Feishu"
|
|
42
|
-
|
|
43
|
-
export interface DesktopSidebarThread {
|
|
44
|
-
id: string
|
|
45
|
-
projectId: string
|
|
46
|
-
title: string
|
|
47
|
-
active: boolean
|
|
48
|
-
running: boolean
|
|
49
|
-
/** 运行进度读数(如 "3/7"),mono+tabular-nums 渲染在行尾实心点之后。
|
|
50
|
-
* SidebarCurrent 规格·状态极改形:与位置极(图标内信标点)不得同形,永不荧黄。 */
|
|
51
|
-
runningCount?: string
|
|
52
|
-
unread: boolean
|
|
53
|
-
sourceIcon?: DesktopSidebarSourceIcon
|
|
54
|
-
sourceLabel?: string
|
|
55
|
-
branched?: boolean
|
|
56
|
-
archived?: boolean
|
|
57
|
-
canArchive?: boolean
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface DesktopSidebarProject {
|
|
61
|
-
id: string
|
|
62
|
-
label: string
|
|
63
|
-
open: boolean
|
|
64
|
-
isDefault: boolean
|
|
65
|
-
loadingMore: boolean
|
|
66
|
-
canLoadMore: boolean
|
|
67
|
-
loadError?: string | null
|
|
68
|
-
threads: DesktopSidebarThread[]
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export interface DesktopSidebarUser {
|
|
72
|
-
name: string
|
|
73
|
-
avatarUrl: string
|
|
74
|
-
/** 账户菜单头部第二行(邮箱优先,没有就出 id)。 */
|
|
75
|
-
email?: string
|
|
76
|
-
/**
|
|
77
|
-
* 身份键:既是头像无图时的配色取模依据(`primitives/Avatar` 的 data-1..6 轮转),
|
|
78
|
-
* 也是账户菜单「复制 ID」复制出去的值。不传=菜单头不出复制钮。
|
|
79
|
-
*/
|
|
80
|
-
id?: string
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export type DesktopSidebarUpdateState = "available" | "downloading" | "ready" | "error"
|
|
84
|
-
|
|
85
|
-
export interface DesktopSidebarUpdate {
|
|
86
|
-
state: DesktopSidebarUpdateState
|
|
87
|
-
version: string
|
|
88
|
-
percent?: number
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface DesktopSidebarViewProps {
|
|
92
|
-
collapsed: boolean
|
|
93
|
-
width: number
|
|
94
|
-
/**
|
|
95
|
-
* 平台(受控,权威值来自主进程;库侧不嗅探 userAgent)。R2 起它决定折叠钮住在哪:
|
|
96
|
-
* `windows` 的钮在通栏带里(本栏无顶行、折叠宽 0),其余平台钮住在**侧栏顶行**
|
|
97
|
-
* (mac 顶行带 68 红绿灯让位块,钮落 x=80;linux/web 落 x=8),折叠成 rail(mac 116 / 其余 44)。
|
|
98
|
-
* 宿主两处传同一个值:`App.tsx` 的 `DesktopWorkbenchShell.platform` 与本件。缺省不传=不出顶行。
|
|
99
|
-
*/
|
|
100
|
-
platform?: SidebarShellPlatform
|
|
101
|
-
/** mac 全屏:红绿灯消失 → 顶行让位块收 0、钮回到 x=8、折叠 rail 收到 44。 */
|
|
102
|
-
fullscreen?: boolean
|
|
103
|
-
/**
|
|
104
|
-
* 折叠后宽度(透传 SidebarShell):缺省按 `platform` 派生 rail(mac 116 / 其余 44);
|
|
105
|
-
* **显式传 0=整条卸载**——折叠后不留 rail,顶行折成浮块坐在窗口左上角原坐标供重新展开。
|
|
106
|
-
* 桌面宿主「折叠=全部折叠」走 0 这一档。
|
|
107
|
-
*/
|
|
108
|
-
collapsedWidth?: number
|
|
109
|
-
/**
|
|
110
|
-
* 当前导航项(位置极)。R2 · L1-1-1:原来是 `Exclude<…, "new">`,
|
|
111
|
-
* 从签名上就禁掉了「新任务」这一档,于是主屏整屏零位置极——而原型
|
|
112
|
-
* (模板 L5008–5013,NAV 首项就是「新任务」)在主屏是把这一行点亮的。
|
|
113
|
-
* 宿主 `features/sidebar/Sidebar.tsx` 补 `view === 'home' → 'new'` 即可,见交接单。
|
|
114
|
-
*/
|
|
115
|
-
activeNav?: DesktopSidebarNavId
|
|
116
|
-
/**
|
|
117
|
-
* 首次会话列表加载中(宿主 `loadSessions` 首轮)。为 true 且还没有任何会话行时,
|
|
118
|
-
* 列表区出品牌 mark + spinner 的启动态,而不是一块空白——首屏读得出「在加载」
|
|
119
|
-
* 而不是「没有会话」。分页/刷新加载不改变此值(那是 `loadingMore` 的语义)。
|
|
120
|
-
*/
|
|
121
|
-
sessionsLoading?: boolean
|
|
122
|
-
/**
|
|
123
|
-
* 是否在导航里出「我的空间」(A11-B1 · 裁决 16)。
|
|
124
|
-
*
|
|
125
|
-
* 缺省 **false**:我的空间正在退役——项目文件搬去右栏文件浏览器、记忆搬去设置·记忆段,
|
|
126
|
-
* 导航因此长成「新任务 / 插件 / 工作台 / 定时任务」四项(原型模板 689–701)。
|
|
127
|
-
* 代码与 `DesktopSidebarNavId` 的 `"files"` 一律保留:宿主路由(apps/desktop
|
|
128
|
-
* `features/sidebar/Sidebar.tsx:291` 的 `view === 'workspace' → 'files'`)还在,
|
|
129
|
-
* 打开本开关即可原样退回五项。宿主路由退役后本 prop 与 `"files"` 分支一起删。
|
|
130
|
-
*/
|
|
131
|
-
showWorkspaceNav?: boolean
|
|
132
|
-
newTaskTitle: string
|
|
133
|
-
projects: DesktopSidebarProject[]
|
|
134
|
-
user: DesktopSidebarUser
|
|
135
|
-
onCollapsedChange: (collapsed: boolean) => void
|
|
136
|
-
onWidthChange: (width: number) => void
|
|
137
|
-
onNavigate: (target: Exclude<DesktopSidebarNavId, "new">) => void
|
|
138
|
-
onOpenSettings: () => void
|
|
139
|
-
petVisible?: boolean
|
|
140
|
-
onPetVisibleChange?: (visible: boolean) => void
|
|
141
|
-
onNewTask: (projectId?: string) => void
|
|
142
|
-
onToggleProject: (projectId: string) => void
|
|
143
|
-
onLoadMore: (projectId: string) => void
|
|
144
|
-
showArchived: boolean
|
|
145
|
-
onRefreshProjects: () => void
|
|
146
|
-
onShowArchivedChange: (showArchived: boolean) => void
|
|
147
|
-
onSelectThread: (threadId: string) => void
|
|
148
|
-
onCreateProject: (name: string) => Promise<void>
|
|
149
|
-
onCreateProjectForSelection?: (name: string) => Promise<string>
|
|
150
|
-
onRenameProject: (projectId: string, name: string) => Promise<void>
|
|
151
|
-
onDeleteProject: (projectId: string) => Promise<void>
|
|
152
|
-
onOpenProjectDirectory: (projectId: string) => void
|
|
153
|
-
onRenameThread: (threadId: string, title: string) => Promise<void>
|
|
154
|
-
onMoveThread: (threadId: string, projectId: string) => Promise<void>
|
|
155
|
-
onDeleteThread: (threadId: string) => Promise<void>
|
|
156
|
-
onArchiveThread: (threadId: string) => Promise<void>
|
|
157
|
-
// Share the whole thread as a one-click, share-everything shortcut (no picker).
|
|
158
|
-
onShareThread: (threadId: string) => void
|
|
159
|
-
onFeedback: () => void
|
|
160
|
-
onLogout: () => void
|
|
161
|
-
update?: DesktopSidebarUpdate
|
|
162
|
-
onUpdateClick?: () => void
|
|
163
|
-
onInstallUpdate?: () => Promise<void> | void
|
|
164
|
-
|
|
165
|
-
/* ── R2 · 账户菜单「常用能力直出」的数据口(全部可选,缺省即该块不出) ───────
|
|
166
|
-
数据来源见交接单第九节:套餐/积分走计费接口、版本号走 app.getVersion()、
|
|
167
|
-
主题走宿主 theme store(与设置·常规段同一个值)。 */
|
|
168
|
-
/** 套餐名 + 行末描边钮(升级 / 充值)。不传=套餐井里不出这一行。 */
|
|
169
|
-
plan?: { name: string; action?: { label: string; onClick: () => void } }
|
|
170
|
-
/** 积分额度读数(used/limit)。不传=不出读数与额度条;plan 与 credits 都没有则整个井不出。 */
|
|
171
|
-
credits?: { used: number; limit: number; label?: string }
|
|
172
|
-
/** 版本号,挂在菜单「检查更新」行尾(mono 读数)。 */
|
|
173
|
-
version?: string
|
|
174
|
-
/** 当前主题(与设置·常规段的三格同一个值)。 */
|
|
175
|
-
theme?: Theme
|
|
176
|
-
onThemeChange?: (theme: Theme) => void
|
|
177
|
-
/** 「记忆」行;不传时回落到 `onOpenSettings()`(宿主再跳记忆段)。 */
|
|
178
|
-
onOpenMemory?: () => void
|
|
179
|
-
/** 「复制 ID」:组件出 2 秒内联反馈,toast 归宿主。不传+没有 user.id =不出复制钮。 */
|
|
180
|
-
onCopyUserId?: (id: string) => void
|
|
181
|
-
/** 「检查更新」行。 */
|
|
182
|
-
onCheckUpdate?: () => void
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
type Anchor = { id: string; left: number; top: number }
|
|
186
|
-
type ProjectAnchor = Anchor & { label: string; isDefault: boolean }
|
|
187
|
-
|
|
188
|
-
export function DesktopSidebarView(props: DesktopSidebarViewProps): React.ReactElement {
|
|
189
|
-
const { projects } = props
|
|
190
|
-
const { isImeEnter, onCompositionStart, onCompositionEnd } = useImeAwareEnter()
|
|
191
|
-
const [creatingProject, setCreatingProject] = useState(false)
|
|
192
|
-
const [userMenu, setUserMenu] = useState<{ left: number; top: number; byKeyboard: boolean } | null>(null)
|
|
193
|
-
/* R2 核对修(T4):账户行按钮是菜单的触发器——Esc / 选中一行关面后焦点回到它
|
|
194
|
-
(WAI-ARIA menu button 口径)。原来关面后焦点掉到 body,键盘用户得从文档头重新 Tab 进来。
|
|
195
|
-
鼠标点遮罩 / 窗口失焦关面不回焦(没有键盘上下文可还)。 */
|
|
196
|
-
const userMenuTrigger = useRef<HTMLButtonElement>(null)
|
|
197
|
-
const closeUserMenu = (restoreFocus: boolean) => {
|
|
198
|
-
setUserMenu(null)
|
|
199
|
-
if (restoreFocus) userMenuTrigger.current?.focus()
|
|
200
|
-
}
|
|
201
|
-
const [threadMenu, setThreadMenu] = useState<Anchor | null>(null)
|
|
202
|
-
const [projectMenu, setProjectMenu] = useState<ProjectAnchor | null>(null)
|
|
203
|
-
const [projectsMenu, setProjectsMenu] = useState<{ left: number; top: number } | null>(null)
|
|
204
|
-
const [renamingThread, setRenamingThread] = useState<{ id: string; value: string } | null>(null)
|
|
205
|
-
const [renamingProject, setRenamingProject] = useState<{ id: string; value: string } | null>(null)
|
|
206
|
-
const [pendingThreadDelete, setPendingThreadDelete] = useState<DesktopSidebarThread | null>(null)
|
|
207
|
-
const [pendingProjectDelete, setPendingProjectDelete] = useState<DesktopSidebarProject | null>(null)
|
|
208
|
-
const [pendingMove, setPendingMove] = useState<DesktopSidebarThread | null>(null)
|
|
209
|
-
const [deletingProject, setDeletingProject] = useState(false)
|
|
210
|
-
const [draggingThreadId, setDraggingThreadId] = useState<string | null>(null)
|
|
211
|
-
const [dragOverProjectId, setDragOverProjectId] = useState<string | null>(null)
|
|
212
|
-
const [showInstallUpdate, setShowInstallUpdate] = useState(false)
|
|
213
|
-
const [installingUpdate, setInstallingUpdate] = useState(false)
|
|
214
|
-
|
|
215
|
-
useEffect(() => {
|
|
216
|
-
if (!threadMenu && !projectMenu && !projectsMenu) return
|
|
217
|
-
const close = () => {
|
|
218
|
-
setThreadMenu(null)
|
|
219
|
-
setProjectMenu(null)
|
|
220
|
-
setProjectsMenu(null)
|
|
221
|
-
}
|
|
222
|
-
const timer = window.setTimeout(() => window.addEventListener("click", close), 0)
|
|
223
|
-
return () => {
|
|
224
|
-
window.clearTimeout(timer)
|
|
225
|
-
window.removeEventListener("click", close)
|
|
226
|
-
}
|
|
227
|
-
}, [threadMenu, projectMenu, projectsMenu])
|
|
228
|
-
|
|
229
|
-
useEffect(() => {
|
|
230
|
-
if (!userMenu) return
|
|
231
|
-
const close = () => setUserMenu(null)
|
|
232
|
-
// 只有 Escape 关面:菜单已换 MenuSurface 基座,方向键/Home/End/首字母都是它的
|
|
233
|
-
// 键盘导航,原来「任意 keydown 就关」会把导航按键一并吃掉。
|
|
234
|
-
const closeOnEscape = (event: KeyboardEvent) => {
|
|
235
|
-
if (event.key === "Escape") closeUserMenu(true)
|
|
236
|
-
}
|
|
237
|
-
window.addEventListener("click", close)
|
|
238
|
-
window.addEventListener("keydown", closeOnEscape)
|
|
239
|
-
window.addEventListener("blur", close)
|
|
240
|
-
return () => {
|
|
241
|
-
window.removeEventListener("click", close)
|
|
242
|
-
window.removeEventListener("keydown", closeOnEscape)
|
|
243
|
-
window.removeEventListener("blur", close)
|
|
244
|
-
}
|
|
245
|
-
}, [userMenu])
|
|
246
|
-
|
|
247
|
-
useEffect(() => {
|
|
248
|
-
if (props.update?.state !== "ready") setShowInstallUpdate(false)
|
|
249
|
-
}, [props.update?.state])
|
|
250
|
-
|
|
251
|
-
const threadById = (id: string) => projects.flatMap((project) => project.threads).find((thread) => thread.id === id)
|
|
252
|
-
const clearDrag = () => {
|
|
253
|
-
setDraggingThreadId(null)
|
|
254
|
-
setDragOverProjectId(null)
|
|
255
|
-
}
|
|
256
|
-
const commitThreadRename = async () => {
|
|
257
|
-
if (!renamingThread) return
|
|
258
|
-
const pending = renamingThread
|
|
259
|
-
const value = pending.value.trim()
|
|
260
|
-
setRenamingThread(null)
|
|
261
|
-
if (!value) return
|
|
262
|
-
try {
|
|
263
|
-
await props.onRenameThread(pending.id, value)
|
|
264
|
-
} catch {
|
|
265
|
-
setRenamingThread(pending)
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
const commitProjectRename = async () => {
|
|
269
|
-
if (!renamingProject) return
|
|
270
|
-
const pending = renamingProject
|
|
271
|
-
const value = pending.value.trim()
|
|
272
|
-
setRenamingProject(null)
|
|
273
|
-
if (!value) return
|
|
274
|
-
try {
|
|
275
|
-
await props.onRenameProject(pending.id, value)
|
|
276
|
-
} catch {
|
|
277
|
-
setRenamingProject(pending)
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
return (
|
|
282
|
-
<SidebarShell
|
|
283
|
-
collapsed={props.collapsed}
|
|
284
|
-
onCollapsedChange={props.onCollapsedChange}
|
|
285
|
-
width={props.width}
|
|
286
|
-
onWidthChange={props.onWidthChange}
|
|
287
|
-
minWidth={180}
|
|
288
|
-
maxWidth={400}
|
|
289
|
-
platform={props.platform}
|
|
290
|
-
fullscreen={props.fullscreen}
|
|
291
|
-
collapsedWidth={props.collapsedWidth}
|
|
292
|
-
>
|
|
293
|
-
{/* R2:折叠态本栏整块不渲染(windows 收成 0 宽、其余平台收成只剩顶行的 rail),
|
|
294
|
-
原来这里那枚 `collapsed ? <OrbitworkMark 28/>` 的折叠分支已成死码——rail 宽
|
|
295
|
-
(mac 116 = 8+68+4+28+8 / 其余 44 = 8+28+8)被让位块与折叠钮占满,塞不下 mark,
|
|
296
|
-
故整条删除,栏内只留展开态的 lockup。 */}
|
|
297
|
-
<div className="owbrand">
|
|
298
|
-
<OrbitworkLockup theme="auto" size={20} />
|
|
299
|
-
</div>
|
|
300
|
-
<nav className="ownav">
|
|
301
|
-
{/* R2 · L1-2-1:四枚导航字形逐点照原型(模板 687/692/696/700)——原来是
|
|
302
|
-
NewTask(方框带笔)/ Compass(指南针)/ Globe(地球),与原型对不上,
|
|
303
|
-
且那三枚不带 `.dot` 零件,所以「当前项点亮信标点」这条规则在三屏上空转。
|
|
304
|
-
换成信标化字形后点随字形自带:ThreadDot=tasks · PanelSidebar=workspace ·
|
|
305
|
-
Clock=schedule 三枚有点,Package(插件)按原型 NAV 表 dot:false 无点。 */}
|
|
306
|
-
<NavItem
|
|
307
|
-
id="new"
|
|
308
|
-
label="新任务"
|
|
309
|
-
title={props.newTaskTitle}
|
|
310
|
-
active={props.activeNav === "new"}
|
|
311
|
-
icon={<ThreadDot />}
|
|
312
|
-
onClick={() => props.onNewTask()}
|
|
313
|
-
/>
|
|
314
|
-
{/* A3-B5 命名统一(原型 693/697):「发现」→「插件」、「站点」→「工作台」。
|
|
315
|
-
路由 id(skills / sites)不动,只换面上的字;埋点键 R2 · L3-3-6 起改名
|
|
316
|
-
(discover→plugins、workspace→workbench),见 NavItem 里的锚点注。 */}
|
|
317
|
-
<NavItem
|
|
318
|
-
id="skills"
|
|
319
|
-
label="插件"
|
|
320
|
-
title="插件"
|
|
321
|
-
active={props.activeNav === "skills"}
|
|
322
|
-
icon={<Package />}
|
|
323
|
-
onClick={() => props.onNavigate("skills")}
|
|
324
|
-
/>
|
|
325
|
-
<NavItem
|
|
326
|
-
id="sites"
|
|
327
|
-
label="工作台"
|
|
328
|
-
title="工作台"
|
|
329
|
-
active={props.activeNav === "sites"}
|
|
330
|
-
icon={<PanelSidebar />}
|
|
331
|
-
onClick={() => props.onNavigate("sites")}
|
|
332
|
-
/>
|
|
333
|
-
<NavItem
|
|
334
|
-
id="cron"
|
|
335
|
-
label="定时任务"
|
|
336
|
-
title="定时任务"
|
|
337
|
-
active={props.activeNav === "cron"}
|
|
338
|
-
icon={<Clock />}
|
|
339
|
-
onClick={() => props.onNavigate("cron")}
|
|
340
|
-
/>
|
|
341
|
-
{/* A11-B1:默认不出(showWorkspaceNav 缺省 false),导航长成四项。
|
|
342
|
-
R2 · L1-2-1:workspace 那枚信标字形(PanelSidebar)已归给「工作台」——
|
|
343
|
-
原型里带信标点的 rect 就是工作台那一位;退役中的「我的空间」改用中性 Grid,
|
|
344
|
-
免得开关打开时同一列出现两枚一模一样的图标。
|
|
345
|
-
R2 · L3-3-6:`workspace` 这个引导锚点也随之移交工作台(改名 `workbench`),
|
|
346
|
-
本项不再挂锚点。删除条件见 showWorkspaceNav 的文档注释。 */}
|
|
347
|
-
{props.showWorkspaceNav && (
|
|
348
|
-
<NavItem
|
|
349
|
-
id="files"
|
|
350
|
-
label="我的空间"
|
|
351
|
-
title="我的空间"
|
|
352
|
-
active={props.activeNav === "files"}
|
|
353
|
-
icon={<Grid />}
|
|
354
|
-
onClick={() => props.onNavigate("files")}
|
|
355
|
-
/>
|
|
356
|
-
)}
|
|
357
|
-
{/* 资料库:恢复的入口(曾隐藏导致已接线的 LibraryPage 不可达——App.tsx 已把
|
|
358
|
-
baseView === "library" 路由到 workbenchView 并以 active prop 挂载 LibraryPage)。
|
|
359
|
-
放在「我的空间」之后;只有 running 的 thread 才禁用移动,archived 可以移动。 */}
|
|
360
|
-
<NavItem
|
|
361
|
-
id="library"
|
|
362
|
-
label="资料库"
|
|
363
|
-
title="资料库"
|
|
364
|
-
active={props.activeNav === "library"}
|
|
365
|
-
icon={<Memo />}
|
|
366
|
-
onClick={() => props.onNavigate("library")}
|
|
367
|
-
/>
|
|
368
|
-
</nav>
|
|
369
|
-
|
|
370
|
-
<div className="owrecent-head" data-tour-anchor="projects">
|
|
371
|
-
<div className="t">项目</div>
|
|
372
|
-
<div className="owrecent-actions">
|
|
373
|
-
<Button
|
|
374
|
-
variant="unstyled"
|
|
375
|
-
title="更多项目操作"
|
|
376
|
-
aria-label="更多项目操作"
|
|
377
|
-
onClick={(event) => {
|
|
378
|
-
event.stopPropagation()
|
|
379
|
-
const rect = event.currentTarget.getBoundingClientRect()
|
|
380
|
-
setProjectsMenu({ left: rect.right + 6, top: rect.top })
|
|
381
|
-
}}
|
|
382
|
-
>
|
|
383
|
-
<More />
|
|
384
|
-
</Button>
|
|
385
|
-
<Button variant="unstyled" title="新建项目" aria-label="新建项目" onClick={() => setCreatingProject(true)}>
|
|
386
|
-
<Plus />
|
|
387
|
-
</Button>
|
|
388
|
-
</div>
|
|
389
|
-
</div>
|
|
390
|
-
<div className="owprojects">
|
|
391
|
-
{props.sessionsLoading && projects.every((project) => project.threads.length === 0) ? (
|
|
392
|
-
<div className="owprojects-boot" role="status" aria-live="polite">
|
|
393
|
-
<OrbitworkMark variant="auto" size={40} />
|
|
394
|
-
<Spinner size="md" />
|
|
395
|
-
</div>
|
|
396
|
-
) : (
|
|
397
|
-
projects.map((project) => (
|
|
398
|
-
<div key={project.id} className="owproject">
|
|
399
|
-
{renamingProject?.id === project.id ? (
|
|
400
|
-
<div className="owproject__head renaming">
|
|
401
|
-
<Folder className="project-icon" />
|
|
402
|
-
<TextField
|
|
403
|
-
unstyled
|
|
404
|
-
autoFocus
|
|
405
|
-
value={renamingProject.value}
|
|
406
|
-
onChange={(event) => setRenamingProject({ id: project.id, value: event.target.value })}
|
|
407
|
-
onBlur={() => {
|
|
408
|
-
void commitProjectRename()
|
|
409
|
-
}}
|
|
410
|
-
onCompositionStart={onCompositionStart}
|
|
411
|
-
onCompositionEnd={onCompositionEnd}
|
|
412
|
-
onKeyDown={(event) => {
|
|
413
|
-
if (isImeEnter(event)) return
|
|
414
|
-
if (event.key === "Enter") void commitProjectRename()
|
|
415
|
-
if (event.key === "Escape") setRenamingProject(null)
|
|
416
|
-
}}
|
|
417
|
-
/>
|
|
418
|
-
</div>
|
|
419
|
-
) : (
|
|
420
|
-
/* DS2 P6-2 口径(同底部账户区 .owuser):行壳只管布局与拖放,行内两枚按钮各拿一个焦点位。
|
|
421
|
-
原来整行是 <Button>,「更多」是它里面的 <span onClick>——键盘够不到,且可点元素套可点元素。 */
|
|
422
|
-
<div
|
|
423
|
-
className={`owproject__head${project.open ? "" : " collapsed"}${dragOverProjectId === project.id ? " drop-target" : ""}`}
|
|
424
|
-
onDragOver={(event) => {
|
|
425
|
-
if (!draggingThreadId) return
|
|
426
|
-
event.preventDefault()
|
|
427
|
-
event.dataTransfer.dropEffect = "move"
|
|
428
|
-
setDragOverProjectId(project.id)
|
|
429
|
-
}}
|
|
430
|
-
onDragLeave={(event) => {
|
|
431
|
-
const related = event.relatedTarget
|
|
432
|
-
if (related instanceof Node && event.currentTarget.contains(related)) return
|
|
433
|
-
setDragOverProjectId((current) => (current === project.id ? null : current))
|
|
434
|
-
}}
|
|
435
|
-
onDrop={(event) => {
|
|
436
|
-
event.preventDefault()
|
|
437
|
-
const threadId = event.dataTransfer.getData("application/x-owthread-id") || draggingThreadId
|
|
438
|
-
clearDrag()
|
|
439
|
-
if (threadId) void props.onMoveThread(threadId, project.id).catch(() => undefined)
|
|
440
|
-
}}
|
|
441
|
-
>
|
|
442
|
-
<Button
|
|
443
|
-
variant="unstyled"
|
|
444
|
-
className="owproject__head-main"
|
|
445
|
-
title={project.label}
|
|
446
|
-
aria-expanded={project.open}
|
|
447
|
-
onClick={() => props.onToggleProject(project.id)}
|
|
448
|
-
>
|
|
449
|
-
{/* R2 · L1-1-2:披露箭头在**行首**(原型模板 L714–720 是
|
|
450
|
-
「chev 14 → folder 16 → 名」,行尾什么都没有)。原来它挂在行尾,
|
|
451
|
-
读起来像行末的一枚操作钮,而不是「这一行能展开」。
|
|
452
|
-
展开 ChevDown / 折叠 ChevRight——原来靠一枚 ChevDown 转 -90°,
|
|
453
|
-
现在两枚字形各画各的,与原型逐点一致。 */}
|
|
454
|
-
{project.open ? <ChevDown className="caret" /> : <ChevRight className="caret" />}
|
|
455
|
-
<Folder className="project-icon" />
|
|
456
|
-
<span className="lbl">{project.label}</span>
|
|
457
|
-
</Button>
|
|
458
|
-
<Button
|
|
459
|
-
variant="unstyled"
|
|
460
|
-
className="more"
|
|
461
|
-
title="项目操作"
|
|
462
|
-
aria-label={`${project.label} 的项目操作`}
|
|
463
|
-
aria-haspopup="menu"
|
|
464
|
-
onClick={(event) => {
|
|
465
|
-
event.stopPropagation()
|
|
466
|
-
const rect = event.currentTarget.getBoundingClientRect()
|
|
467
|
-
setThreadMenu(null)
|
|
468
|
-
setProjectMenu({
|
|
469
|
-
id: project.id,
|
|
470
|
-
label: project.label,
|
|
471
|
-
isDefault: project.isDefault,
|
|
472
|
-
left: rect.right + 6,
|
|
473
|
-
top: rect.top,
|
|
474
|
-
})
|
|
475
|
-
}}
|
|
476
|
-
>
|
|
477
|
-
<More />
|
|
478
|
-
</Button>
|
|
479
|
-
</div>
|
|
480
|
-
)}
|
|
481
|
-
{project.open && (
|
|
482
|
-
<div className="owthreads">
|
|
483
|
-
{project.threads.map((thread) =>
|
|
484
|
-
renamingThread?.id === thread.id ? (
|
|
485
|
-
<div key={thread.id} className="owthread renaming">
|
|
486
|
-
<TextField
|
|
487
|
-
unstyled
|
|
488
|
-
autoFocus
|
|
489
|
-
value={renamingThread.value}
|
|
490
|
-
onChange={(event) => setRenamingThread({ id: thread.id, value: event.target.value })}
|
|
491
|
-
onBlur={() => {
|
|
492
|
-
void commitThreadRename()
|
|
493
|
-
}}
|
|
494
|
-
onCompositionStart={onCompositionStart}
|
|
495
|
-
onCompositionEnd={onCompositionEnd}
|
|
496
|
-
onKeyDown={(event) => {
|
|
497
|
-
if (isImeEnter(event)) return
|
|
498
|
-
if (event.key === "Enter") void commitThreadRename()
|
|
499
|
-
if (event.key === "Escape") setRenamingThread(null)
|
|
500
|
-
}}
|
|
501
|
-
/>
|
|
502
|
-
</div>
|
|
503
|
-
) : (
|
|
504
|
-
/* DS2 P6-2 口径(同 .owuser / .owproject__head):行壳只管布局与拖放,
|
|
505
|
-
行主体与行尾「更多」各是一枚真按钮,键盘都够得到。 */
|
|
506
|
-
<div
|
|
507
|
-
key={thread.id}
|
|
508
|
-
className={`owthread${thread.active ? " active" : ""}${draggingThreadId === thread.id ? " dragging" : ""}`}
|
|
509
|
-
draggable={!thread.running}
|
|
510
|
-
onDragStart={(event) => {
|
|
511
|
-
if (thread.running) return
|
|
512
|
-
setDraggingThreadId(thread.id)
|
|
513
|
-
event.dataTransfer.effectAllowed = "move"
|
|
514
|
-
event.dataTransfer.setData("application/x-owthread-id", thread.id)
|
|
515
|
-
}}
|
|
516
|
-
onDragEnd={clearDrag}
|
|
517
|
-
>
|
|
518
|
-
<Button
|
|
519
|
-
variant="unstyled"
|
|
520
|
-
className="owthread__main"
|
|
521
|
-
title={thread.title}
|
|
522
|
-
onClick={() => props.onSelectThread(thread.id)}
|
|
523
|
-
>
|
|
524
|
-
{/* R2 · L1-1-3:未读点在**行首**、运行点在行尾(原型模板 L727–733
|
|
525
|
-
就是这两个位置)。原来两颗点都堆在行尾,只靠颜色区分含义——
|
|
526
|
-
位置本身才是第一编码,颜色只是第二编码(R1)。 */}
|
|
527
|
-
{thread.unread && <span className="dot" title="未读" aria-label="未读" role="img" />}
|
|
528
|
-
<span className="lbl">{thread.title}</span>
|
|
529
|
-
{/* §9 呼吸退役后运行点静止:形(实点的有无)+文字(title/aria-label)
|
|
530
|
-
承担 R1 双编码。 */}
|
|
531
|
-
{thread.running && (
|
|
532
|
-
<span className="run-dot" title="任务正在执行" aria-label="任务正在执行" role="img" />
|
|
533
|
-
)}
|
|
534
|
-
{thread.running && thread.runningCount && (
|
|
535
|
-
<span className="run-cnt" title="任务进度">
|
|
536
|
-
{thread.runningCount}
|
|
537
|
-
</span>
|
|
538
|
-
)}
|
|
539
|
-
</Button>
|
|
540
|
-
<span
|
|
541
|
-
className={`thread-trailing${thread.sourceIcon || thread.branched || thread.archived ? " has-marks" : ""}`}
|
|
542
|
-
>
|
|
543
|
-
<span className="thread-status-marks">
|
|
544
|
-
{thread.sourceIcon && (
|
|
545
|
-
<span
|
|
546
|
-
className="thread-source-mark"
|
|
547
|
-
title={thread.sourceLabel ? `${thread.sourceLabel}会话` : "IM 会话"}
|
|
548
|
-
>
|
|
549
|
-
<Icon name={thread.sourceIcon} size={16} />
|
|
550
|
-
</span>
|
|
551
|
-
)}
|
|
552
|
-
{thread.branched && (
|
|
553
|
-
<span className="thread-branch-mark" title="分支会话">
|
|
554
|
-
<Branch />
|
|
555
|
-
</span>
|
|
556
|
-
)}
|
|
557
|
-
{thread.archived && (
|
|
558
|
-
<span className="thread-archive-mark" title="已归档">
|
|
559
|
-
<Archive />
|
|
560
|
-
</span>
|
|
561
|
-
)}
|
|
562
|
-
</span>
|
|
563
|
-
<Button
|
|
564
|
-
variant="unstyled"
|
|
565
|
-
className="more"
|
|
566
|
-
title="更多"
|
|
567
|
-
aria-label={`${thread.title} 的更多操作`}
|
|
568
|
-
aria-haspopup="menu"
|
|
569
|
-
onClick={(event) => {
|
|
570
|
-
event.stopPropagation()
|
|
571
|
-
const rect = event.currentTarget.getBoundingClientRect()
|
|
572
|
-
setProjectMenu(null)
|
|
573
|
-
setThreadMenu({ id: thread.id, left: rect.right + 6, top: rect.top })
|
|
574
|
-
}}
|
|
575
|
-
>
|
|
576
|
-
<More />
|
|
577
|
-
</Button>
|
|
578
|
-
</span>
|
|
579
|
-
</div>
|
|
580
|
-
),
|
|
581
|
-
)}
|
|
582
|
-
{project.threads.length === 0 && (
|
|
583
|
-
<Button variant="unstyled" className="owthread-new" onClick={() => props.onNewTask(project.id)}>
|
|
584
|
-
<Plus /> 新建任务
|
|
585
|
-
</Button>
|
|
586
|
-
)}
|
|
587
|
-
{project.canLoadMore && (
|
|
588
|
-
<Button
|
|
589
|
-
variant="unstyled"
|
|
590
|
-
className={`owthread-more${project.loadError ? " error" : ""}`}
|
|
591
|
-
disabled={project.loadingMore}
|
|
592
|
-
onClick={() => props.onLoadMore(project.id)}
|
|
593
|
-
>
|
|
594
|
-
{/* R2 · L2-1-1:「展开显示」原来是一行没有图标、没有 chevron、
|
|
595
|
-
与会话行同缩进同字号的 --ow-text-3 灰字(浅档 2.29:1),读起来像
|
|
596
|
-
一条被禁用的会话。补一枚 14 的 ChevDown 前置图标(与同族
|
|
597
|
-
.owthread-new 的 Plus 同语法),让它读成动作;字色并轨见 CSS。
|
|
598
|
-
加载中同理:纯文案太朴素,换成 spinner + 文案(#34)。 */}
|
|
599
|
-
{project.loadingMore ? (
|
|
600
|
-
<>
|
|
601
|
-
<Spinner size="sm" />
|
|
602
|
-
加载中…
|
|
603
|
-
</>
|
|
604
|
-
) : (
|
|
605
|
-
<>
|
|
606
|
-
<ChevDown className="lead" aria-hidden="true" />
|
|
607
|
-
{project.loadError ? "加载失败,点击重试" : "展开显示"}
|
|
608
|
-
</>
|
|
609
|
-
)}
|
|
610
|
-
</Button>
|
|
611
|
-
)}
|
|
612
|
-
</div>
|
|
613
|
-
)}
|
|
614
|
-
</div>
|
|
615
|
-
))
|
|
616
|
-
)}
|
|
617
|
-
</div>
|
|
618
|
-
|
|
619
|
-
{projectsMenu && (
|
|
620
|
-
<FloatingMenu anchor={projectsMenu}>
|
|
621
|
-
<MenuSurface
|
|
622
|
-
width={168}
|
|
623
|
-
autoAdjust
|
|
624
|
-
items={[
|
|
625
|
-
{ key: "refresh", label: "刷新", icon: <Refresh /> },
|
|
626
|
-
{ key: "archived", label: props.showArchived ? "隐藏已归档" : "显示已归档", icon: <Archive /> },
|
|
627
|
-
]}
|
|
628
|
-
onSelect={(key) => {
|
|
629
|
-
setProjectsMenu(null)
|
|
630
|
-
if (key === "refresh") props.onRefreshProjects()
|
|
631
|
-
if (key === "archived") props.onShowArchivedChange(!props.showArchived)
|
|
632
|
-
}}
|
|
633
|
-
/>
|
|
634
|
-
</FloatingMenu>
|
|
635
|
-
)}
|
|
636
|
-
{threadMenu && (
|
|
637
|
-
<FloatingMenu anchor={threadMenu}>
|
|
638
|
-
<MenuSurface
|
|
639
|
-
width={160}
|
|
640
|
-
autoAdjust
|
|
641
|
-
items={[
|
|
642
|
-
{
|
|
643
|
-
key: "rename",
|
|
644
|
-
label: "重命名",
|
|
645
|
-
icon: <Edit />,
|
|
646
|
-
disabled: Boolean(threadById(threadMenu.id)?.archived),
|
|
647
|
-
},
|
|
648
|
-
{ key: "share", label: "分享", icon: <Share /> },
|
|
649
|
-
{
|
|
650
|
-
key: "move",
|
|
651
|
-
label: "移动",
|
|
652
|
-
icon: <Folder />,
|
|
653
|
-
disabled: Boolean(threadById(threadMenu.id)?.running),
|
|
654
|
-
},
|
|
655
|
-
...(!threadById(threadMenu.id)?.archived
|
|
656
|
-
? ([
|
|
657
|
-
{
|
|
658
|
-
key: "archive",
|
|
659
|
-
label: "归档",
|
|
660
|
-
icon: <Archive />,
|
|
661
|
-
disabled: threadById(threadMenu.id)?.canArchive === false,
|
|
662
|
-
},
|
|
663
|
-
] as MenuItem[])
|
|
664
|
-
: []),
|
|
665
|
-
{ key: "delete", label: "删除", icon: <Trash />, danger: true },
|
|
666
|
-
]}
|
|
667
|
-
onSelect={(key) => {
|
|
668
|
-
const thread = threadById(threadMenu.id)
|
|
669
|
-
setThreadMenu(null)
|
|
670
|
-
if (!thread) return
|
|
671
|
-
if (key === "rename") setRenamingThread({ id: thread.id, value: thread.title })
|
|
672
|
-
if (key === "share") props.onShareThread(thread.id)
|
|
673
|
-
if (key === "move") setPendingMove(thread)
|
|
674
|
-
if (key === "archive") void props.onArchiveThread(thread.id).catch(() => undefined)
|
|
675
|
-
if (key === "delete") setPendingThreadDelete(thread)
|
|
676
|
-
}}
|
|
677
|
-
/>
|
|
678
|
-
</FloatingMenu>
|
|
679
|
-
)}
|
|
680
|
-
{projectMenu && (
|
|
681
|
-
<FloatingMenu anchor={projectMenu}>
|
|
682
|
-
<MenuSurface
|
|
683
|
-
width={160}
|
|
684
|
-
autoAdjust
|
|
685
|
-
items={projectMenuItems(projectMenu.isDefault)}
|
|
686
|
-
onSelect={(key) => {
|
|
687
|
-
const project = projects.find((item) => item.id === projectMenu.id)
|
|
688
|
-
setProjectMenu(null)
|
|
689
|
-
if (!project) return
|
|
690
|
-
if (key === "new-task") props.onNewTask(project.id)
|
|
691
|
-
if (key === "open-dir") props.onOpenProjectDirectory(project.id)
|
|
692
|
-
if (key === "rename") setRenamingProject({ id: project.id, value: project.label })
|
|
693
|
-
if (key === "delete") setPendingProjectDelete(project)
|
|
694
|
-
}}
|
|
695
|
-
/>
|
|
696
|
-
</FloatingMenu>
|
|
697
|
-
)}
|
|
698
|
-
|
|
699
|
-
{/* DS2 P6-2:底部账户区归 ListRow 语法。原来整行是 <div onClick>,键盘完全够不到,
|
|
700
|
-
且更新胶囊是它内部的 <button>(button 套 button)。按 ListRow 的焦点口径拆开:
|
|
701
|
-
行壳只管布局(.owuser 这个类名同时是 electron-shell.css 的拖拽豁免契约,保留),
|
|
702
|
-
左侧「头像+名字」升为按钮拿一个焦点位,右侧更新胶囊自己是第二个焦点位。 */}
|
|
703
|
-
<div className="owuser">
|
|
704
|
-
<Button
|
|
705
|
-
ref={userMenuTrigger}
|
|
706
|
-
variant="unstyled"
|
|
707
|
-
className="owuser__main"
|
|
708
|
-
aria-haspopup="menu"
|
|
709
|
-
aria-expanded={Boolean(userMenu)}
|
|
710
|
-
title={props.user.name}
|
|
711
|
-
onClick={(event) => {
|
|
712
|
-
event.stopPropagation()
|
|
713
|
-
if (userMenu) return setUserMenu(null)
|
|
714
|
-
const rect = event.currentTarget.getBoundingClientRect()
|
|
715
|
-
// Enter/Space 触发的 click detail=0 → 键盘打开,焦点进首行;指针打开只落面本体(R3)
|
|
716
|
-
setUserMenu({ left: rect.left, top: rect.top, byKeyboard: event.detail === 0 })
|
|
717
|
-
}}
|
|
718
|
-
>
|
|
719
|
-
{/* R2 · L1-1-4 / L2-1-5:无图时原来是一枚与侧栏底几乎同色的空灰圆
|
|
720
|
-
(#EFEEE9 on #F7F6F1);原型 L743 是带首字的 --ow-data-1 实心圆。
|
|
721
|
-
改走 `primitives/Avatar`——它自带 id→data-1..6 的稳定取模与首字回落,
|
|
722
|
-
和账户菜单头部那枚 32 头像同一套实现。行结构(26 头像+名+chevron)不动,
|
|
723
|
-
类名 `av` 保留(CSS 与 electron-shell 的拖拽豁免都按它认)。 */}
|
|
724
|
-
<Avatar className="av" size={26} id={props.user.id ?? props.user.name}>
|
|
725
|
-
{props.user.avatarUrl ? (
|
|
726
|
-
<img
|
|
727
|
-
src={props.user.avatarUrl}
|
|
728
|
-
alt=""
|
|
729
|
-
className="w-full h-full object-cover"
|
|
730
|
-
onError={(event) => event.currentTarget.remove()}
|
|
731
|
-
/>
|
|
732
|
-
) : (
|
|
733
|
-
props.user.name.slice(-1)
|
|
734
|
-
)}
|
|
735
|
-
</Avatar>
|
|
736
|
-
<span className="name">{props.user.name}</span>
|
|
737
|
-
{!props.update && <ChevRight className="chev" />}
|
|
738
|
-
</Button>
|
|
739
|
-
{props.update && (
|
|
740
|
-
<SidebarUpdateButton
|
|
741
|
-
update={props.update}
|
|
742
|
-
onClick={() => {
|
|
743
|
-
if (props.update?.state === "ready") setShowInstallUpdate(true)
|
|
744
|
-
else if (props.update?.state !== "downloading") props.onUpdateClick?.()
|
|
745
|
-
}}
|
|
746
|
-
/>
|
|
747
|
-
)}
|
|
748
|
-
</div>
|
|
749
|
-
|
|
750
|
-
{userMenu &&
|
|
751
|
-
createPortal(
|
|
752
|
-
<>
|
|
753
|
-
<div
|
|
754
|
-
className="owusermenu-backdrop"
|
|
755
|
-
onClick={(event) => {
|
|
756
|
-
event.stopPropagation()
|
|
757
|
-
setUserMenu(null)
|
|
758
|
-
}}
|
|
759
|
-
/>
|
|
760
|
-
{/* DS2 P6-2:账户菜单收敛到 primitives/Menu 的 MenuSurface(与本文件另外三处菜单同基座)。
|
|
761
|
-
手写的 .mi 行原来 :hover 走全局 --ow-surface 档——弹层上该走 -pop 档,正是 §14
|
|
762
|
-
已知坑「暗主题弹层用全局 hover 档」;MenuSurface 自带 hover-pop/press-pop、
|
|
763
|
-
focus-visible、danger 的 error-tint 与键盘导航。.owusermenu 只剩定位+no-drag 壳。
|
|
764
|
-
R2(Terry 意见 4):面体整块搬进 `DesktopAccountMenuView`(280 宽,头部+套餐井
|
|
765
|
-
+七行常用能力),本文件只留「在哪儿弹、几时关」。宽度 179→280:Home 画框实测
|
|
766
|
-
left=38,38+280=318,离 240 侧栏右沿外仍在视口内,不会越出。 */}
|
|
767
|
-
<div
|
|
768
|
-
className="owusermenu"
|
|
769
|
-
style={{ position: "fixed", left: userMenu.left, bottom: window.innerHeight - userMenu.top + 8 }}
|
|
770
|
-
onClick={(event) => event.stopPropagation()}
|
|
771
|
-
>
|
|
772
|
-
<DesktopAccountMenuView
|
|
773
|
-
user={props.user}
|
|
774
|
-
plan={props.plan}
|
|
775
|
-
credits={props.credits}
|
|
776
|
-
version={props.version}
|
|
777
|
-
update={props.update}
|
|
778
|
-
theme={props.theme}
|
|
779
|
-
onThemeChange={props.onThemeChange}
|
|
780
|
-
petVisible={props.petVisible}
|
|
781
|
-
onPetVisibleChange={props.onPetVisibleChange}
|
|
782
|
-
onOpenSettings={props.onOpenSettings}
|
|
783
|
-
onOpenMemory={props.onOpenMemory}
|
|
784
|
-
onCopyUserId={props.onCopyUserId}
|
|
785
|
-
/* R2 核对修(T4):菜单「检查更新」行与账户行的更新胶囊说的是同一件事,
|
|
786
|
-
点下去也得走同一条路——原来一律 `onCheckUpdate ?? onUpdateClick`,
|
|
787
|
-
「重启安装」态点了却去 downloadUpdate(宿主 Sidebar.tsx:324 的 onUpdateClick),
|
|
788
|
-
与行尾文字说的事对不上。按胶囊的分支:ready → 安装确认弹窗(再走 onInstallUpdate);
|
|
789
|
-
downloading → 行已 disabled,这里只兜底;available / error → onUpdateClick(下载 / 重试);
|
|
790
|
-
没有已知更新 → onCheckUpdate(宿主的「检查更新」),未接线时回落 onUpdateClick。 */
|
|
791
|
-
onCheckUpdate={() => {
|
|
792
|
-
const state = props.update?.state
|
|
793
|
-
if (state === "ready") return setShowInstallUpdate(true)
|
|
794
|
-
if (state === "downloading") return
|
|
795
|
-
if (props.update) return props.onUpdateClick?.()
|
|
796
|
-
; (props.onCheckUpdate ?? props.onUpdateClick)?.()
|
|
797
|
-
}}
|
|
798
|
-
onFeedback={props.onFeedback}
|
|
799
|
-
onLogout={props.onLogout}
|
|
800
|
-
autoFocus={userMenu.byKeyboard ? true : "surface"}
|
|
801
|
-
onClose={() => closeUserMenu(true)}
|
|
802
|
-
/>
|
|
803
|
-
</div>
|
|
804
|
-
</>,
|
|
805
|
-
document.body,
|
|
806
|
-
)}
|
|
807
|
-
{pendingThreadDelete && (
|
|
808
|
-
<ConfirmDialog
|
|
809
|
-
title="删除任务"
|
|
810
|
-
description={`确定要删除「${pendingThreadDelete.title}」吗?该任务的对话将被移除,此操作无法撤销。`}
|
|
811
|
-
onCancel={() => setPendingThreadDelete(null)}
|
|
812
|
-
onConfirm={() => {
|
|
813
|
-
const id = pendingThreadDelete.id
|
|
814
|
-
void props
|
|
815
|
-
.onDeleteThread(id)
|
|
816
|
-
.then(() => setPendingThreadDelete(null))
|
|
817
|
-
.catch(() => undefined)
|
|
818
|
-
}}
|
|
819
|
-
/>
|
|
820
|
-
)}
|
|
821
|
-
{pendingProjectDelete && (
|
|
822
|
-
<ConfirmDialog
|
|
823
|
-
title="删除项目"
|
|
824
|
-
description={`确定要删除项目「${pendingProjectDelete.label}」吗?项目下的任务将不再显示,但本地工作目录中的文件会保留。`}
|
|
825
|
-
pending={deletingProject}
|
|
826
|
-
pendingLabel="删除中…"
|
|
827
|
-
onCancel={() => setPendingProjectDelete(null)}
|
|
828
|
-
onConfirm={() => {
|
|
829
|
-
setDeletingProject(true)
|
|
830
|
-
void props
|
|
831
|
-
.onDeleteProject(pendingProjectDelete.id)
|
|
832
|
-
.then(() => setPendingProjectDelete(null))
|
|
833
|
-
.catch(() => undefined)
|
|
834
|
-
.finally(() => setDeletingProject(false))
|
|
835
|
-
}}
|
|
836
|
-
/>
|
|
837
|
-
)}
|
|
838
|
-
{showInstallUpdate && props.update?.state === "ready" && (
|
|
839
|
-
<UpdateInstallDialog
|
|
840
|
-
version={props.update.version}
|
|
841
|
-
pending={installingUpdate}
|
|
842
|
-
onCancel={() => setShowInstallUpdate(false)}
|
|
843
|
-
onConfirm={() => {
|
|
844
|
-
setInstallingUpdate(true)
|
|
845
|
-
Promise.resolve()
|
|
846
|
-
.then(() => props.onInstallUpdate?.())
|
|
847
|
-
.catch(() => setInstallingUpdate(false))
|
|
848
|
-
}}
|
|
849
|
-
/>
|
|
850
|
-
)}
|
|
851
|
-
{creatingProject &&
|
|
852
|
-
createPortal(
|
|
853
|
-
<CreateProjectDialog
|
|
854
|
-
onCancel={() => setCreatingProject(false)}
|
|
855
|
-
onSubmit={(name) => props.onCreateProject(name).then(() => setCreatingProject(false))}
|
|
856
|
-
/>,
|
|
857
|
-
document.body,
|
|
858
|
-
)}
|
|
859
|
-
{/* MoveThreadDialog 内部已走 composite/Dialog(自带 portal),此处不再套一层 createPortal。 */}
|
|
860
|
-
{pendingMove && (
|
|
861
|
-
<MoveThreadDialog
|
|
862
|
-
thread={pendingMove}
|
|
863
|
-
projects={projects}
|
|
864
|
-
onCreateProject={props.onCreateProjectForSelection}
|
|
865
|
-
onCancel={() => setPendingMove(null)}
|
|
866
|
-
onSubmit={(projectId) => props.onMoveThread(pendingMove.id, projectId).then(() => setPendingMove(null))}
|
|
867
|
-
/>
|
|
868
|
-
)}
|
|
869
|
-
</SidebarShell>
|
|
870
|
-
)
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
function SidebarUpdateButton({
|
|
874
|
-
update,
|
|
875
|
-
onClick,
|
|
876
|
-
}: { update: DesktopSidebarUpdate; onClick: () => void }): React.ReactElement {
|
|
877
|
-
const percent = Math.round(Math.max(0, Math.min(100, update.percent ?? 0)))
|
|
878
|
-
/* 图标 + 角标小圆点:信息级提示,hover 才上色。ready 态图标换成 Refresh(动作是
|
|
879
|
-
重启安装),与 available 的 Download 形成形状双编码,不靠颜色区分两个可点态;
|
|
880
|
-
状态说明走 title(与账户菜单「检查更新」行同一份 updateRowText)。下载中禁用并
|
|
881
|
-
附百分比读数(读数用墨不用黄),点按行为由宿主按态分发。 */
|
|
882
|
-
const { title } = updateRowText(update)
|
|
883
|
-
const StateIcon = update.state === "ready" ? Refresh : Download
|
|
884
|
-
return (
|
|
885
|
-
<button
|
|
886
|
-
type="button"
|
|
887
|
-
className={`owuser-update ${update.state}`}
|
|
888
|
-
title={title}
|
|
889
|
-
aria-label={title}
|
|
890
|
-
disabled={update.state === "downloading"}
|
|
891
|
-
onClick={(event) => {
|
|
892
|
-
event.stopPropagation()
|
|
893
|
-
onClick()
|
|
894
|
-
}}
|
|
895
|
-
>
|
|
896
|
-
<span className="owuser-update-ic">
|
|
897
|
-
<StateIcon />
|
|
898
|
-
{update.state !== "downloading" && <i className="owuser-update-dot" aria-hidden="true" />}
|
|
899
|
-
</span>
|
|
900
|
-
{update.state === "downloading" && <em>{percent}%</em>}
|
|
901
|
-
</button>
|
|
902
|
-
)
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
function NavItem({
|
|
906
|
-
id,
|
|
907
|
-
label,
|
|
908
|
-
title,
|
|
909
|
-
active,
|
|
910
|
-
icon,
|
|
911
|
-
onClick,
|
|
912
|
-
}: {
|
|
913
|
-
id: DesktopSidebarNavId
|
|
914
|
-
label: string
|
|
915
|
-
title: string
|
|
916
|
-
active?: boolean
|
|
917
|
-
icon: React.ReactNode
|
|
918
|
-
onClick: () => void
|
|
919
|
-
}): React.ReactElement {
|
|
920
|
-
return (
|
|
921
|
-
<Button
|
|
922
|
-
variant="unstyled"
|
|
923
|
-
className={`ownavitem${active ? " active" : ""}`}
|
|
924
|
-
/* R2 · L1-1-1:当前项除了 `.active` 类还要出 `aria-current="page"`——原型模板
|
|
925
|
-
L687 每个导航钮都写着 `aria-current="{{ navCurN }}"`,我们只画了底色,
|
|
926
|
-
读屏用户听不出「你在哪一屏」。 */
|
|
927
|
-
aria-current={active ? "page" : undefined}
|
|
928
|
-
/* R2 · L3-3-6 锚点契约(与 DesktopOnboardingTourView 件头注同一份):
|
|
929
|
-
new-task / projects / plugins / workbench / composer。
|
|
930
|
-
原来只映射三枚,工作台(id="sites")根本没有锚点,而「我的空间」(id="files")
|
|
931
|
-
缺省不渲染 → `workspace` 锚点也不存在,宿主 `stepsForAvailableAnchors` 便把
|
|
932
|
-
五步静默砍成三步。旧键 discover / workspace 一并改名,宿主步表同批改,见交接单。 */
|
|
933
|
-
data-tour-anchor={
|
|
934
|
-
id === "new" ? "new-task" : id === "skills" ? "plugins" : id === "sites" ? "workbench" : undefined
|
|
935
|
-
}
|
|
936
|
-
onClick={onClick}
|
|
937
|
-
title={title}
|
|
938
|
-
>
|
|
939
|
-
{icon}
|
|
940
|
-
<span className="lbl">{label}</span>
|
|
941
|
-
</Button>
|
|
942
|
-
)
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
function FloatingMenu({
|
|
946
|
-
anchor,
|
|
947
|
-
children,
|
|
948
|
-
}: { anchor: { left: number; top: number }; children: React.ReactNode }): React.ReactElement {
|
|
949
|
-
return (
|
|
950
|
-
<div
|
|
951
|
-
style={{ position: "fixed", left: anchor.left, top: anchor.top, zIndex: 1000 }}
|
|
952
|
-
onClick={(event) => event.stopPropagation()}
|
|
953
|
-
>
|
|
954
|
-
{children}
|
|
955
|
-
</div>
|
|
956
|
-
)
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
function projectMenuItems(isDefault: boolean): MenuItem[] {
|
|
960
|
-
return [
|
|
961
|
-
{ key: "new-task", label: "新建任务", icon: <Plus /> },
|
|
962
|
-
{ key: "open-dir", label: "打开项目目录", icon: <Folder /> },
|
|
963
|
-
...(!isDefault
|
|
964
|
-
? ([
|
|
965
|
-
{ key: "rename", label: "重命名", icon: <Edit /> },
|
|
966
|
-
{ key: "delete", label: "删除", icon: <Trash />, danger: true },
|
|
967
|
-
] as MenuItem[])
|
|
968
|
-
: []),
|
|
969
|
-
]
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
function ConfirmDialog({
|
|
973
|
-
title,
|
|
974
|
-
description,
|
|
975
|
-
pending = false,
|
|
976
|
-
pendingLabel = "删除中…",
|
|
977
|
-
onCancel,
|
|
978
|
-
onConfirm,
|
|
979
|
-
}: {
|
|
980
|
-
title: string
|
|
981
|
-
description: string
|
|
982
|
-
pending?: boolean
|
|
983
|
-
pendingLabel?: string
|
|
984
|
-
onCancel: () => void
|
|
985
|
-
onConfirm: () => void
|
|
986
|
-
}): React.ReactElement {
|
|
987
|
-
// 归口 composite/Dialog:遮罩 --ow-scrim(无 backdrop-blur)、立面 16 圆角 + --ow-shadow-modal + 1px 边,
|
|
988
|
-
// 头部图标走 danger 变体的 error tint 徽章(8px 行动档,不再是 48px rounded-full 彩底)。
|
|
989
|
-
return (
|
|
990
|
-
<Dialog
|
|
991
|
-
open
|
|
992
|
-
variant="danger"
|
|
993
|
-
icon={<Trash aria-hidden="true" />}
|
|
994
|
-
title={title}
|
|
995
|
-
closable={false}
|
|
996
|
-
closeOnOverlayClick={!pending}
|
|
997
|
-
closeOnEscape={!pending}
|
|
998
|
-
onClose={onCancel}
|
|
999
|
-
actions={
|
|
1000
|
-
<>
|
|
1001
|
-
<Button variant="secondary" disabled={pending} onClick={onCancel}>
|
|
1002
|
-
取消
|
|
1003
|
-
</Button>
|
|
1004
|
-
<Button variant="danger" disabled={pending} onClick={onConfirm}>
|
|
1005
|
-
{pending ? pendingLabel : "删除"}
|
|
1006
|
-
</Button>
|
|
1007
|
-
</>
|
|
1008
|
-
}
|
|
1009
|
-
>
|
|
1010
|
-
{description}
|
|
1011
|
-
</Dialog>
|
|
1012
|
-
)
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
function UpdateInstallDialog({
|
|
1016
|
-
version,
|
|
1017
|
-
pending,
|
|
1018
|
-
onCancel,
|
|
1019
|
-
onConfirm,
|
|
1020
|
-
}: { version: string; pending: boolean; onCancel: () => void; onConfirm: () => void }): React.ReactElement {
|
|
1021
|
-
// 归口 composite/Dialog;图标走 plain 裸档(原 bg-ow-primary/10 圆底在暗档是荧黄,会假冒行动极)。
|
|
1022
|
-
return (
|
|
1023
|
-
<Dialog
|
|
1024
|
-
open
|
|
1025
|
-
icon={<Refresh aria-hidden="true" />}
|
|
1026
|
-
iconTone="plain"
|
|
1027
|
-
title="安装更新"
|
|
1028
|
-
closable={false}
|
|
1029
|
-
closeOnOverlayClick={!pending}
|
|
1030
|
-
closeOnEscape={!pending}
|
|
1031
|
-
onClose={onCancel}
|
|
1032
|
-
actions={
|
|
1033
|
-
<>
|
|
1034
|
-
<Button variant="secondary" disabled={pending} onClick={onCancel}>
|
|
1035
|
-
稍后
|
|
1036
|
-
</Button>
|
|
1037
|
-
<Button variant="primary" disabled={pending} onClick={onConfirm}>
|
|
1038
|
-
{pending ? "正在重启…" : "安装并重启"}
|
|
1039
|
-
</Button>
|
|
1040
|
-
</>
|
|
1041
|
-
}
|
|
1042
|
-
>
|
|
1043
|
-
Orbitwork {version} 已下载完成。安装后应用将自动重启。
|
|
1044
|
-
</Dialog>
|
|
1045
|
-
)
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
function MoveThreadDialog({
|
|
1049
|
-
thread,
|
|
1050
|
-
projects,
|
|
1051
|
-
onCreateProject,
|
|
1052
|
-
onCancel,
|
|
1053
|
-
onSubmit,
|
|
1054
|
-
}: {
|
|
1055
|
-
thread: DesktopSidebarThread
|
|
1056
|
-
projects: DesktopSidebarProject[]
|
|
1057
|
-
onCreateProject?: (name: string) => Promise<string>
|
|
1058
|
-
onCancel: () => void
|
|
1059
|
-
onSubmit: (projectId: string) => Promise<void>
|
|
1060
|
-
}): React.ReactElement {
|
|
1061
|
-
const [selected, setSelected] = useState("")
|
|
1062
|
-
const [submitting, setSubmitting] = useState(false)
|
|
1063
|
-
const [error, setError] = useState<string | null>(null)
|
|
1064
|
-
const submit = () => {
|
|
1065
|
-
if (!selected || submitting) return
|
|
1066
|
-
setSubmitting(true)
|
|
1067
|
-
setError(null)
|
|
1068
|
-
onSubmit(selected)
|
|
1069
|
-
.catch((reason) => setError(reason instanceof Error ? reason.message : "移动失败"))
|
|
1070
|
-
.finally(() => setSubmitting(false))
|
|
1071
|
-
}
|
|
1072
|
-
// 归口 composite/Dialog(原手写 modal-host + backdrop-blur 毛玻璃已下线)。
|
|
1073
|
-
return (
|
|
1074
|
-
<Dialog
|
|
1075
|
-
open
|
|
1076
|
-
title={`移动任务「${thread.title}」`}
|
|
1077
|
-
width={480}
|
|
1078
|
-
closable={false}
|
|
1079
|
-
onClose={onCancel}
|
|
1080
|
-
actions={
|
|
1081
|
-
<>
|
|
1082
|
-
<Button variant="secondary" disabled={submitting} onClick={onCancel}>
|
|
1083
|
-
取消
|
|
1084
|
-
</Button>
|
|
1085
|
-
<Button variant="primary" disabled={!selected || submitting} onClick={submit}>
|
|
1086
|
-
{submitting ? "移动中…" : "确认"}
|
|
1087
|
-
</Button>
|
|
1088
|
-
</>
|
|
1089
|
-
}
|
|
1090
|
-
>
|
|
1091
|
-
<ProjectSelect
|
|
1092
|
-
value={selected}
|
|
1093
|
-
options={projects
|
|
1094
|
-
.filter((project) => project.id !== thread.projectId)
|
|
1095
|
-
.map((project) => ({ value: project.id, label: project.label }))}
|
|
1096
|
-
onChange={setSelected}
|
|
1097
|
-
onCreate={onCreateProject}
|
|
1098
|
-
placeholder="选择目标项目"
|
|
1099
|
-
disabled={submitting}
|
|
1100
|
-
/>
|
|
1101
|
-
{error && (
|
|
1102
|
-
<div
|
|
1103
|
-
data-ow-part="error"
|
|
1104
|
-
className="mt-2 text-ow-error font-normal text-ow-fs-ui leading-[1.4] font-[family-name:var(--ow-font-sans)]"
|
|
1105
|
-
>
|
|
1106
|
-
{error}
|
|
1107
|
-
</div>
|
|
1108
|
-
)}
|
|
1109
|
-
</Dialog>
|
|
1110
|
-
)
|
|
1111
|
-
}
|