@kortix/ui 0.15.11 → 0.16.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 (398) hide show
  1. package/dist/_vendor/kortix-shared.js +478 -179
  2. package/dist/_vendor/shared/my-kortix-agent.d.ts +5 -3
  3. package/dist/_vendor/shared/session/attachment-tile.d.ts +8 -0
  4. package/dist/_vendor/shared/workspace-settings.d.ts +3 -0
  5. package/dist/access/access/copy-row.d.ts +7 -1
  6. package/dist/access/access/copy-row.js +2 -2
  7. package/dist/animated-copy-icon.js +2 -1
  8. package/dist/browser/sandbox-browser-chrome.d.ts +2 -1
  9. package/dist/browser/sandbox-browser-chrome.js +1 -1
  10. package/dist/customize/agents/agent-cover-card.d.ts +1 -1
  11. package/dist/customize/agents/agent-cover-card.js +10 -2
  12. package/dist/customize/agents/agent-filter.js +3 -1
  13. package/dist/customize/agents/agent-overview.d.ts +10 -0
  14. package/dist/customize/agents/agent-overview.js +5 -4
  15. package/dist/customize/agents/agent-page-chrome.d.ts +5 -6
  16. package/dist/customize/agents/agent-page-chrome.js +16 -13
  17. package/dist/customize/agents/agent-page.js +6 -28
  18. package/dist/customize/agents/agent-tabs.d.ts +1 -0
  19. package/dist/customize/agents/agent-tabs.js +1 -0
  20. package/dist/customize/agents/agents-page.js +3 -3
  21. package/dist/customize/agents/create-agent-modal.d.ts +9 -0
  22. package/dist/customize/agents/create-agent-modal.js +21 -3
  23. package/dist/customize/agents/use-default-agent.js +2 -2
  24. package/dist/customize/connectors/connector-identity.d.ts +11 -2
  25. package/dist/customize/connectors/connector-identity.js +16 -4
  26. package/dist/customize/connectors/connectors-page.js +10 -6
  27. package/dist/customize/connectors/detail/app-page.js +2 -2
  28. package/dist/customize/connectors/install/install-dialog.d.ts +2 -0
  29. package/dist/customize/connectors/install/install-dialog.js +6 -1
  30. package/dist/customize/connectors/use-agent-access.d.ts +1 -0
  31. package/dist/customize/evals/eval-compare-view.d.ts +10 -0
  32. package/dist/customize/evals/eval-compare-view.js +68 -0
  33. package/dist/customize/evals/eval-dataset-view.d.ts +20 -0
  34. package/dist/customize/evals/eval-dataset-view.js +81 -0
  35. package/dist/customize/evals/eval-datasets-page.d.ts +25 -0
  36. package/dist/customize/evals/eval-datasets-page.js +91 -0
  37. package/dist/customize/evals/eval-job-view.d.ts +12 -0
  38. package/dist/customize/evals/eval-job-view.js +360 -0
  39. package/dist/customize/evals/eval-jobs-page.d.ts +4 -0
  40. package/dist/customize/evals/eval-jobs-page.js +69 -0
  41. package/dist/customize/evals/eval-meta.d.ts +97 -0
  42. package/dist/customize/evals/eval-meta.js +228 -0
  43. package/dist/customize/evals/eval-task-view.d.ts +13 -0
  44. package/dist/customize/evals/eval-task-view.js +123 -0
  45. package/dist/customize/evals/eval-tasks-page.d.ts +8 -0
  46. package/dist/customize/evals/eval-tasks-page.js +56 -0
  47. package/dist/customize/evals/eval-ui.d.ts +97 -0
  48. package/dist/customize/evals/eval-ui.js +153 -0
  49. package/dist/customize/evals/evals-page.d.ts +10 -0
  50. package/dist/customize/evals/evals-page.js +56 -0
  51. package/dist/customize/evals/run-eval-modal.d.ts +28 -0
  52. package/dist/customize/evals/run-eval-modal.js +167 -0
  53. package/dist/customize/project-settings/project-admin-sections.d.ts +3 -2
  54. package/dist/customize/project-settings/project-admin-sections.js +6 -1
  55. package/dist/customize/providers/provider-connect.d.ts +13 -0
  56. package/dist/customize/providers/provider-connect.js +29 -5
  57. package/dist/customize/providers/provider-sheet.js +5 -4
  58. package/dist/customize/sections/view/gateway/gateway-overview.d.ts +5 -0
  59. package/dist/customize/sections/view/gateway/gateway-overview.js +32 -6
  60. package/dist/customize/sections/view/gateway/routing-parts.d.ts +6 -0
  61. package/dist/customize/sections/view/gateway/routing-parts.js +21 -13
  62. package/dist/customize/sections/view/git-view.d.ts +19 -1
  63. package/dist/customize/sections/view/git-view.js +7 -3
  64. package/dist/customize/sections/view/manifest-issue-list.d.ts +16 -0
  65. package/dist/customize/sections/view/manifest-issue-list.js +41 -0
  66. package/dist/customize/sections/view/manifest-issues-row.d.ts +24 -0
  67. package/dist/customize/sections/view/manifest-issues-row.js +39 -0
  68. package/dist/customize/sections/view/sandbox-provider-coverage.d.ts +7 -1
  69. package/dist/customize/sections/view/sandbox-provider-coverage.js +7 -5
  70. package/dist/customize/sections/view/secrets-view.d.ts +13 -0
  71. package/dist/customize/sections/view/secrets-view.js +10 -6
  72. package/dist/customize/sections/view/subscription-usage.d.ts +2 -7
  73. package/dist/customize/sections/view/subscription-usage.js +4 -8
  74. package/dist/customize/settings/settings-tab-header.js +12 -3
  75. package/dist/customize/settings/tabs/experimental-tab.d.ts +16 -5
  76. package/dist/customize/settings/tabs/experimental-tab.js +36 -11
  77. package/dist/customize/settings/tabs/general-tab.js +1 -1
  78. package/dist/customize/settings/tabs/sandbox-tab.d.ts +10 -0
  79. package/dist/customize/settings/tabs/sandbox-tab.js +27 -4
  80. package/dist/customize/settings/tabs/snapshots-tab.d.ts +31 -0
  81. package/dist/customize/settings/tabs/snapshots-tab.js +61 -5
  82. package/dist/customize/settings/tabs/workspace-keys.js +6 -3
  83. package/dist/customize/shared/capability-page-shell.js +9 -1
  84. package/dist/customize/shared/catalog/catalog-card.d.ts +1 -1
  85. package/dist/customize/shared/catalog/catalog-card.js +15 -5
  86. package/dist/customize/shared/customize-tab-bar.js +1 -1
  87. package/dist/customize/shared/new-entity-menu.d.ts +1 -1
  88. package/dist/customize/shared/new-entity-menu.js +38 -1
  89. package/dist/customize/triggers/runtime-triggers.d.ts +4 -0
  90. package/dist/customize/triggers/runtime-triggers.js +21 -2
  91. package/dist/customize/triggers/schedule/post-to-field.js +2 -2
  92. package/dist/customize/triggers/schedule-view.js +2 -1
  93. package/dist/files/project/components/drive-explorer.js +33 -70
  94. package/dist/files/project/components/drive-grid-view.d.ts +2 -31
  95. package/dist/files/project/components/drive-grid-view.js +12 -22
  96. package/dist/files/project/components/drive-list-view.d.ts +3 -30
  97. package/dist/files/project/components/drive-list-view.js +8 -18
  98. package/dist/files/project/components/drive-selection-bar.d.ts +4 -5
  99. package/dist/files/project/components/drive-selection-bar.js +13 -20
  100. package/dist/files/project/components/explorer-listing.d.ts +48 -0
  101. package/dist/files/project/components/explorer-listing.js +64 -0
  102. package/dist/files/project/components/file-explorer-page.js +7 -204
  103. package/dist/files/project/components/file-thumbnail.js +3 -1
  104. package/dist/files/project/components/manifest-issue-mark.d.ts +9 -0
  105. package/dist/files/project/components/manifest-issue-mark.js +26 -0
  106. package/dist/files/project/hooks/use-change-requests.d.ts +10 -0
  107. package/dist/files/project/hooks/use-change-requests.js +17 -0
  108. package/dist/files/project/manifest-annotations.d.ts +16 -0
  109. package/dist/files/project/manifest-annotations.js +19 -0
  110. package/dist/files/project/store/version-store.d.ts +1 -1
  111. package/dist/files/project/upload-batch.d.ts +20 -0
  112. package/dist/files/project/upload-batch.js +20 -0
  113. package/dist/files/runtime/hooks/use-binary-blob.js +3 -2
  114. package/dist/files/runtime/hooks/use-file-content.js +3 -2
  115. package/dist/files/runtime/hooks/use-file-list.js +1 -2
  116. package/dist/files/runtime/hooks/use-file-mutations.js +69 -6
  117. package/dist/files/runtime/hooks/use-file-refresh.d.ts +4 -0
  118. package/dist/files/runtime/hooks/use-file-refresh.js +6 -0
  119. package/dist/files/tree/components/file-tree-item.js +1 -4
  120. package/dist/files/viewer/file-annotations.d.ts +18 -0
  121. package/dist/files/viewer/file-annotations.js +21 -0
  122. package/dist/files/viewer/file-content-renderer.js +1 -1
  123. package/dist/files/viewer/file-viewer.js +2 -1
  124. package/dist/files/viewer/index.d.ts +1 -0
  125. package/dist/files/viewer/index.js +1 -0
  126. package/dist/files/viewer/use-file-content-state.js +8 -1
  127. package/dist/i18n/en.d.ts +495 -46
  128. package/dist/i18n/en.js +536 -87
  129. package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +0 -4
  130. package/dist/icons/caret-right-solid.d.ts +11 -0
  131. package/dist/icons/caret-right-solid.js +15 -0
  132. package/dist/internal/auth/auth-art.d.ts +12 -0
  133. package/dist/internal/auth/auth-art.js +118 -0
  134. package/dist/internal/auth/auth-card-shell.d.ts +14 -10
  135. package/dist/internal/auth/auth-card-shell.js +20 -31
  136. package/dist/internal/auth/auth-consent.d.ts +3 -1
  137. package/dist/internal/auth/auth-consent.js +2 -2
  138. package/dist/internal/auth/auth-primitives.d.ts +26 -1
  139. package/dist/internal/auth/auth-primitives.js +37 -8
  140. package/dist/internal/connector-logo/connector-logo.d.ts +2 -1
  141. package/dist/internal/connector-logo/connector-logo.js +11 -2
  142. package/dist/internal/files/file-read-retry.d.ts +18 -2
  143. package/dist/internal/files/file-read-retry.js +42 -4
  144. package/dist/internal/hooks/projects/use-new-project-session.js +5 -10
  145. package/dist/internal/hooks/use-auto-scroll-physics.d.ts +1 -1
  146. package/dist/internal/hooks/use-auto-scroll-physics.js +2 -10
  147. package/dist/internal/hooks/use-reduced-motion.d.ts +4 -0
  148. package/dist/internal/hooks/use-reduced-motion.js +12 -0
  149. package/dist/internal/hooks/use-save-shortcut.d.ts +8 -0
  150. package/dist/internal/hooks/use-save-shortcut.js +28 -0
  151. package/dist/internal/layout/connect-mcp-modal.d.ts +1 -1
  152. package/dist/internal/layout/connect-mcp-modal.js +9 -4
  153. package/dist/internal/layout/panel-chrome.d.ts +28 -0
  154. package/dist/internal/layout/panel-chrome.js +27 -0
  155. package/dist/internal/layout/project-page-header.js +5 -1
  156. package/dist/internal/lib/browser-noise/rules/webview.js +16 -0
  157. package/dist/internal/lib/manifest-health.d.ts +25 -1
  158. package/dist/internal/lib/manifest-health.js +56 -0
  159. package/dist/internal/lib/project-preamble.js +1 -1
  160. package/dist/internal/lib/web-notifications.d.ts +1 -1
  161. package/dist/internal/lib/web-notifications.js +3 -0
  162. package/dist/internal/notifications/notification-inbox.js +2 -1
  163. package/dist/internal/notifications/notification-rows.d.ts +1 -1
  164. package/dist/internal/notifications/notification-rows.js +15 -1
  165. package/dist/internal/selection/selection-bar.d.ts +2 -8
  166. package/dist/internal/selection/selection-bar.js +15 -38
  167. package/dist/internal/stores/active-space-store.d.ts +1 -1
  168. package/dist/internal/stores/browser-recents-store.d.ts +1 -1
  169. package/dist/internal/stores/current-account-store.d.ts +1 -1
  170. package/dist/internal/stores/first-chat-store.d.ts +1 -1
  171. package/dist/internal/stores/mobile-app-promo-store.d.ts +1 -1
  172. package/dist/internal/stores/session-browser-store.d.ts +1 -1
  173. package/dist/internal/stores/session-expanded-store.d.ts +1 -1
  174. package/dist/internal/stores/session-filter-store.d.ts +1 -1
  175. package/dist/internal/stores/session-history-view-store.d.ts +1 -1
  176. package/dist/internal/stores/session-panel-memory-store.d.ts +1 -1
  177. package/dist/internal/stores/sound-store.d.ts +1 -1
  178. package/dist/internal/stores/tab-store.d.ts +1 -1
  179. package/dist/internal/stores/user-preferences-store.d.ts +9 -1
  180. package/dist/internal/stores/user-preferences-store.js +2 -0
  181. package/dist/internal/stores/web-notification-store.d.ts +1 -1
  182. package/dist/lib/base-ui-compat.js +28 -1
  183. package/dist/lib/dotmatrix-hooks.d.ts +1 -0
  184. package/dist/lib/dotmatrix-hooks.js +3 -13
  185. package/dist/lib/reduced-motion.d.ts +10 -0
  186. package/dist/lib/reduced-motion.js +104 -0
  187. package/dist/lib/routes.d.ts +9 -0
  188. package/dist/lib/routes.js +7 -4
  189. package/dist/markdown/artifact-link.d.ts +11 -0
  190. package/dist/markdown/artifact-link.js +62 -0
  191. package/dist/markdown/code/index.d.ts +1 -1
  192. package/dist/markdown/code/index.js +1 -1
  193. package/dist/markdown/code/inline-code.d.ts +1 -1
  194. package/dist/markdown/code/inline-code.js +1 -1
  195. package/dist/markdown/genui/components/map-canvas.js +2 -1
  196. package/dist/markdown/index.d.ts +3 -1
  197. package/dist/markdown/index.js +2 -1
  198. package/dist/markdown/{code/inline-chip.js → inline-chip.js} +2 -2
  199. package/dist/markdown/inline-code-text.d.ts +34 -0
  200. package/dist/markdown/inline-code-text.js +68 -0
  201. package/dist/markdown/setup-links/approval-decision.js +3 -3
  202. package/dist/markdown/soft-breaks.d.ts +21 -0
  203. package/dist/markdown/soft-breaks.js +33 -0
  204. package/dist/markdown/unified-markdown.d.ts +9 -1
  205. package/dist/markdown/unified-markdown.js +31 -9
  206. package/dist/primitives/action-bar.d.ts +50 -0
  207. package/dist/primitives/action-bar.js +87 -0
  208. package/dist/primitives/calendar.js +4 -2
  209. package/dist/primitives/inline-meta.js +2 -2
  210. package/dist/primitives/kortix-loader.js +2 -1
  211. package/dist/primitives/modal.d.ts +1 -1
  212. package/dist/primitives/paper-wallpaper-shaders.d.ts +1 -0
  213. package/dist/primitives/paper-wallpaper-shaders.js +6 -0
  214. package/dist/primitives/resizable.d.ts +1 -1
  215. package/dist/primitives/resize-seam.d.ts +3 -2
  216. package/dist/primitives/resize-seam.js +4 -3
  217. package/dist/primitives/settings-section-header.d.ts +30 -1
  218. package/dist/primitives/settings-section-header.js +37 -0
  219. package/dist/primitives/sliding-tab-indicator.js +2 -1
  220. package/dist/primitives/switch.js +15 -8
  221. package/dist/primitives/text-shimmer.js +6 -0
  222. package/dist/primitives/toast-clearance.d.ts +52 -0
  223. package/dist/primitives/toast-clearance.js +116 -0
  224. package/dist/primitives/toast.d.ts +3 -1
  225. package/dist/primitives/toast.js +2 -0
  226. package/dist/primitives/typed-title.js +1 -1
  227. package/dist/primitives/wallpaper-shaders.js +1 -1
  228. package/dist/session/actions/project-session-list-helpers.d.ts +16 -0
  229. package/dist/session/actions/project-session-list-helpers.js +18 -0
  230. package/dist/session/agents/agent-model.d.ts +1 -0
  231. package/dist/session/agents/agent-model.js +2 -1
  232. package/dist/session/agents/agent-strip.js +10 -4
  233. package/dist/session/agents/workflow-run-controls.d.ts +27 -4
  234. package/dist/session/agents/workflow-run-controls.js +63 -10
  235. package/dist/session/composer/ComposerCard.js +3 -0
  236. package/dist/session/composer/agent-selector.js +6 -4
  237. package/dist/session/composer/animated-placeholder.js +2 -1
  238. package/dist/session/composer/attachment-tile.d.ts +2 -2
  239. package/dist/session/composer/attachment-tile.js +25 -3
  240. package/dist/session/composer/composer-agent-access.d.ts +10 -1
  241. package/dist/session/composer/composer-agent-access.js +18 -4
  242. package/dist/session/composer/composer-chat-input.js +7 -2
  243. package/dist/session/composer/composer.d.ts +2 -2
  244. package/dist/session/composer/composer.js +7 -6
  245. package/dist/session/composer/hooks/use-file-search.d.ts +12 -2
  246. package/dist/session/composer/hooks/use-file-search.js +71 -7
  247. package/dist/session/composer/menus/menu-items.js +6 -2
  248. package/dist/session/composer/menus/menu-shell.d.ts +3 -1
  249. package/dist/session/composer/menus/menu-shell.js +2 -2
  250. package/dist/session/composer/menus/slash-menu.d.ts +7 -0
  251. package/dist/session/composer/menus/slash-menu.js +48 -1
  252. package/dist/session/composer/use-instant-session-send.js +7 -1
  253. package/dist/session/header/session-reminders-indicator.js +3 -2
  254. package/dist/session/header/session-site-header.js +24 -6
  255. package/dist/session/media/sandbox-url-detector.js +1 -1
  256. package/dist/session/models/model-connection-gate.js +2 -1
  257. package/dist/session/models/model-selector.js +1 -1
  258. package/dist/session/models/subscription-switcher.d.ts +7 -0
  259. package/dist/session/models/subscription-switcher.js +52 -10
  260. package/dist/session/models/subscription-windows.d.ts +2 -0
  261. package/dist/session/models/subscription-windows.js +2 -0
  262. package/dist/session/outcomes/session-outcomes-provider.js +14 -7
  263. package/dist/session/panel/action-panel.js +8 -19
  264. package/dist/session/panel/easy/app-preview.d.ts +4 -1
  265. package/dist/session/panel/easy/app-preview.js +95 -33
  266. package/dist/session/panel/easy/apps-card.js +6 -11
  267. package/dist/session/panel/easy/change-requests-card.js +1 -1
  268. package/dist/session/panel/easy/changes-card.d.ts +14 -0
  269. package/dist/session/panel/easy/changes-card.js +60 -0
  270. package/dist/session/panel/easy/context-card.d.ts +5 -1
  271. package/dist/session/panel/easy/context-card.js +13 -28
  272. package/dist/session/panel/easy/context-meter.d.ts +18 -0
  273. package/dist/session/panel/easy/context-meter.js +73 -0
  274. package/dist/session/panel/easy/detail-view.d.ts +1 -1
  275. package/dist/session/panel/easy/detail-view.js +24 -21
  276. package/dist/session/panel/easy/easy-panel.js +7 -5
  277. package/dist/session/panel/easy/file-preview.js +3 -1
  278. package/dist/session/panel/easy/frame-history.d.ts +91 -0
  279. package/dist/session/panel/easy/frame-history.js +198 -0
  280. package/dist/session/panel/easy/outputs-card.d.ts +10 -0
  281. package/dist/session/panel/easy/outputs-card.js +28 -31
  282. package/dist/session/panel/easy/panel-card.d.ts +1 -3
  283. package/dist/session/panel/easy/panel-card.js +24 -8
  284. package/dist/session/panel/easy/plan-card.js +2 -2
  285. package/dist/session/panel/easy/step-icon.d.ts +4 -1
  286. package/dist/session/panel/easy/step-icon.js +2 -2
  287. package/dist/session/panel/session-action-panel-column.d.ts +5 -0
  288. package/dist/session/panel/session-action-panel-column.js +198 -101
  289. package/dist/session/panel/session-desktop.js +5 -1
  290. package/dist/session/panel/session-diff-viewer.d.ts +3 -1
  291. package/dist/session/panel/session-diff-viewer.js +7 -4
  292. package/dist/session/panel/session-panel-provider.js +29 -5
  293. package/dist/session/panel/shared/derive-panels.js +64 -4
  294. package/dist/session/status/session-busy-indicator.js +2 -1
  295. package/dist/session/status/session-error-banner.js +1 -1
  296. package/dist/session/thread/chat-minimap.js +2 -1
  297. package/dist/session/thread/session-body.js +4 -1
  298. package/dist/session/thread/session-chat.js +18 -3
  299. package/dist/session/thread/session-turn-meta-rows.d.ts +13 -5
  300. package/dist/session/thread/session-turn-meta-rows.js +33 -5
  301. package/dist/session/thread/transcript.d.ts +1 -2
  302. package/dist/session/thread/transcript.js +26 -24
  303. package/dist/session/thread/typing-indicator.d.ts +2 -2
  304. package/dist/session/thread/typing-indicator.js +10 -3
  305. package/dist/session/tool/tools/session-spawn-tool.js +3 -3
  306. package/dist/session/tool/tools/workflow-run-card.d.ts +11 -1
  307. package/dist/session/tool/tools/workflow-run-card.js +31 -7
  308. package/dist/session/tool/tools/workflow-run-cost.d.ts +29 -0
  309. package/dist/session/tool/tools/workflow-run-cost.js +75 -0
  310. package/dist/session/tool/tools/workflow-tool.d.ts +1 -1
  311. package/dist/session/tool/tools/workflow-tool.js +40 -15
  312. package/dist/session/turn/peer-message-row.js +1 -1
  313. package/dist/session/turn/queued-prompt-bubbles.d.ts +3 -2
  314. package/dist/session/turn/queued-prompt-bubbles.js +1 -1
  315. package/dist/session/turn/throttled-markdown.js +1 -1
  316. package/dist/styles/theme.css +68 -0
  317. package/dist/styles.css +1 -1
  318. package/dist/terminal/pty-terminal.js +1 -1
  319. package/dist/terminal/session-terminal-connect-bar.js +2 -1
  320. package/dist/test-utils/intl.d.ts +495 -46
  321. package/dist/workspace/admin/project-admin-dashboard.js +21 -7
  322. package/dist/workspace/admin/settings-search-landing.js +2 -1
  323. package/dist/workspace/calendar/calendar-dates.d.ts +31 -0
  324. package/dist/workspace/calendar/calendar-dates.js +64 -0
  325. package/dist/workspace/calendar/calendar-new-item.d.ts +11 -0
  326. package/dist/workspace/calendar/calendar-new-item.js +47 -0
  327. package/dist/workspace/calendar/calendar-page.d.ts +3 -0
  328. package/dist/workspace/calendar/calendar-page.js +177 -0
  329. package/dist/workspace/calendar/calendar-panel.d.ts +13 -0
  330. package/dist/workspace/calendar/calendar-panel.js +103 -0
  331. package/dist/workspace/calendar/calendar-people.d.ts +52 -0
  332. package/dist/workspace/calendar/calendar-people.js +117 -0
  333. package/dist/workspace/calendar/calendar-scheduled.d.ts +29 -0
  334. package/dist/workspace/calendar/calendar-scheduled.js +118 -0
  335. package/dist/workspace/calendar/calendar-views.d.ts +32 -0
  336. package/dist/workspace/calendar/calendar-views.js +124 -0
  337. package/dist/workspace/calendar/calendar-when.d.ts +14 -0
  338. package/dist/workspace/calendar/calendar-when.js +81 -0
  339. package/dist/workspace/calendar/mention-textarea.d.ts +19 -0
  340. package/dist/workspace/calendar/mention-textarea.js +84 -0
  341. package/dist/workspace/home/access-requests-bell.js +2 -1
  342. package/dist/workspace/inbox/workspace-inbox.d.ts +1 -1
  343. package/dist/workspace/inbox/workspace-inbox.js +1 -1
  344. package/dist/workspace/layout/project-files-view.js +2 -1
  345. package/dist/workspace/memory/memory-page-list.js +1 -1
  346. package/dist/workspace/new/workspace-handoff.js +2 -1
  347. package/dist/workspace/projects/modal/project-icon-field.js +2 -1
  348. package/dist/workspace/session-workspace.js +13 -12
  349. package/dist/workspace/setup/setup-steps.d.ts +43 -0
  350. package/dist/workspace/setup/setup-steps.js +38 -0
  351. package/dist/workspace/setup/workspace-setup-page.d.ts +10 -0
  352. package/dist/workspace/setup/workspace-setup-page.js +124 -0
  353. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +5 -1
  354. package/dist/workspace/sidebar/footer/project-calendar-nav.d.ts +8 -0
  355. package/dist/workspace/sidebar/footer/project-calendar-nav.js +31 -0
  356. package/dist/workspace/sidebar/footer/project-chrome-nav.d.ts +14 -6
  357. package/dist/workspace/sidebar/footer/project-chrome-nav.js +37 -25
  358. package/dist/workspace/sidebar/footer/project-computer-nav.d.ts +17 -9
  359. package/dist/workspace/sidebar/footer/project-computer-nav.js +36 -26
  360. package/dist/workspace/sidebar/footer/project-download-app-nav.d.ts +7 -7
  361. package/dist/workspace/sidebar/footer/project-download-app-nav.js +25 -13
  362. package/dist/workspace/sidebar/footer/project-inbox-nav.d.ts +8 -0
  363. package/dist/workspace/sidebar/footer/project-inbox-nav.js +29 -0
  364. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +3 -13
  365. package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +6 -48
  366. package/dist/workspace/sidebar/footer/project-mcp-nav.d.ts +7 -7
  367. package/dist/workspace/sidebar/footer/project-mcp-nav.js +31 -13
  368. package/dist/workspace/sidebar/footer/project-phone-app-nav.d.ts +10 -0
  369. package/dist/workspace/sidebar/footer/project-phone-app-nav.js +61 -0
  370. package/dist/workspace/sidebar/footer/project-promo-cards.d.ts +21 -0
  371. package/dist/workspace/sidebar/footer/project-promo-cards.js +33 -0
  372. package/dist/workspace/sidebar/footer/promo-card.d.ts +41 -0
  373. package/dist/workspace/sidebar/footer/promo-card.js +47 -0
  374. package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
  375. package/dist/workspace/sidebar/project-nav-items.js +12 -4
  376. package/dist/workspace/sidebar/project-session-list.js +58 -26
  377. package/dist/workspace/sidebar/project-sidebar.js +2 -5
  378. package/dist/workspace/sidebar/project-spaces-nav.js +2 -1
  379. package/dist/workspace/sidebar/session-brief-hover-card.d.ts +24 -0
  380. package/dist/workspace/sidebar/session-brief-hover-card.js +4 -3
  381. package/dist/workspace/sidebar/session-group-sections.d.ts +26 -7
  382. package/dist/workspace/sidebar/session-group-sections.js +121 -41
  383. package/dist/workspace/sidebar/sidebar-drill.js +6 -0
  384. package/dist/workspace/sidebar/sidebar-more-group.js +3 -2
  385. package/dist/workspace/sidebar/use-workspace-list.d.ts +7 -0
  386. package/dist/workspace/sidebar/use-workspace-list.js +11 -1
  387. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.d.ts +14 -0
  388. package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +46 -2
  389. package/dist/workspace/space/space-tab-panels.js +1 -1
  390. package/dist/workspace/spaces/space-timeline.js +2 -2
  391. package/package.json +67 -10
  392. package/skills/kortix-ui/SKILL.md +2 -2
  393. package/skills/kortix-ui/references/modules.md +5 -3
  394. package/dist/session/thread/turn-share.d.ts +0 -16
  395. package/dist/session/thread/turn-share.js +0 -161
  396. package/dist/workspace/sidebar/footer/promo-nav-row.d.ts +0 -11
  397. package/dist/workspace/sidebar/footer/promo-nav-row.js +0 -7
  398. /package/dist/markdown/{code/inline-chip.d.ts → inline-chip.d.ts} +0 -0
