@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
@@ -3,7 +3,6 @@ import { inject, toRefs } from 'vue';
3
3
  import {
4
4
  AppWindow,
5
5
  ArrowDownToLine,
6
- Blocks,
7
6
  Check,
8
7
  CopyPlus,
9
8
  Eye,
@@ -174,6 +173,13 @@ const {
174
173
  >
175
174
  <FolderPlus :size="15" />{{ t('在此新建文件夹') }}
176
175
  </button>
176
+ <button
177
+ role="menuitem"
178
+ :disabled="fileMutationDisabled(fileContextMenu.file)"
179
+ @click="fileContextAction('table')"
180
+ >
181
+ <Table2 :size="15" />{{ t('在此新建数据表') }}
182
+ </button>
177
183
  <button
178
184
  role="menuitem"
179
185
  :disabled="
@@ -219,6 +225,13 @@ const {
219
225
  >
220
226
  <PanelsTopLeft :size="15" />{{ t('在新标签页中打开') }}
221
227
  </button>
228
+ <button
229
+ v-if="store.hasMarkdownFileHandler(fileContextMenu.file)"
230
+ role="menuitem"
231
+ @click="fileContextAction('open-markdown-source')"
232
+ >
233
+ <FileText :size="15" />{{ t('用 Markdown 源码打开') }}
234
+ </button>
222
235
  <div
223
236
  v-if="
224
237
  isMarkdown(fileContextMenu.file.path) ||
@@ -358,13 +371,6 @@ const {
358
371
  >
359
372
  <FileSliders :size="15" />{{ t('文件属性') }}
360
373
  </button>
361
- <button
362
- v-if="!isWorkspaceInternalPath(fileContextMenu.file.path)"
363
- role="menuitem"
364
- @click="fileContextAction('object')"
365
- >
366
- <Blocks :size="15" />{{ t('查看文件对象') }}
367
- </button>
368
374
  </template>
369
375
  <PluginMenu
370
376
  v-if="fileContextMenu.file.kind === 'file'"
@@ -423,6 +429,13 @@ const {
423
429
  >
424
430
  <FolderPlus :size="15" />{{ t('新建文件夹') }}
425
431
  </button>
432
+ <button
433
+ role="menuitem"
434
+ :disabled="!workspace || workspace.readOnly || busy"
435
+ @click="directoryContextAction('table')"
436
+ >
437
+ <Table2 :size="15" />{{ t('新建数据表') }}
438
+ </button>
426
439
  <button
427
440
  v-if="!directoryContextMenu.parent"
428
441
  role="menuitem"
@@ -9,15 +9,16 @@ import {
9
9
  DocumentHistoryPanel,
10
10
  ImportPanel,
11
11
  MobileRecycle,
12
- ObjectPanel,
12
+ ObjectDetailModal,
13
+ PlanArchiveDialog,
13
14
  PlanDetailPanel,
14
15
  SelectionTodoDialog,
15
16
  } from '../workbench-async-components';
16
17
  import { workbenchContextKey } from '../workbench-context';
17
18
  import CommandPalette from './CommandPalette.vue';
18
19
  import NewTabPicker from '../../tabs/components/NewTabPicker.vue';
20
+ import PluginUiDialog from '../../plugins/components/PluginUiDialog.vue';
19
21
  import WorkbenchSettings from '../../settings/components/WorkbenchSettings.vue';
20
- import WorkspaceSyncPanel from '../../workspace/components/WorkspaceSyncPanel.vue';
21
22
 
22
23
  const context = inject(workbenchContextKey);
23
24
  if (!context) throw new Error('Workbench context is required');
@@ -30,8 +31,6 @@ const {
30
31
  importPanel,
31
32
  attachments,
32
33
  importRecords,
33
- systemSyncPanel,
34
- workspaceSync,
35
34
  extensions,
36
35
  extensionActions,
37
36
  recyclePanel,
@@ -41,19 +40,12 @@ const {
41
40
  active,
42
41
  activities,
43
42
  historyPage,
44
- importObjectAssets,
45
- objectPanelMounted,
46
- objectPanel,
47
- selectedObjectId,
48
- selectedResourceIdentity,
49
- selectedPersonal,
50
- plans,
51
- assetImportBusy,
52
- assetPreview,
53
- openObjectResource,
43
+ objectDetail,
44
+ planArchiveOpen,
45
+ calendarScope,
54
46
  openObjectReference,
55
47
  createNewDocument,
56
- assetInput,
48
+ createNewEntry,
57
49
  planDetail,
58
50
  openPlanReference,
59
51
  selectionTodo,
@@ -94,13 +86,6 @@ const {
94
86
  @close="importPanel = false"
95
87
  @completed="importRecords.unshift($event)"
96
88
  />
97
- <WorkspaceSyncPanel
98
- v-if="systemSyncPanel && workspace"
99
- :workspace-id="workspace.id"
100
- :controller="workspaceSync"
101
- :cloud="extensions.sync"
102
- @close="systemSyncPanel = false"
103
- />
104
89
  <component
105
90
  :is="extensions.regions['sync-dialog']"
106
91
  v-if="extensions.regions['sync-dialog']"
@@ -137,31 +122,20 @@ const {
137
122
  selectedDiff = $event;
138
123
  "
139
124
  />
140
- <input
141
- :ref="(el) => { context.assetInput = (el as HTMLInputElement | null) ?? undefined; }"
142
- type="file"
143
- multiple
144
- hidden
145
- @change="importObjectAssets"
146
- />
147
- <ObjectPanel
148
- v-if="objectPanelMounted"
149
- v-show="objectPanel"
150
- :open="objectPanel"
151
- :selected-id="selectedObjectId"
152
- :selected-identity="selectedResourceIdentity"
153
- :personal="selectedPersonal ? plans.panel : undefined"
154
- :can-open-asset="!!attachments"
155
- :can-import-asset="!!attachments && !assetImportBusy"
156
- :preview-asset="assetPreview"
157
- @close="objectPanel = false"
158
- @open-resource="openObjectResource"
125
+ <ObjectDetailModal
126
+ v-if="objectDetail && workspace"
127
+ :key="`${workspace.id}:${objectDetail.record?.object.id ?? `new:${objectDetail.initialType ?? ''}`}`"
128
+ :record="objectDetail.record"
129
+ :initial-type="objectDetail.initialType"
130
+ @close="objectDetail = undefined"
159
131
  @open-reference="openObjectReference"
160
- @create-document="
161
- objectPanel = false;
162
- createNewDocument();
163
- "
164
- @import-asset="assetInput?.click()"
132
+ @saved="objectDetail = { record: $event }"
133
+ />
134
+ <PlanArchiveDialog
135
+ v-if="planArchiveOpen"
136
+ :scope="calendarScope"
137
+ @close="planArchiveOpen = false"
138
+ @select-event="showPlanEvent"
165
139
  />
166
140
  <PlanDetailPanel
167
141
  v-if="planDetail"
@@ -207,6 +181,7 @@ const {
207
181
  v-if="modal === 'newTab'"
208
182
  @close="modal = ''"
209
183
  @new-document="createNewDocument"
184
+ @new-table="createNewEntry('table')"
210
185
  />
211
186
  <div
212
187
  v-surface-motion="'App:8'"
@@ -369,6 +344,12 @@ const {
369
344
  </form>
370
345
  </section>
371
346
  </div>
347
+ <PluginUiDialog
348
+ :dialog="store.activePluginDialog"
349
+ :toasts="store.pluginToasts"
350
+ @resolve="store.resolvePluginDialog"
351
+ @dismiss-toast="store.dismissPluginToast"
352
+ />
372
353
  </WindowScope>
373
354
  </Teleport>
374
355
  </template>