@allbluecn/web-app 0.18.0 → 0.18.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/package.json +2 -3
- package/src/__tests__/visual/theme-surface.vrt.test.tsx +1 -1
- package/src/components/agents/agent-bindings-tab.tsx +3 -3
- package/src/components/agents/agent-card.tsx +4 -4
- package/src/components/agents/agent-form-dialog.tsx +9 -9
- package/src/components/agents/agent-selector.tsx +1 -1
- package/src/components/agents/agents-page.tsx +1 -1
- package/src/components/agents/skill-card.tsx +1 -1
- package/src/components/agents/skill-form-dialog.tsx +5 -5
- package/src/components/agents/use-agent-handlers.ts +1 -1
- package/src/components/ai/__tests__/prompt-input-actions.test.tsx +1 -1
- package/src/components/ai/ai-chat-prompt.tsx +3 -3
- package/src/components/ai/ai-prompt-input/components/action-buttons.tsx +3 -3
- package/src/components/ai/ai-prompt-input/components/agent-mode-select.tsx +1 -1
- package/src/components/ai/ai-prompt-input/components/model-select.tsx +1 -1
- package/src/components/ai/ai-prompt-input/index.tsx +3 -3
- package/src/components/ai/ai-suggested-prompts.tsx +5 -5
- package/src/components/ai/global-harness-sidebar/index.tsx +5 -5
- package/src/components/ai/tool-parts/tool-call-part.tsx +1 -1
- package/src/components/ai/tool-parts/tool-result-part.tsx +1 -1
- package/src/components/anyhub/anyhub-app-card.tsx +5 -5
- package/src/components/anyhub/anyhub-install-dialog.tsx +4 -4
- package/src/components/anyhub/anyhub-management-view.tsx +1 -1
- package/src/components/anyhub/anyhub-marketplace-view.tsx +4 -4
- package/src/components/anyhub/anyhub-permission-panel.tsx +4 -4
- package/src/components/anyhub/anyhub-top-nav.tsx +2 -2
- package/src/components/auth/icon-input.tsx +2 -2
- package/src/components/auth/oauth-section.tsx +2 -2
- package/src/components/auth/password-input.tsx +2 -2
- package/src/components/auth/sso-section.tsx +1 -1
- package/src/components/billing/__tests__/seats-manager.test.tsx +1 -1
- package/src/components/billing/checkout-redirect.ts +1 -1
- package/src/components/billing/login-prompt-dialog.tsx +3 -3
- package/src/components/billing/seats-manager.tsx +2 -2
- package/src/components/bug/__tests__/bug-display-dropdown.test.tsx +1 -1
- package/src/components/bug/__tests__/bug-toolbar.test.tsx +1 -1
- package/src/components/bug/__tests__/create-bug-dialog.test.tsx +2 -2
- package/src/components/bug/__tests__/use-paged-bug-groups.test.tsx +1 -1
- package/src/components/bug/bug-list-table.tsx +1 -1
- package/src/components/bug/bug-list-view.tsx +1 -1
- package/src/components/bug/bug-panel-header.tsx +5 -5
- package/src/components/bug/bug-toolbar.tsx +3 -3
- package/src/components/bug/collect/__tests__/collect-form.test.tsx +1 -1
- package/src/components/bug/collect/collect-form.tsx +5 -5
- package/src/components/bug/columns.tsx +1 -1
- package/src/components/bug/create-bug-dialog.tsx +4 -4
- package/src/components/bug/detail/__tests__/error-context.test.tsx +1 -1
- package/src/components/bug/detail/activity-tabs.tsx +1 -1
- package/src/components/bug/detail/bug-detail-body.tsx +6 -6
- package/src/components/bug/detail/comment-input.tsx +3 -3
- package/src/components/bug/detail/comment-item.tsx +5 -5
- package/src/components/bug/detail/events-timeline.tsx +1 -1
- package/src/components/bug/detail/fix-timeline.tsx +3 -3
- package/src/components/bug/detail/props-section.tsx +2 -2
- package/src/components/bug/detail/regression-section.tsx +3 -3
- package/src/components/bug/detail/repro-report-card.tsx +5 -5
- package/src/components/bug/display/display-dropdown.tsx +2 -2
- package/src/components/bug/filters/add-filter-dropdown.tsx +1 -1
- package/src/components/bug/filters/applied-filters.tsx +1 -1
- package/src/components/bug/filters/filter-row.tsx +1 -1
- package/src/components/bug/filters/filter-toggle.tsx +2 -2
- package/src/components/bug/filters/filter-value-input.tsx +1 -1
- package/src/components/bug/inline-editors/assignee-editor.tsx +1 -1
- package/src/components/bug/inline-editors/date-editor.tsx +1 -1
- package/src/components/bug/inline-editors/inline-trigger.tsx +2 -2
- package/src/components/bug/peek-panel.tsx +1 -1
- package/src/components/bug/reproduce-steps-editor.tsx +3 -3
- package/src/components/bug/settings/bug-settings-panel.tsx +4 -4
- package/src/components/bug/settings/collect-page-manager.tsx +9 -9
- package/src/components/bug/settings/install-commands.tsx +3 -3
- package/src/components/bug/settings/token-list.tsx +7 -7
- package/src/components/bug/settings/webhook-manager.tsx +9 -9
- package/src/components/bug/views/bug-list/batch-toolbar.tsx +4 -4
- package/src/components/bug/views/bug-list/group.tsx +2 -2
- package/src/components/bug/views/bug-list/index.tsx +1 -1
- package/src/components/bug/views/bug-list/inline-bug-creator.tsx +1 -1
- package/src/components/bug/views/bug-list/row.tsx +2 -2
- package/src/components/bug/views/view-switcher.tsx +1 -1
- package/src/components/changelog/changelog-page.tsx +1 -1
- package/src/components/confirm-dialog.tsx +94 -0
- package/src/components/design/canvas/panels/appearance-text-panel.tsx +3 -3
- package/src/components/design/canvas/panels/controls/add-button.tsx +1 -1
- package/src/components/design/canvas/panels/controls/constraint-select.tsx +1 -1
- package/src/components/design/canvas/panels/controls/gradient-editor.tsx +1 -1
- package/src/components/design/canvas/panels/controls/pattern-params.tsx +2 -2
- package/src/components/design/canvas/panels/controls/rows.tsx +3 -3
- package/src/components/design/canvas/panels/controls/shader-picker.tsx +3 -3
- package/src/components/design/canvas/panels/controls/text-style-button.tsx +1 -1
- package/src/components/design/canvas/panels/controls/toolbar-button.tsx +2 -2
- package/src/components/design/canvas/panels/frame-property-panel.tsx +3 -3
- package/src/components/design/canvas/panels/layer-panel.tsx +2 -2
- package/src/components/design/canvas/panels/paint-lists-panel.tsx +1 -1
- package/src/components/design/canvas/panels/property-panel.tsx +3 -3
- package/src/components/design/canvas/panels/shape-corners-panel.tsx +2 -2
- package/src/components/design/canvas/panels/toolbar.tsx +4 -4
- package/src/components/design/canvas/panels/transform-layout-panel.tsx +3 -3
- package/src/components/design/canvas/react/__tests__/hooks.test.tsx +2 -2
- package/src/components/design/canvas/react/hooks.ts +1 -1
- package/src/components/design/canvas/react/workbench.tsx +2 -2
- package/src/components/design/editor/annotation/annotation-node/annotation-node-view.tsx +1 -1
- package/src/components/design/editor/collaboration/__tests__/design-agent-panel-regenerate.test.tsx +1 -1
- package/src/components/design/editor/collaboration/__tests__/design-agent-panel-stream.test.tsx +2 -2
- package/src/components/design/editor/collaboration/agent-input.tsx +2 -2
- package/src/components/design/editor/collaboration/design-agent-panel.tsx +2 -2
- package/src/components/design/editor/collaboration/design-comment-review-panel.tsx +4 -4
- package/src/components/design/editor/dashboard/create-design-dialog.tsx +3 -3
- package/src/components/design/editor/dashboard/design-dashboard.tsx +4 -4
- package/src/components/design/editor/layout/__tests__/context-menu.test.tsx +1 -1
- package/src/components/design/editor/layout/__tests__/no-page-save-toast.test.tsx +2 -2
- package/src/components/design/editor/layout/__tests__/persistence-restore.test.tsx +1 -1
- package/src/components/design/editor/layout/__tests__/ssr-localstorage-smoke.test.tsx +1 -1
- package/src/components/design/editor/layout/context-menu.tsx +1 -1
- package/src/components/design/editor/layout/design-doc-panel.tsx +2 -2
- package/src/components/design/editor/layout/design-editor-layout.tsx +1 -1
- package/src/components/design/editor/layout/design-navigation.tsx +4 -4
- package/src/components/design/editor/layout/design-right-sidebar.tsx +2 -2
- package/src/components/design/editor/layout/hooks/use-design-auto-save.ts +1 -1
- package/src/components/design/editor/pages/design-detail-page.tsx +1 -1
- package/src/components/design/editor/pages/share-design-page.tsx +1 -1
- package/src/components/design/editor/pages-tree/design-tree-page-tab.tsx +3 -3
- package/src/components/design/editor/share/design-share-panel/components/single-version-share-card.tsx +6 -6
- package/src/components/design/editor/share/design-share-panel/index.tsx +9 -9
- package/src/components/design/editor/share/share-comment-panel.tsx +4 -4
- package/src/components/design/editor/share/share-nav-bar.tsx +3 -3
- package/src/components/design/editor/share/share-password-gate.tsx +3 -3
- package/src/components/design/editor/share/share-review-panel.tsx +4 -4
- package/src/components/design/editor/versions/components/create-version-dialog.tsx +2 -2
- package/src/components/design/editor/versions/components/delete-version-dialog.tsx +2 -2
- package/src/components/design/editor/versions/components/edit-version-dialog.tsx +2 -2
- package/src/components/design/editor/versions/components/page-tree-selector.tsx +4 -4
- package/src/components/design/editor/versions/components/page-version-timeline.tsx +2 -2
- package/src/components/design/editor/versions/page-version-panel.tsx +5 -5
- package/src/components/design/editor/versions/page-version-tree.tsx +3 -3
- package/src/components/design/editor/versions/restore-version-dialog.tsx +2 -2
- package/src/components/error/global-error-boundary.tsx +1 -1
- package/src/components/forms/app-array-field.tsx +1 -1
- package/src/components/forms/app-checkbox.tsx +1 -1
- package/src/components/forms/app-combobox.tsx +1 -1
- package/src/components/forms/app-date-picker.tsx +1 -1
- package/src/components/forms/app-field.tsx +1 -1
- package/src/components/forms/app-form-dialog.tsx +2 -2
- package/src/components/forms/app-input.tsx +1 -1
- package/src/components/forms/app-section.tsx +1 -1
- package/src/components/forms/app-select.tsx +1 -1
- package/src/components/forms/app-switch.tsx +1 -1
- package/src/components/forms/app-textarea.tsx +1 -1
- package/src/components/forms/hooks/use-form-submit.ts +1 -1
- package/src/components/harness/__tests__/media-route.test.tsx +1 -1
- package/src/components/harness/agent-preset-picker.tsx +3 -3
- package/src/components/harness/ai-chat-history/components/conversation-header.tsx +2 -2
- package/src/components/harness/ai-chat-history/components/conversation-item.tsx +3 -3
- package/src/components/harness/ai-chat-history/components/conversation-search.tsx +1 -1
- package/src/components/harness/ai-chat-history/components/empty-state.tsx +1 -1
- package/src/components/harness/ai-chat-history/index.tsx +2 -2
- package/src/components/harness/ai-citations/components/citation-item.tsx +1 -1
- package/src/components/harness/ai-citations/components/source-components.tsx +1 -1
- package/src/components/harness/ai-citations/index.tsx +1 -1
- package/src/components/harness/ai-thinking.tsx +1 -1
- package/src/components/harness/code/file-tree.tsx +1 -1
- package/src/components/harness/code/preview-panel.tsx +2 -2
- package/src/components/harness/code/workspace-picker.tsx +3 -3
- package/src/components/harness/composer/harness-composer.tsx +3 -3
- package/src/components/harness/composer/model-select.tsx +1 -1
- package/src/components/harness/connection-indicator.tsx +1 -1
- package/src/components/harness/gallery/gallery-card.tsx +5 -5
- package/src/components/harness/gallery/gallery-grid.tsx +5 -5
- package/src/components/harness/gallery/lightbox-viewer.tsx +2 -2
- package/src/components/harness/gallery/retranscribe-dialog.tsx +5 -5
- package/src/components/harness/harness-workbench-page.tsx +2 -2
- package/src/components/harness/image-lightbox.tsx +1 -1
- package/src/components/harness/interrupt-approval.tsx +2 -2
- package/src/components/harness/message-actions.tsx +2 -2
- package/src/components/harness/plan-approval-card.tsx +2 -2
- package/src/components/harness/plugin-define-approval.tsx +2 -2
- package/src/components/harness/plugin-panel.tsx +3 -3
- package/src/components/harness/queue-bar.tsx +1 -1
- package/src/components/harness/queue-item.tsx +1 -1
- package/src/components/harness/retry-countdown-bar.tsx +1 -1
- package/src/components/hextaui/ai-citations.tsx +1 -1
- package/src/components/hextaui/ai-file-upload.tsx +2 -2
- package/src/components/hextaui/ai-message.tsx +2 -2
- package/src/components/hextaui/ai-thinking.tsx +1 -1
- package/src/components/hotkeys/shortcuts-panel.tsx +2 -2
- package/src/components/infinite-scroll-sentinel.tsx +37 -0
- package/src/components/iteration/auto-schedule-dialog.tsx +5 -5
- package/src/components/iteration/create-iteration-dialog.tsx +5 -5
- package/src/components/iteration/iteration-editor.tsx +3 -3
- package/src/components/knowledge/dialog/knowledge-form-dialog.tsx +3 -3
- package/src/components/knowledge/doc-properties.tsx +2 -2
- package/src/components/knowledge/kb-filter-popover.tsx +2 -2
- package/src/components/knowledge/knowledge-tag-input.tsx +2 -2
- package/src/components/knowledge/knowledge-toolbar.tsx +9 -9
- package/src/components/knowledge/knowledge-tree-item.tsx +5 -5
- package/src/components/knowledge/knowledge-tree.tsx +3 -3
- package/src/components/knowledge-public/bookmark-card.tsx +3 -3
- package/src/components/knowledge-public/bookmark-form-dialog.tsx +6 -6
- package/src/components/knowledge-public/knowledge-card.tsx +1 -1
- package/src/components/knowledge-public/knowledge-form-dialog.tsx +6 -6
- package/src/components/knowledge-public/knowledge-search-bar.tsx +2 -2
- package/src/components/knowledge-public/legal-compliance-editor.tsx +1 -1
- package/src/components/knowledge-public/markdown-editor.tsx +2 -2
- package/src/components/knowledge-public/sharers-avatar-group.tsx +1 -1
- package/src/components/layout/sidebar-03/__tests__/nav-workspace.test.tsx +2 -2
- package/src/components/layout/sidebar-03/__tests__/user-menu-anonymous.test.tsx +3 -3
- package/src/components/layout/sidebar-03/app-sidebar.tsx +1 -1
- package/src/components/layout/sidebar-03/index.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-anyhub.tsx +2 -2
- package/src/components/layout/sidebar-03/nav-knowledge.tsx +4 -4
- package/src/components/layout/sidebar-03/nav-main.tsx +4 -4
- package/src/components/layout/sidebar-03/nav-notifications.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-search-trigger.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-secondary.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-workspace.tsx +2 -2
- package/src/components/layout/sidebar-03/team-switcher.tsx +2 -2
- package/src/components/layout/sidebar-03/user-menu.tsx +3 -3
- package/src/components/notifications/settings-notifications.tsx +6 -6
- package/src/components/notifications/team-notifications.tsx +6 -6
- package/src/components/project/create-project-dialog.tsx +4 -4
- package/src/components/project/invite-member-dialog.tsx +6 -6
- package/src/components/project/project-member-manager.tsx +5 -5
- package/src/components/project/project-module-card.tsx +1 -1
- package/src/components/settings/ai/api-key-field.tsx +3 -3
- package/src/components/settings/ai/byok-section.tsx +2 -2
- package/src/components/settings/ai/create-custom-model-dialog.tsx +5 -5
- package/src/components/settings/ai/create-custom-provider-dialog.tsx +5 -5
- package/src/components/settings/ai/local-agent-panel.tsx +3 -3
- package/src/components/settings/ai/model-card.tsx +2 -2
- package/src/components/settings/ai/model-manager.tsx +4 -4
- package/src/components/settings/ai/provider-card.tsx +1 -1
- package/src/components/settings/ai/provider-detail-form.tsx +6 -6
- package/src/components/settings/ai/provider-grid.tsx +3 -3
- package/src/components/settings/ai/source/model-source-picker.tsx +2 -2
- package/src/components/settings/language-selector.tsx +2 -2
- package/src/components/settings/personal-team/account/account-client.tsx +2 -2
- package/src/components/settings/personal-team/account/avatar/notion-avatar-editor.tsx +3 -3
- package/src/components/settings/personal-team/account/settings-profile.tsx +8 -8
- package/src/components/settings/personal-team/team/invitation-cards/invitation-badges.tsx +1 -1
- package/src/components/settings/personal-team/team/invitation-cards/invitation-history-list.tsx +5 -5
- package/src/components/settings/personal-team/team/invitation-cards/invite-email-card.tsx +5 -5
- package/src/components/settings/personal-team/team/invitation-cards/invite-link-card.tsx +3 -3
- package/src/components/settings/personal-team/team/team-client.tsx +6 -6
- package/src/components/settings/personal-team/team/team-invitations.tsx +1 -1
- package/src/components/settings/personal-team/team/team-member-list.tsx +7 -7
- package/src/components/shared-kit/avatars/notion-avatar.tsx +109 -3
- package/src/components/shared-kit/avatars/user-avatar.tsx +65 -3
- package/src/components/shared-kit/data-viz/contribution-graph-tooltip.tsx +1 -1
- package/src/components/shared-kit/dialogs/name-confirm-dialog.tsx +5 -5
- package/src/components/shared-kit/i18n/language-switcher.tsx +2 -2
- package/src/components/shared-kit/icons/lucide-icon-picker/index.tsx +1 -1
- package/src/components/shared-kit/icons/lucide-icon-picker/panel.tsx +1 -1
- package/src/components/shared-kit/theme/theme-surface.tsx +4 -4
- package/src/components/shared-kit/theme/theme-toggle.tsx +1 -1
- package/src/components/shared-kit/timezone/timezone-select.tsx +1 -1
- package/src/components/story/__tests__/story-list-view-restore.test.tsx +2 -2
- package/src/components/story/__tests__/story-list-view-ssr.test.tsx +2 -2
- package/src/components/story/ai/handlers/more-popover.tsx +2 -2
- package/src/components/story/ai/handlers/stream-text.ts +1 -1
- package/src/components/story/ai/prototype-dialog.tsx +4 -4
- package/src/components/story/ai/split-dialog.tsx +6 -6
- package/src/components/story/ai/story-ai-panel.tsx +4 -4
- package/src/components/story/ai/story-ai-preview-list.tsx +4 -4
- package/src/components/story/ai/story-ai-toolbar.tsx +3 -3
- package/src/components/story/columns.tsx +1 -1
- package/src/components/story/create-story-dialog.tsx +4 -4
- package/src/components/story/detail/__tests__/associated-attachments-panel.test.tsx +1 -1
- package/src/components/story/detail/__tests__/categories.test.tsx +1 -1
- package/src/components/story/detail/__tests__/dependencies-button.test.tsx +1 -1
- package/src/components/story/detail/comment-input.tsx +3 -3
- package/src/components/story/detail/comment-item.tsx +3 -3
- package/src/components/story/detail/reaction-bar.tsx +1 -1
- package/src/components/story/detail/story-detail-body.tsx +5 -5
- package/src/components/story/detail/story-detail-toolbar/__tests__/related-test-cases.test.tsx +1 -1
- package/src/components/story/detail/story-detail-toolbar/associated-attachments-panel.tsx +4 -4
- package/src/components/story/detail/story-detail-toolbar/categories.tsx +1 -1
- package/src/components/story/detail/story-detail-toolbar/children.tsx +5 -5
- package/src/components/story/detail/story-detail-toolbar/dependencies.tsx +1 -1
- package/src/components/story/detail/story-detail-toolbar/dependency-panel.tsx +3 -3
- package/src/components/story/detail/story-detail-toolbar/related-test-cases.tsx +1 -1
- package/src/components/story/detail/story-detail-toolbar.tsx +2 -2
- package/src/components/story/detail/story-properties.tsx +1 -1
- package/src/components/story/display/__tests__/display-dropdown.test.tsx +1 -1
- package/src/components/story/display/display-dropdown.tsx +3 -3
- package/src/components/story/filters/add-filter-dropdown.tsx +1 -1
- package/src/components/story/filters/applied-filters.tsx +1 -1
- package/src/components/story/filters/filter-row.tsx +1 -1
- package/src/components/story/filters/filter-toggle.tsx +2 -2
- package/src/components/story/inline-editors/__tests__/dependency-type-select.test.tsx +2 -2
- package/src/components/story/inline-editors/__tests__/labels-editor.test.tsx +2 -2
- package/src/components/story/inline-editors/__tests__/priority-editor.test.tsx +1 -1
- package/src/components/story/inline-editors/__tests__/state-editor.test.tsx +1 -1
- package/src/components/story/inline-editors/assignee-editor.tsx +1 -1
- package/src/components/story/inline-editors/date-editor.tsx +1 -1
- package/src/components/story/inline-editors/dependency-type-select.tsx +2 -2
- package/src/components/story/inline-editors/inline-trigger.tsx +2 -2
- package/src/components/story/inline-editors/labels-editor.tsx +2 -2
- package/src/components/story/inline-editors/parent-story-editor.tsx +1 -1
- package/src/components/story/inline-editors/story-select-dialog.tsx +6 -6
- package/src/components/story/peek-panel.tsx +2 -2
- package/src/components/story/relations/__tests__/attachment-manage-dialog.test.tsx +4 -4
- package/src/components/story/relations/__tests__/knowledge-select-dialog.test.tsx +2 -2
- package/src/components/story/relations/__tests__/link-manage-dialog.test.tsx +1 -1
- package/src/components/story/relations/attachment-manage-dialog.tsx +4 -4
- package/src/components/story/relations/knowledge-select-dialog.tsx +5 -5
- package/src/components/story/relations/link-manage-dialog.tsx +5 -5
- package/src/components/story/relations/story-ref-row.tsx +5 -5
- package/src/components/story/search-popover.tsx +1 -1
- package/src/components/story/story-list-table.tsx +1 -1
- package/src/components/story/story-list-view.tsx +2 -2
- package/src/components/story/story-panel-header.tsx +5 -5
- package/src/components/story/story-toolbar.tsx +4 -4
- package/src/components/story/transfer-story-popover.tsx +4 -4
- package/src/components/story/views/calendar-view.tsx +3 -3
- package/src/components/story/views/create-view-dialog.tsx +2 -2
- package/src/components/story/views/kanban-board.tsx +2 -2
- package/src/components/story/views/story-list/__tests__/batch-toolbar.test.tsx +1 -1
- package/src/components/story/views/story-list/__tests__/group-header.test.tsx +1 -1
- package/src/components/story/views/story-list/batch-preview-dialog.tsx +7 -7
- package/src/components/story/views/story-list/batch-toolbar.tsx +3 -3
- package/src/components/story/views/story-list/group.tsx +2 -2
- package/src/components/story/views/story-list/index.tsx +1 -1
- package/src/components/story/views/story-list/row.tsx +1 -1
- package/src/components/story/views/timeline-view.tsx +3 -3
- package/src/components/story/views/view-list-section.tsx +1 -1
- package/src/components/story/views/view-selector-button.tsx +2 -2
- package/src/components/story/views/view-switcher.tsx +1 -1
- package/src/components/tags/nav-tag.tsx +6 -6
- package/src/components/tags/tag-badge.tsx +1 -1
- package/src/components/tags/tag-manager.tsx +5 -5
- package/src/components/tags/tag-selector.tsx +1 -1
- package/src/components/testcase/__tests__/artifact-panel.test.tsx +1 -1
- package/src/components/testcase/__tests__/case-row.test.tsx +2 -2
- package/src/components/testcase/__tests__/convert-bug.test.tsx +2 -2
- package/src/components/testcase/__tests__/folder-tree.test.tsx +2 -2
- package/src/components/testcase/__tests__/generate-dialog.test.tsx +1 -1
- package/src/components/testcase/__tests__/review-layout.test.tsx +1 -1
- package/src/components/testcase/__tests__/step-editor.test.tsx +2 -2
- package/src/components/testcase/ai/generate-dialog.tsx +4 -4
- package/src/components/testcase/automation/artifact-diff.tsx +1 -1
- package/src/components/testcase/automation/artifact-panel.tsx +6 -6
- package/src/components/testcase/automation/verify-report.tsx +1 -1
- package/src/components/testcase/create-testcase-dialog.tsx +5 -5
- package/src/components/testcase/detail/case-detail-body.tsx +1 -1
- package/src/components/testcase/detail/properties.tsx +1 -1
- package/src/components/testcase/detail/story-link-editor.tsx +1 -1
- package/src/components/testcase/filters/index.tsx +2 -2
- package/src/components/testcase/folder-tree.tsx +2 -2
- package/src/components/testcase/generation/batch-actions.tsx +1 -1
- package/src/components/testcase/generation/draft-card.tsx +5 -5
- package/src/components/testcase/generation/review-layout.tsx +2 -2
- package/src/components/testcase/inline-editors/assignee-editor.tsx +1 -1
- package/src/components/testcase/list/case-row.tsx +1 -1
- package/src/components/testcase/list/grouped-list.tsx +1 -1
- package/src/components/testcase/list-view.tsx +1 -1
- package/src/components/testcase/peek-panel.tsx +4 -4
- package/src/components/testcase/plans/add-to-plan-bar.tsx +2 -2
- package/src/components/testcase/plans/add-to-plan-dialog.tsx +4 -4
- package/src/components/testcase/plans/create-plan-dialog.tsx +5 -5
- package/src/components/testcase/plans/plan-detail.tsx +7 -7
- package/src/components/testcase/plans/plan-list.tsx +3 -3
- package/src/components/testcase/plans/plan-state-badge.tsx +1 -1
- package/src/components/testcase/runs/case-checklist.tsx +3 -3
- package/src/components/testcase/runs/convert-bug-button.tsx +1 -1
- package/src/components/testcase/runs/failure-list.tsx +2 -2
- package/src/components/testcase/runs/pending-bugs.tsx +3 -3
- package/src/components/testcase/runs/run-header.tsx +1 -1
- package/src/components/testcase/runs/step-row.tsx +2 -2
- package/src/components/testcase/step-editor.tsx +2 -2
- package/src/components/testcase/table/table-view.tsx +1 -1
- package/src/components/testcase/testcase-toolbar.tsx +3 -3
- package/src/components/testcase/views/create-view-dialog.tsx +2 -2
- package/src/components/testcase/views/view-selector-button.tsx +2 -2
- package/src/components/testcase/views/view-switcher.tsx +1 -1
- package/src/components/tiptap/mindmap/mind-map-context-menu.tsx +1 -1
- package/src/components/tiptap/mindmap/mind-map-controls.tsx +2 -2
- package/src/components/tiptap/mindmap/mindmap-fullscreen-dialog.tsx +1 -1
- package/src/components/tiptap/notion-like/notion-like-editor-header.tsx +2 -2
- package/src/components/tiptap/ui/ai-menu/ai-menu.tsx +1 -1
- package/src/components/tiptap/ui/mention-dropdown-menu/mention-dropdown-menu.tsx +1 -1
- package/src/components/ui/__tests__/select.test.tsx +1 -1
- package/src/components/ui/alert-dialog.tsx +185 -0
- package/src/components/ui/alert.tsx +75 -0
- package/src/components/ui/avatar.tsx +106 -0
- package/src/components/ui/badge.tsx +51 -0
- package/src/components/ui/button-group.tsx +1 -1
- package/src/components/ui/button.tsx +57 -0
- package/src/components/ui/calendar.tsx +1 -1
- package/src/components/ui/card.tsx +102 -0
- package/src/components/ui/checkbox.tsx +27 -0
- package/src/components/ui/collapsible.tsx +19 -0
- package/src/components/ui/command.tsx +2 -2
- package/src/components/ui/dialog.tsx +155 -0
- package/src/components/ui/dropdown-menu.tsx +265 -0
- package/src/components/ui/field.tsx +236 -0
- package/src/components/ui/input-group.tsx +157 -0
- package/src/components/ui/input.tsx +19 -0
- package/src/components/ui/item.tsx +1 -1
- package/src/components/ui/label.tsx +17 -0
- package/src/components/ui/message-scroller.tsx +1 -1
- package/src/components/ui/pagination.tsx +130 -0
- package/src/components/ui/questionnaire.tsx +1 -1
- package/src/components/ui/select.tsx +232 -0
- package/src/components/ui/separator.tsx +23 -0
- package/src/components/ui/sheet.tsx +134 -0
- package/src/components/ui/sidebar.tsx +721 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/switch.tsx +30 -0
- package/src/components/ui/table.tsx +113 -0
- package/src/components/ui/textarea.tsx +17 -0
- package/src/components/ui/toast.tsx +308 -0
- package/src/components/ui/tooltip.tsx +64 -0
- package/src/components/workspace/__tests__/dialogs/create-workspace-dialog.test.tsx +3 -3
- package/src/components/workspace/__tests__/dialogs/delete-workspace-options.test.tsx +3 -3
- package/src/components/workspace/__tests__/dialogs/edit-workspace-dialog.test.tsx +3 -3
- package/src/components/workspace/__tests__/header/workspace-header.test.tsx +3 -3
- package/src/components/workspace/__tests__/kb/workspace-kb-card.test.tsx +2 -2
- package/src/components/workspace/__tests__/members/workspace-members-manager.test.tsx +5 -5
- package/src/components/workspace/__tests__/projects/workspace-project-list.test.tsx +2 -2
- package/src/components/workspace/dialogs/create-workspace-dialog.tsx +3 -3
- package/src/components/workspace/dialogs/delete-workspace-options.tsx +3 -3
- package/src/components/workspace/dialogs/edit-workspace-dialog.tsx +3 -3
- package/src/components/workspace/header/workspace-header.tsx +3 -3
- package/src/components/workspace/kb/workspace-kb-card.tsx +6 -6
- package/src/components/workspace/kb/workspace-kb-manage-dialog.tsx +5 -5
- package/src/components/workspace/kb/workspace-quick-doc-dialog.tsx +6 -6
- package/src/components/workspace/members/workspace-members-manager.tsx +6 -6
- package/src/components/workspace/projects/workspace-project-list.tsx +2 -2
- package/src/hooks/use-load-more.ts +57 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/hooks/use-notifications.ts +1 -1
- package/src/lib/changelog/sdk-versions.ts +1 -1
- package/src/lib/datetime.ts +209 -4
- package/src/lib/sanitize.ts +17 -19
- package/src/lib/toast-error.ts +1 -1
- package/src/providers/index.tsx +2 -2
- package/src/routes/__desktop/onboarding/route.lazy.tsx +6 -6
- package/src/routes/__root.tsx +2 -2
- package/src/routes/_login/forgot-password/route.lazy.tsx +1 -1
- package/src/routes/_login/login/route.lazy.tsx +4 -4
- package/src/routes/_login/register/route.lazy.tsx +2 -2
- package/src/routes/_login/reset-password/route.lazy.tsx +1 -1
- package/src/routes/_login/verify-email/route.lazy.tsx +1 -1
- package/src/routes/_nav/-components/nav-not-found.tsx +1 -1
- package/src/routes/_nav/bugs/$bugId/route.tsx +1 -1
- package/src/routes/_nav/dashboard/-components/activity-feed.tsx +1 -1
- package/src/routes/_nav/dashboard/-components/quick-actions.tsx +1 -1
- package/src/routes/_nav/dashboard/-components/stats-grid.tsx +1 -1
- package/src/routes/_nav/dashboard/route.lazy.tsx +1 -1
- package/src/routes/_nav/knowledge/$kbId/-components/knowledge-workspace-pending.tsx +1 -1
- package/src/routes/_nav/knowledge/$kbId/doc/$docId/route.tsx +1 -1
- package/src/routes/_nav/knowledge/$kbId/route.lazy.tsx +1 -1
- package/src/routes/_nav/knowledge/bookmarks/$id.lazy.tsx +6 -6
- package/src/routes/_nav/knowledge/bookmarks/index.lazy.tsx +1 -1
- package/src/routes/_nav/knowledge/compliance/$id.lazy.tsx +5 -5
- package/src/routes/_nav/knowledge/dictionaries/$id.lazy.tsx +3 -3
- package/src/routes/_nav/knowledge/index.lazy.tsx +6 -6
- package/src/routes/_nav/knowledge/laws/$id.lazy.tsx +5 -5
- package/src/routes/_nav/projects/$projectId/$storyId/route.lazy.tsx +2 -2
- package/src/routes/_nav/projects/$projectId/index.lazy.tsx +1 -1
- package/src/routes/_nav/projects/$projectId/iterations/$iterationId/route.lazy.tsx +5 -5
- package/src/routes/_nav/projects/$projectId/iterations/index.lazy.tsx +1 -1
- package/src/routes/_nav/projects/$projectId/settings/route.lazy.tsx +8 -8
- package/src/routes/_nav/settings/ai/hosted/route.lazy.tsx +2 -2
- package/src/routes/_nav/settings/ai/index/route.lazy.tsx +1 -1
- package/src/routes/_nav/settings/billing/route.lazy.tsx +1 -1
- package/src/routes/_nav/settings/connection/route.lazy.tsx +3 -3
- package/src/routes/_nav/settings/general/route.lazy.tsx +3 -3
- package/src/routes/_nav/settings/privacy/route.lazy.tsx +5 -5
- package/src/routes/_nav/settings/route.tsx +1 -1
- package/src/routes/_nav/stories/-components/story-detail-skeleton.tsx +1 -1
- package/src/routes/_nav/test-cases/$caseId/route.tsx +1 -1
- package/src/routes/_nav/test-cases/generation/$generationId/route.tsx +1 -1
- package/src/routes/_nav/test-cases/plans/$planId/route.tsx +1 -1
- package/src/routes/_nav/test-cases/runs/$runId/route.tsx +1 -1
- package/src/routes/_nav/workspaces/$workspaceId/activities/route.lazy.tsx +1 -1
- package/src/routes/_nav/workspaces/$workspaceId/settings/route.lazy.tsx +6 -6
- package/src/routes/_nav/workspaces/index.lazy.tsx +5 -5
- package/src/routes/invite/$token/route.lazy.tsx +2 -2
- package/src/routes/share/compliance/$id/route.lazy.tsx +3 -3
- package/src/routes/share/law/$id/route.lazy.tsx +3 -3
- package/src/server/__tests__/agent-client-graph.test.ts +1 -1
- package/src/styles/globals.css +0 -1
|
@@ -2,15 +2,15 @@ import { describe, it, expect, vi } from "vitest";
|
|
|
2
2
|
import { render, screen } from "@testing-library/react";
|
|
3
3
|
import { WorkspaceMembersManager } from "../../members/workspace-members-manager";
|
|
4
4
|
|
|
5
|
-
vi.mock("
|
|
5
|
+
vi.mock("@/components/ui/button", () => ({
|
|
6
6
|
Button: ({ children, ...props }: any) => <button {...props}>{children}</button>,
|
|
7
7
|
}));
|
|
8
8
|
|
|
9
|
-
vi.mock("
|
|
9
|
+
vi.mock("@/components/ui/input", () => ({
|
|
10
10
|
Input: (props: any) => <input {...props} />,
|
|
11
11
|
}));
|
|
12
12
|
|
|
13
|
-
vi.mock("
|
|
13
|
+
vi.mock("@/components/ui/dialog", () => ({
|
|
14
14
|
Dialog: ({ children }: any) => <div>{children}</div>,
|
|
15
15
|
DialogContent: ({ children }: any) => <div>{children}</div>,
|
|
16
16
|
DialogFooter: ({ children }: any) => <div>{children}</div>,
|
|
@@ -19,11 +19,11 @@ vi.mock("@allbluecn/ui/dialog", () => ({
|
|
|
19
19
|
DialogDescription: ({ children }: any) => <p>{children}</p>,
|
|
20
20
|
}));
|
|
21
21
|
|
|
22
|
-
vi.mock("
|
|
22
|
+
vi.mock("@/components/ui/toast", () => ({
|
|
23
23
|
toast: { error: vi.fn(), success: vi.fn() },
|
|
24
24
|
}));
|
|
25
25
|
|
|
26
|
-
vi.mock("
|
|
26
|
+
vi.mock("@/components/ui/tooltip", () => ({
|
|
27
27
|
TooltipProvider: ({ children }: any) => <div>{children}</div>,
|
|
28
28
|
Tooltip: ({ children }: any) => <div>{children}</div>,
|
|
29
29
|
TooltipTrigger: ({ children }: any) => <div>{children}</div>,
|
|
@@ -2,11 +2,11 @@ import { describe, it, expect, vi } from "vitest";
|
|
|
2
2
|
import { render, screen } from "@testing-library/react";
|
|
3
3
|
import { WorkspaceProjectList } from "../../projects/workspace-project-list";
|
|
4
4
|
|
|
5
|
-
vi.mock("
|
|
5
|
+
vi.mock("@/components/ui/button", () => ({
|
|
6
6
|
Button: ({ children, ...props }: any) => <button {...props}>{children}</button>,
|
|
7
7
|
}));
|
|
8
8
|
|
|
9
|
-
vi.mock("
|
|
9
|
+
vi.mock("@/components/ui/card", () => ({
|
|
10
10
|
Card: ({ children, className, ...props }: any) => <div className={className} {...props}>{children}</div>,
|
|
11
11
|
}));
|
|
12
12
|
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
import { useState } from "react";
|
|
19
19
|
import { useForm } from "@tanstack/react-form";
|
|
20
20
|
import { Link, useRouter } from "@tanstack/react-router";
|
|
21
|
-
import { Button } from "
|
|
22
|
-
import { Input } from "
|
|
21
|
+
import { Button } from "@/components/ui/button";
|
|
22
|
+
import { Input } from "@/components/ui/input";
|
|
23
23
|
import {
|
|
24
24
|
Dialog,
|
|
25
25
|
DialogContent,
|
|
26
26
|
DialogFooter,
|
|
27
27
|
DialogHeader,
|
|
28
28
|
DialogTitle,
|
|
29
|
-
} from "
|
|
29
|
+
} from "@/components/ui/dialog";
|
|
30
30
|
import { LucideIconPicker } from "@/components/shared-kit/icons/lucide-icon-picker";
|
|
31
31
|
import { createWorkspaceFn } from "@/server/serverFns/workspace";
|
|
32
32
|
import { createWorkspaceSchema } from "../schemas/create-workspace";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
FieldDescription,
|
|
22
22
|
FieldLabel,
|
|
23
23
|
FieldTitle,
|
|
24
|
-
} from "
|
|
24
|
+
} from "@/components/ui/field";
|
|
25
25
|
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
|
|
26
26
|
import {
|
|
27
27
|
Select,
|
|
@@ -29,8 +29,8 @@ import {
|
|
|
29
29
|
SelectItem,
|
|
30
30
|
SelectTrigger,
|
|
31
31
|
SelectValue,
|
|
32
|
-
} from "
|
|
33
|
-
import { Separator } from "
|
|
32
|
+
} from "@/components/ui/select";
|
|
33
|
+
import { Separator } from "@/components/ui/separator";
|
|
34
34
|
import { m } from "@/paraglide/messages.js";
|
|
35
35
|
|
|
36
36
|
interface DeleteWorkspaceOptionsProps {
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
import { useState } from "react";
|
|
19
19
|
import { useForm } from "@tanstack/react-form";
|
|
20
20
|
import { useRouter } from "@tanstack/react-router";
|
|
21
|
-
import { Button } from "
|
|
22
|
-
import { Input } from "
|
|
21
|
+
import { Button } from "@/components/ui/button";
|
|
22
|
+
import { Input } from "@/components/ui/input";
|
|
23
23
|
import {
|
|
24
24
|
Dialog,
|
|
25
25
|
DialogContent,
|
|
26
26
|
DialogFooter,
|
|
27
27
|
DialogHeader,
|
|
28
28
|
DialogTitle,
|
|
29
|
-
} from "
|
|
29
|
+
} from "@/components/ui/dialog";
|
|
30
30
|
import { LucideIconPicker } from "@/components/shared-kit/icons/lucide-icon-picker";
|
|
31
31
|
import { updateWorkspaceFn } from "@/server/serverFns/workspace";
|
|
32
32
|
import { createWorkspaceSchema } from "../schemas/create-workspace";
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
|
|
18
18
|
import { Link } from "@tanstack/react-router";
|
|
19
19
|
import { Settings, FolderKanban, Pencil, Trash2, ArrowLeft } from "lucide-react";
|
|
20
|
-
import { Button } from "
|
|
20
|
+
import { Button } from "@/components/ui/button";
|
|
21
21
|
import {
|
|
22
22
|
DropdownMenu,
|
|
23
23
|
DropdownMenuContent,
|
|
24
24
|
DropdownMenuItem,
|
|
25
25
|
DropdownMenuTrigger,
|
|
26
|
-
} from "
|
|
26
|
+
} from "@/components/ui/dropdown-menu";
|
|
27
27
|
import {
|
|
28
28
|
Separator,
|
|
29
|
-
} from '
|
|
29
|
+
} from '@/components/ui/separator';
|
|
30
30
|
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
31
31
|
import { m } from "@/paraglide/messages.js";
|
|
32
32
|
|
|
@@ -25,14 +25,14 @@ import { DragDropProvider, useDroppable, type DragEndEvent, type DragMoveEvent }
|
|
|
25
25
|
import { useSortable } from "@dnd-kit/react/sortable";
|
|
26
26
|
import { Feedback } from "@dnd-kit/dom";
|
|
27
27
|
import { OptimisticSortingPlugin } from "@dnd-kit/dom/sortable";
|
|
28
|
-
import { Badge } from "
|
|
29
|
-
import { Button } from "
|
|
30
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "
|
|
31
|
-
import { Input } from "
|
|
32
|
-
import { ConfirmDialog } from "
|
|
28
|
+
import { Badge } from "@/components/ui/badge";
|
|
29
|
+
import { Button } from "@/components/ui/button";
|
|
30
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu";
|
|
31
|
+
import { Input } from "@/components/ui/input";
|
|
32
|
+
import { ConfirmDialog } from "@/components/confirm-dialog";
|
|
33
33
|
import {
|
|
34
34
|
Tooltip, TooltipContent, TooltipTrigger,
|
|
35
|
-
} from "
|
|
35
|
+
} from "@/components/ui/tooltip";
|
|
36
36
|
import {
|
|
37
37
|
setWorkspaceKbsFn,
|
|
38
38
|
renameQuickDocFn,
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
import * as React from "react";
|
|
19
19
|
import { useServerFn } from "@tanstack/react-start";
|
|
20
20
|
import { Check, Search } from "lucide-react";
|
|
21
|
-
import { Button } from "
|
|
22
|
-
import { Badge } from "
|
|
23
|
-
import { Checkbox } from "
|
|
24
|
-
import { Input } from "
|
|
21
|
+
import { Button } from "@/components/ui/button";
|
|
22
|
+
import { Badge } from "@/components/ui/badge";
|
|
23
|
+
import { Checkbox } from "@/components/ui/checkbox";
|
|
24
|
+
import { Input } from "@/components/ui/input";
|
|
25
25
|
import {
|
|
26
26
|
Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle,
|
|
27
|
-
} from "
|
|
27
|
+
} from "@/components/ui/dialog";
|
|
28
28
|
import {
|
|
29
29
|
listWorkspaceAvailableKbsFn,
|
|
30
30
|
setWorkspaceKbsFn,
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
|
|
18
18
|
import * as React from "react";
|
|
19
19
|
import { useServerFn } from "@tanstack/react-start";
|
|
20
|
-
import { toast } from "
|
|
20
|
+
import { toast } from "@/components/ui/toast";
|
|
21
21
|
import { BookOpenText, X } from "lucide-react";
|
|
22
|
-
import { Button } from "
|
|
23
|
-
import { Checkbox } from "
|
|
24
|
-
import { Input } from "
|
|
25
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "
|
|
22
|
+
import { Button } from "@/components/ui/button";
|
|
23
|
+
import { Checkbox } from "@/components/ui/checkbox";
|
|
24
|
+
import { Input } from "@/components/ui/input";
|
|
25
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
|
26
26
|
import {
|
|
27
27
|
Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle,
|
|
28
|
-
} from "
|
|
28
|
+
} from "@/components/ui/dialog";
|
|
29
29
|
import { KbFilterPopover, type KbFilter } from "@/components/knowledge/kb-filter-popover";
|
|
30
30
|
import { generalGroupLabel } from "@/components/knowledge/general-groups";
|
|
31
31
|
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
import { useState, useEffect } from "react";
|
|
19
19
|
import { UserPlus, Loader2, Search, Check, Users } from "lucide-react";
|
|
20
|
-
import { toast } from "
|
|
21
|
-
import { Button } from "
|
|
22
|
-
import { Input } from "
|
|
20
|
+
import { toast } from "@/components/ui/toast";
|
|
21
|
+
import { Button } from "@/components/ui/button";
|
|
22
|
+
import { Input } from "@/components/ui/input";
|
|
23
23
|
import {
|
|
24
24
|
Dialog,
|
|
25
25
|
DialogContent,
|
|
@@ -27,20 +27,20 @@ import {
|
|
|
27
27
|
DialogFooter,
|
|
28
28
|
DialogHeader,
|
|
29
29
|
DialogTitle,
|
|
30
|
-
} from "
|
|
30
|
+
} from "@/components/ui/dialog";
|
|
31
31
|
import {
|
|
32
32
|
Tooltip,
|
|
33
33
|
TooltipContent,
|
|
34
34
|
TooltipProvider,
|
|
35
35
|
TooltipTrigger,
|
|
36
|
-
} from "
|
|
36
|
+
} from "@/components/ui/tooltip";
|
|
37
37
|
import {
|
|
38
38
|
Select,
|
|
39
39
|
SelectContent,
|
|
40
40
|
SelectItem,
|
|
41
41
|
SelectTrigger,
|
|
42
42
|
SelectValue,
|
|
43
|
-
} from "
|
|
43
|
+
} from "@/components/ui/select";
|
|
44
44
|
import { UserAvatar } from "@/components/shared-kit";
|
|
45
45
|
import type { AvatarConfig, ShapeType } from "@allbluecn/kernel";
|
|
46
46
|
import { NameConfirmDialog } from "@/components/shared-kit/dialogs/name-confirm-dialog";
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
import { Link } from "@tanstack/react-router";
|
|
19
19
|
import { FolderKanban, Plus, Users, Box } from "lucide-react";
|
|
20
|
-
import { Button } from "
|
|
21
|
-
import { Card } from "
|
|
20
|
+
import { Button } from "@/components/ui/button";
|
|
21
|
+
import { Card } from "@/components/ui/card";
|
|
22
22
|
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
23
23
|
import { CreateProjectDialog } from "@/components/project/create-project-dialog";
|
|
24
24
|
import { m } from "@/paraglide/messages.js";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
|
|
5
|
+
import { useEffect, useRef, useState } from "react";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 无限滚动加载状态机:IntersectionObserver 哨兵 + loading 防重入。
|
|
9
|
+
*
|
|
10
|
+
* 哨兵进入视口且 hasMore 时触发 onLoadMore;返回 Promise 时 resolve 后解除
|
|
11
|
+
* loading,同步返回则由调用方经 hasMore/数据更新间接解除。供
|
|
12
|
+
* InfiniteScrollSentinel 等无限滚动组件复用。
|
|
13
|
+
*/
|
|
14
|
+
export function useLoadMore(
|
|
15
|
+
onLoadMore: () => void | Promise<void>,
|
|
16
|
+
hasMore: boolean,
|
|
17
|
+
rootRef?: React.RefObject<HTMLElement | null>,
|
|
18
|
+
): {
|
|
19
|
+
/** 挂到滚动末端哨兵元素上 */
|
|
20
|
+
sentinelRef: React.RefObject<HTMLDivElement | null>;
|
|
21
|
+
loading: boolean;
|
|
22
|
+
} {
|
|
23
|
+
const sentinelRef = useRef<HTMLDivElement>(null);
|
|
24
|
+
const observerRef = useRef<IntersectionObserver | null>(null);
|
|
25
|
+
const [loading, setLoading] = useState(false);
|
|
26
|
+
const loadingRef = useRef(false);
|
|
27
|
+
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
loadingRef.current = loading;
|
|
30
|
+
}, [loading]);
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (!sentinelRef.current || !hasMore) return;
|
|
34
|
+
|
|
35
|
+
if (observerRef.current) observerRef.current.disconnect();
|
|
36
|
+
|
|
37
|
+
const observer = new IntersectionObserver(
|
|
38
|
+
(entries) => {
|
|
39
|
+
if (entries[0]?.isIntersecting && !loadingRef.current) {
|
|
40
|
+
setLoading(true);
|
|
41
|
+
const result = onLoadMore();
|
|
42
|
+
if (result && typeof (result as Promise<void>).then === "function") {
|
|
43
|
+
(result as Promise<void>).then(() => setLoading(false));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{ root: rootRef?.current ?? null, rootMargin: "80px" },
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
observer.observe(sentinelRef.current);
|
|
51
|
+
observerRef.current = observer;
|
|
52
|
+
return () => observer.disconnect();
|
|
53
|
+
// onLoadMore 由调用方保证稳定(多为 useCallback),与原实现一致仅依赖 hasMore/rootRef
|
|
54
|
+
}, [hasMore, rootRef]);
|
|
55
|
+
|
|
56
|
+
return { sentinelRef, loading };
|
|
57
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
const MOBILE_BREAKPOINT = 768
|
|
4
|
+
|
|
5
|
+
export function useIsMobile() {
|
|
6
|
+
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
|
|
7
|
+
|
|
8
|
+
React.useEffect(() => {
|
|
9
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
|
|
10
|
+
const onChange = () => {
|
|
11
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
|
12
|
+
}
|
|
13
|
+
mql.addEventListener("change", onChange)
|
|
14
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
|
15
|
+
return () => mql.removeEventListener("change", onChange)
|
|
16
|
+
}, [])
|
|
17
|
+
|
|
18
|
+
return !!isMobile
|
|
19
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useCallback, useEffect } from 'react'
|
|
3
3
|
import { useQuery, useQueryClient } from '@tanstack/react-query'
|
|
4
4
|
import { useRouter } from '@tanstack/react-router'
|
|
5
|
-
import { toast } from '
|
|
5
|
+
import { toast } from '@/components/ui/toast'
|
|
6
6
|
import type { NotificationSseValue, NotificationItem } from '@allbluecn/kernel'
|
|
7
7
|
import { isInDndWindow } from '@allbluecn/kernel'
|
|
8
8
|
import { getUnreadCountFn, getNotificationPreferencesFn } from '@/server/serverFns/notifications'
|
|
@@ -95,7 +95,7 @@ export const SDK_GROUPS: SdkGroup[] = [
|
|
|
95
95
|
"items": [
|
|
96
96
|
{
|
|
97
97
|
"name": "@allbluecn/web-app",
|
|
98
|
-
"version": "v0.18.
|
|
98
|
+
"version": "v0.18.2",
|
|
99
99
|
"lastUpdate": "Oct 7, 2026",
|
|
100
100
|
"source": "apps/web/package.json",
|
|
101
101
|
"docsUrl": "https://github.com/allbluecn/allblue"
|
package/src/lib/datetime.ts
CHANGED
|
@@ -15,7 +15,212 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
import { formatInTimeZone, toZonedTime, fromZonedTime } from 'date-fns-tz'
|
|
19
|
+
import { startOfDay, subDays } from 'date-fns'
|
|
20
|
+
|
|
21
|
+
const FALLBACK_TIMEZONE = 'Asia/Shanghai'
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 解析生效时区:项目时区 > 用户时区 > 浏览器时区 > Asia/Shanghai
|
|
25
|
+
*/
|
|
26
|
+
export function resolveTimezone(
|
|
27
|
+
projectTz?: string | null,
|
|
28
|
+
userTz?: string | null,
|
|
29
|
+
): string {
|
|
30
|
+
const browserTz =
|
|
31
|
+
typeof Intl !== 'undefined'
|
|
32
|
+
? Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
33
|
+
: FALLBACK_TIMEZONE
|
|
34
|
+
return projectTz || userTz || browserTz || FALLBACK_TIMEZONE
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 时区感知的时间格式化。
|
|
39
|
+
* @param date UTC Date 对象(来自 DB)
|
|
40
|
+
* @param timezone IANA 时区,如 "Asia/Shanghai"
|
|
41
|
+
* @param fmt date-fns 格式,默认 "yyyy-MM-dd HH:mm"
|
|
42
|
+
*/
|
|
43
|
+
export function formatDate(
|
|
44
|
+
date: Date,
|
|
45
|
+
timezone: string,
|
|
46
|
+
fmt = 'yyyy-MM-dd HH:mm',
|
|
47
|
+
): string {
|
|
48
|
+
try {
|
|
49
|
+
return formatInTimeZone(date, timezone, fmt)
|
|
50
|
+
} catch {
|
|
51
|
+
return formatInTimeZone(date, FALLBACK_TIMEZONE, fmt)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 确定性时间戳格式化:固定时区 + date-fns 数字格式,不依赖运行环境 locale/时区。
|
|
57
|
+
* SSR 与客户端输出字节级一致,专治 toLocaleString() 引发的 hydration mismatch。
|
|
58
|
+
* @param date Date 对象或 ISO 字符串
|
|
59
|
+
* @param fmt date-fns 格式,默认 "yyyy-MM-dd HH:mm"
|
|
60
|
+
*/
|
|
61
|
+
export function formatTimestamp(
|
|
62
|
+
date: Date | string,
|
|
63
|
+
fmt = 'yyyy-MM-dd HH:mm',
|
|
64
|
+
): string {
|
|
65
|
+
const d = typeof date === 'string' ? new Date(date) : date
|
|
66
|
+
if (Number.isNaN(d.getTime())) return '-'
|
|
67
|
+
return formatDate(d, FALLBACK_TIMEZONE, fmt)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 相对时间(今天/昨天/具体日期),基于时区计算「今天的 0 点」。
|
|
72
|
+
* @param now 当前时间(测试注入;生产用默认 new Date())
|
|
73
|
+
*/
|
|
74
|
+
export function formatRelative(
|
|
75
|
+
date: Date,
|
|
76
|
+
timezone: string,
|
|
77
|
+
now: Date = new Date(),
|
|
78
|
+
): string {
|
|
79
|
+
try {
|
|
80
|
+
const todayStart = startOfDayInTimeZone(now, timezone)
|
|
81
|
+
const yesterdayStart = new Date(todayStart)
|
|
82
|
+
yesterdayStart.setDate(yesterdayStart.getDate() - 1)
|
|
83
|
+
|
|
84
|
+
const dateStart = startOfDayInTimeZone(date, timezone)
|
|
85
|
+
|
|
86
|
+
if (dateStart.getTime() === todayStart.getTime()) return '今天'
|
|
87
|
+
if (dateStart.getTime() === yesterdayStart.getTime()) return '昨天'
|
|
88
|
+
return formatInTimeZone(date, timezone, 'yyyy-MM-dd')
|
|
89
|
+
} catch {
|
|
90
|
+
return formatInTimeZone(date, FALLBACK_TIMEZONE, 'yyyy-MM-dd')
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 获取指定时区下某天的 0 点(UTC Date 对象)。
|
|
96
|
+
*/
|
|
97
|
+
function startOfDayInTimeZone(date: Date, timezone: string): Date {
|
|
98
|
+
const zoned = toZonedTime(date, timezone)
|
|
99
|
+
const dayStart = startOfDay(zoned)
|
|
100
|
+
return fromZonedTime(dayStart, timezone)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* 对话历史日期分组标签(今天/昨天/本周/具体日期)。
|
|
105
|
+
* @param date UTC Date 对象
|
|
106
|
+
* @param timezone IANA 时区
|
|
107
|
+
*/
|
|
108
|
+
export function formatChatDate(date: Date, timezone: string): string {
|
|
109
|
+
try {
|
|
110
|
+
const now = new Date()
|
|
111
|
+
const todayStart = startOfDayInTimeZone(now, timezone)
|
|
112
|
+
const yesterdayStart = subDays(todayStart, 1)
|
|
113
|
+
const weekStart = subDays(todayStart, 7)
|
|
114
|
+
|
|
115
|
+
const dateStart = startOfDayInTimeZone(date, timezone)
|
|
116
|
+
|
|
117
|
+
if (dateStart.getTime() === todayStart.getTime()) return '今天'
|
|
118
|
+
if (dateStart.getTime() === yesterdayStart.getTime()) return '昨天'
|
|
119
|
+
if (dateStart.getTime() >= weekStart.getTime()) return '本周'
|
|
120
|
+
|
|
121
|
+
const currentYear = Number(formatInTimeZone(now, timezone, 'yyyy'))
|
|
122
|
+
const dateYear = Number(formatInTimeZone(date, timezone, 'yyyy'))
|
|
123
|
+
if (dateYear === currentYear) {
|
|
124
|
+
return formatInTimeZone(date, timezone, 'M月d日')
|
|
125
|
+
}
|
|
126
|
+
return formatInTimeZone(date, timezone, 'yyyy年M月d日')
|
|
127
|
+
} catch {
|
|
128
|
+
return formatInTimeZone(date, FALLBACK_TIMEZONE, 'yyyy-MM-dd')
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
// ---- 本地日历工具(自 lib/date-utils.ts 并入:按本地时区做日历网格/日键计算,无时区转换) ----
|
|
134
|
+
|
|
135
|
+
/** 解析 "yyyy-MM-dd" 前缀为本地 Date(避免 UTC 偏移) */
|
|
136
|
+
export function parseDate(s: string): Date {
|
|
137
|
+
const datePart = s.slice(0, 10)
|
|
138
|
+
const [y, m, d] = datePart.split('-').map(Number)
|
|
139
|
+
return new Date(y, m - 1, d)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** 本地时区 yyyy-MM-dd 日键(与 timezone 版 formatDate 区分) */
|
|
143
|
+
export function formatDateLocal(d: Date): string {
|
|
144
|
+
const y = d.getFullYear()
|
|
145
|
+
const m = String(d.getMonth() + 1).padStart(2, '0')
|
|
146
|
+
const day = String(d.getDate()).padStart(2, '0')
|
|
147
|
+
return `${y}-${m}-${day}`
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function isSameDay(a: Date, b: Date): boolean {
|
|
151
|
+
return (
|
|
152
|
+
a.getFullYear() === b.getFullYear() &&
|
|
153
|
+
a.getMonth() === b.getMonth() &&
|
|
154
|
+
a.getDate() === b.getDate()
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function getMonthGrid(
|
|
159
|
+
year: number,
|
|
160
|
+
month: number,
|
|
161
|
+
): Array<{ date: Date; inMonth: boolean }> {
|
|
162
|
+
const firstDay = new Date(year, month, 1)
|
|
163
|
+
const startOffset = firstDay.getDay() // 周日=0
|
|
164
|
+
const gridStart = new Date(year, month, 1 - startOffset)
|
|
165
|
+
const result: Array<{ date: Date; inMonth: boolean }> = []
|
|
166
|
+
for (let i = 0; i < 42; i++) {
|
|
167
|
+
const date = new Date(gridStart)
|
|
168
|
+
date.setDate(gridStart.getDate() + i)
|
|
169
|
+
result.push({ date, inMonth: date.getMonth() === month })
|
|
170
|
+
}
|
|
171
|
+
return result
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export function getWeekGrid(
|
|
175
|
+
year: number,
|
|
176
|
+
month: number,
|
|
177
|
+
day: number,
|
|
178
|
+
): Array<{ date: Date; inMonth: boolean }> {
|
|
179
|
+
const anchor = new Date(year, month, day)
|
|
180
|
+
const startOffset = anchor.getDay()
|
|
181
|
+
const gridStart = new Date(year, month, day - startOffset)
|
|
182
|
+
const result: Array<{ date: Date; inMonth: boolean }> = []
|
|
183
|
+
for (let i = 0; i < 7; i++) {
|
|
184
|
+
const date = new Date(gridStart)
|
|
185
|
+
date.setDate(gridStart.getDate() + i)
|
|
186
|
+
result.push({ date, inMonth: date.getMonth() === month })
|
|
187
|
+
}
|
|
188
|
+
return result
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export function buildTimelineRange(
|
|
192
|
+
start: Date,
|
|
193
|
+
end: Date,
|
|
194
|
+
mode: 'month' | 'week',
|
|
195
|
+
): Array<{ start: Date; label: string }> {
|
|
196
|
+
const ticks: Array<{ start: Date; label: string }> = []
|
|
197
|
+
const cursor = new Date(start.getFullYear(), start.getMonth(), 1)
|
|
198
|
+
const endDate = new Date(end.getFullYear(), end.getMonth(), 1)
|
|
199
|
+
while (cursor <= endDate) {
|
|
200
|
+
const label =
|
|
201
|
+
mode === 'month'
|
|
202
|
+
? `${cursor.getFullYear()}-${String(cursor.getMonth() + 1).padStart(2, '0')}`
|
|
203
|
+
: `${cursor.getFullYear()}-${String(cursor.getMonth() + 1).padStart(2, '0')}-${String(cursor.getDate()).padStart(2, '0')}`
|
|
204
|
+
ticks.push({ start: new Date(cursor), label })
|
|
205
|
+
if (mode === 'month') cursor.setMonth(cursor.getMonth() + 1)
|
|
206
|
+
else cursor.setDate(cursor.getDate() + 7)
|
|
207
|
+
}
|
|
208
|
+
return ticks
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export function getRangeFromDates(dates: Date[]): { start: Date; end: Date } {
|
|
212
|
+
if (dates.length === 0) {
|
|
213
|
+
const now = new Date()
|
|
214
|
+
return {
|
|
215
|
+
start: new Date(now.getFullYear(), now.getMonth(), 1),
|
|
216
|
+
end: new Date(now.getFullYear(), now.getMonth() + 2, 0),
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
const times = dates.map((d) => d.getTime())
|
|
220
|
+
const min = new Date(Math.min(...times))
|
|
221
|
+
const max = new Date(Math.max(...times))
|
|
222
|
+
return {
|
|
223
|
+
start: new Date(min.getFullYear(), min.getMonth() - 1, 1),
|
|
224
|
+
end: new Date(max.getFullYear(), max.getMonth() + 1, 0),
|
|
225
|
+
}
|
|
226
|
+
}
|
package/src/lib/sanitize.ts
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
// AllBlue - 理想之海
|
|
3
|
-
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
-
//
|
|
5
|
-
// This program is free software: you can redistribute it and/or modify
|
|
6
|
-
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
-
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
// (at your option) any later version.
|
|
9
|
-
//
|
|
10
|
-
// This program is distributed in the hope that it will be useful,
|
|
11
|
-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
// GNU Affero General Public License for more details.
|
|
14
|
-
//
|
|
15
|
-
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
1
|
+
import DOMPurify from 'isomorphic-dompurify'
|
|
17
2
|
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
export
|
|
3
|
+
// HTML 清理:默认配置(html + svg + mathMl profile 均启用),
|
|
4
|
+
// 覆盖富文本 diff、附件预览等 7 处 HTML 渲染场景。
|
|
5
|
+
export function sanitize(html: string): string {
|
|
6
|
+
return DOMPurify.sanitize(html)
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// SVG 清理:头像渲染(NotionAvatar)专用。
|
|
10
|
+
// 显式复用默认配置——DOMPurify 默认 profile 已包含 SVG 滤镜元素
|
|
11
|
+
// (<defs>/<filter>/<feMorphology>/<feFlood>/<feComposite>/<feMerge>/<feMergeNode>),
|
|
12
|
+
// 同时清除 <script>/on*/javascript: 等 XSS 载荷。
|
|
13
|
+
// 禁止改成 USE_PROFILES: { svg: true }——严格 SVG profile 会移除全部 fe* 滤镜元素,
|
|
14
|
+
// 头像轮廓辉光(feMorphology+feFlood+feComposite+feMerge)会失效渲染白屏。
|
|
15
|
+
// 结构完整性由 __tests__/security/xss-sanitize.test.ts 的双向断言锁定。
|
|
16
|
+
export function sanitizeSvg(svg: string): string {
|
|
17
|
+
return DOMPurify.sanitize(svg)
|
|
18
|
+
}
|
package/src/lib/toast-error.ts
CHANGED
package/src/providers/index.tsx
CHANGED
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
import { ThemeProvider } from "next-themes";
|
|
19
19
|
import { useEffect, type ReactNode } from "react";
|
|
20
20
|
import { LazyMotion, domAnimation } from "motion/react";
|
|
21
|
-
import { TooltipProvider } from "
|
|
21
|
+
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
22
22
|
import { TimezoneProvider } from "@/providers/timezone-provider";
|
|
23
23
|
import type { Session } from "@/lib/auth/auth-client";
|
|
24
24
|
import { exchangeRemoteTokenFn } from "@/server/serverFns/auth/session";
|
|
25
|
-
import { toast } from "
|
|
25
|
+
import { toast } from "@/components/ui/toast";
|
|
26
26
|
import { registerIconPicker } from "@/components/design/editor/icon-picker-bridge";
|
|
27
27
|
import { LucideIconPicker } from "@/components/shared-kit/icons/lucide-icon-picker";
|
|
28
28
|
import { m } from "@/paraglide/messages.js";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { createLazyFileRoute, useNavigate } from '@tanstack/react-router'
|
|
2
2
|
import { useState } from 'react'
|
|
3
|
-
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '
|
|
4
|
-
import { Button } from '
|
|
3
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
|
|
4
|
+
import { Button } from '@/components/ui/button'
|
|
5
5
|
import {
|
|
6
6
|
Dialog,
|
|
7
7
|
DialogContent,
|
|
8
8
|
DialogFooter,
|
|
9
9
|
DialogHeader,
|
|
10
10
|
DialogTitle,
|
|
11
|
-
} from '
|
|
12
|
-
import { Input } from '
|
|
13
|
-
import { Label } from '
|
|
11
|
+
} from '@/components/ui/dialog'
|
|
12
|
+
import { Input } from '@/components/ui/input'
|
|
13
|
+
import { Label } from '@/components/ui/label'
|
|
14
14
|
import { Cloud, Server, HardDrive, Loader2 } from 'lucide-react'
|
|
15
15
|
import { useConnection } from '@desktop/connection-manager'
|
|
16
16
|
import { connectionTest } from '@desktop/connection-manager/connection-test'
|
|
17
|
-
import { toast } from '
|
|
17
|
+
import { toast } from '@/components/ui/toast'
|
|
18
18
|
import { m } from "@/paraglide/messages.js";
|
|
19
19
|
import { errorMessage } from "@/lib/toast-error";
|
|
20
20
|
|