@@ -1,6 +1,8 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useId } from 'react';
3
4
  import { HoverPrefetchLink } from '../../../internal/components/hover-prefetch-link.js';
5
+ import { plainTextFromMarkdown, shortSummary } from '../../../markdown/inline-code-text.js';
4
6
  import { Checkbox } from '../../../primitives/checkbox.js';
5
7
  import { cn } from '../../../internal/lib/utils.js';
6
8
  export function CatalogCard({ leading, title, description, badges, meta, subtitle, variant = 'default', trailing, trailingInteractive, href, onIntent, onClick, disabled, className, style, select, }) {
@@ -11,10 +13,18 @@ export function CatalogCard({ leading, title, description, badges, meta, subtitl
11
13
  // toggle), so in select mode it is a SIBLING of the body button, never a
12
14
  // child — a <button> inside a <button> is invalid HTML and a hydration error.
13
15
  const trailingSlot = trailing ? _jsx("span", { className: "shrink-0", children: trailing }) : null;
14
- const content = (_jsxs(_Fragment, { children: [leading ? _jsx("span", { className: "shrink-0", children: leading }) : null, _jsxs("span", { className: cn('min-w-0 flex-1', variant === 'plain' ? 'space-y-0' : 'space-y-1'), children: [_jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-foreground truncate text-sm font-medium", children: title }), badges] }), subtitle ? _jsx("span", { className: "flex flex-wrap items-center gap-1.5", children: subtitle }) : null, description ? (_jsx("span", { className: "text-muted-foreground line-clamp-2 text-xs text-pretty", children: description })) : null, meta ? (_jsx("span", { className: "text-muted-foreground/80 flex flex-wrap items-center gap-x-2 gap-y-0.5 pt-1 text-xs", children: meta })) : null] })] }));
16
+ // The control's name is the title alone; the summary is its description.
17
+ // Without these, the name is every word inside the card (a whole SKILL.md
18
+ // summary on each Tab stop).
19
+ const id = useId();
20
+ const titleId = `${id}-title`;
21
+ const descriptionId = `${id}-description`;
22
+ const summary = description ? plainTextFromMarkdown(description) : '';
23
+ const a11y = { 'aria-labelledby': titleId, 'aria-describedby': summary ? descriptionId : undefined };
24
+ const content = (_jsxs(_Fragment, { children: [leading ? _jsx("span", { className: "shrink-0", children: leading }) : null, _jsxs("span", { className: cn('min-w-0 flex-1', variant === 'plain' ? 'space-y-0' : 'space-y-1'), children: [_jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx("span", { id: titleId, className: "text-foreground truncate text-sm font-medium", children: title }), badges] }), subtitle ? _jsx("span", { className: "flex flex-wrap items-center gap-1.5", children: subtitle }) : null, summary ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-muted-foreground line-clamp-2 text-xs text-pretty", children: summary }), _jsx("span", { id: descriptionId, className: "sr-only", "aria-hidden": true, children: shortSummary(description ?? '') })] })) : null, meta ? (_jsx("span", { className: "text-muted-foreground/80 flex flex-wrap items-center gap-x-2 gap-y-0.5 pt-1 text-xs", children: meta })) : null] })] }));
15
25
  const body = (_jsxs(_Fragment, { children: [content, trailingSlot] }));
16
26
  if (select) {
17
- return (_jsxs("div", { style: style, "data-selected": select.checked || undefined, className: cn(classes, select.checked && 'border-border bg-accent'), children: [_jsx(Checkbox, { "aria-label": select.label, checked: select.checked, disabled: disabled || select.disabled, onCheckedChange: () => select.onCheckedChange(), className: "mt-0.5" }), _jsx("button", { type: "button", onClick: onClick, disabled: disabled, className: "flex min-w-0 flex-1 items-start gap-3 text-left focus-visible:outline-none", children: content }), trailingSlot] }));
27
+ return (_jsxs("div", { style: style, "data-selected": select.checked || undefined, className: cn(classes, select.checked && 'border-border bg-accent'), children: [_jsx(Checkbox, { "aria-label": select.label, checked: select.checked, disabled: disabled || select.disabled, onCheckedChange: () => select.onCheckedChange(), className: "mt-0.5" }), _jsx("button", { type: "button", onClick: onClick, disabled: disabled, ...a11y, className: "flex min-w-0 flex-1 items-start gap-3 text-left focus-visible:outline-none", children: content }), trailingSlot] }));
18
28
  }
19
29
  if (href && trailingInteractive) {
20
30
  return (
@@ -22,10 +32,10 @@ export function CatalogCard({ leading, title, description, badges, meta, subtitl
22
32
  // never paints here: `has-` draws the same ring while the link holds
23
33
  // keyboard focus. The link's `after` covers the card, so the padding
24
34
  // still navigates; the control is `relative` to stay above it.
25
- _jsxs("div", { style: style, className: cn(classes, 'has-[a:focus-visible]:ring-ring/50 relative has-[a:focus-visible]:ring-2'), children: [_jsx(HoverPrefetchLink, { href: href, prefetch: true, "aria-disabled": disabled || undefined, onPointerEnter: onIntent, onFocus: onIntent, className: "flex min-w-0 flex-1 items-start gap-3 text-left after:absolute after:inset-0 after:content-[''] focus-visible:outline-none", children: content }), trailing ? _jsx("span", { className: "relative shrink-0", children: trailing }) : null] }));
35
+ _jsxs("div", { style: style, className: cn(classes, 'has-[a:focus-visible]:ring-ring/50 relative has-[a:focus-visible]:ring-2'), children: [_jsx(HoverPrefetchLink, { href: href, prefetch: true, "aria-disabled": disabled || undefined, onPointerEnter: onIntent, onFocus: onIntent, ...a11y, className: "flex min-w-0 flex-1 items-start gap-3 text-left after:absolute after:inset-0 after:content-[''] focus-visible:outline-none", children: content }), trailing ? _jsx("span", { className: "relative shrink-0", children: trailing }) : null] }));
26
36
  }
27
37
  if (href) {
28
- return (_jsx(HoverPrefetchLink, { href: href, prefetch: true, "aria-disabled": disabled || undefined, onPointerEnter: onIntent, onFocus: onIntent, style: style, className: classes, children: body }));
38
+ return (_jsx(HoverPrefetchLink, { href: href, prefetch: true, "aria-disabled": disabled || undefined, onPointerEnter: onIntent, onFocus: onIntent, ...a11y, style: style, className: classes, children: body }));
29
39
  }
30
- return (_jsx("button", { type: "button", onClick: onClick, disabled: disabled, style: style, className: classes, children: body }));
40
+ return (_jsx("button", { type: "button", onClick: onClick, disabled: disabled, ...a11y, style: style, className: classes, children: body }));
31
41
  }
@@ -50,7 +50,7 @@ export function CustomizeFrame({ projectId, children }) {
50
50
  export function SettingsFrame({ children }) {
51
51
  const tSettings = useTranslations('workspaces.settings');
52
52
  const sidebar = useOptionalSidebar();
53
- return (_jsxs(InCustomizeFrame.Provider, { value: true, children: [_jsxs("div", { className: "kx-titlebar-row kx-capability-titlebar relative flex h-11 shrink-0 items-center gap-1 border-b px-2", "data-sidebar-collapsed": sidebar?.state === 'collapsed' || undefined, children: [_jsx(SidebarToggle, {}), _jsx("h1", { className: "text-foreground truncate px-2 text-sm font-medium", children: tSettings('title') })] }), children] }));
53
+ return (_jsxs(InCustomizeFrame.Provider, { value: true, children: [_jsxs("div", { className: "kx-titlebar-row kx-capability-titlebar relative flex h-11 shrink-0 items-center gap-1 border-b px-2", "data-sidebar-collapsed": sidebar?.state === 'collapsed' || undefined, children: [_jsx(SidebarToggle, {}), _jsx("p", { className: "text-foreground truncate px-2 text-sm font-medium", children: tSettings('title') })] }), children] }));
54
54
  }
55
55
  const TAB_CLASS = 'w-fit flex-none px-1 py-3';
56
56
  const SETTINGS_LINK_CLASS = 'text-muted-foreground hover:text-foreground flex w-fit flex-none items-center gap-1 px-1 py-3 text-sm font-medium whitespace-nowrap transition-colors';
@@ -1,4 +1,4 @@
1
- import type { ComponentType } from 'react';
1
+ import { type ComponentType } from 'react';
2
2
  /**
3
3
  * One row of the New menu: icon, title, description (Paper "New menu" V03,
4
4
  * after `alert.tsx`). The 16px glyph takes `mt-1 ml-0.5` so it sits level
@@ -6,6 +6,7 @@ import Loading from '../../primitives/loading.js';
6
6
  import { useTranslations as useI18nTranslations } from '../../i18n/index.js';
7
7
  import { CaretDownIcon, ChatCircleIcon, GearSixIcon, PlusIcon } from '@phosphor-icons/react';
8
8
  import { UiLink as Link } from '../../providers/ui-provider.js';
9
+ import { useEffect, useRef } from 'react';
9
10
  /**
10
11
  * One row of the New menu: icon, title, description (Paper "New menu" V03,
11
12
  * after `alert.tsx`). The 16px glyph takes `mt-1 ml-0.5` so it sits level
@@ -35,10 +36,46 @@ export function NewEntityMenu({ label = 'New',
35
36
  // Customize header puts beside it. `sm` (`h-8`) left the pair 4px apart.
36
37
  size = 'default', variant = 'secondary', caret = true, pending = false, onChat, manual, quick, }) {
37
38
  const tI18nComplete = useI18nTranslations('hardcodedUi.i18nComplete');
39
+ const triggerRef = useRef(null);
40
+ const pendingRef = useRef(null);
41
+ const fallbackRef = useRef(null);
42
+ useEffect(() => () => {
43
+ if (fallbackRef.current)
44
+ clearTimeout(fallbackRef.current);
45
+ }, []);
38
46
  if (!manual) {
39
47
  return (_jsxs(Button, { variant: variant, size: size, className: "gap-1.5", disabled: pending, onClick: onChat, children: [pending ? _jsx(Loading, { className: "size-4 shrink-0" }) : _jsx(PlusIcon, { className: "size-4" }), label] }));
40
48
  }
49
+ // A row that opens a dialog or panel runs after the menu has closed and
50
+ // focus is back on the New button. Run from the row itself, the dialog
51
+ // remembers the row as its return target; the menu unmounts the row, so
52
+ // Cancel or Escape dropped focus to <body>. Run here, the dialog records the
53
+ // New button and returns focus to it.
54
+ const runPending = () => {
55
+ const open = pendingRef.current;
56
+ pendingRef.current = null;
57
+ open?.();
58
+ };
59
+ const afterClose = (open) => {
60
+ pendingRef.current = open ?? null;
61
+ // The close hook runs on the frame the menu closes. If it never runs, the
62
+ // row still opens its dialog, with the old focus behavior.
63
+ if (fallbackRef.current)
64
+ clearTimeout(fallbackRef.current);
65
+ fallbackRef.current = setTimeout(() => {
66
+ fallbackRef.current = null;
67
+ if (pendingRef.current === open)
68
+ runPending();
69
+ }, 250);
70
+ };
71
+ const onCloseAutoFocus = (event) => {
72
+ if (!pendingRef.current)
73
+ return;
74
+ event.preventDefault();
75
+ triggerRef.current?.focus({ preventScroll: true });
76
+ runPending();
77
+ };
41
78
  const manualLabel = manual.label ?? 'Set up manually';
42
79
  const manualBody = (_jsx(RichRowBody, { icon: GearSixIcon, title: manualLabel, description: manual.description }));
43
- return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: variant, size: size, className: "gap-1.5", disabled: pending, children: [pending ? _jsx(Loading, { className: "size-4 shrink-0" }) : _jsx(PlusIcon, { className: "size-4" }), label, caret ? _jsx(CaretDownIcon, { className: "text-muted-foreground size-3.5 shrink-0" }) : null] }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-76", children: [quick ? (_jsx(DropdownMenuItem, { className: RICH_ROW_CLASS, onSelect: quick.onSelect, children: _jsx(RichRowBody, { icon: quick.icon, title: quick.label, description: quick.description }) })) : null, _jsx(DropdownMenuItem, { className: RICH_ROW_CLASS, onSelect: onChat, children: _jsx(RichRowBody, { icon: ChatCircleIcon, title: tI18nComplete.raw('textb1895f6ddd9d'), description: tI18nComplete.raw('text31e3ed0f6798') }) }), manual.href ? (_jsx(DropdownMenuItem, { asChild: true, className: RICH_ROW_CLASS, children: _jsx(Link, { href: manual.href, prefetch: true, children: manualBody }) })) : (_jsx(DropdownMenuItem, { className: RICH_ROW_CLASS, onSelect: manual.onSelect, children: manualBody }))] })] }));
80
+ return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { ref: triggerRef, asChild: true, children: _jsxs(Button, { variant: variant, size: size, className: "gap-1.5", disabled: pending, children: [pending ? _jsx(Loading, { className: "size-4 shrink-0" }) : _jsx(PlusIcon, { className: "size-4" }), label, caret ? _jsx(CaretDownIcon, { className: "text-muted-foreground size-3.5 shrink-0" }) : null] }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-76", onCloseAutoFocus: onCloseAutoFocus, children: [quick ? (_jsx(DropdownMenuItem, { className: RICH_ROW_CLASS, onSelect: () => afterClose(quick.onSelect), children: _jsx(RichRowBody, { icon: quick.icon, title: quick.label, description: quick.description }) })) : null, _jsx(DropdownMenuItem, { className: RICH_ROW_CLASS, onSelect: onChat, children: _jsx(RichRowBody, { icon: ChatCircleIcon, title: tI18nComplete.raw('textb1895f6ddd9d'), description: tI18nComplete.raw('text31e3ed0f6798') }) }), manual.href ? (_jsx(DropdownMenuItem, { asChild: true, className: RICH_ROW_CLASS, children: _jsx(Link, { href: manual.href, prefetch: true, children: manualBody }) })) : (_jsx(DropdownMenuItem, { className: RICH_ROW_CLASS, onSelect: () => afterClose(manual.onSelect), children: manualBody }))] })] }));
44
81
  }
@@ -11,6 +11,10 @@
11
11
  import type { UnifiedTrigger } from '@kortix/sdk';
12
12
  /** `true` for a row this page lists: runtime, and (on an agent's page) one that starts that agent. */
13
13
  export declare function runtimeRowsFor(triggers: readonly UnifiedTrigger[], agentName: string | null): UnifiedTrigger[];
14
+ /** A one-shot schedule's run time (`source.at`) in the viewer's locale, or null. */
15
+ export declare function oneShotText(source: UnifiedTrigger['source'], locale: string): string | null;
16
+ /** Active and paused rows first, then the one-shots that already fired. Stable within each group. */
17
+ export declare function sortRuntimeRows(rows: readonly UnifiedTrigger[]): UnifiedTrigger[];
14
18
  export declare function RuntimeTriggers({ projectId, agentName }: {
15
19
  projectId: string;
16
20
  agentName?: string | null;
@@ -34,12 +34,25 @@ function scheduleText(source) {
34
34
  return null;
35
35
  return source.cron ?? source.every ?? null;
36
36
  }
37
+ /** A one-shot schedule's run time (`source.at`) in the viewer's locale, or null. */
38
+ export function oneShotText(source, locale) {
39
+ if (source.type !== 'schedule' || source.cron || source.every || !source.at)
40
+ return null;
41
+ const at = new Date(source.at);
42
+ if (Number.isNaN(at.getTime()))
43
+ return null;
44
+ return new Intl.DateTimeFormat(locale, { dateStyle: 'medium', timeStyle: 'short' }).format(at);
45
+ }
46
+ /** Active and paused rows first, then the one-shots that already fired. Stable within each group. */
47
+ export function sortRuntimeRows(rows) {
48
+ return [...rows.filter((a) => a.state !== 'done'), ...rows.filter((a) => a.state === 'done')];
49
+ }
37
50
  export function RuntimeTriggers({ projectId, agentName = null }) {
38
51
  const t = useTranslations('hardcodedUi.i18nComplete');
39
52
  const locale = useLocale();
40
53
  const triggers = useUnifiedTriggers(projectId);
41
54
  const [deleteTarget, setDeleteTarget] = useState(null);
42
- const rows = runtimeRowsFor(triggers.data?.triggers ?? [], agentName);
55
+ const rows = sortRuntimeRows(runtimeRowsFor(triggers.data?.triggers ?? [], agentName));
43
56
  // `?id=<runtime id>` names one row (a loop's Manage link): mark it and bring it into view once.
44
57
  const openId = readTriggerSheet(useUiSearchParams()).slug;
45
58
  const openRow = rows.some((a) => a.id === openId) ? openId : null;
@@ -59,7 +72,13 @@ export function RuntimeTriggers({ projectId, agentName = null }) {
59
72
  return (_jsxs("section", { className: "space-y-2 pt-4", children: [_jsxs("div", { className: "space-y-0.5", children: [_jsx(Label, { children: t.raw('text41bec5c0977c') }), _jsx("p", { className: "text-muted-foreground text-xs", children: t.raw('text8898c02a816e') })] }), _jsx("ul", { className: "space-y-2", children: rows.map((a) => {
60
73
  const busy = (triggers.update.isPending && triggers.update.variables?.triggerId === a.id) ||
61
74
  (triggers.run.isPending && triggers.run.variables?.triggerId === a.id);
62
- return (_jsxs("li", { ref: a.id === openRow ? openRef : undefined, "data-trigger-id": a.id, "aria-current": a.id === openRow ? 'true' : undefined, className: cn('flex items-center gap-3 rounded-md border px-4 py-2', a.id === openRow ? 'bg-hover' : 'bg-popover'), children: [_jsxs("div", { className: "min-w-0 flex-1 space-y-0.5", children: [_jsx("p", { className: "text-foreground truncate text-sm font-medium", children: a.name ?? a.prompt }), _jsxs(InlineMeta, { children: [_jsx("span", { children: t.raw(SOURCE_KEY[a.source.type]) }), scheduleText(a.source) ? _jsx("span", { className: "font-mono", children: scheduleText(a.source) }) : null, _jsx("span", { className: "truncate", children: target(a) }), a.state === 'active' && a.next_fire_at ? (_jsxs("span", { children: [t.raw('textb3c0ab96930c'), " ", relativeTime(a.next_fire_at, locale)] })) : null, _jsxs("span", { children: [t.raw('text512a48218ba2'), ' ', a.last_fired_at ? relativeTime(a.last_fired_at, locale) : t.raw('text6300ef800bb8')] })] }), a.last_error ? _jsx("p", { className: "text-destructive truncate text-xs", children: a.last_error }) : null] }), busy ? _jsx(Loading, { className: "size-4 shrink-0" }) : null, _jsx(Switch, { checked: a.state === 'active', disabled: a.state === 'done' || busy, "aria-label": a.state === 'active' ? t.raw('text858e4ba7a29f') : t.raw('textd640c7421da0'), onCheckedChange: (enabled) => triggers.update.mutate({ triggerId: a.id, enabled }, { onError }) }), _jsxs(ButtonGroup, { children: [_jsx(Hint, { label: t.raw('text0991397702fa'), children: _jsx(Button, { variant: "ghost", size: "icon", "aria-label": t.raw('text0991397702fa'), disabled: busy, onClick: () => triggers.run.mutate({ triggerId: a.id }, { onError }), children: _jsx(PlayIcon, { className: "size-4 shrink-0" }) }) }), _jsx(Hint, { label: t.raw('texte2d0a54968ea'), children: _jsx(Button, { variant: "ghost", size: "icon", "aria-label": t.raw('texte2d0a54968ea'), onClick: () => setDeleteTarget(a), children: _jsx(TrashIcon, { className: "size-4 shrink-0" }) }) })] })] }, a.id));
75
+ const done = a.state === 'done';
76
+ const once = oneShotText(a.source, locale);
77
+ // The API runs a fired one-shot again on request (POST …/run has no state gate).
78
+ const runLabel = done ? t.raw('text3e310b75051c') : t.raw('text0991397702fa');
79
+ return (_jsxs("li", { ref: a.id === openRow ? openRef : undefined, "data-trigger-id": a.id, "aria-current": a.id === openRow ? 'true' : undefined, className: cn('flex items-center gap-3 rounded-md border px-4 py-2', a.id === openRow ? 'bg-hover' : 'bg-popover'), children: [_jsxs("div", { className: "min-w-0 flex-1 space-y-0.5", children: [_jsx("p", { className: "text-foreground truncate text-sm font-medium", children: a.name ?? a.prompt }), _jsxs(InlineMeta, { children: [_jsx("span", { children: t.raw(SOURCE_KEY[a.source.type]) }), scheduleText(a.source) ? _jsx("span", { className: "font-mono", children: scheduleText(a.source) }) : null, once ? _jsx("span", { children: t.raw('textd88f6d8372f4') }) : null, once ? _jsx("time", { dateTime: a.source.at ?? undefined, children: once }) : null, _jsx("span", { className: "min-w-0 truncate", children: target(a) }), a.state === 'active' && a.next_fire_at ? (_jsxs("span", { children: [t.raw('textb3c0ab96930c'), " ", relativeTime(a.next_fire_at, locale)] })) : null, _jsxs("span", { children: [t.raw('text512a48218ba2'), ' ', a.last_fired_at ? relativeTime(a.last_fired_at, locale) : t.raw('text6300ef800bb8')] })] }), a.last_error ? _jsx("p", { className: "text-destructive truncate text-xs", children: a.last_error }) : null] }), busy ? _jsx(Loading, { className: "size-4 shrink-0" }) : null, done ? (
80
+ // A fired one-shot has nothing to turn on: a label, not a dead switch.
81
+ _jsx("span", { className: "text-muted-foreground shrink-0 text-xs", children: t.raw('text11a6767d5674') })) : (_jsx(Switch, { checked: a.state === 'active', disabled: busy, "aria-label": a.state === 'active' ? t.raw('text858e4ba7a29f') : t.raw('textd640c7421da0'), onCheckedChange: (enabled) => triggers.update.mutate({ triggerId: a.id, enabled }, { onError }) })), _jsxs(ButtonGroup, { children: [_jsx(Hint, { label: runLabel, children: _jsx(Button, { variant: "ghost", size: "icon", "aria-label": runLabel, disabled: busy, onClick: () => triggers.run.mutate({ triggerId: a.id }, { onError }), children: _jsx(PlayIcon, { className: "size-4 shrink-0" }) }) }), _jsx(Hint, { label: t.raw('texte2d0a54968ea'), children: _jsx(Button, { variant: "ghost", size: "icon", "aria-label": t.raw('texte2d0a54968ea'), onClick: () => setDeleteTarget(a), children: _jsx(TrashIcon, { className: "size-4 shrink-0" }) }) })] })] }, a.id));
63
82
  }) }), _jsx(ConfirmDialog, { open: !!deleteTarget, onOpenChange: (next) => {
64
83
  if (!next)
65
84
  setDeleteTarget(null);
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useFeatureFlag, useProjectSpaces } from '@kortix/sdk/react';
4
- import { capitalizeWords, isMyKortixAgentName, MY_KORTIX_DISPLAY_NAME } from '../../../_vendor/kortix-shared.js';
4
+ import { agentDisplayName } from '../../../_vendor/kortix-shared.js';
5
5
  import { HashIcon, LockSimpleIcon } from '@phosphor-icons/react';
6
6
  import { useTranslations } from '../../../i18n/index.js';
7
7
  import { AgentMark } from '../../../internal/components/agent-mark.js';
@@ -45,5 +45,5 @@ export function PostToField({ projectId, draft, patch, baseAccess, }) {
45
45
  })] })] }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: t('postToHint', { channel: list.find((space) => space.is_default)?.slug ?? 'general' }) })] }));
46
46
  }
47
47
  function agentLabel(name) {
48
- return isMyKortixAgentName(name) ? MY_KORTIX_DISPLAY_NAME : capitalizeWords(name);
48
+ return agentDisplayName(name);
49
49
  }
@@ -64,6 +64,7 @@ import { RuntimeTriggers, runtimeRowsFor } from './runtime-triggers.js';
64
64
  import { runsInFlight } from './schedule/trigger-runs-logic.js';
65
65
  import { runsOf } from './schedule/trigger-runs-panel.js';
66
66
  import { bulkTargets, runSequentially, selectAllShown, selectRange, toggleSlug, visibleSelection, } from './schedule/trigger-selection.js';
67
+ import { ActionBarDock } from '../../primitives/action-bar.js';
67
68
  import { TriggerSelectionBar } from './schedule/trigger-selection-bar.js';
68
69
  import { useEventTitles } from './schedule/use-event-titles.js';
69
70
  /** Tab label per filter: the three kinds reuse the page's existing words. */
@@ -453,5 +454,5 @@ export function ScheduleView({ projectId, surface = { kind: 'global' }, defaultA
453
454
  } })] }), selectMode ? (
454
455
  // Pinned to the bottom of the list column, not to the end of the list:
455
456
  // `sticky` stops where a short list ends.
456
- _jsx("div", { className: "pointer-events-none absolute inset-x-0 bottom-4 z-10 flex justify-center px-4", children: _jsx("div", { className: "pointer-events-auto w-full max-w-xl", children: _jsx(TriggerSelectionBar, { selectedCount: actionable.size, shownCount: filtered.length, allSelected: filtered.length > 0 && filtered.every((t) => selectedSlugs.has(t.slug)), canPause: bulkTargets(triggers, actionable, false).length > 0, canResume: bulkTargets(triggers, actionable, true).length > 0, canDelete: controls.canDelete, progress: bulkProgress, onSelectAll: () => setSelectedSlugs(selectAllShown(filtered)), onClear: () => setSelectedSlugs(new Set()), onPause: () => void runBulk('pause'), onResume: () => void runBulk('resume'), onDelete: () => setBulkDeleteOpen(true), onExit: exitSelectMode }) }) })) : null] }), _jsx(ScheduleDetailSplitContent, { projectId: projectId, trigger: selected, eventsEnabled: eventsOn, controls: controls, initialTab: sheet.tab, projectPaused: paused, live: !!selected && selected.slug === liveSlug, onResumeAll: () => resumeAll.mutate(false), resumingAll: resumeAll.isPending, onTabChange: (tab) => selected && navigateSheet({ slug: selected.slug, tab }), onRun: () => selected && run.mutate(selected), running: run.isPending && run.variables?.slug === selected?.slug, onDelete: () => selected && setDeleteTarget(selected), onMutated: invalidate })] }));
457
+ _jsx(ActionBarDock, { className: "z-10", children: _jsx(TriggerSelectionBar, { selectedCount: actionable.size, shownCount: filtered.length, allSelected: filtered.length > 0 && filtered.every((t) => selectedSlugs.has(t.slug)), canPause: bulkTargets(triggers, actionable, false).length > 0, canResume: bulkTargets(triggers, actionable, true).length > 0, canDelete: controls.canDelete, progress: bulkProgress, onSelectAll: () => setSelectedSlugs(selectAllShown(filtered)), onClear: () => setSelectedSlugs(new Set()), onPause: () => void runBulk('pause'), onResume: () => void runBulk('resume'), onDelete: () => setBulkDeleteOpen(true), onExit: exitSelectMode }) })) : null] }), _jsx(ScheduleDetailSplitContent, { projectId: projectId, trigger: selected, eventsEnabled: eventsOn, controls: controls, initialTab: sheet.tab, projectPaused: paused, live: !!selected && selected.slug === liveSlug, onResumeAll: () => resumeAll.mutate(false), resumingAll: resumeAll.isPending, onTabChange: (tab) => selected && navigateSheet({ slug: selected.slug, tab }), onRun: () => selected && run.mutate(selected), running: run.isPending && run.variables?.slug === selected?.slug, onDelete: () => selected && setDeleteTarget(selected), onMutated: invalidate })] }));
457
458
  }
