@tano.page/workbench 0.14.0 → 0.15.0

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.
Files changed (177) hide show
  1. package/package.json +21 -8
  2. package/src/App.vue +76 -17
  3. package/src/appearance/appearance.ts +14 -4
  4. package/src/appearance/components/ThemePresetPreview.vue +52 -8
  5. package/src/appearance/interface-font.ts +99 -0
  6. package/src/appearance/theme.ts +26 -10
  7. package/src/appearance/use-interface-font.ts +30 -0
  8. package/src/assets/mail-provider-icons/NOTICE.txt +27 -0
  9. package/src/assets/mail-provider-icons/aliyun-mail.svg +3 -0
  10. package/src/assets/mail-provider-icons/gmail.svg +1 -0
  11. package/src/assets/mail-provider-icons/icloud.svg +12 -0
  12. package/src/assets/mail-provider-icons/netease-126.svg +5 -0
  13. package/src/assets/mail-provider-icons/netease-163.svg +5 -0
  14. package/src/assets/mail-provider-icons/qq.svg +9 -0
  15. package/src/assets/mail-provider-icons/tencent-exmail.svg +4 -0
  16. package/src/assistant/components/AssistantChangeList.vue +98 -21
  17. package/src/assistant/components/AssistantPanel.vue +424 -7
  18. package/src/assistant/components/PluginToolProposalCard.vue +235 -0
  19. package/src/assistant/engine.ts +56 -3
  20. package/src/assistant/files.ts +5 -13
  21. package/src/assistant/inbox.ts +1 -148
  22. package/src/assistant/locales/de-DE.json +4 -1
  23. package/src/assistant/locales/en-US.json +4 -1
  24. package/src/assistant/locales/es-ES.json +4 -1
  25. package/src/assistant/locales/ja-JP.json +4 -1
  26. package/src/assistant/locales/zh-CN.json +4 -1
  27. package/src/assistant/locales/zh-TW.json +4 -1
  28. package/src/assistant/mention-autocomplete.ts +69 -0
  29. package/src/assistant/prompts.ts +7 -0
  30. package/src/assistant/results.ts +20 -86
  31. package/src/assistant/store.ts +319 -12
  32. package/src/assistant/structures.ts +7 -5
  33. package/src/assistant/tasks.ts +3 -5
  34. package/src/assistant/workspace-bridge.ts +1 -1
  35. package/src/composables/use-document-actions.ts +38 -20
  36. package/src/composables/use-file-tree-controller.ts +7 -12
  37. package/src/composables/use-workbench-history.ts +2 -4
  38. package/src/composables/use-workbench-modals.ts +6 -1
  39. package/src/composables/use-workbench-outline.ts +0 -5
  40. package/src/composables/use-workbench-shortcuts.ts +26 -22
  41. package/src/data-tables/data-tables.ts +1 -2
  42. package/src/documents/components/DocumentHistoryPanel.vue +3 -1
  43. package/src/features.ts +1 -0
  44. package/src/fonts/Inter-Latin-Italic.woff2 +0 -0
  45. package/src/fonts/Inter-Latin.woff2 +0 -0
  46. package/src/fonts/TanoUISansSC-Bold.woff2 +0 -0
  47. package/src/fonts/TanoUISansSC-Medium.woff2 +0 -0
  48. package/src/fonts/TanoUISansSC-Regular.woff2 +0 -0
  49. package/src/help/help-milestones.ts +3 -5
  50. package/src/i18n/locales/de-DE.json +349 -3
  51. package/src/i18n/locales/en-US.json +349 -2
  52. package/src/i18n/locales/es-ES.json +349 -3
  53. package/src/i18n/locales/ja-JP.json +348 -2
  54. package/src/i18n/locales/zh-TW.json +348 -2
  55. package/src/mail/components/MailAccountDialog.vue +449 -0
  56. package/src/mail/components/MailComposerDialog.vue +325 -0
  57. package/src/mail/components/MailProviderIcon.vue +30 -0
  58. package/src/mail/components/MailWorkspaceView.vue +820 -0
  59. package/src/mail/components/SidebarMail.vue +133 -0
  60. package/src/mail/mail-avatar.ts +17 -0
  61. package/src/mail/mail-bridge.ts +68 -0
  62. package/src/mail/mail-calendar.ts +208 -0
  63. package/src/mail/mail-markdown.ts +195 -0
  64. package/src/mail/types.ts +226 -0
  65. package/src/objects/components/ObjectDetailModal.vue +1001 -0
  66. package/src/objects/workspace-objects.ts +1 -1
  67. package/src/plan-sync/types.ts +6 -3
  68. package/src/plans/calendar-interaction.ts +194 -0
  69. package/src/plans/calendar.ts +63 -7
  70. package/src/plans/components/CalendarDayPopover.vue +172 -39
  71. package/src/plans/components/CalendarView.vue +1736 -276
  72. package/src/plans/components/PlanArchiveDialog.vue +295 -0
  73. package/src/plans/components/PlanDateField.vue +6 -4
  74. package/src/plans/components/PlanDetailPanel.vue +227 -32
  75. package/src/plans/components/PlanEventList.vue +16 -4
  76. package/src/plans/components/SidebarPlan.vue +22 -15
  77. package/src/plans/components/TaskRepeatControls.vue +169 -30
  78. package/src/plans/local-reminders.ts +149 -0
  79. package/src/plans/personal-plans.ts +10 -1
  80. package/src/plans/plan-date.ts +8 -1
  81. package/src/plans/plan-migration.ts +95 -0
  82. package/src/plans/recurrence.ts +95 -0
  83. package/src/plans/task-repeat.ts +8 -8
  84. package/src/plans/timeline-layout.ts +92 -0
  85. package/src/plugins/assistant-bridge.ts +520 -0
  86. package/src/plugins/attachment-reader.ts +3 -1
  87. package/src/plugins/cache-storage.ts +42 -2
  88. package/src/plugins/components/PluginAutomations.vue +3 -3
  89. package/src/plugins/components/PluginCatalogBrowser.vue +17 -8
  90. package/src/plugins/components/PluginChangeSummary.vue +16 -3
  91. package/src/plugins/components/PluginConnections.vue +1 -1
  92. package/src/plugins/components/PluginCustomView.vue +2 -2
  93. package/src/plugins/components/PluginDetailPage.vue +129 -54
  94. package/src/plugins/components/PluginDocumentSlot.vue +63 -0
  95. package/src/plugins/components/PluginExplorer.vue +15 -21
  96. package/src/plugins/components/PluginImportDialog.vue +410 -0
  97. package/src/plugins/components/PluginInstaller.vue +39 -145
  98. package/src/plugins/components/PluginListItem.vue +3 -0
  99. package/src/plugins/components/PluginMaintenance.vue +21 -6
  100. package/src/plugins/components/PluginRuntimePanel.vue +3 -3
  101. package/src/plugins/components/PluginSettingsForm.vue +111 -0
  102. package/src/plugins/components/PluginStatusBar.vue +161 -0
  103. package/src/plugins/components/PluginSurface.vue +18 -6
  104. package/src/plugins/components/PluginUiDialog.vue +452 -0
  105. package/src/plugins/excalidraw/bundle.tano-plugin.json +1 -1
  106. package/src/plugins/excalidraw/manifest.json +12 -1
  107. package/src/plugins/host.ts +662 -43
  108. package/src/plugins/native.ts +2 -10
  109. package/src/plugins/overlay-mapping.ts +125 -0
  110. package/src/plugins/packages.ts +73 -1
  111. package/src/plugins/plugin-permissions.ts +57 -0
  112. package/src/plugins/plugin-sdk.ts +174 -8
  113. package/src/plugins/policy.ts +53 -3
  114. package/src/plugins/presentation-preview/bundle.tano-plugin.json +1 -1
  115. package/src/plugins/presentation-preview/manifest.json +2 -1
  116. package/src/plugins/queries.ts +3 -1
  117. package/src/plugins/sandbox.ts +15 -1
  118. package/src/plugins/use-plugin-actions.ts +67 -20
  119. package/src/plugins/user-plugins.ts +254 -0
  120. package/src/plugins/word-preview/bundle.tano-plugin.json +1 -1
  121. package/src/plugins/word-preview/manifest.json +13 -1
  122. package/src/plugins/workbench.ts +175 -2
  123. package/src/plugins/worker.js +105 -8
  124. package/src/plugins/workspace-plugin-runtime.ts +23 -7
  125. package/src/plugins/workspace-plugins.ts +212 -21
  126. package/src/runtime.ts +101 -3
  127. package/src/settings/components/SettingsAppearancePage.vue +46 -0
  128. package/src/settings/components/SettingsDocumentsPage.vue +0 -1
  129. package/src/settings/components/settings-search.ts +2 -3
  130. package/src/shell/components/SidebarNavigation.vue +22 -2
  131. package/src/shell/components/WorkbenchContextMenus.vue +21 -8
  132. package/src/shell/components/WorkbenchModals.vue +27 -46
  133. package/src/shell/components/WorkbenchPanes.vue +267 -84
  134. package/src/shell/components/WorkspaceBreadcrumb.vue +6 -14
  135. package/src/shell/components/WorkspaceViewSwitcher.vue +12 -7
  136. package/src/shell/use-workbench.ts +116 -145
  137. package/src/shell/workbench-async-components.ts +14 -5
  138. package/src/stores/mail.ts +414 -0
  139. package/src/stores/plan-sync.ts +2 -1
  140. package/src/stores/plans.ts +2 -9
  141. package/src/stores/workspace-knowledge.ts +1 -113
  142. package/src/stores/workspace-plugins-state.ts +537 -14
  143. package/src/stores/workspace-tabs-layout.ts +5 -43
  144. package/src/stores/workspace.ts +69 -66
  145. package/src/styles/agent-diff-modals.css +0 -7
  146. package/src/styles/dark-theme.css +3 -3
  147. package/src/styles/inspector.css +0 -59
  148. package/src/styles/layout-themes.css +346 -0
  149. package/src/styles/mail.css +1568 -0
  150. package/src/styles/mobile.css +2 -2
  151. package/src/styles/recent-and-media.css +0 -17
  152. package/src/styles/theme-contract.css +3 -3
  153. package/src/styles/workbench-shell.css +110 -17
  154. package/src/styles/workspace-states.css +9 -33
  155. package/src/styles.css +1 -1
  156. package/src/tabs/components/DesktopTabs.vue +0 -3
  157. package/src/tabs/components/NewTabPicker.vue +10 -4
  158. package/src/tabs/tab-label.ts +0 -1
  159. package/src/workspace/components/WorkspaceGeneralSettings.vue +0 -13
  160. package/src/workspace/components/WorkspaceIconPicker.vue +28 -6
  161. package/src/workspace/workspace-comments.ts +11 -151
  162. package/src/workspace/workspace-welcome.ts +1 -1
  163. package/src/documents/components/FormulaMenu.vue +0 -50
  164. package/src/files/components/FileDatabasePage.vue +0 -152
  165. package/src/files/components/FolderHomeIcon.vue +0 -12
  166. package/src/objects/components/ObjectDatabasePage.vue +0 -100
  167. package/src/objects/components/ObjectPanel.vue +0 -554
  168. package/src/plans/components/PersonalPlanDialog.vue +0 -105
  169. package/src/shell/components/WorkspaceViewPage.vue +0 -127
  170. package/src/shell/components/WorkspaceViewTab.vue +0 -24
  171. package/src/styles/object-panel.css +0 -163
  172. package/src/workspace/components/GitInspectionPanel.vue +0 -35
  173. package/src/workspace/components/WorkspaceSyncPanel.vue +0 -50
  174. package/src/workspace/welcome-slogans.ts +0 -11
  175. package/src/workspace/workspace-git.ts +0 -35
  176. package/src/workspace/workspace-sync.ts +0 -46
  177. package/src/workspace/workspace-views.ts +0 -48