@@ -2,10 +2,9 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from '../../../primitives/alert-dialog.js';
4
4
  import { Button } from '../../../primitives/button.js';
5
- import { ButtonGroup } from '../../../primitives/button-group.js';
5
+ import { ActionBar, ActionBarDock } from '../../../primitives/action-bar.js';
6
6
  import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger, } from '../../../primitives/context-menu.js';
7
7
  import Loading from '../../../primitives/loading.js';
8
- import { Skeleton } from '../../../primitives/skeleton.js';
9
8
  import { errorToast, successToast } from '../../../primitives/toast.js';
10
9
  import { DRAG_MIME } from '../../tree/components/file-tree-item.js';
11
10
  import { useFilesStore, useFilesStoreApi } from '../../../internal/stores/files-store.js';
@@ -13,14 +12,14 @@ import { EmptyState } from '../../../primitives/empty-state.js';
13
12
  import { EmptyArt } from '../../../primitives/empty-art.js';
14
13
  import { ErrorState } from '../../../primitives/error-state.js';
15
14
  import { isSandboxNotReadyError } from '@kortix/sdk';
16
- import { ClipboardIcon as Clipboard, FolderPlusIcon as FolderPlus, ClipboardTextIcon, MoonIcon, XIcon, UploadSimpleIcon, UploadIcon as Upload, ArrowsLeftRightIcon, CheckSquareIcon, TrashIcon, } from '@phosphor-icons/react';
15
+ import { ClipboardIcon as Clipboard, FolderPlusIcon as FolderPlus, MoonIcon, XIcon, UploadSimpleIcon, UploadIcon as Upload, ArrowsLeftRightIcon, CheckSquareIcon, TrashIcon, } from '@phosphor-icons/react';
17
16
  import { Download } from '../../../internal/icons/download.js';
18
17
  import { useLocale, useTranslations } from '../../../i18n/index.js';
19
18
  import { formatStorageBytes } from '../../drives/drive-storage.js';
20
19
  import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore, } from 'react';
21
20
  import { useFileExplorerSource } from '../explorer-source.js';
22
21
  import { buildGitStatusMap } from '../hooks/index.js';
23
- import { forEachLimit, MAX_UPLOAD_BYTES, partitionUploadBatch, resolveUploadTarget, UPLOAD_CONCURRENCY, } from '../upload-batch.js';
22
+ import { forEachLimit, inFlightPaths, MAX_UPLOAD_BYTES, partitionUploadBatch, resolveUploadTarget, UPLOAD_CONCURRENCY, } from '../upload-batch.js';
24
23
  import { droppedEntries, folderMaker, hasFolder, readDroppedTree, treeLevels, } from '../drop-tree.js';
25
24
  import { DriveCreateDialog, } from './drive-create-dialog.js';
26
25
  import { DriveGridView } from './drive-grid-view.js';
@@ -34,8 +33,7 @@ import { FileHistoryPopoverContent } from './file-history-popover.js';
34
33
  import { ExplorerFilePreview } from './file-preview-modal.js';
35
34
  import { FileSearch } from './file-search.js';
36
35
  import { isPartialListing, LoadMoreRow } from './load-more-row.js';