@@ -40,7 +40,7 @@
40
40
  .touch-layout .inspector-surface { max-height: inherit; }
41
41
  .touch-layout .modal-backdrop,
42
42
  .touch-layout .modal-backdrop.settings-backdrop,
43
- .touch-layout .object-panel-backdrop {
43
+ .touch-layout .object-detail-backdrop {
44
44
  top: var(--app-viewport-top, 0px);
45
45
  bottom: auto;
46
46
  height: var(--app-viewport-height, 100dvh);
@@ -48,7 +48,7 @@
48
48
  overflow-y: auto;
49
49
  }
50
50
  .touch-layout .modal,
51
- .touch-layout .object-panel { max-height: 100%; overflow-y: auto; }
51
+ .touch-layout .object-detail-panel { max-height: 100%; overflow-y: auto; }
52
52
  .touch-layout .search-modal { max-height: 100%; }
53
53
  .touch-layout .search-results { min-height: 0; overflow-y: auto; }
54
54
  .touch-layout .settings-dialog { height: 100%; max-height: 760px; }
@@ -30,23 +30,6 @@
30
30
  .recent-spaces button:hover {
31
31
  background: var(--hover);
32
32
  }
33
- .recent-spaces-header {
34
- display: flex;
35
- align-items: center;
36
- justify-content: space-between;
37
- padding-right: 4px;
38
- }
39
- .recent-spaces .recent-open-button {
40
- justify-content: center;
41
- flex-shrink: 0;
42
- width: 32px;
43
- height: 32px;
44
- padding: 0;
45
- }
46
- .recent-spaces .recent-open-button:disabled {
47
- opacity: 0.5;
48
- cursor: default;
49
- }
50
33
  .recent-spaces .recent-workspace-details {
51
34
  display: grid;
52
35
  gap: 4px;
@@ -41,10 +41,10 @@
41
41
  .settings-card, .review-card, .assistant-composer, .tano-prose pre, .tano-prose blockquote
42
42
  ) { border-radius: var(--radius-card); }
43
43
  :root[data-shape-theme] :is(
44
- .modal, .settings-dialog, .object-panel, .import-dialog, .plugin-dialog,
44
+ .modal, .settings-dialog, .object-detail-panel, .import-dialog, .plugin-dialog,
45
45
  .command-palette, .document-history-dialog, .selection-todo-dialog,
46
46
  .plan-detail-panel, .plan-connections, .assistant-connection-dialog, .assistant-panel-floating,
47
- .new-tab-picker, .personal-plan-dialog
47
+ .new-tab-picker
48
48
  ) {
49
49
  border-radius: var(--radius-dialog);
50
50
  background-color: var(--paper);
@@ -67,7 +67,7 @@
67
67
  :root[data-shape-theme] :is(.settings-row, .modal, .tano-editor-panel) {
68
68
  padding-block: var(--space-panel);
69
69
  }
70
- :root[data-shape-theme] :is(.modal-backdrop, .object-panel-backdrop, .plugin-dialog-backdrop) {
70
+ :root[data-shape-theme] :is(.modal-backdrop, .object-detail-backdrop, .plugin-dialog-backdrop) {
71
71
  background: var(--backdrop);
72
72
  }
73
73
  :root[data-shape-theme] dialog::backdrop { background: var(--backdrop); }
@@ -46,14 +46,92 @@
46
46
  font-display: swap;
47
47
  }
48
48
 
49
+ /* Interface Latin face. The unicode-range stops at Latin-1 plus a few symbols:
50
+ CJK text, full-width punctuation, curly quotes, em dashes and ellipses all
51
+ fall through to the Chinese face (bundled Noto or the platform face), so
52
+ Chinese sentences keep their native punctuation width. Prose has its own font setting and never uses this
53
+ alias unless a surface opts into --font-ui. */
54
+ @font-face {
55
+ font-family: 'Tano UI Inter';
56
+ src: url('../fonts/Inter-Latin.woff2') format('woff2');
57
+ font-style: normal;
58
+ font-weight: 100 900;
59
+ font-display: swap;
60
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013, U+20AC, U+2122, U+2212;
61
+ }
62
+
63
+ @font-face {
64
+ font-family: 'Tano UI Inter';
65
+ src: url('../fonts/Inter-Latin-Italic.woff2') format('woff2');
66
+ font-style: italic;
67
+ font-weight: 100 900;
68
+ font-display: swap;
69
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013, U+20AC, U+2122, U+2212;
70
+ }
71
+
72
+ /* Bundled Simplified Chinese face for the interface default (界面字体 → 内置):
73
+ Noto Sans CJK SC (思源黑体) Regular/Medium/Bold, GB2312 subsets renamed per
74
+ OFL (docs/THIRD_PARTY_NOTICES.md, scripts/fonts/subset-ui-cjk.py). Every
75
+ weight comes from this one family; the 系统字体 and 自定义 choices replace it
76
+ entirely. Characters outside the subset fall through to the platform stack. */
77
+ @font-face {
78
+ font-family: 'Tano UI Sans SC';
79
+ src: url('../fonts/TanoUISansSC-Regular.woff2') format('woff2');
80
+ font-style: normal;
81
+ font-weight: 100 449;
82
+ font-display: swap;
83
+ unicode-range: U+2010-2027, U+2030-203B, U+3000-303F, U+4E00-9FFF, U+FF00-FFEF;
84
+ /* Measured on Windows: Noto Sans CJK 1.16/0.29 em vs Microsoft YaHei UI
85
+ 1.02/0.25 em. Match YaHei UI so switching faces never changes row heights;
86
+ ideographs (-0.12…0.88 em) stay centred in the 1.27 em box. */
87
+ ascent-override: 102%;
88
+ descent-override: 25%;
89
+ line-gap-override: 0%;
90
+ }
91
+
92
+ @font-face {
93
+ font-family: 'Tano UI Sans SC';
94
+ src: url('../fonts/TanoUISansSC-Medium.woff2') format('woff2');
95
+ font-style: normal;
96
+ /* 500 only. 600 (section headings, group labels) must stay a clear step
97
+ above 500 (row titles), as YaHei's 400/700 pair made it; Noto has no
98
+ SemiBold, so 550+ uses Bold like standard nearest-weight matching. */
99
+ font-weight: 450 549;
100
+ font-display: swap;
101
+ unicode-range: U+2010-2027, U+2030-203B, U+3000-303F, U+4E00-9FFF, U+FF00-FFEF;
102
+ /* Same metrics as the regular face. */
103
+ ascent-override: 102%;
104
+ descent-override: 25%;
105
+ line-gap-override: 0%;
106
+ }
107
+
108
+ @font-face {
109
+ font-family: 'Tano UI Sans SC';
110
+ src: url('../fonts/TanoUISansSC-Bold.woff2') format('woff2');
111
+ font-style: normal;
112
+ font-weight: 550 900;
113
+ font-display: swap;
114
+ unicode-range: U+2010-2027, U+2030-203B, U+3000-303F, U+4E00-9FFF, U+FF00-FFEF;
115
+ /* Same metrics as the regular face. */
116
+ ascent-override: 102%;
117
+ descent-override: 25%;
118
+ line-gap-override: 0%;
119
+ }
120
+
49
121
  :root {
50
122
  color-scheme: light;
51
- /* One family for chrome and prose: Latin uses the platform UI face and CJK
52
- falls back to the platform Chinese face, so mixed lines share a baseline
53
- and weight instead of pairing Inter with Microsoft YaHei. */
123
+ /* Chrome uses bundled Inter for Latin and bundled Noto Sans CJK SC for
124
+ Chinese, every weight from the same family. On Windows, Segoe UI next to
125
+ Microsoft YaHei read lighter than the Chinese glyphs and YaHei lacks
126
+ 500/600; the platform stack still renders sharper at 12–13px on 100%
127
+ scaling because YaHei carries screen hinting. Settings → 外观 → 界面字体
128
+ can switch back to the platform stack (--font-ui-system) or a local font; see
129
+ appearance/interface-font.ts. Traditional Chinese and Japanese locales
130
+ keep platform CJK (see below) so Han glyphs follow their regional forms. */
54
131
  --font-cjk-sans: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Noto Sans SC', 'Source Han Sans SC';
55
- --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Text', 'Segoe UI',
132
+ --font-ui-system: -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Text', 'Segoe UI',
56
133
  var(--font-cjk-sans), ui-sans-serif, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
134
+ --font-ui: 'Tano UI Inter', 'Tano UI Sans SC', var(--font-ui-system);
57
135
  /* UI glyphs sit slightly below their line-box centre. Align navigation icons
58
136
  with the visible text rather than only the surrounding flex boxes. */
59
137
  --navigation-icon-offset-y: 0.5px;
@@ -122,6 +200,13 @@
122
200
  --diff-remove-bg: #fcefea;
123
201
  --quote-border: #d3d2ce;
124
202
  }
203
+
204
+ /* Bundled Noto is the Simplified Chinese design; other Han locales use their
205
+ platform faces (overridden per locale in print-and-locale.css). */
206
+ :root:is(:lang(zh-TW), :lang(zh-HK), :lang(ja), :lang(ko)) {
207
+ --font-ui: 'Tano UI Inter', var(--font-ui-system);
208
+ }
209
+
125
210
  * {
126
211
  box-sizing: border-box;
127
212
  }
@@ -1033,44 +1118,52 @@ button:hover {
1033
1118
  justify-content: center;
1034
1119
  gap: 5px;
1035
1120
  min-height: 28px;
1036
- padding: 0 9px;
1121
+ padding: 0 10px;
1037
1122
  border: 1px solid var(--line);
1038
- border-radius: 6px;
1123
+ border-radius: 7px;
1039
1124
  color: var(--text-secondary);
1040
1125
  font-size: 12px;
1041
1126
  white-space: nowrap;
1042
1127
  }
1043
1128
  .calendar-topbar-today:hover,
1044
1129
  .calendar-topbar-events:hover,
1045
- .calendar-topbar-mode:hover { background: var(--hover); color: var(--text); }
1130
+ .calendar-topbar-mode:hover,
1131
+ .calendar-topbar-mode[aria-expanded='true'] {
1132
+ border-color: var(--control-border);
1133
+ background: var(--hover);
1134
+ color: var(--text);
1135
+ }
1136
+ .calendar-topbar-controls > .icon-button { width: 28px; height: 28px; border-radius: 7px; }
1046
1137
  .calendar-view-picker { position: relative; }
1047
- .calendar-topbar-mode { min-width: 58px; }
1138
+ .calendar-topbar-mode { min-width: 62px; }
1139
+ .calendar-topbar-mode > svg { color: var(--muted); }
1140
+ .calendar-topbar-mode[aria-expanded='true'] > svg { rotate: 180deg; }
1048
1141
  .calendar-view-menu {
1049
1142
  position: absolute;
1050
1143
  z-index: 20;
1051
1144
  top: calc(100% + 6px);
1052
1145
  right: 0;
1053
- width: 154px;
1054
- padding: 5px;
1146
+ width: 160px;
1147
+ padding: 4px;
1055
1148
  border: 1px solid var(--line);
1056
- border-radius: 8px;
1149
+ border-radius: 10px;
1057
1150
  background: var(--paper);
1058
- box-shadow: 0 8px 24px #0002;
1151
+ box-shadow: var(--overlay-shadow, 0 8px 24px #0002);
1059
1152
  }
1060
1153
  .calendar-view-menu button {
1061
1154
  display: flex;
1062
1155
  align-items: center;
1063
1156
  justify-content: space-between;
1064
1157
  width: 100%;
1065
- min-height: 34px;
1066
- padding: 0 9px;
1067
- border-radius: 5px;
1068
- color: var(--text);
1158
+ min-height: 32px;
1159
+ padding: 0 10px;
1160
+ border-radius: 6px;
1161
+ color: var(--text-secondary);
1069
1162
  font-size: 12px;
1070
1163
  text-align: left;
1071
1164
  }
1072
1165
  .calendar-view-menu button:hover,
1073
- .calendar-view-menu button:focus-visible { background: var(--hover); }
1166
+ .calendar-view-menu button:focus-visible { background: var(--hover); color: var(--text); }
1074
1167
  .calendar-view-menu button[aria-checked='true'] { color: var(--text); font-weight: 500; }
1075
1168
  @media (max-width: 900px) {
1076
1169
  .calendar-topbar-period { display: none; }
@@ -56,7 +56,15 @@
56
56
  padding: 20px 16px 40px;
57
57
  }
58
58
  }
59
- .workspace-no-tabs.workspace-no-tabs-loading { padding: 0; }
59
+ .workspace-no-tabs.workspace-no-tabs-loading,
60
+ .workspace-no-tabs:has(.plugin-overlay-tab-host) { padding: 0; }
61
+ .plugin-overlay-tab-host {
62
+ flex: 1;
63
+ min-width: 0;
64
+ min-height: 0;
65
+ display: flex;
66
+ flex-direction: column;
67
+ }
60
68
  .workspace-no-tabs {
61
69
  flex: 1;
62
70
  min-height: 0;
@@ -157,17 +165,6 @@
157
165
  padding: 30px;
158
166
  background: var(--paper);
159
167
  }
160
- .welcome-mark img {
161
- height: 64px;
162
- width: 64px;
163
- filter: drop-shadow(0 12px 17px #0f0f0f20);
164
- }
165
- .eyebrow {
166
- font-size: 12px;
167
- letter-spacing: 3px;
168
- color: var(--muted);
169
- margin: 29px 0 11px;
170
- }
171
168
  .welcome h1 {
172
169
  font-family: var(--font-ui);
173
170
  font-size: 32px;
@@ -176,33 +173,12 @@
176
173
  letter-spacing: 2px;
177
174
  margin: 12px 0;
178
175
  }
179
- .welcome h1 .welcome-latin {
180
- font-size: 1.1em;
181
- line-height: 1;
182
- letter-spacing: 0.02em;
183
- }
184
176
  .welcome p {
185
177
  color: var(--text-secondary);
186
178
  font-size: 13px;
187
179
  line-height: 2.3;
188
180
  margin: 7px 0 29px;
189
181
  }
190
- .welcome-actions {
191
- display: flex;
192
- flex-wrap: wrap;
193
- justify-content: center;
194
- gap: 10px;
195
- width: max-content;
196
- max-width: 100%;
197
- }
198
- .welcome-actions > button {
199
- flex: 0 0 auto;
200
- }
201
- .welcome-actions .secondary-button {
202
- display: inline-flex;
203
- align-items: center;
204
- gap: 6px;
205
- }
206
182
  .primary-button {
207
183
  display: inline-flex;
208
184
  align-items: center;
package/src/styles.css CHANGED
@@ -16,5 +16,5 @@
16
16
  @import './styles/responsive.css';
17
17
  @import './styles/recent-and-media.css';
18
18
  @import './styles/agent-diff-modals.css';
19
- @import './styles/object-panel.css';
19
+ @import './styles/mail.css';
20
20
  @import './styles/print-and-locale.css';
@@ -7,7 +7,6 @@ import {
7
7
  Bot,
8
8
  Bug,
9
9
  CalendarDays,
10
- Database,
11
10
  ExternalLink,
12
11
  FilePlus2,
13
12
  GitFork,
@@ -346,7 +345,6 @@ async function onTabKeydown(event: KeyboardEvent) {
346
345
  <span v-else-if="!doc.blank && documentIcons[doc.id]" class="desktop-tab-icon desktop-tab-document-icon" aria-hidden="true">
347
346
  <WorkspaceIcon :icon="documentIcons[doc.id]" :size="15" />
348
347
  </span>
349
- <Database v-else-if="doc.workspaceView?.view.database" class="desktop-tab-icon" :size="15" :stroke-width="1.6" />
350
348
  <FilePlus2 v-else-if="doc.blank" class="desktop-tab-icon" :size="15" :stroke-width="1.6" />
351
349
  <ResourceIcon v-else :path="doc.path" class="desktop-tab-icon" :size="15" />
352
350
  <span class="desktop-tab-label">{{ tabLabel(doc) }}</span>
@@ -487,7 +485,6 @@ async function onTabKeydown(event: KeyboardEvent) {
487
485
  <span v-else-if="documentIcons[dragPreview.id]" class="desktop-tab-icon desktop-tab-document-icon">
488
486
  <WorkspaceIcon :icon="documentIcons[dragPreview.id]" :size="15" />
489
487
  </span>
490
- <Database v-else-if="paneTabs.find(tab => tab.id === dragPreview?.id)?.workspaceView?.view.database" class="desktop-tab-icon" :size="15" :stroke-width="1.6" />
491
488
  <ResourceIcon v-else :path="dragPreview.path" :kind="paneTabs.find(tab => tab.id === dragPreview?.id)?.directory ? 'directory' : 'file'" class="desktop-tab-icon" :size="15" />
492
489
  <span class="desktop-tab-label">{{ paneTabs.find(tab => tab.id === dragPreview?.id) ? tabLabel(paneTabs.find(tab => tab.id === dragPreview?.id)!) : title(dragPreview.path) }}</span>
493
490
  <span v-if="dragPreview.dirty" class="desktop-tab-dirty" />
@@ -21,7 +21,7 @@ import type { FileEntry } from '@tano/protocol';
21
21
  import { useWorkspaceStore } from '../../stores/workspace';
22
22
  import { tableFileId } from '../../data-tables/data-tables';
23
23
 
24
- const emit = defineEmits<{ close: []; 'new-document': [] }>();
24
+ const emit = defineEmits<{ close: []; 'new-document': []; 'new-table': [] }>();
25
25
  const store = useWorkspaceStore();
26
26
  const query = ref('');
27
27
  const input = ref<HTMLInputElement>();
@@ -53,7 +53,12 @@ const matches = computed(() => {
53
53
  });
54
54
  type Choice = { id: string; label: string; group: string; file?: FileEntry };
55
55
  const choices = computed<Choice[]>(() => [
56
- ...(!store.workspace?.readOnly ? [{ id: 'create', get label() { return t('新建文档'); }, group: '' }] : []),
56
+ ...(!store.workspace?.readOnly
57
+ ? [
58
+ { id: 'create', get label() { return t('新建文档'); }, group: '' },
59
+ { id: 'create-table', get label() { return t('新建数据表'); }, group: '' },
60
+ ]
61
+ : []),
57
62
  ...matches.value.slice(0, 60).map((file) => ({
58
63
  id: `file-${file.id}`,
59
64
  label: title(file.path),
@@ -82,7 +87,8 @@ onBeforeUnmount(() => {
82
87
  async function choose(choice: Choice) {
83
88
  if (opening.value || store.busy) return;
84
89
  if (!choice.file) {
85
- emit('new-document');
90
+ if (choice.id === 'create-table') emit('new-table');
91
+ else emit('new-document');
86
92
  return;
87
93
  }
88
94
  opening.value = true;
@@ -189,7 +195,7 @@ async function onSearchKeydown(event: KeyboardEvent) {
189
195
  >
190
196
  <component
191
197
  :is="
192
- choice.file && isDataTableFilePath(choice.file.path)
198
+ choice.id === 'create-table' || (choice.file && isDataTableFilePath(choice.file.path))
193
199
  ? Table2
194
200
  : choice.file
195
201
  ? FileText
@@ -7,7 +7,6 @@ export function documentTabLabel(tab: DocumentTab): string {
7
7
  if (tab.pluginDetail) return tab.pluginDetail.name;
8
8
  if (tab.directory) return t(tab.directory.name);
9
9
  if (tab.dataTable) return tab.dataTable.name;
10
- if (tab.workspaceView) return tab.workspaceView.view.name;
11
10
  if (tab.graph) return t('关系图谱');
12
11
  if (tab.plugins) return t('插件');
13
12
  if (tab.calendar) return t('计划');
@@ -175,19 +175,6 @@ const sidebarOptions = [
175
175
  </div>
176
176
  <p v-if="exportError" class="settings-notice" role="alert">{{ exportError }}</p>
177
177
  </section>
178
- <section class="settings-section" :aria-label="t('浏览统计')">
179
- <h3>{{ t('浏览统计') }}</h3>
180
- <div class="settings-card">
181
- <div class="settings-row is-disabled" data-settings-key="workspace-page-views"><div><strong>{{ t('保存并显示页面浏览统计') }} <span class="settings-scope">{{ t('尚未开放') }}</span></strong><p>{{ t('页面浏览量统计尚未实现,当前不会收集浏览数据。') }}</p></div><button type="button" class="settings-switch" role="switch" :aria-label="t('保存并显示页面浏览统计')" aria-checked="false" disabled><span /></button></div>
182
- </div>
183
- </section>
184
- <section class="settings-section" :aria-label="t('人物')">
185
- <h3>{{ t('人物') }}</h3>
186
- <div class="settings-card">
187
- <div class="settings-row" data-settings-key="workspace-people"><div><strong>{{ t('人物目录') }}</strong><p>{{ t('在工作区对象列表中显示人物;关闭后仍可通过已有引用访问人物。') }}</p></div><button type="button" class="settings-switch" :class="{ on: settings.showPeopleDirectory }" role="switch" :aria-label="t('人物目录')" :aria-checked="settings.showPeopleDirectory" :disabled="disabled" @click="change({ key: 'showPeopleDirectory', value: !settings.showPeopleDirectory, previous: settings.showPeopleDirectory })"><span /></button></div>
188
- <div v-for="label in [t('在人物资料中显示近期活动'), t('人物悬浮卡片')]" :key="label" class="settings-row is-disabled"><div><strong>{{ t(label) }} <span class="settings-scope">{{ t('尚未开放') }}</span></strong><p>{{ label === t('人物悬浮卡片') ? t('悬停时展示人物资料的卡片尚未实现。') : t('人物的编辑与评论活动展示尚未实现。') }}</p></div><button type="button" class="settings-switch" role="switch" :aria-label="t(label)" aria-checked="false" disabled><span /></button></div>
189
- </div>
190
- </section>
191
178
  <section v-if="workspace?.id" class="settings-section" :aria-label="t('工作区 ID')">
192
179
  <h3>{{ t('工作区 ID') }}</h3>
193
180
  <div class="settings-card">
@@ -10,6 +10,13 @@ import { Search, Upload } from 'lucide-vue-next';
10
10
  import WorkspaceIcon from './WorkspaceIcon.vue';
11
11
  import { filterWorkspaceIconGroups, workspaceBuiltinIconGroups, workspaceEmojiGroups } from '../workspace-icons';
12
12
 
13
+ export interface WorkspaceIconPickerExtraTab {
14
+ id: string;
15
+ label: string;
16
+ matches?: (icon: string) => boolean;
17
+ defaultOpen?: boolean;
18
+ }
19
+
13
20
  const props = withDefaults(defineProps<{
14
21
  icon: string;
15
22
  mode: 'demo' | 'web' | 'local';
@@ -18,6 +25,7 @@ const props = withDefaults(defineProps<{
18
25
  triggerClass?: string;
19
26
  align?: 'start' | 'end';
20
27
  allowUpload?: boolean;
28
+ extraTab?: WorkspaceIconPickerExtraTab;
21
29
  }>(), { align: 'end', allowUpload: true });
22
30
  const label = computed(() => props.label ?? t('工作区图标'));
23
31
  const emit = defineEmits<{ select: [value: string]; upload: []; pasteImage: [file: File]; 'update:open': [value: boolean] }>();
@@ -31,13 +39,16 @@ const open = ref(false);
31
39
  // movement of the document underneath the teleported picker.
32
40
  let anchorRect: DOMRect | undefined;
33
41
  watch(open, value => emit('update:open', value), { flush: 'sync' });
34
- const tabs = [
42
+ const baseTabs = [
35
43
  { id: 'emoji', get label() { return t('表情符号'); } },
36
44
  { id: 'icons', get label() { return t('图标'); } },
37
45
  { id: 'upload', get label() { return t('上传'); } },
38
46
  ] as const;
39
- const visibleTabs = computed(() => tabs.filter(item => props.allowUpload || item.id !== 'upload'));
40
- type Tab = typeof tabs[number]['id'];
47
+ const visibleTabs = computed(() => [
48
+ ...(props.extraTab ? [{ id: props.extraTab.id, label: props.extraTab.label }] : []),
49
+ ...baseTabs.filter(item => props.allowUpload || item.id !== 'upload'),
50
+ ]);
51
+ type Tab = string;
41
52
  const tab = ref<Tab>('emoji');
42
53
  const query = ref('');
43
54
  const currentCategory = ref('');
@@ -106,7 +117,10 @@ function place() {
106
117
  async function toggle() {
107
118
  if (props.disabled) return;
108
119
  if (open.value) { close(); return; }
109
- tab.value = props.icon.startsWith('icon:') ? 'icons' : 'emoji';
120
+ if (props.extraTab?.matches?.(props.icon)) tab.value = props.extraTab.id;
121
+ else if (props.icon.startsWith('icon:')) tab.value = 'icons';
122
+ else if ((!props.icon || props.icon.startsWith('data:')) && props.extraTab?.defaultOpen) tab.value = props.extraTab.id;
123
+ else tab.value = 'emoji';
110
124
  query.value = ''; focusedIcon.value = '';
111
125
  anchorRect = trigger.value?.getBoundingClientRect();
112
126
  place();
@@ -114,7 +128,11 @@ async function toggle() {
114
128
  await nextTick();
115
129
  place();
116
130
  resetScroll();
117
- searchInput.value?.focus({ preventScroll: true });
131
+ if (tab.value === 'emoji' || tab.value === 'icons') {
132
+ searchInput.value?.focus({ preventScroll: true });
133
+ } else {
134
+ panel.value?.querySelector<HTMLElement>('[data-icon-choice][aria-pressed="true"], [data-icon-choice], [role="tab"][aria-selected="true"]')?.focus({ preventScroll: true });
135
+ }
118
136
  }
119
137
  function close(restoreFocus = false) {
120
138
  open.value = false;
@@ -238,7 +256,10 @@ onBeforeUnmount(() => {
238
256
  <button type="button" class="workspace-icon-picker-remove" :disabled="disabled || !icon" @click="select('')">{{ t('移除') }}</button>
239
257
  </header>
240
258
  <div :id="`${pickerId}-content`" class="workspace-icon-picker-content" role="tabpanel" :aria-labelledby="`${pickerId}-${tab}-tab`">
241
- <template v-if="tab !== 'upload'">
259
+ <template v-if="extraTab && tab === extraTab.id">
260
+ <slot name="extra-tab" :select="select" :close="close" :disabled="disabled" :icon="icon" />
261
+ </template>
262
+ <template v-else-if="tab !== 'upload'">
242
263
  <label class="workspace-icon-picker-search"><Search :size="15" aria-hidden="true" /><input ref="searchInput" v-model="query" :aria-label="t('筛选图标')" :placeholder="t('筛选…')" /></label>
243
264
  <div ref="scrollArea" class="workspace-icon-picker-scroll" @scroll="syncCategory">
244
265
  <section v-for="group in filteredGroups" :id="`${pickerId}-${group.id}`" :key="group.id" class="workspace-icon-picker-group" :data-category="group.id" :aria-label="group.label">
@@ -267,6 +288,7 @@ onBeforeUnmount(() => {
267
288
  <p class="workspace-icon-picker-upload-title">{{ t('上传{0}', [label]) }}</p>
268
289
  <div class="workspace-icon-picker-upload-actions">
269
290
  <button type="button" class="settings-button" :disabled="disabled" @click="upload">{{ t('选择图片') }}</button>
291
+ <slot name="upload-actions" :close="close" />
270
292
  <p class="workspace-icon-picker-upload-paste">{{ t('或按') }} <kbd>Ctrl+V</kbd> {{ t('粘贴图片') }}</p>
271
293
  </div>
272
294
  </div>