37
- /** System directories always pinned at the top of the listing. */
38
- const ELEVATED_DIRS = new Set(['.kortix']);
36
+ import { ListingSkeleton, useSortedListing } from './explorer-listing.js';
39
37
  /**
40
38
  * Google Drive-style file explorer — the ONE explorer implementation, shared
41
39
  * by every surface. Data access comes from the injected FileExplorerSource
@@ -83,8 +81,6 @@ export function DriveExplorer({ embedded = false, shareContext, leading, trailin
83
81
  const currentPath = useFilesStore((s) => s.currentPath);
84
82
  const navigateToPath = useFilesStore((s) => s.navigateToPath);
85
83
  const viewMode = useFilesStore((s) => s.viewMode);
86
- const sortBy = useFilesStore((s) => s.sortBy);
87
- const sortOrder = useFilesStore((s) => s.sortOrder);
88
84
  const isSearchOpen = useFilesStore((s) => s.isSearchOpen);
89
85
  const toggleSearch = useFilesStore((s) => s.toggleSearch);
90
86
  const closeSearch = useFilesStore((s) => s.closeSearch);
@@ -152,10 +148,9 @@ export function DriveExplorer({ embedded = false, shareContext, leading, trailin
152
148
  // Project-wide, so a batch keeps going (and its tray keeps reporting) after
153
149
  // this folder view unmounts. The tray itself is in the project shell.
154
150
  const uploads = useDriveUploads((s) => s.uploads);
155
- // Cards and rows still on their way up show a spinner until the server has them.
156
- const uploadingPaths = useMemo(() => new Set(uploads
157
- .filter((u) => u.status === 'queued' || u.status === 'uploading')
158
- .map((u) => (u.targetPath ? `${u.targetPath.replace(/\/+$/, '')}/${u.file.name}` : u.file.name))), [uploads]);
151
+ // Cards and rows still on their way up (an upload, or a New file not yet
152
+ // created) show a spinner and defer their preview until the server has them.
153
+ const uploadingPaths = useMemo(() => inFlightPaths(uploads, pending), [uploads, pending]);
159
154
  const dragPageCounter = useRef(0);
160
155
  const [createKind, setCreateKind] = useState(null);
161
156
  const [renameTarget, setRenameTarget] = useState(null);
@@ -204,46 +199,7 @@ export function DriveExplorer({ embedded = false, shareContext, leading, trailin
204
199
  window.addEventListener('keydown', handleKeyDown);
205
200
  return () => window.removeEventListener('keydown', handleKeyDown);
206
201
  }, [searchEnabled, toggleSearch, closeSearch, isSearchOpen]);
207
- // Sort and separate dirs and files
208
- const { elevatedDirs, dirs, fileItems } = useMemo(() => {
209
- if (!files)
210
- return {
211
- elevatedDirs: [],
212
- dirs: [],
213
- fileItems: [],
214
- };
215
- const sortFn = (a, b) => {
216
- let cmp = 0;
217
- switch (sortBy) {
218
- case 'name':
219
- cmp = a.name.localeCompare(b.name);
220
- break;
221
- case 'type': {
222
- const extA = a.name.includes('.') ? a.name.split('.').pop() || '' : '';
223
- const extB = b.name.includes('.') ? b.name.split('.').pop() || '' : '';
224
- cmp = extA.localeCompare(extB);
225
- if (cmp === 0)
226
- cmp = a.name.localeCompare(b.name);
227
- break;
228
- }
229
- case 'modified':
230
- case 'size':
231
- cmp = a.name.localeCompare(b.name);
232
- break;
233
- }
234
- return sortOrder === 'desc' ? -cmp : cmp;
235
- };
236
- // A partial folder keeps the server's name order: a sorted subset would
237
- // put a later page's rows above the ones shown (KRTX-1723).
238
- const sorted = (nodes) => (partial ? nodes : nodes.sort(sortFn));
239
- const allDirs = files.filter((f) => f.type === 'directory');
240
- const elevatedDirs = allDirs
241
- .filter((f) => ELEVATED_DIRS.has(f.name))
242
- .sort((a, b) => a.name.localeCompare(b.name));
243
- const dirs = sorted(allDirs.filter((f) => !ELEVATED_DIRS.has(f.name)));
244
- const fileItems = sorted(files.filter((f) => f.type === 'file'));
245
- return { elevatedDirs, dirs, fileItems };
246
- }, [files, sortBy, sortOrder, partial]);
202
+ const { dirs, fileItems } = useSortedListing(files, partial);
247
203
  // ── Handlers ──────────────────────────────────────────────────
248
204
  const handleNavigateToDir = useCallback((node) => {
249
205
  navigateToPath(node.path);
@@ -789,7 +745,7 @@ export function DriveExplorer({ embedded = false, shareContext, leading, trailin
789
745
  const [selectionStore] = useState(createSelectionStore);
790
746
  useEffect(() => selectionStore.clear(), [currentPath, selectionStore]);
791
747
  const selectMode = useSyncExternalStore(selectionStore.subscribe, selectionStore.mode, () => false);
792
- const ordered = useMemo(() => [...elevatedDirs, ...dirs, ...fileItems], [elevatedDirs, dirs, fileItems]);
748
+ const ordered = useMemo(() => [...dirs, ...fileItems], [dirs, fileItems]);
793
749
  // Read by the stable callbacks below at the moment they run.
794
750
  const orderedRef = useRef(ordered);
795
751
  useEffect(() => {
@@ -1014,7 +970,6 @@ export function DriveExplorer({ embedded = false, shareContext, leading, trailin
1014
970
  !error &&
1015
971
  Boolean(files) &&
1016
972
  !listing.hasNextPage &&
1017
- elevatedDirs.length === 0 &&
1018
973
  dirs.length === 0 &&
1019
974
  fileItems.length === 0;
1020
975
  return (_jsx(DriveSelectionContext.Provider, { value: selectionValue, children: _jsx(DriveRenameContext.Provider, { value: canWrite ? requestRename : null, children: _jsxs("div", { className: "bg-background relative flex h-full flex-col", onDragEnter: handlePageDragEnter, onDragLeave: handlePageDragLeave, onDragOver: handlePageDragOver, onDrop: handlePageDrop, children: [_jsx(DriveActionRow, { leading: leading, actions: (() => {
@@ -1033,11 +988,7 @@ export function DriveExplorer({ embedded = false, shareContext, leading, trailin
1033
988
  if (picked?.length)
1034
989
  void handleUploadFolder(picked);
1035
990
  e.target.value = '';
1036
- } }), _jsxs(ListingRegion, { className: "relative min-h-0 flex-1", children: [_jsxs(ContextMenu, { children: [_jsx(ContextMenuTrigger, { asChild: true, children: _jsxs("div", { ref: scrollRef, className: "absolute inset-0 overflow-y-auto", onPointerDown: onMarqueeDown, onPointerMove: onMarqueeMove, onPointerUp: onMarqueeUp, onPointerCancel: onMarqueeUp, children: [_jsx("div", { ref: marqueeBoxRef, "aria-hidden": true, className: "border-kortix-base bg-kortix-base/15 pointer-events-none absolute top-0 left-0 z-20 hidden rounded-sm border" }), isLoading && showSkeleton && (_jsx("div", { className: "animate-in fade-in-0 p-4 duration-(--duration-moderate) motion-reduce:animate-none", children: viewMode === 'grid' ? (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsx(Skeleton, { className: "mb-3 h-4 w-16" }), _jsx("div", { className: "grid gap-2", style: {
1037
- gridTemplateColumns: "repeat(auto-fill, minmax(160px, 1fr))",
1038
- }, children: Array.from({ length: 6 }).map((_, i) => (_jsx(Skeleton, { className: "h-10 rounded-lg" }, `f${i}`))) })] }), _jsxs("div", { children: [_jsx(Skeleton, { className: "mb-3 h-4 w-12" }), _jsx("div", { className: "grid gap-2.5", style: {
1039
- gridTemplateColumns: "repeat(auto-fill, minmax(150px, 1fr))",
1040
- }, children: Array.from({ length: 8 }).map((_, i) => (_jsx(Skeleton, { className: "h-[138px] rounded-lg" }, `fi${i}`))) })] })] })) : (_jsx("div", { className: "space-y-1", children: Array.from({ length: 10 }).map((_, i) => (_jsx(Skeleton, { className: "h-10 w-full rounded-sm" }, i))) })) })), !!error &&
991
+ } }), _jsxs(ListingRegion, { className: "relative min-h-0 flex-1", children: [_jsxs(ContextMenu, { children: [_jsx(ContextMenuTrigger, { asChild: true, children: _jsxs("div", { ref: scrollRef, className: "absolute inset-0 overflow-y-auto", onPointerDown: onMarqueeDown, onPointerMove: onMarqueeMove, onPointerUp: onMarqueeUp, onPointerCancel: onMarqueeUp, children: [_jsx("div", { ref: marqueeBoxRef, "aria-hidden": true, className: "border-kortix-base bg-kortix-base/15 pointer-events-none absolute top-0 left-0 z-20 hidden rounded-sm border" }), isLoading && showSkeleton && _jsx(ListingSkeleton, { viewMode: viewMode }), !!error &&
1041
992
  !isLoading &&
1042
993
  (sandboxWaking ? (_jsxs("div", { className: "flex flex-col items-center justify-center gap-3 py-16 text-center", children: [_jsx(Loading, { className: "text-muted-foreground size-4" }), _jsx("p", { className: "text-muted-foreground text-sm font-medium", children: tHardcodedUi.raw('i18nComplete.text5e3de76869f3') }), _jsx("p", { className: "text-muted-foreground max-w-xs text-xs", children: tHardcodedUi.raw('i18nComplete.textc1b1dc22e207') })] })) : (_jsx(ErrorState, { title: tHardcodedUi.raw('featuresProjectFilesComponentsFileExplorerPage.line658JsxTextFailedToLoadFiles'), description: error instanceof Error
1043
994
  ? error.message
@@ -1047,20 +998,32 @@ export function DriveExplorer({ embedded = false, shareContext, leading, trailin
1047
998
  // An empty folder with no way to add a file is the worst case of
1048
999
  // the missing-affordance bug — surface upload here, not only in
1049
1000
  // the toolbar menu.
1050
- action: canWrite ? (_jsxs(Button, { variant: "outline", size: "sm", className: "gap-1.5", onClick: handleUpload, children: [_jsx(Upload, { className: "size-3.5 shrink-0" }), tHardcodedUi.raw('i18nComplete.text4118deee6e13')] })) : undefined, secondaryAction: canWrite ? (_jsxs(Button, { variant: "outline", size: "sm", className: "gap-1.5", onClick: () => setCreateKind('folder'), children: [_jsx(FolderPlus, { className: "size-3.5 shrink-0" }), tHardcodedUi.raw('i18nComplete.textcf28f49ec597')] })) : undefined })), !isLoading && !error && files && !isEmpty && (_jsxs(_Fragment, { children: [viewMode === 'grid' ? (_jsx(DriveGridView, { elevatedDirs: elevatedDirs, dirs: dirs, files: fileItems, onNavigateToDir: handleNavigateToDir, onOpenFile: handleOpenFile, onPreviewFile: handlePreviewFile, onDownload: handleDownload, onDownloadDir: handleDownloadDir, onRename: handleRename, onDelete: handleDelete, onHistory: handleHistory, onCopy: handleCopy, onCut: handleCut, onDropMove: handleDropMove, onDropUpload: handleRowDropUpload, gitStatusMap: gitStatusMap, clipboardPath: clipboard?.path, clipboardOperation: clipboard?.operation, isDirDownloading: isDirDownloading, readOnly: !canWrite, isFixed: capabilities.fixedAt, uploadingPaths: uploadingPaths })) : (_jsx(DriveListView, { elevatedDirs: elevatedDirs, dirs: dirs, files: fileItems, sortDisabled: partial, onNavigateToDir: handleNavigateToDir, onOpenFile: handleOpenFile, onPreviewFile: handlePreviewFile, onDownload: handleDownload, onDownloadDir: handleDownloadDir, onRename: handleRename, onDelete: handleDelete, onHistory: handleHistory, onCopy: handleCopy, onCut: handleCut, onDropMove: handleDropMove, onDropUpload: handleRowDropUpload, gitStatusMap: gitStatusMap, clipboardPath: clipboard?.path, clipboardOperation: clipboard?.operation, isDirDownloading: isDirDownloading, readOnly: !canWrite, isFixed: capabilities.fixedAt, uploadingPaths: uploadingPaths })), _jsx(LoadMoreRow, { listing: listing })] }))] }) }), _jsxs(ContextMenuContent, { className: "w-48", children: [_jsx(DriveNewMenuItems, { Item: ContextMenuItem, Separator: ContextMenuSeparator, onUpload: canWrite && filesAllowedHere ? handleUpload : undefined, onUploadFolder: canWrite ? handlePickFolder : undefined, onNewFile: canWrite && filesAllowedHere && capabilities.newFile !== false
1001
+ action: canWrite ? (_jsxs(Button, { variant: "outline", size: "sm", className: "gap-1.5", onClick: handleUpload, children: [_jsx(Upload, { className: "size-3.5 shrink-0" }), tHardcodedUi.raw('i18nComplete.text4118deee6e13')] })) : undefined, secondaryAction: canWrite ? (_jsxs(Button, { variant: "outline", size: "sm", className: "gap-1.5", onClick: () => setCreateKind('folder'), children: [_jsx(FolderPlus, { className: "size-3.5 shrink-0" }), tHardcodedUi.raw('i18nComplete.textcf28f49ec597')] })) : undefined })), !isLoading && !error && files && !isEmpty && (_jsxs(_Fragment, { children: [viewMode === 'grid' ? (_jsx(DriveGridView, { dirs: dirs, files: fileItems, onNavigateToDir: handleNavigateToDir, onOpenFile: handleOpenFile, onPreviewFile: handlePreviewFile, onDownload: handleDownload, onDownloadDir: handleDownloadDir, onRename: handleRename, onDelete: handleDelete, onHistory: handleHistory, onCopy: handleCopy, onCut: handleCut, onDropMove: handleDropMove, onDropUpload: handleRowDropUpload, gitStatusMap: gitStatusMap, clipboardPath: clipboard?.path, clipboardOperation: clipboard?.operation, isDirDownloading: isDirDownloading, readOnly: !canWrite, isFixed: capabilities.fixedAt, uploadingPaths: uploadingPaths })) : (_jsx(DriveListView, { dirs: dirs, files: fileItems, sortDisabled: partial, onNavigateToDir: handleNavigateToDir, onOpenFile: handleOpenFile, onPreviewFile: handlePreviewFile, onDownload: handleDownload, onDownloadDir: handleDownloadDir, onRename: handleRename, onDelete: handleDelete, onHistory: handleHistory, onCopy: handleCopy, onCut: handleCut, onDropMove: handleDropMove, onDropUpload: handleRowDropUpload, gitStatusMap: gitStatusMap, clipboardPath: clipboard?.path, clipboardOperation: clipboard?.operation, isDirDownloading: isDirDownloading, readOnly: !canWrite, isFixed: capabilities.fixedAt, uploadingPaths: uploadingPaths })), _jsx(LoadMoreRow, { listing: listing })] }))] }) }), _jsxs(ContextMenuContent, { className: "w-48", children: [_jsx(DriveNewMenuItems, { Item: ContextMenuItem, Separator: ContextMenuSeparator, onUpload: canWrite && filesAllowedHere ? handleUpload : undefined, onUploadFolder: canWrite ? handlePickFolder : undefined, onNewFile: canWrite && filesAllowedHere && capabilities.newFile !== false
1051
1002
  ? () => setCreateKind('file')
1052
1003
  : undefined, onNewFolder: canWrite ? () => setCreateKind('folder') : undefined }), ordered.length > 0 ? (_jsxs(_Fragment, { children: [canWrite ? _jsx(ContextMenuSeparator, {}) : null, _jsxs(ContextMenuItem, { onClick: () => selectionStore.set(new Set(selectionStore.paths()), true), children: [_jsx(CheckSquareIcon, {}), tDrives('select')] }), _jsxs(ContextMenuItem, { onClick: selectAll, children: [_jsx(CheckSquareIcon, {}), tDrives('selectAll')] })] })) : null] })] }), panels] }), canWrite && filesAllowedHere && isDragOverPage && (_jsx("div", { className: "bg-background/85 pointer-events-none absolute inset-0 z-50 p-3 backdrop-blur-sm", children: _jsxs("div", { className: "border-kortix-base flex h-full flex-col items-center justify-center gap-4 rounded-md border-2 border-dashed p-6 text-center", children: [_jsx(UploadSimpleIcon, { className: "text-muted-foreground size-10" }), _jsxs("div", { className: "max-w-xs space-y-1.5", children: [_jsx("p", { className: "text-foreground text-sm font-semibold tracking-tight", children: tDrives('dropToUpload', {
1053
1004
  folder: normalizedCurrentPath.split('/').filter(Boolean).pop() ?? rootLabel ?? '/',
1054
- }) }), _jsx("p", { className: "text-muted-foreground text-sm", children: tDrives('dropHint') })] })] }) })), selectMode ? (_jsx("div", { className: "pointer-events-none absolute inset-x-0 bottom-4 z-30 flex justify-center px-4", children: _jsx("div", { className: "pointer-events-auto w-full max-w-xl", children: _jsx(DriveSelectionBar, { store: selectionStore, total: ordered.length, zipping: zipping, canWrite: canWrite, onSelectAll: selectAll, onClearSelection: () => selectionStore.set(new Set()), onDownload: () => void bulkDownload(selectedNodes()), onCopy: () => bulkClipboard(selectedNodes(), 'copy'), onMove: () => bulkClipboard(selectedNodes(), 'cut'), onDelete: () => bulkDelete(selectedNodes()), onExit: exitSelect }) }) })) : null, canWrite && clipboard && !selectMode && (_jsx("div", { className: "pointer-events-none absolute inset-x-0 bottom-4 z-30 flex justify-center px-4", children: _jsxs("div", { className: "bg-popover text-popover-foreground border-border pointer-events-auto flex w-full max-w-xl items-center gap-3 rounded-lg border p-2 pl-3.5 shadow-md", children: [_jsx(Clipboard, { className: "text-muted-foreground size-4 shrink-0" }), _jsx("span", { className: "min-w-0 flex-1 truncate text-sm", "aria-live": "polite", children: clipboardItems.length > 1
1055
- ? tDrives(clipboard.operation === 'cut' ? 'clipboardMovingMany' : 'clipboardCopyingMany', {
1056
- count: clipboardItems.length,
1057
- })
1058
- : tDrives(clipboard.operation === 'cut' ? 'clipboardMoving' : 'clipboardCopying', {
1059
- name: clipboard.name,
1060
- }) }), _jsxs(ButtonGroup, { className: "shrink-0", children: [_jsxs(Button, { type: "button", variant: "secondary", size: "sm", className: "gap-1.5 active:scale-[0.96]", onClick: handlePaste, disabled: pasting, children: [pasting ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : (_jsx(ClipboardTextIcon, { className: "size-3.5 shrink-0" })), tHardcodedUi.raw('featuresFilesComponentsFileExplorerPage.line771JsxTextPasteHere')] }), _jsxs(Button, { type: "button", variant: "secondary", size: "sm", className: "gap-1.5 active:scale-[0.96]", onClick: clearClipboard,
1061
- // A paste already sent cannot be taken back; Cancel would only
1062
- // hide the bar while it finishes.
1063
- disabled: pasting, children: [_jsx(XIcon, { className: "size-3.5 shrink-0" }), tHardcodedUi.raw('i18nComplete.text19766ed6ccb2')] })] })] }) })), _jsx(DriveCreateDialog, { kind: canWrite ? createKind : null, location: location ?? {
1005
+ }) }), _jsx("p", { className: "text-muted-foreground text-sm", children: tDrives('dropHint') })] })] }) })), selectMode ? (_jsx(ActionBarDock, { children: _jsx(DriveSelectionBar, { store: selectionStore, total: ordered.length, zipping: zipping, canWrite: canWrite, onSelectAll: selectAll, onClearSelection: () => selectionStore.set(new Set()), onDownload: () => void bulkDownload(selectedNodes()), onCopy: () => bulkClipboard(selectedNodes(), 'copy'), onMove: () => bulkClipboard(selectedNodes(), 'cut'), onDelete: () => bulkDelete(selectedNodes()), onExit: exitSelect }) })) : null, canWrite && clipboard && !selectMode && (_jsx(ActionBarDock, { children: _jsx(ActionBar, { leading: _jsx(Clipboard, {}), title: clipboardItems.length > 1
1006
+ ? tDrives(clipboard.operation === 'cut' ? 'clipboardMovingMany' : 'clipboardCopyingMany', {
1007
+ count: clipboardItems.length,
1008
+ })
1009
+ : tDrives(clipboard.operation === 'cut' ? 'clipboardMoving' : 'clipboardCopying', {
1010
+ name: clipboard.name,
1011
+ }), actions: [
1012
+ {
1013
+ id: 'paste',
1014
+ label: tHardcodedUi.raw('featuresFilesComponentsFileExplorerPage.line771JsxTextPasteHere'),
1015
+ loading: pasting,
1016
+ onSelect: handlePaste,
1017
+ },
1018
+ {
1019
+ id: 'cancel',
1020
+ label: tHardcodedUi.raw('i18nComplete.text19766ed6ccb2'),
1021
+ // A paste already sent cannot be taken back; Cancel would only
1022
+ // hide the bar while it finishes.
1023
+ disabled: pasting,
1024
+ onSelect: clearClipboard,
1025
+ },
1026
+ ] }) })), _jsx(DriveCreateDialog, { kind: canWrite ? createKind : null, location: location ?? {
1064
1027
  icon: rootIcon,
1065
1028
  crumbs: [
1066
1029
  ...(rootLabel ? [rootLabel] : []),
@@ -1,5 +1,4 @@
1
- import type { DroppedEntry } from '../drop-tree.js';
2
- import type { GitStatusType } from '../../tree/components/file-tree-item.js';
1
+ import { type DriveListingProps } from './explorer-listing.js';
3
2
  import type { FileNode } from '../../../internal/files/types.js';
4
3
  import { type ComponentType, type ReactNode } from 'react';
5
4
  type DriveMenuItemComponent = ComponentType<{
@@ -40,33 +39,5 @@ interface FileDriveMenuProps {
40
39
  copyPathLabel: string;
41
40
  }
42
41
  export declare function FileDriveMenuItems({ Item, Separator, node, onClick, onDownload, onHistory, onCopy, onCut, onRename, onDelete, startRenaming, checkpointHistoryLabel, copyPathLabel, }: FileDriveMenuProps): import("react").JSX.Element;
43
- interface DriveGridViewProps {
44
- elevatedDirs: FileNode[];
45
- dirs: FileNode[];
46
- files: FileNode[];
47
- onNavigateToDir: (node: FileNode) => void;
48
- onOpenFile: (node: FileNode) => void;
49
- onPreviewFile: (node: FileNode) => void;
50
- onDownload: (node: FileNode) => void;
51
- onDownloadDir: (node: FileNode) => void;
52
- onRename: (node: FileNode, newName: string) => void;
53
- onDelete: (node: FileNode) => void;
54
- onHistory: (node: FileNode) => void;
55
- onCopy: (node: FileNode) => void;
56
- onCut: (node: FileNode) => void;
57
- onDropMove: (sourcePath: string, targetDirPath: string) => void;
58
- /** External files dropped onto a folder card upload into THAT folder. */
59
- onDropUpload?: (files: File[], targetDirPath: string, entries?: DroppedEntry[]) => void;
60
- gitStatusMap: Map<string, GitStatusType>;
61
- clipboardPath?: string;
62
- clipboardOperation?: string;
63
- isDirDownloading: (path: string) => boolean;
64
- /** Hide mutation context-menu entries (delete/rename/cut/copy/history). */
65
- readOnly?: boolean;
66
- /** Folders that cannot be renamed, cut or deleted (see `ExplorerCapabilities.fixedAt`). */
67
- isFixed?: (path: string) => boolean;
68
- /** Paths still uploading. */
69
- uploadingPaths?: ReadonlySet<string>;
70
- }
71
- export declare function DriveGridView({ elevatedDirs, dirs, files, onNavigateToDir, onOpenFile, onPreviewFile, onDownload, onDownloadDir, onRename: rawOnRename, onDelete: rawOnDelete, onHistory: rawOnHistory, onCopy: rawOnCopy, onCut: rawOnCut, onDropMove: rawOnDropMove, onDropUpload: rawOnDropUpload, gitStatusMap, clipboardPath, clipboardOperation, isDirDownloading, readOnly, isFixed, uploadingPaths, }: DriveGridViewProps): import("react").JSX.Element;
42
+ export declare function DriveGridView(props: DriveListingProps): import("react").JSX.Element;
72
43
  export {};
@@ -1,10 +1,12 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { Button } from '../../../primitives/button.js';
4
+ import { listingWriteHandlers } from './explorer-listing.js';
4
5
  import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger, } from '../../../primitives/context-menu.js';
5
6
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from '../../../primitives/dropdown-menu.js';
6
7
  import { Label } from '../../../primitives/label.js';
7
8
  import { cn } from '../../../lib/utils.js';
9
+ import { ManifestIssueMark } from './manifest-issue-mark.js';
8
10
  import Loading from '../../../primitives/loading.js';
9
11
  import { Copy } from '../../../icons/copy.js';
10
12
  import { ArrowUpRightIcon as ArrowUpRight, ClipboardIcon as ClipboardCopy, EyeIcon as Eye, ClockCounterClockwiseIcon as History, DotsThreeIcon as MoreVertical, PencilSimpleIcon, ScissorsIcon as Scissors, TrashIcon, } from '@phosphor-icons/react';
@@ -98,38 +100,26 @@ const FileCard = memo(function FileCard({ node, onClick, onDoubleClick, onDownlo
98
100
  checkpointHistoryLabel,
99
101
  copyPathLabel,
100
102
  };
101
- return (_jsxs(ContextMenu, { children: [_jsx(ContextMenuTrigger, { asChild: true, children: _jsxs("div", { draggable: !isRenaming, onDragStart: handleDragStart, onDragEnd: handleDragEnd, onClick: isRenaming ? undefined : onItemClick, "data-drive-item": node.path, onDoubleClick: isRenaming || !onDoubleClick ? undefined : ownClicks(() => onDoubleClick(node)), className: cn('group relative flex cursor-pointer flex-col gap-2 select-none', isCut && 'opacity-60', isDragging && 'opacity-30'), children: [_jsx(FileThumbnail, { filePath: node.path, fileName: node.name, onOpen: open, className: cn('border-border h-[120px] rounded-lg border',
103
+ return (_jsxs(ContextMenu, { children: [_jsx(ContextMenuTrigger, { asChild: true, children: _jsxs("div", { draggable: !isRenaming, onDragStart: handleDragStart, onDragEnd: handleDragEnd, onClick: isRenaming ? undefined : onItemClick, "data-drive-item": node.path, onDoubleClick: isRenaming || !onDoubleClick ? undefined : ownClicks(() => onDoubleClick(node)), className: cn('group relative flex cursor-pointer flex-col gap-2 select-none', isCut && 'opacity-60', isDragging && 'opacity-30'), children: [_jsx(FileThumbnail, { filePath: node.path, fileName: node.name,
104
+ // No preview until the server has the file: a read before the
105
+ // write lands is a 404 the card would keep (D-08).
106
+ deferPreview: uploading, onOpen: open, className: cn('border-border h-[120px] rounded-lg border',
102
107
  // Copied, cut or selected: the focus border plus its soft 15% ring.
103
- (isCut || isCopied || selected) && 'border-ring ring-ring/15 ring-2') }), selectMode && !uploading ? (_jsx(SelectionCheck, { selected: selected, className: "absolute top-2 left-2 z-10" })) : null, uploading ? (_jsx("span", { role: "status", "aria-label": tDrives('uploadingFile', { name: node.name }), className: "bg-popover border-border absolute top-2 left-2 z-10 flex size-7 items-center justify-center rounded-md border shadow-xs", children: _jsx(Loading, { variant: "spokes", className: "size-4" }) })) : null, !isRenaming && (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { onClick: (e) => e.stopPropagation(), "aria-label": tHardcodedUi.raw('i18nComplete.textf8d46c2570e7'), variant: "secondary", size: "icon-sm", className: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100", children: _jsx(MoreVertical, { weight: "bold", className: "size-3.5" }) }) }), _jsx(DropdownMenuContent, { align: "end", className: "w-48", children: _jsx(FileDriveMenuItems, { Item: DropdownMenuItem, Separator: DropdownMenuSeparator, ...fileMenuProps }) })] })), _jsx("div", { className: "flex min-w-0 items-center px-0.5", children: isRenaming ? (_jsx("input", { ref: renameInputRef, type: "text", "aria-label": tHardcodedUi.raw('i18nComplete.text3064d79a295c'), value: renameName, onChange: (e) => setRenameName(e.target.value), onKeyDown: (e) => {
108
+ (isCut || isCopied || selected) && 'border-ring ring-ring/15 ring-2') }), selectMode && !uploading ? (_jsx(SelectionCheck, { selected: selected, className: "absolute top-2 left-2 z-10" })) : null, uploading ? (_jsx("span", { role: "status", "aria-label": tDrives('uploadingFile', { name: node.name }), className: "bg-popover border-border absolute top-2 left-2 z-10 flex size-7 items-center justify-center rounded-md border shadow-xs", children: _jsx(Loading, { variant: "spokes", className: "size-4" }) })) : null, !isRenaming && (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { onClick: (e) => e.stopPropagation(), "aria-label": tHardcodedUi.raw('i18nComplete.textf8d46c2570e7'), variant: "secondary", size: "icon-sm", className: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100", children: _jsx(MoreVertical, { weight: "bold", className: "size-3.5" }) }) }), _jsx(DropdownMenuContent, { align: "end", className: "w-48", children: _jsx(FileDriveMenuItems, { Item: DropdownMenuItem, Separator: DropdownMenuSeparator, ...fileMenuProps }) })] })), _jsx("div", { className: "flex min-w-0 items-center gap-1 px-0.5", children: isRenaming ? (_jsx("input", { ref: renameInputRef, type: "text", "aria-label": tHardcodedUi.raw('i18nComplete.text3064d79a295c'), value: renameName, onChange: (e) => setRenameName(e.target.value), onKeyDown: (e) => {
104
109
  if (e.nativeEvent.isComposing)
105
110
  return;
106
111
  if (e.key === 'Enter')
107
112
  confirmRename();
108
113
  if (e.key === 'Escape')
109
114
  setIsRenaming(false);
110
- }, onBlur: confirmRename, onClick: (e) => e.stopPropagation(), className: "border-primary/50 w-full border-b bg-transparent py-0.5 text-sm outline-none" })) : (_jsx("span", { className: "text-foreground truncate text-sm font-medium", children: node.name })) })] }) }), _jsx(ContextMenuContent, { className: "w-48", children: selection?.selectionMenu(node, ContextMenuItem, ContextMenuSeparator) ?? (_jsxs(_Fragment, { children: [_jsx(SelectMenuItem, { selection: selection, node: node, Item: ContextMenuItem, Separator: ContextMenuSeparator }), _jsx(FileDriveMenuItems, { Item: ContextMenuItem, Separator: ContextMenuSeparator, ...fileMenuProps })] })) })] }));
115
+ }, onBlur: confirmRename, onClick: (e) => e.stopPropagation(), className: "border-primary/50 w-full border-b bg-transparent py-0.5 text-sm outline-none" })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-foreground truncate text-sm font-medium", children: node.name }), _jsx(ManifestIssueMark, { path: node.path, name: node.name })] })) })] }) }), _jsx(ContextMenuContent, { className: "w-48", children: selection?.selectionMenu(node, ContextMenuItem, ContextMenuSeparator) ?? (_jsxs(_Fragment, { children: [_jsx(SelectMenuItem, { selection: selection, node: node, Item: ContextMenuItem, Separator: ContextMenuSeparator }), _jsx(FileDriveMenuItems, { Item: ContextMenuItem, Separator: ContextMenuSeparator, ...fileMenuProps })] })) })] }));
111
116
  });
112
117
  // ─── Main Grid View ─────────────────────────────────────────────────────────
113
- /** Descriptions for elevated system directories */
114
- const ELEVATED_DIR_META = {
115
- '.kortix': { description: 'Workspace config, tasks, context' },
116
- };
117
- export function DriveGridView({ elevatedDirs, dirs, files, onNavigateToDir, onOpenFile, onPreviewFile, onDownload, onDownloadDir, onRename: rawOnRename, onDelete: rawOnDelete, onHistory: rawOnHistory, onCopy: rawOnCopy, onCut: rawOnCut, onDropMove: rawOnDropMove, onDropUpload: rawOnDropUpload, gitStatusMap, clipboardPath, clipboardOperation, isDirDownloading, readOnly = false, isFixed, uploadingPaths, }) {
118
+ export function DriveGridView(props) {
119
+ const { dirs, files, onNavigateToDir, onOpenFile, onPreviewFile, onDownload, onDownloadDir, onHistory, gitStatusMap, clipboardPath, clipboardOperation, isDirDownloading, isFixed, uploadingPaths, } = props;
120
+ const { onRename, onDelete, onCopy, onCut, onDropMove, onDropUpload } = listingWriteHandlers(props);
118
121
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
119
- const onRename = readOnly ? undefined : rawOnRename;
120
- const onDelete = readOnly ? undefined : rawOnDelete;
121
- const onHistory = rawOnHistory;
122
- const onCopy = readOnly ? undefined : rawOnCopy;
123
- const onCut = readOnly ? undefined : rawOnCut;
124
- const onDropMove = readOnly ? undefined : rawOnDropMove;
125
- const onDropUpload = readOnly ? undefined : rawOnDropUpload;
126
- return (_jsxs("div", { className: "space-y-7 p-5", children: [elevatedDirs.length > 0 && (_jsxs("section", { className: "space-y-2", children: [_jsx(SectionHeader, { label: tI18nComplete.raw('text6725e7bbcd28'), count: elevatedDirs.length }), _jsx("div", { className: "grid gap-x-4 gap-y-5", style: { gridTemplateColumns: "repeat(auto-fill, minmax(168px, 1fr))" }, children: elevatedDirs.map((node) => {
127
- const meta = ELEVATED_DIR_META[node.name];
128
- const description = meta
129
- ? tI18nComplete.raw(node.name === '.kortix' ? 'text85231c543c71' : 'text96ef9c0ac0c9')
130
- : undefined;
131
- return (_jsxs("button", { type: "button", onClick: () => onNavigateToDir(node), title: description, className: "group relative flex w-full min-w-0 cursor-pointer flex-col gap-2 text-left select-none", children: [_jsx(DriveFolderThumbnail, { path: node.path, className: "h-[120px]" }), _jsx("span", { className: "text-foreground truncate px-0.5 text-sm font-medium", children: node.name })] }, node.path));
132
- }) })] })), dirs.length > 0 && (_jsxs("section", { className: "space-y-2", children: [_jsx(SectionHeader, { label: tI18nComplete.raw('textc4d6bb200f4c'), count: dirs.length }), _jsx("div", { className: "grid gap-x-4 gap-y-5", style: { gridTemplateColumns: "repeat(auto-fill, minmax(168px, 1fr))" }, children: dirs.map((node) => (_jsx(FolderCard, { node: node, onClick: onNavigateToDir, onDownload: onDownloadDir, isDownloadingItem: isDirDownloading(node.path), onRename: isFixed?.(node.path) ? undefined : onRename, onDelete: isFixed?.(node.path) ? undefined : onDelete, onCopy: onCopy, onCut: isFixed?.(node.path) ? undefined : onCut, onDropMove: onDropMove, onDropUpload: onDropUpload, isCut: clipboardOperation === 'cut' && clipboardPath === node.path, isCopied: clipboardOperation === 'copy' && clipboardPath === node.path }, node.path))) })] })), files.length > 0 && (_jsxs("section", { className: "space-y-2", children: [_jsx(SectionHeader, { label: tI18nComplete.raw('textabc7e9892806'), count: files.length }), _jsx("div", { className: "grid gap-x-4 gap-y-5", style: { gridTemplateColumns: "repeat(auto-fill, minmax(168px, 1fr))" }, children: files.map((node) => (_jsx(FileCard, { node: node, onClick: onPreviewFile, onDoubleClick: onOpenFile, onDownload: onDownload, onRename: onRename, onDelete: onDelete, onHistory: onHistory, onCopy: onCopy, onCut: onCut, gitStatus: gitStatusMap.get(node.path), isCut: clipboardOperation === 'cut' && clipboardPath === node.path, isCopied: clipboardOperation === 'copy' && clipboardPath === node.path, uploading: uploadingPaths?.has(node.path) }, node.path))) })] }))] }));
122
+ return (_jsxs("div", { className: "space-y-7 p-5", children: [dirs.length > 0 && (_jsxs("section", { className: "space-y-2", children: [_jsx(SectionHeader, { label: tI18nComplete.raw('textc4d6bb200f4c'), count: dirs.length }), _jsx("div", { className: "grid gap-x-4 gap-y-5", style: { gridTemplateColumns: "repeat(auto-fill, minmax(168px, 1fr))" }, children: dirs.map((node) => (_jsx(FolderCard, { node: node, onClick: onNavigateToDir, onDownload: onDownloadDir, isDownloadingItem: isDirDownloading(node.path), onRename: isFixed?.(node.path) ? undefined : onRename, onDelete: isFixed?.(node.path) ? undefined : onDelete, onCopy: onCopy, onCut: isFixed?.(node.path) ? undefined : onCut, onDropMove: onDropMove, onDropUpload: onDropUpload, isCut: clipboardOperation === 'cut' && clipboardPath === node.path, isCopied: clipboardOperation === 'copy' && clipboardPath === node.path }, node.path))) })] })), files.length > 0 && (_jsxs("section", { className: "space-y-2", children: [_jsx(SectionHeader, { label: tI18nComplete.raw('textabc7e9892806'), count: files.length }), _jsx("div", { className: "grid gap-x-4 gap-y-5", style: { gridTemplateColumns: "repeat(auto-fill, minmax(168px, 1fr))" }, children: files.map((node) => (_jsx(FileCard, { node: node, onClick: onPreviewFile, onDoubleClick: onOpenFile, onDownload: onDownload, onRename: onRename, onDelete: onDelete, onHistory: onHistory, onCopy: onCopy, onCut: onCut, gitStatus: gitStatusMap.get(node.path), isCut: clipboardOperation === 'cut' && clipboardPath === node.path, isCopied: clipboardOperation === 'copy' && clipboardPath === node.path, uploading: uploadingPaths?.has(node.path) }, node.path))) })] }))] }));
133
123
  }
134
124
  function SectionHeader({ label, count, icon, }) {
135
125
  return (_jsxs("div", { className: "flex w-fit items-center justify-between gap-2 px-1", children: [_jsxs(Label, { className: "text-foreground flex items-center gap-2 text-sm font-medium", children: [icon, label] }), _jsx("span", { className: "text-muted-foreground text-xs tabular-nums", children: count })] }));